Restructured Amaranth code to be able to import sibling modules

This commit is contained in:
2022-01-22 19:28:29 +01:00
parent 7780e14887
commit 4a2d2b4881
91 changed files with 518 additions and 356 deletions

View File

@@ -0,0 +1,19 @@
from amaranth.build import Platform
from amaranth import Signal, Const, Module, Elaboratable
class GetId(Elaboratable):
def __init__(self):
self.request = Signal(16)
self.isGetId = Signal()
pass
def elaborate(self, platform: Platform):
m = Module()
with m.If(self.request == 0):
m.d.comb += self.isGetId.eq(Const(1))
with m.Else():
m.d.comb += self.isGetId.eq(Const(0))
return m