Hybrid Memory Cube Controller Design Example User Guide
Hybrid Memory Cube Controller Design Example Quick Start Guide
To help you understand how to use the Hybrid Memory Cube Controller IP core, the core features a simulatable testbench and a hardware design example that supports compilation and hardware testing. When you generate the design example, the parameter editor automatically creates the files necessary to simulate, compile, and test the design in hardware. You can download the compiled design to the Arria® 10 GX FPGA Development Kit.
Design Example Directory Structure
The hardware configuration and test files (the hardware design example) are located in <example_design_install_dir>/example_design/par. The simulation files (testbench for simulation only) are located in <example_design_install_dir>/example_design/sim.
Design Example Components
The HMC Controller hardware design example includes the following components:
- HMC Controller IP core with CDR reference
clock set to 125 MHz and with default RX
mapping and TX mapping settings.
Note: The design example requires these settings to operate properly on the Arria 10 GX FPGA Development Kit with the HMC daughter card.
- Client logic that coordinates the programming of the IP core, and packet generation and checking.
- JTAG controller that communicates with the Altera System Console. You communicate with the client logic through the System Console.
File Names |
Description |
---|---|
Testbench and Simulation Files |
|
/src/hmcc_example.sv | Top-level hardware design example file. |
/sim/hmcc_tb.sv | Top-level file for simulation. |
Testbench Scripts Note: Use the provided Makefile to generate these scripts.
|
|
/sim/run_vsim.do |
The ModelSim script to run the testbench. |
/sim/run_vcs.sh |
The Synopsys VCS script to run the testbench. |
/sim/run_ncsim.sh |
The Cadence NCSim script to run the testbench. |
File Names |
Description |
---|---|
hmcc_example.qpf | Quartus® Prime project file |
hmcc_example.qsf | Quartus® Prime project settings file |
hmcc_example.sdc | Quartus® Prime project Synopsys Design Constraints file |
../src/hmcc_example.sv | Top-level Verilog HDL design example file |
Scripts |
|
sysconsole_testbench.tcl |
Main file for accessing System Console |
Generating the Design Example

Follow these steps to generate the Arria 10 hardware design example and testbench:
- In the IP Catalog (Tools > IP Catalog), select the Arria 10 target device family.
- In the IP Catalog, locate and select Hybrid Memory Cube Controller. The New IP Variation window appears.
- Specify a top-level name for your custom IP variation. The parameter editor saves the IP variation settings in a file named <your_ip> .qsys .
- You must select a specific Arria 10 device in the Device field, or keep the default device the Quartus Prime software selects.
- Click OK. The IP parameter editor appears.
- On the IP tab, specify the parameters for your IP core variation.
- On the Example Design tab, choose
the following settings for the design example:
- For Select Design, select the HMCC Daughter Board option.
- For Example Design Files, select the Simulation option to generate the testbench, and select the Synthesis option to generate the hardware design example.
- For Generated HDL Format, only Verilog is available.
- For Target Development Kit
select the Arria 10 GX FPGA Development Kit (Production
Silicon).
Note:
When you choose this kit, the hardware design example overwrites your previous device selection with the device on the target board.
When you generate the design example, the Quartus® Prime software creates Quartus® Prime project, setting, and pin assignments for the board you selected. If you do not want the software to target a specific board, select None.
- Click the Generate Example Design button.
Understanding the Testbench
Altera provides an design example with the HMC Controller IP core. The design example is available both for simulation of your IP core and for compilation. The design example in simulation functions as the HMC Controller IP core testbench.
If you click Generate Example Design in the HMC Controller parameter editor, the Quartus® Prime software generates a demonstration testbench. The parameter editor prompts you for the desired location of the testbench.
To simulate the testbench, you must provide your own HMC bus functional model (BFM). Altera tests the design example testbench with the Micron Hybrid Memory Cube BFM. The testbench does not include an I2C master module, because the Micron HMC BFM does not support and does not require configuration by an I2C module.
In simulation, the testbench controls a TX PLL and the data path interfaces to perform the following sequence of actions:
- Configures the HMC BFM with the HMC Controller IP core data rate and channel width, in Response Open Loop Mode.
- Establishes the link between the BFM and the IP core.
- Directs each of the IP core's four ports to write four packets of data to the BFM.
- Directs the IP core to read back the data from the BFM.
- Checks that the read data matches the write data.
- If the data matches, displays TEST_PASSED.
Simulating the Design Example Testbench
Follow these steps to simulate the testbench:
- At the command line, change to the <design example>/sim directory.
- Type make scripts.
- Type one of the following commands, depending on your simulator:
Simulator License Command Line Mentor Graphics QuestaSim make vsim HMC_MODEL=< HMC BFM directory > Synopsys VCS make vcs HMC_MODEL=< HMC BFM directory > Cadence NCSIM make ncsim HMC_MODEL=< HMC BFM directory > - To view simulation results:
- When you run the testbench in any of the three supported simulators, the script executes the testbench sequence and logs the simulator activity in <design example directory> /example_design/sim/ <simulator> .log. <simulator> is "vsim", "ncsim", or "vcs".
- When you run the testbench in any of the three supported simulators, the script generates a waveform file. You can run the command make <simulator> _gui to load the waveform in the simulator-specific waveform viewer.
Simulator License Command Line Waveform File Mentor Graphics ModelSim make vsim_gui <design example directory> /example_design/sim/mentor/hmcc_wf.wlf Synopsys Discovery Visual Environment make vcs_gui <design example directory> /example_design/sim/hmcc_wf.vpd Cadence SimVision Waveform make ncsim_gui <design example directory> /example_design/sim/cadence/hmcc_wf.shm - Analyze the results. The successful testbench sends and receives ten packets per port, and displays Test_PASSED"
Setting Up the Board
-
Set the DIP switches on the daughter card as follows:
Set DIP switch SW1 to indicate cube ID 0:
Switch Function Setting 1 CUB[0] Open 2 CUB[1] Open 3 CUB[2] Open 4 — Don't Care Switch Function Setting 1 CLK1_FSEL0 Open (125 MHz) 2 CLK1_FSEL1 Open (125 MHz) 3 CLK1_SEL Open (Crystal) 4 — Don't Care - Connect the HMC daughter card to the Arria 10 FPGA Development Kit using the daughter card's J8 and J10 connectors.
-
Set the jumpers on the Arria 10 GX FPGA Development Kit:
- Add shunts to the J8 jumper to select 1.5 V as the VCCIO setting for FMC connector B.
- Add shunts to the J11 jumper to select 1.8 V as the VCCIO setting for FMC connector A.
Figure 7. Arria 10 GX FPGA Development Kit and HMC Daughter Card
Compiling and Testing the Design Example in Hardware
To compile and run a demonstration test on the hardware design example, follow these steps:
- Ensure hardware design example generation is complete.
- In the Quartus® Prime software, open the Quartus® Prime project <example_design_install_dir>/example_design/par/hmcc_example.qpf.
- In the Compilation Dashboard, click Compile Design ( Quartus® Prime Pro Edition) or choose Processing > Start Compilation ( Quartus® Prime Standard Edition).
- After you generate a .sof,
follow these steps to program the hardware
design
example on the Arria 10 device:
- Choose Tools > Programmer.
- In the Programmer, click Hardware Setup.
- Select a programming device.
- Select and add the Arria 10 GX FPGA Development Kit to which your Quartus® Prime session can connect.
- Ensure that Mode is set to JTAG.
- Click Auto Detect and choose any device.
- Double-click the Arria 10 device.
- Open the .sof in
<example_design_install_dir>/example_design/par/output_files,
Note: The Quartus® Prime software changes the device to the one in the .sof.
- In the row with your .sof, check the box in the Program/Configure column.
- Click Start.
- After
the
software configures the device with the hardware
design
example,
observe
the board LEDs:
- A blinking red LED signifies the design is running.
- Two green LEDs near the red blinking LED signifies that the HMC link is initialized and the test passed.
- One red LED near the red blinking LED signifies that the test failed.
- Optional.
Use the System Console testbench to observe additional test output.
Note: Use the System Console to monitor status signals in the design example when the board is connected to your computer via the JTAG interface. The System Console shows the board's LED status for remote monitoring, the initialization status for each step, and the status of each port’s request generator and response checker. The System Console also provides an interface to start or re-start the test.
- Choose Tools > System Debugging Tools > System Console.
- In the System Console, choose File > Execute Script.
- Open the file <example_design_install_dir>/example_design/par/sysconsole_testbench.tcl.
- The software loads graphical test output. Choose Re-start to run the test again.

Hybrid Memory Cube Controller Design Example Description
Design Example Description
Features
- I2C master and I2C initialization state machine for HMC daughter card and HMC configuration
- ATX PLL and transceiver recalibration state machine
- Request generator
- Request monitor
- System Console interface
Hardware and Software Requirements
- Quartus® Prime software
- System Console
- ModelSim-AE, Modelsim-SE, NCsim (Verilog HDL only), or VCS simulator
- Arria 10 GX FPGA Development Kit
- HMC daughter card
Functional Description
You can use the design as an example for correct connection of your IP core to your design, or as a starter design you can customize for your own design requirements. The design example includes an I2C master module, a PLL/CDR recalibration module, one external transceiver PLL IP core, and logic to generate and check transactions. The design example assumes a Micron HMC 15G-SR HMC device, which is a four-link device, on the daughter card. The design example includes one instance of the IP core and connects to a single link on the HMC device.
After you configure the Arria 10 FPGA with the design example, the I2C controller configures the on-board clock generators and the HMC device. When calibration completes, the design example calibrates the ATX PLL. During operation, the request generator generates read and write commands that the HMC Controller IP core then processes. The request monitor captures the responses from the IP core and checks them for correctness.
Interface Signals
Signal Name | Direction | Width (Bits) | Description |
---|---|---|---|
clk_50 | Input | 1 | 50 MHz input clock. |
hssi_refclk | Input | 1 | CDR reference clock for HMC and HMCC IP core. |
hmc_lxrx | Input | Channel Count (16 or 8) | FPGA transceiver receive pins. |
hmc_lxtx | Output | Channel Count (16 or 8) | FPGA transceiver transmit pins. |
hmc_ctrl_lxrxps | Input | 1 | FPGA transceiver power save control. |
hmc_ctrl_lxtxps | Output | 1 | HMC transceiver power save control. |
hmc_ctrl_ferr_n | Input | 1 | HMC FERR_N output. |
hmc_ctrl_p_rst_n | Output | 1 | HMC P_RST_N input. |
hmc_ctrl_scl | Bi-Directional | 1 | HMC I2C configuration clock. |
hmc_ctrl_sda | Bi-Directional | 1 | HMC I2C configuration data. |
fmc0_scl | Output | 1 | Unused. Driven low to protect the FPGA I/O pins from the 3.3 V pullup on the daughter card. |
fmc0_sda | Output | 1 | Unused. Driven low to protect the FPGA I/O pins from the 3.3 V pullup on the daughter card. |
push_button | Input | 1 | Push button input used for reset. |
heart_beat_n | Output | 1 | Heartbeat LED output. |
link_init_complete_n | Output | 1 | Link initialization complete LED output. |
test_passed_n | Output | 1 | Test passed LED output. |
test_failed_n | Output | 1 | Test failed LED output. |
Design Example Register Map
Offset | Register |
---|---|
0x00 | DESIGN_INFO and RESET |
0x01 | BOARD_LEDS |
0x02 | TEST_INITIALIZATION_STATUS |
0x03 | PORT_TEST_STATUS |
Bits | Field Name | Type | Value on Reset | Description |
---|---|---|---|---|
1:0 | Port Count | RO | Varies | Number of ports for the IP core instance. |
7:2 | Reserved | RO | 0x00 |
Bits | Field Name | Type | Value on Reset | Description |
---|---|---|---|---|
0 | Test Failed | RO | 0x00 | Test failed. |
1 | Test Passed | RO | 0x00 | Test passed. |
2 | HMCC Link Initialization Complete | RO | 0x00 | HMC link initialization complete and ready for traffic. |
3 | Heartbeat | RO | 0x00 | Toggles when the design is running. |
7:4 | Reserved | RO | 0x00 |
Bits | Field Name | Type | Value on Reset | Description |
---|---|---|---|---|
0 | I2C Clock Generator Set | RO | 0x00 | On-board clock generators configured. |
1 | ATX PLL and Transceiver Recalibration Complete | RO | 0x00 | ATX PLL and transceivers re-calibrated to the input clock. |
2 | I2C HMC Configuration Complete | RO | 0x00 | HMC device configuration over I2C complete. |
3 | HMC Link Initialization Complete | RO | 0x00 | HMC link initialization complete and ready for traffic. |
7:4 | Reserved | RO | 0x00 |
Bits | Field Name | Type | Value on Reset | Description |
---|---|---|---|---|
0 | Port 0 Requests OK | RO | 0x00 | Port 0 request generation complete. |
1 | Port 0 Responses OK | RO | 0x00 | Port 0 response checking passed. |
2 | Port 1 Requests OK | RO | 0x00 | Port 1 request generation complete. |
3 | Port 1 Responses OK | RO | 0x00 | Port 1 response checking passed. |
4 | Port 2 Requests OK | RO | 0x00 | Port 2 request generation complete. |
5 | Port 2 Responses OK | RO | 0x00 | Port 2 response checking passed. |
6 | Port 3 Requests OK | RO | 0x00 | Port 3 request generation complete. |
7 | Port 4 Responses OK | RO | 0x00 | Port 3 response checking passed. |
Additional Information
HMC Controller Design Example User Guide Revision History
Date |
ACDS Version |
Changes |
---|---|---|
2016.05.02 | 16.0 | Initial release. |
How to Contact Altera
Contact |
Contact Method |
Address |
---|---|---|
Technical support |
Website |
www.altera.com/support |
Technical training |
Website |
www.altera.com/training |
FPGATraining@intel.com |
||
Product literature |
Website |
www.altera.com/literature |
Nontechnical support: general |
nacomp@altera.com |
|
Nontechnical support: software licensing |
authorization@altera.com |
Typographic Conventions
Visual Cue |
Meaning |
---|---|
Bold Type with Initial Capital Letters |
Indicate command names, dialog box titles, dialog box options, and other GUI labels. For example, Save As dialog box. For GUI elements, capitalization matches the GUI. |
bold type |
Indicates directory names, project names, disk drive names, file names, file name extensions, software utility names, and GUI labels. For example, \ qdesigns directory, D: drive, and chiptrip.gdf file. |
Italic Type with Initial Capital Letters |
Indicate document titles. For example, Stratix V Design Guidelines. |
italic type |
Indicates variables. For example, n + 1. Variable names are enclosed in angle brackets (< >). For example, <file name> and <project name> . pof file. |
Initial Capital Letters |
Indicate keyboard keys and menu names. For example, the Delete key and the Options menu. |
“Subheading Title” |
Quotation marks indicate references to sections in a document and titles of Quartus Prime Help topics. For example, “Typographic Conventions.” |
Courier type |
Indicates signal, port, register, bit, block, and primitive names. For example, data1, tdi, and input. The suffix n denotes an active-low signal. For example, resetn. Indicates command line commands and anything that must be typed exactly as it appears. For example, c:\qdesigns\tutorial\chiptrip.gdf. Also indicates sections of an actual file, such as a Report File, references to parts of files (for example, the AHDL keyword SUBDESIGN), and logic function names (for example, TRI). |
1., 2., 3., and a., b., c., and so on |
Numbered steps indicate a list of items when the sequence of the items is important, such as the steps listed in a procedure. |
|
Bullets indicate a list of items when the sequence of the items is not important. |
The Subscribe button links to the Email Subscription Management Center page of the Altera website, where you can sign up to receive update notifications for Altera documents.
|
|
The Feedback icon allows you to submit feedback to Altera about the document. Methods for collecting feedback vary as appropriate for each document.
|