From 6a48a6a96fed96b7492fdc9da30f86135d535e60 Mon Sep 17 00:00:00 2001 From: Cesar Strauss Date: Thu, 19 Nov 2020 07:38:11 -0300 Subject: [PATCH] Explain the test cases --- src/soc/experiment/test/test_compalu_multi.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/soc/experiment/test/test_compalu_multi.py b/src/soc/experiment/test/test_compalu_multi.py index 4c6cbe6d..489ad9ed 100644 --- a/src/soc/experiment/test/test_compalu_multi.py +++ b/src/soc/experiment/test/test_compalu_multi.py @@ -262,8 +262,19 @@ def scoreboard_sim_fsm(dut, producers, consumers): assert (yield producers[1].count) == op_count assert (yield consumers[0].count) == op_count + # 13 >> 2 = 3 + # operand 1 arrives immediately + # operand 2 arrives after operand 1 + # write data is accepted immediately yield from op_sim_fsm(13, 2, 1, 3, [0, 2, 0]) + # 3 << 4 = 48 + # operand 2 arrives immediately + # operand 1 arrives after operand 2 + # write data is accepted after some delay yield from op_sim_fsm(3, 4, 0, 48, [2, 0, 2]) + # 21 << 0 = 21 + # operands 1 and 2 arrive at the same time + # write data is accepted after some delay yield from op_sim_fsm(21, 0, 0, 21, [1, 1, 1]) -- 2.30.2