Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions dau_sim/integrations/cocotb.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,19 @@
from __future__ import annotations

from collections.abc import Mapping, Sequence
from dataclasses import dataclass
from pathlib import Path

from pydantic import BaseModel, ConfigDict

DEFAULT_BUILD_ARGS = ("--timing", "-Wno-fatal")


@dataclass(frozen=True)
class CocotbProfile:
class CocotbProfile(BaseModel):
"""A registered cocotb bench: HDL sources, the toplevel they build,
and the cocotb test module that drives it."""

model_config = ConfigDict(frozen=True)

name: str
sources: tuple[Path, ...]
hdl_toplevel: str
Expand Down
8 changes: 5 additions & 3 deletions dau_sim/integrations/verilator_profiles.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
from __future__ import annotations

from dataclasses import dataclass
from pathlib import Path

from pydantic import BaseModel, ConfigDict


class VerilatorProfile(BaseModel):
model_config = ConfigDict(frozen=True)

@dataclass(frozen=True)
class VerilatorProfile:
name: str
sources: tuple[Path, ...]
top_module: str
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ classifiers = [
dependencies = [
"amaranth",
"csp",
"pydantic",
"pyslang",
"typer",
"rich",
Expand Down
Loading