From: Cesar Strauss Date: Thu, 31 Dec 2020 20:43:34 +0000 (-0300) Subject: Don't use OP_NOP for zero-delay subtraction X-Git-Tag: 24jan2021_ls180~49 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1c6dc3ad92965c85ba38ba1e5f721bc7daa82f09;p=soc.git Don't use OP_NOP for zero-delay subtraction We are going to implement an actual NOP --- diff --git a/src/soc/experiment/alu_hier.py b/src/soc/experiment/alu_hier.py index 49b0db62..39a4be95 100644 --- a/src/soc/experiment/alu_hier.py +++ b/src/soc/experiment/alu_hier.py @@ -468,7 +468,7 @@ def alu_sim(dut): # test zero-delay ALU # don't have OP_SUB, so use any other - result = yield from run_op(dut, 5, 3, MicrOp.OP_NOP) + result = yield from run_op(dut, 5, 3, MicrOp.OP_CMP) print("alu_sim sub", result) assert (result == 2) diff --git a/src/soc/experiment/test/test_compalu_multi.py b/src/soc/experiment/test/test_compalu_multi.py index 3e295935..ed97189d 100644 --- a/src/soc/experiment/test/test_compalu_multi.py +++ b/src/soc/experiment/test/test_compalu_multi.py @@ -451,7 +451,7 @@ def scoreboard_sim(op): # In the test ALU, any operation other than ADD, MUL, EXTS or SHR # is zero-delay, and do a subtraction. # 5 - 2 = 3 - yield from op.issue([5, 2], MicrOp.OP_NOP, [3], + yield from op.issue([5, 2], MicrOp.OP_CMP, [3], src_delays=[0, 1], dest_delays=[2]) # test all combinations of masked input ports # sign_extend(0x80) = 0xFF80