re-bba-rb/re-bba/ReBba/Components/ExiDecoder.py

23 lines
510 B
Python

from amaranth.build import Platform
from amaranth import *
from ExiDecoders.GetId import GetId
class ExiDecoder(Elaboratable):
def __init__(self):
#ports
self.request = Signal(16)
self.request_type = Signal(1)
#state
def elaborate(self, platform: Platform):
m = Module()
getId = GetId()
m.submodules += getId
m.d.comb += getId.request.eq(self.request)
m.d.comb += self.request_type[0].eq(getId.isGetId)
return m