From e89254ebef8b5b780e79faec25752b4cab71fbfd Mon Sep 17 00:00:00 2001 From: Yehowshua Immanuel Date: Tue, 25 Mar 2025 08:03:04 -0400 Subject: [PATCH] eliminate warnings --- bs/TagEngine.bs | 24 ++++++++++-------------- bs/Top.bs | 7 +------ 2 files changed, 11 insertions(+), 20 deletions(-) diff --git a/bs/TagEngine.bs b/bs/TagEngine.bs index 134e2c8..edca9fa 100644 --- a/bs/TagEngine.bs +++ b/bs/TagEngine.bs @@ -37,9 +37,10 @@ mkTagEngine = methodRetireTagCalledValid :: RWire UIntLog2N(numTags) methodRetireTagCalledValid <- mkUnsafeRWire - debugOnce <- mkReg True + -- computedTagResult :: BypassWire (Maybe UIntLog2N(numTags)) + -- methodRetireTagCalledValid <- mkBypassWire - tt :: Reg Bool <- mkReg False + debugOnce <- mkReg True addRules $ rules @@ -52,15 +53,15 @@ mkTagEngine = "update stack pointer": when True ==> do - stackPtr := + stackPtr := case (methodRequestTagCalled, methodRetireTagCalledValid.wget) of - (True, Just tag) -> stackPtr + (True, Just _) -> stackPtr (True, Nothing) -> case stackPtr of Just 0 -> Nothing Just sampledStackPtr -> Just |> sampledStackPtr - 1 Nothing -> Nothing - (False, Just tag) -> + (False, Just _) -> case stackPtr of Just sampledStackPtr -> Just |> sampledStackPtr + 1 Nothing -> Nothing @@ -69,7 +70,7 @@ mkTagEngine = "update free stack": when True ==> do case (methodRequestTagCalled, methodRetireTagCalledValid.wget) of - (True, Just tag) -> do action {} + (True, Just _) -> do action {} (True, Nothing) -> do action {} (False, Just tag) -> do case stackPtr of @@ -82,7 +83,7 @@ mkTagEngine = "update in use": when True ==> do case (methodRequestTagCalled, methodRetireTagCalledValid.wget) of - (True, Just tag) -> do action {} + (True, Just _) -> do action {} (True, Nothing) -> case stackPtr of Just sampledStackPtr -> do @@ -92,7 +93,6 @@ mkTagEngine = (select inUseVec tag) := False (False, Nothing) -> do action {} - counter <- mkReg(0 :: UIntLog2N(numTags)) return $ interface TagEngine @@ -104,9 +104,9 @@ mkTagEngine = Just tag -> do return |> Just tag Nothing -> do - return |> + return |> case stackPtr of - Just sampledStackPtr -> + Just sampledStackPtr -> Just |> readReg (select freeStackVec sampledStackPtr) Nothing -> Nothing @@ -116,10 +116,6 @@ mkTagEngine = let tagValid = tag < reifiedNumTags tagInUse = readReg (select inUseVec tag) - nextStackPtrUint = - case stackPtr of - Nothing -> 0 - Just n -> n + 1 if (tagValid && tagInUse) then do methodRetireTagCalledValid.wset tag diff --git a/bs/Top.bs b/bs/Top.bs index 5541bf6..373589c 100644 --- a/bs/Top.bs +++ b/bs/Top.bs @@ -68,8 +68,6 @@ mkTop = do bus :: Bus <- mkBus busClient :: BusClient <- mkBusClient - let a :: List Integer = 1 :> 2 :> Nil - b = length a persistLed :: Reg (Bit 8) <- mkReg 0 messageM $ "Hallo!!" + (realToString 5) @@ -102,10 +100,7 @@ mkTop = do mkSim :: Module Empty mkSim = do - let cfg :: BRAM_Configure = defaultValue - - tagEngineTester :: Empty <- mkTagEngineTester - count :: Reg (UInt 4) <- mkReg 0; + _ :: Empty <- mkTagEngineTester initCFunctions :: Reg Bool <- mkReg False; core :: Core FCLK <- mkCore;