From 48fd14a50107128278ad38c60e22a361ed4093b3 Mon Sep 17 00:00:00 2001 From: Cesar Strauss Date: Wed, 27 May 2020 07:06:37 -0300 Subject: [PATCH] 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. --- src/soc/experiment/compalu_multi.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) 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) -- 2.30.2