alternate approach not so successful

This commit is contained in:
Yehowshua Immanuel 2025-03-25 08:35:17 -04:00
parent e89254ebef
commit 0452f44fbd

View file

@ -36,9 +36,10 @@ mkTagEngine =
methodRetireTagCalledValid :: RWire UIntLog2N(numTags)
methodRetireTagCalledValid <- mkUnsafeRWire
-- methodRetireTagCalledValid <- mkRWireSBR
-- computedTagResult :: BypassWire (Maybe UIntLog2N(numTags))
-- methodRetireTagCalledValid <- mkBypassWire
computedTagResult :: Wire (Maybe UIntLog2N(numTags))
computedTagResult <- mkBypassWire
debugOnce <- mkReg True
@ -93,6 +94,16 @@ mkTagEngine =
(select inUseVec tag) := False
(False, Nothing) -> do action {}
"compute tag": when True ==>
computedTagResult :=
case methodRetireTagCalledValid.wget of
Just tag -> Just tag
Nothing ->
case stackPtr of
Just sampledStackPtr ->
Just |> readReg (select freeStackVec sampledStackPtr)
Nothing -> Nothing
return $
interface TagEngine
@ -100,15 +111,7 @@ mkTagEngine =
requestTag =
do
methodRequestTagCalled.send
case methodRetireTagCalledValid.wget of
Just tag -> do
return |> Just tag
Nothing -> do
return |>
case stackPtr of
Just sampledStackPtr ->
Just |> readReg (select freeStackVec sampledStackPtr)
Nothing -> Nothing
return computedTagResult
retireTag :: UIntLog2N(numTags) -> ActionValue BasicResult
retireTag tag =