Restructured Amaranth code to be able to import sibling modules
This commit is contained in:
19
re-bba/ReBba/ExiDecoders/GetId.py
Normal file
19
re-bba/ReBba/ExiDecoders/GetId.py
Normal 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
|
||||
Reference in New Issue
Block a user