Skip to content

Commit

Permalink
Fix comments from review.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lekcyjna committed Oct 23, 2023
1 parent 60c7cf4 commit d479466
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
9 changes: 5 additions & 4 deletions test/common/functions.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
from amaranth import *
from typing import TYPE_CHECKING
from amaranth.hdl.ast import Statement
from amaranth.sim.core import Command
from typing import TypeVar, Any, Generator, TypeAlias
from coreblocks.utils._typing import RecordValueDict, RecordIntDict


if TYPE_CHECKING:
from .testbenchio import TestGen
T = TypeVar("T")
TestGen: TypeAlias = Generator[Command | Value | Statement | None, Any, T]


def set_inputs(values: RecordValueDict, field: Record) -> "TestGen[None]":
Expand Down
9 changes: 2 additions & 7 deletions test/common/testbenchio.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
from amaranth import *
from amaranth.hdl.ast import Statement
from amaranth.sim.core import Command
from amaranth.sim import Settle, Passive
from typing import Any, Generator, TypeVar, Optional, Callable
from typing import Optional, Callable
from transactron.lib import AdapterBase
from transactron.core import ValueLike, SignalBundle
from transactron._utils import method_def_helper
from coreblocks.utils._typing import RecordIntDictRet, RecordValueDict, RecordIntDict
from .functions import set_inputs, get_outputs

T = TypeVar("T")
TestGen = Generator[Command | Value | Statement | None, Any, T]
from .functions import set_inputs, get_outputs, TestGen


class TestbenchIO(Elaboratable):
Expand Down

0 comments on commit d479466

Please sign in to comment.