Qsys System Design Tutorial

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

1.5.2. Complete the Top-Level System

  1. In Qsys, open the top_system.qsys file from the tt_qsys_design\quartus_ii_projects_for_boards\<development_board> directory.
    The top-level system is set up for your development board, with an external clock source, a processor system, and an SDRAM controller. You can view the clocks in top-level system on the Clock Settings tab, and the partially-completed system connections on the System Contents tab.
  2. In the IP Catalog, double-click memory_tester_system from the System group.
  3. Click Finish to accept the default parameters, and to add the memory tester system to the top-level system.
  4. Rename the system to memory_tester_subsystem.
  5. On the System Contents tab, use the arrows to move the memory_tester_subsystem up between the cpu_subsystem and the sdram.
    Since the cpu_subsystem controls the memory_tester_subsystem, and the memory_tester_subsystem controls the sdram, this positioning allows you to more easily visualize system performance.
  6. Set the memory_tester_subsystem clk to either the sdram_sysclk (for ALTMEMPHY-based designs), or sdram_afi_clk (for UniPHY-based designs).
    Some boards have an FPGA and SDRAM device that use either the Altera DDR or DDR2 SDRAM Controller with ALTMEMPHY; others use the Altera DDR3 SDRAM controller with UniPHY.
  7. Connect the memory_tester_subsystem reset interface to the ext_clk clk_reset interface.
  8. Connect the memory_tester_subsystem reset interface to the cpu_subsystem cpu_jtag_debug_reset interface.
    This design exports the Nios II processor JTAG debug reset output interface, jtag_debug_module_reset, from the cpu_subsystem with the interface name cpu_ jtag_debug_reset. The design must connect this Nios II reset output to any component reset inputs that require resetting by the Nios II processor code or JTAG interface, and also to the Nios II processor's reset input interface. The cpu_subsystem cpu_reset interface connects to the Nios II processor's reset input interface. The top_level.qsys file connects the cpu_jtag_debug_reset interface to the cpu_reset interface.
  9. Connect the memory_tester_subsystem write_master and read_master interfaces to either the sdram s1 interface (for ALTMEMPHY-based designs), or sdram avl interface (for UniPHY-based designs).
  10. Connect the memory_tester_subsystem slave interface to the cpu_subsystem master interface.
  11. Maintain the base addresses of 0x0 for the memory_tester_subsystem slave interface, and for either the sdram s1 interface (for ALTMEMPHY-based designs), or sdram avl interface (for UniPHY-based designs).

The two slave interfaces can use the same address map range because different masters control them. The cpu_subsystem master interface controls the memory_tester_subsystem, and the memory_tester_subsystem write_master and read_master interfaces control the sdram interface.