From: Cesar Strauss Date: Wed, 27 May 2020 10:06:37 +0000 (-0300) Subject: Move test case parameters to an "operation" member function X-Git-Tag: div_pipeline~800 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=48fd14a50107128278ad38c60e22a361ed4093b3;p=soc.git Move test case parameters to an "operation" member function This allows running several operation cases in succession, without needing to restart the processes, losing state and trace history. I expect the need to synchronize the processes for each new operation. --- diff --git a/src/soc/experiment/compalu_multi.py b/src/soc/experiment/compalu_multi.py index ec07a64e..913dd8e5 100644 --- a/src/soc/experiment/compalu_multi.py +++ b/src/soc/experiment/compalu_multi.py @@ -379,10 +379,7 @@ def test_compunit(): class CompUnitParallelTest: - def __init__(self, dut, - # TODO add a, b, expected_o, and other parameters such as imm_mode, zero - # operand etc. - ): + def __init__(self, dut): self.dut = dut # Operation cycle should not take longer than this: @@ -393,9 +390,15 @@ class CompUnitParallelTest: self.MIN_BUSY_LOW = 5 def driver(self): - print("Begin parallel test.") + yield from self.operation() + + # TODO add a, b, expected_o, and other parameters such as imm_mode, zero + # operand etc. + def operation(self): + yield from self.issue() + def issue(self): # issue_i starts inactive yield self.dut.issue_i.eq(0)