Tag engine building
This commit is contained in:
parent
ac48f5a4ad
commit
5f2d9456ae
|
@ -14,6 +14,9 @@ interface (TagEngine :: # -> *) numTags =
|
|||
requestTag :: ActionValue UIntLog2N(numTags)
|
||||
retireTag :: UIntLog2N(numTags) -> Action
|
||||
|
||||
instance FShow (Reg (Tag numTags)) where
|
||||
fshow value = fshow (readReg value)
|
||||
|
||||
initTagNext :: Integer -> Module(Reg (Tag numTags))
|
||||
initTagNext i = do
|
||||
t :: Reg (Tag numTags)
|
||||
|
@ -45,17 +48,14 @@ mkTagEngine =
|
|||
|
||||
fileHandle :: Handle <- openFile "compile.log" WriteMode
|
||||
|
||||
cycle <- mkReg 0
|
||||
end_cycle <- mkReg 4
|
||||
|
||||
addRules (simulate_for cycle end_cycle)
|
||||
debugOnce <- mkReg True
|
||||
|
||||
addRules $
|
||||
rules
|
||||
"display": when True ==>
|
||||
"display": when (debugOnce == True) ==>
|
||||
do
|
||||
$display (fshow (tagVec !! 0))
|
||||
$finish
|
||||
$display (fshow tagVec)
|
||||
debugOnce := False
|
||||
|
||||
counter <- mkReg(0 :: UIntLog2N(numTags))
|
||||
return $
|
||||
|
|
Loading…
Reference in a new issue