From 91fd2a9cefa71bb771eec3f353d9aeb4fee5f3b3 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Mon, 1 Jun 2020 18:57:35 +0100 Subject: [PATCH] argh - need to zero the src_i input after "Read" is actioned --- src/soc/fu/compunits/test/test_compunit.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/soc/fu/compunits/test/test_compunit.py b/src/soc/fu/compunits/test/test_compunit.py index 9970c2db..08a704dc 100644 --- a/src/soc/fu/compunits/test/test_compunit.py +++ b/src/soc/fu/compunits/test/test_compunit.py @@ -33,6 +33,7 @@ def set_cu_input(cu, idx, data): print ("rd_rel %d wait HI" % idx, rd_rel_o) yield yield cu.rd.go[idx].eq(0) + yield cu.src_i[idx].eq(0) def get_cu_output(cu, idx, code): @@ -168,6 +169,11 @@ class TestRunner(FHDLTestCase): fname = find_ok(wrok.fields) yield getattr(wrok, fname).eq(0) + # first set inputs to zero + for idx in range(cu.n_src): + cu_in = cu.get_in(idx) + yield cu_in.eq(0) + # set inputs into CU rd_rel_o = yield cu.rd.rel wr_rel_o = yield cu.wr.rel -- 2.30.2