Cyclone® V Hard Processor System Technical Reference Manual

ID 683126
Date 8/28/2023
Public
Document Table of Contents

30.6.1. HPS Memory Interface Simulation

The HPS component provides a complete simulation model of the HPS memory interface controller and PHY, with cycle-level accuracy, comparable to the simulation models for the FPGA memory interface.
There are three simulation modes:
  • Skip-cal - In the simulation, the memory comes up already calibrated.
  • Quick-cal - The calibration process is sped up so that you do not have to wait so long into the simulation to start reading or writing memory.
  • Full-cal - The entire calibration sequence is simulated. This means that you can be waiting a while before the memory controller is online.

The simulation model supports only the skip-cal simulation mode. Quick-cal and full-cal are not supported. Although an example design is not provided, you can create a test design by adding the traffic generator component to your design using Platform Designer (Standard). Also, the HPS simulation model does not use external memory pins to connect to the DDR memory model; instead, the memory model is incorporated directly into the HPS SDRAM interface simulation modules.

One of the various ways you can simulate the FPGA-to-SDRAM interfaces is by:

  • Bring the interfaces out of reset; otherwise, transactions cannot occur.
  • Connect the H2F reset to the F2H port resets.
  • Add a stage to your testbench to assert and deassert the H2F reset in the HPS.

The appropriate Verilog code is shown below:

Initial
begin
   // Assert reset
<base name>.hps.fpga_interfaces.h2f_reset_inst.reset_assert();
   // Delay
   #1
   // Deassert reset
<base name>.hps.fpga_interfaces.h2f_reset_inst.reset_deassert();
end