Visible to Intel only — Ixiasoft
Visible to Intel only — Ixiasoft
3.7.5.1.3. Add Memory Master Components
Memory masters access the SDRAM controller by writing the test pattern to the memory and reading the pattern back for validation. The RAM test controller accepts commands from the processor and controls the memory masters. Each command contains a start address, test length in bytes, and memory block size in bytes. The RAM test controller segments the commands into smaller block transfers and issues the commands to the read and write masters independently via streaming connections.
When the pattern reader or writer components complete a block transfer, they signal to the RAM test controller that they are ready for another command. The RAM test controller issues the block-sized commands independently, which minimizes the number of idle cycles between memory transfers. The RAM test controller also ensures that the pattern reader never overtakes the pattern writer with respect to the memory locations it is testing, otherwise data corruption occurs.
The SDRAM controller is parameterized to use a local maximum burst length of 2. The pattern reader and writer components are also configured to match this burst length to maximize the memory bandwidth.
Add a Pattern Writer Component
- In the IP Catalog, double-click Pattern Writer from the Memory Test Microcores group.
- In the parameter editor, turn on Burst Enable.
- Ensure that the Maximum Burst Count is 2.
- Ensure that Enable Burst Re-alignment is turned on.
- To accept the other default parameters, click Finish.
- Rename the instance to pattern_writer.
- Set the pattern_writer clock to clk_0.
- Connect the pattern_writer st_data interface to the pattern_generator_subsystem st_data_out interface.
- Export the pattern_writer mm_data interface with the name write_master.
Add a Pattern Reader Component
- In the IP Catalog, double-click Pattern Reader from the Memory Test Microcores group.
- n the parameter editor, turn on Burst Enable.
- Ensure the Maximum Burst Count is 2.
- Ensure that Enable Burst Re-alignment is turned on.
- To accept the other default parameters, click Finish.
- Rename the instance to pattern_reader.
- Set the pattern_reader clock to clk_0.
- Connect the pattern_reader st_data interface to the pattern_checker_subsystem st_data_in interface.
- Export the pattern_reader mm_data interface with the name read_master.
Add a RAM Test Controller
- In the IP Catalog, double-click RAM Test Controller from the Memory Test Microcores group.
- In the parameter editor, click Finish to accept the default parameters.
- Rename the instance to ram_test_controller.
- Set the ram_test_controller clock to clk_0.
- Connect the ram_test_controller write_command interface to the pattern_writer_command interface.
- Connect the ram_test_controller read_command interface to the pattern_reader_command interface.
- Connect the ram_test_controller csr interface to the mm_bridge m0 interface.
Do not use the Generation tab at this point in the tutorial to generate HDL code for these subsystems. You must generate files for the entire top-level system, which includes all the subsystems. The batch script provided for you to program the device requires that only one system is generated in the project directory. The top-level design includes a Nios® II subsystem, and the Nios® II software build tools require the SOPC Information File (.sopcinfo) to be generated for the top-level design. If there are multiple .sopcinfo files, the batch script to program the device fails with an error from the software build tools.