Beispiel #1
0
 def test_core_output_stream_contract(self):
     input_stream = PacketizedStream(32)
     device_input_stream: BasicStream
     def core_producer(i):
         nonlocal device_input_stream
         device_input_stream = i
         return LegalStreamSource(i.clone())
     dut = GenericMetadataWrapper(input_stream, core_producer)
     verify_stream_output_contract(dut, stream_output=device_input_stream, support_modules=(LegalStreamSource(input_stream),))
Beispiel #2
0
 def test_burster_stream_output(self):
     i = BasicStream(32)
     verify_stream_output_contract(AxiReaderBurster(i),
                                   support_modules=(LegalStreamSource(i), ))
Beispiel #3
0
 def test_reader_stream_output(self):
     axi = AxiEndpoint(addr_bits=32, data_bits=64, lite=False, id_bits=12)
     verify_stream_output_contract(AxiReader(BasicStream(32), axi),
                                   support_modules=(LegalStreamSource(
                                       axi.read_data), ))
Beispiel #4
0
 def test_output_stream_contract(self):
     input_stream = PacketizedStream(32)
     dut = LastWrapper(input_stream, lambda i: BufferedSyncStreamFIFO(i, 10), last_rle_bits=3)
     verify_stream_output_contract(dut, support_modules=(LegalStreamSource(input_stream),))
Beispiel #5
0
 def test_output_stream_contract(self):
     input_stream = PacketizedStream(32)
     dut = GenericMetadataWrapper(input_stream, lambda i: BufferedSyncStreamFIFO(i, 10))
     verify_stream_output_contract(dut, support_modules=(LegalStreamSource(input_stream),))
Beispiel #6
0
 def test_legal_stream_source(self):
     verify_stream_output_contract(LegalStreamSource(BasicStream(32)))
Beispiel #7
0
 def test_catch_dont_wait_for_ready(self):
     with self.assertRaises(AssertionError):
         verify_stream_output_contract(
             BrokenStreamSource("dont_wait_for_ready"))
Beispiel #8
0
 def test_catch_changing_payload(self):
     with self.assertRaises(AssertionError):
         verify_stream_output_contract(
             BrokenStreamSource("payload_unsteady"))
Beispiel #9
0
 def test_catch_valid_depends_on_ready(self):
     with self.assertRaises(AssertionError):
         verify_stream_output_contract(BrokenStreamSource("valid_is_ready"))
Beispiel #10
0
 def test_output_stream_properties(self):
     input = VariableWidthStream(32)
     verify_stream_output_contract(BitStuffer(input, 32), support_modules=(LegalStreamSource(input),))