diff --git a/power_fv/__init__.py b/power_fv/__init__.py index 45b5fd1..b55b1ca 100644 --- a/power_fv/__init__.py +++ b/power_fv/__init__.py @@ -1,2 +1,10 @@ from importlib import metadata __version__ = metadata.version(__package__) + + +from .dut import * + + +__all__ = [ + "Interface", +] diff --git a/power_fv/dut.py b/power_fv/dut.py new file mode 100644 index 0000000..ba071ce --- /dev/null +++ b/power_fv/dut.py @@ -0,0 +1,22 @@ +from amaranth import * + + +__all__ = ["Interface"] + + +class Interface(Record): + """POWER-FV interface. + + The interface between the formal testbench and the processor-under-test. + + Attributes + ---------- + stb : Signal + Instruction strobe. Asserted when the processor retires an instruction. Other signals are + only valid when ``stb`` is asserted. + """ + def __init__(self, *, name=None, src_loc_at=0): + layout = [ + ("stb", 1), + ] + super().__init__(layout, name=name, src_loc_at=1 + src_loc_at)