re-bba-rb/re-bba/ReBba/ExiDecoders/GetId.py

19 lines
476 B
Python

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