Qsys System Design Tutorial

ID 683378
Date 5/04/2015
Public
Document Table of Contents

1.4.1.5. Add a Two-to-One Streaming Multiplexer

You add a two-to-one streaming multiplexer between the pattern generators and the pattern writer because the system has two pattern sources, and the pattern writer component accepts data only from one streaming source. The two-to-one streaming soft programmable multiplexer IP core allows the processor to select which pattern to send to the pattern writer.

The two-to-one streaming multiplexer component has the following interfaces:

  • Two streaming inputs: st_input_A and st_input_B.
  • One streaming output: st_output.
  • One csr slave interface, which the processor controls to select whether input A or input B is sent to the streaming output.

The custom pattern generator connects to input A, and the PRBS pattern generator connects to input B.

  1. In the IP Catalog, expand Memory Test Microcores, and then double-click Two-to-one Streaming Mux.
  2. In the parameter editor, accept the default parameters, and then click Finish.
  3. Rename the instance to two_to_one_st_mux.
  4. Set the two_to_one_st_mux clock to clk_0.
  5. Connect the two_to_one_st_mux st_input_A interface to the custom_pattern_generator st_pattern_output interface.
  6. Connect the two_to_one_st_mux st_input_B interface to the prbs_pattern_generator st_pattern_output interface.
  7. Connect the two_to_one_st_mux csr interface to the mm_bridge m0 interface.
  8. Export the two_to_one_st_mux st_output interface with the name st_data_out.
  9. Assign the two_to_one_st_mux csr interface to a base address of 0x0440, which is a base address higher than the end address of the prbs_pattern_generator csr interface at base address 0x0420

The output of the two-to-one streaming multiplexer carries the pattern data from either the custom pattern generator or the PRBS pattern generator, to the pattern writer. The data, from the output of the two-to-one streaming multiplexer, achieves a throughput of one word per clock cycle.