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