Preliminary check of the alu protocol
authorCesar Strauss <cestrauss@gmail.com>
Wed, 3 Jun 2020 01:16:07 +0000 (22:16 -0300)
committerCesar Strauss <cestrauss@gmail.com>
Wed, 3 Jun 2020 01:18:01 +0000 (22:18 -0300)
Still need to check that the operand to the alu is held stable.
For now, it's more like a placeholder of what will become the full check.

src/soc/experiment/test/test_compalu_multi.py

index c92ceb42f105ee02c0e41445cc8b7f357aa68425..8796a6101c8dfe29d82e22b57349469fb33fcbd6 100644 (file)
@@ -270,6 +270,11 @@ class CompUnitParallelTest:
         # assert go for one cycle, passing along the operand value
         yield self.dut.rd.go[rd_idx].eq(1)
         yield self.dut.src_i[rd_idx].eq(self.operands[rd_idx])
+        # check that the operand was sent to the alu
+        # TODO: Properly check the alu protocol
+        yield Settle()
+        alu_input = yield self.dut.get_in(rd_idx)
+        assert alu_input == self.operands[rd_idx]
         yield
 
         # rel must keep high, since go was inactive in the last cycle