implement_Bus_alt1 #16

Merged
Yehowshua merged 23 commits from implement_Bus_alt1 into main 2025-04-16 22:00:14 +00:00
Showing only changes of commit 628319709e - Show all commits

View file

@ -19,7 +19,7 @@ busRequestToAddr req = case req of
BusWriteRequest (WriteRequest addr _) -> addr
dummyRule :: Rules
dummyRule =
dummyRule =
rules
"test rule": when True ==> do
$display "test rule"
@ -32,14 +32,18 @@ mkBus serverMap = do
tagEngineByClientVec :: Vector numClients (TagEngine inFlightTransactions)
tagEngineByClientVec <- replicateM mkTagEngine
-- There are `numClients` clients, each of which needs its own
-- arbiter as there are up to `numServer` servers that may wish
-- to submit a response to a given client.
clientArbiters :: Vector numClients (Arbiter.Arbiter_IFC numServers)
clientArbiters <- replicateM (mkArbiter False)
-- There are `numClients` clients, each of which needs its own arbiter as
-- there are up to `numServer` servers that may wish to submit a response
-- to a given client. Furthermore the rule that routes client requests to
-- servers makes for another potential requestor as it may determine that
-- a request is unmappable and instead opt to form and submit a
-- `BusError UnMapped` response directly to a client response arbiter. Thus
-- we must arbit between a total of `numServers + 1` requestors.
clientResponseArbiter :: Vector numClients (Arbiter.Arbiter_IFC (TAdd numServers 1))
clientResponseArbiter <- replicateM (mkArbiter False)
serverArbiters :: Vector numServers (Arbiter.Arbiter_IFC numClients)
serverArbiters <- replicateM (mkArbiter False)
serverRequestArbiter :: Vector numServers (Arbiter.Arbiter_IFC numClients)
serverRequestArbiter <- replicateM (mkArbiter False)
dummyVar :: Reg(Bool)
dummyVar <- mkReg False
@ -60,7 +64,7 @@ mkBus serverMap = do
in
rules
"request": when True ==> do
let
let
clientRequest :: TaggedBusRequest inFlightTransactions
clientRequest = selectedClientRequestQueue.first