Success! Subscription added.
Success! Subscription removed.
Sorry, you must verify to complete this action. Please click the verification link in your email. You may re-send via your profile.
Page creation - November 16th 2010
Altera offers several external memory controller IPs that use the Avalon interface specification on the local side, this is the interface that is connected to the user's logic. This article will examine the basics of interfacing to an Avalon controller such as the High Performance Controller II (HPCII) and how to do simple read and write burst transfers. The diagram below shows the location of this interface in the IP example top project hierarchy, between the driver and the controller.
A Quartus project using HPCII and UniPHY with a modified driver is attached to show basic read and write transfers in simulation as a reference.
The table below lists the specifications for this design:
Attribute | Specification |
Quartus version | QuartusII v10.1b141a (customer beta) |
FPGA | EP4SGX230KF40C2 |
Kit | Stratix IV GX FPGA Development kit (DK-DEV-4SGX230N/C2) |
Memory device | DDR3 (Micron MT41J64M16LA-15E) |
Memory speed | 533MHz |
Memory topology | single component, x16 |
IP used | UniPHY with HPCII and generated example top Quartus project and modified driver |
Design files can be found here: Interfacing to Altera EMI IP example project files
The Avalon Interface is a data transfer standard created by Altera to allow easy connections between components particularly using the Avalon system interconnect fabric. It simplifies design by removing the requirement for a user to verify the actual transfer, just requiring them to ensure the interface conforms to the specification.
There are 6 types of Avalon interfaces:
An Avalon component can use multiple types of these interfaces. The HPCII uses Memory Mapped for the primary part of its command transfer interface. Memory Mapped interfaces are read and write data transfer interfaces and can either be Masters (can initiate transfers) or Slaves (respond to transfers). HPCII is a Slave, in the above diagram the driver would be a Master.
For more information on Altera's Avalon specification refer to the link at the bottom of this page.
The following diagram shows the basic behavior for an Avalon write transfer.
Important things to note:
The following diagram shows the basic behavior for an Avalon read transfer.
Important things to note:
Using DDR3 as an example, DDR3 specification requires accesses in bursts of 8 cycles (BL = 8). For a 64 bit DIMM this means 512 bits (64 x8) of data for each transfer (typically).
A half rate HPCII controller has a local data bus width of 256bits and thus with typical operation writes will have local_size = 2, ie. two beats to provide 512 bits of data for a full burst.
Click on any waveform for a higher resolution image.
d/d6/HPCII_half_rate_write_with_local_size%3D2.jpg
Note: it take as few transfers requests in the HPCII's command FIFO before it starts making use of the burst merging feature
6/63/HPCII_half_rate_write_with_local_size%3D1_and_burst_merging.jpg
( HPCII half rate write with local size=1 and burst merging.jpg - click here to view image )
e/ee/HPCII_half_rate_read_with_local_size%3D2.jpg
5/5c/HPCII_single_half_rate_read_with_local_size%3D1.jpg
(HPCII single half rate read with local size=1.jpg - click here to view image )
Note: it take as few transfers requests in the HPCII's command FIFO before it starts making use of the burst merging feature
b/bf/HPCII_half_rate_read_with_local_size%3D1_and_burst_merging.jpg
The local_address signal does not translate 1:1 to external memory address. On the local side there is a new address location for each beat as shown in the following table for the DDR3 half rate case:
Also, external memory interface address my have special address bits for controller certain features. In the above waveforms for DDR3 we can observe auto precharge (A10) and burst chop (A12) being used.
As as example above in the typical half rate write with local_size = 2
local side address 10d translated to external memory address mem_a = 1428h
10d x 4 = 40d = 28h
and with precharge high and burst chop off = 1428h
See your external memory vendor's datasheet for more details.
See the Altera EMI handbook for description (link below):
HPCII, External Memory Controller, High Performance Controller, Interface, Avalon, local side, burst transfers
© 2010 Altera Corporation. The material in this wiki page or document is provided AS-IS and is not
supported by Altera Corporation. Use the material in this document at your own risk; it might be, for example, objectionable,
misleading or inaccurate.Retrieved from http://www.alterawiki.com/wiki/Altera_Wiki
For more complete information about compiler optimizations, see our Optimization Notice.