reduce noise in tag engine unit test as well as make results apparent

This commit is contained in:
Yehowshua Immanuel 2025-04-19 22:04:38 -04:00
parent 2d9bc945c5
commit 89664a01f6
3 changed files with 79 additions and 9 deletions

View file

@ -19,18 +19,20 @@ mkTagEngineTester = do
requestTagAction =
do
tag <- tagEngine.requestTag
$display $time " got tag : " (fshow tag)
-- $display $time " got tag : " (fshow tag)
action {}
retireTagAction :: UInt 3 -> Action
retireTagAction tag =
do
res <- tagEngine.retireTag tag
$display $time " retiring tag : " (fshow tag) " " (fshow res)
-- $display $time " retiring tag : " (fshow tag) " " (fshow res)
action {}
in
actionSeq $
do
$display "=== TESTING TagEngine ==="
let expectedTag = 4
tag <- tagEngine.requestTag
dynamicAssert (tag == expectedTag) ""
@ -59,10 +61,11 @@ mkTagEngineTester = do
dynamicAssert (tag == expectedTag) ""
|> do
retireTagAction 2
let expectedTag = 3
let expectedTag = 4
tag <- tagEngine.requestTag
dynamicAssert (tag == expectedTag) ""
|> do
$display "=== PASSED ==="
terminateSimNoError
addRules $