From: Cesar Strauss Date: Thu, 19 Nov 2020 10:38:11 +0000 (-0300) Subject: Explain the test cases X-Git-Tag: 24jan2021_ls180~88 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6a48a6a96fed96b7492fdc9da30f86135d535e60;p=soc.git Explain the test cases --- 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])