Bug 341 - unit tests needed for soc.fu.compunits (shared with soc.fu.*/test_pipe_caller.py)
Summary: unit tests needed for soc.fu.compunits (shared with soc.fu.*/test_pipe_caller...
Status: RESOLVED FIXED
Alias: None
Product: Libre-SOC's first SoC
Classification: Unclassified
Component: Source Code (show other bugs)
Version: unspecified
Hardware: PC Linux
: --- enhancement
Assignee: Luke Kenneth Casson Leighton
URL:
Depends on: 318 305
Blocks:
  Show dependency treegraph
 
Reported: 2020-05-23 23:50 BST by Luke Kenneth Casson Leighton
Modified: 2020-06-30 17:00 BST (History)
1 user (show)

See Also:
NLnet milestone: ---
total budget (EUR) for completion of task and all subtasks: 0
budget (EUR) for this task, excluding subtasks' budget: 0
parent task for budget allocation:
child tasks for budget allocation:
The table of payments (in EUR) for this task; TOML format:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Luke Kenneth Casson Leighton 2020-05-23 23:50:53 BST
we need some test infrastructure that does exactly the same as
every single one of the test_pipe_caller.py unit tests, except
using ALUFunctionUnit, CRFunctionUnit etc. instead of
ALUBasePipe+ALUPipeSpec, CRBasePipe+CRPipeSpec etc.

the only pieces of code that need to change to achieve this is
how the inputs are set up, and the outputs obtained.

this basically means generalising each test_pipe_caller.py
TestRunner.run_all().process() function, so that instead
of explicitly targetting the alu instance:

                    vld = yield alu.n.valid_o
                    while not vld:
                        yield
                        vld = yield alu.n.valid_o
                    yield
                    alu_out = yield alu.n.data_o.o

instead it allows a parameterised selection of  the MultiCompUnit API /
data-synchronisation method (see experiment/compalu_multi.py tests):

    yield dut.issue_i.eq(1)
    yield
    yield dut.issue_i.eq(0)
    yield
    yield dut.rd.go.eq(0b11)
    while True:
        yield
        rd_rel_o = yield dut.rd.rel
        print ("rd_rel", rd_rel_o)
        if rd_rel_o:
            break

(actually, this ties in with Cesar's task, somewhat).