From: Luke Kenneth Casson Leighton Date: Wed, 10 Apr 2019 07:51:34 +0000 (+0100) Subject: add FIFO chain-test X-Git-Tag: ls180-24jan2020~1267 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=40badcf87eb03200ef5383aba99f04f06d72a6ce;p=ieee754fpu.git add FIFO chain-test --- diff --git a/src/add/test_buf_pipe.py b/src/add/test_buf_pipe.py index fcb1ca31..b695e537 100644 --- a/src/add/test_buf_pipe.py +++ b/src/add/test_buf_pipe.py @@ -769,6 +769,26 @@ class FIFOTest16(FIFOtest): FIFOtest.__init__(self, 16, 2) +###################################################################### +# Test 21 +###################################################################### + +class ExampleFIFOPassThruPipe1(ControlBase): + + def elaborate(self, platform): + m = ControlBase._elaborate(self, platform) + + pipe1 = FIFOTest16() + pipe2 = ExamplePassAdd1Pipe() + + m.submodules.pipe1 = pipe1 + m.submodules.pipe2 = pipe2 + + m.d.comb += self.connect([pipe1, pipe2]) + + return m + + ###################################################################### # Test 997 ###################################################################### @@ -860,7 +880,7 @@ class ExampleBufUnBufPipe(ControlBase): # Unit Tests ###################################################################### -num_tests = 100 +num_tests = 10 if __name__ == '__main__': print ("test 1") @@ -1054,6 +1074,18 @@ if __name__ == '__main__': with open("test_fifo20.il", "w") as f: f.write(vl) + print ("test 21") + dut = ExampleFIFOPassThruPipe1() + data = data_chain1() + test = Test5(dut, test12_resultfn, data=data) + run_simulation(dut, [test.send, test.rcv], vcd_name="test_fifopass21.vcd") + ports = [dut.p.i_valid, dut.n.i_ready, + dut.n.o_valid, dut.p.o_ready] + \ + [dut.p.i_data] + [dut.n.o_data] + vl = rtlil.convert(dut, ports=ports) + with open("test_fifopass21.il", "w") as f: + f.write(vl) + print ("test 997") dut = ExampleBufPassThruPipe2() data = data_chain1()