From 1c6dc3ad92965c85ba38ba1e5f721bc7daa82f09 Mon Sep 17 00:00:00 2001 From: Cesar Strauss Date: Thu, 31 Dec 2020 17:43:34 -0300 Subject: [PATCH] Don't use OP_NOP for zero-delay subtraction We are going to implement an actual NOP --- src/soc/experiment/alu_hier.py | 2 +- src/soc/experiment/test/test_compalu_multi.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 -- 2.30.2