Changes

Jump to: navigation, search

BELK-AN-003: Interfacing DDR3 SDRAM to PL

1,285 bytes added, 12:16, 17 October 2018
no edit summary
{{Applies To Bora}}
{{InfoBoxBottom}}
{{WarningMessage|text=This application note was validated against specific versions of the kit only. It may not work with other versions. Supported versions are listed in the ''History'' section.}}
==History==
{| class="wikitable" border="1"
!Version
!Date
!BELK version
!Notes
|-
|1.0.0
|14:35, 31 August 2015 (CEST)
|[[Bora_Embedded_Linux_Kit_(BELK)#BELK_software_components|2.1.0]]
|First release
|-
|}
==Introduction==
Even if PL can share main SDRAM with PS, several applications need a dedicated bank for FPGA IPs in order to have exclusive access and to maximize bandwidth. In any case, since this additional SDRAM bank is accessible via AXI bus, it is mapped in the processor's memory space and thus it can be accessed by PS as well.
BoraEVB can optionally be populated with a 16-bit 512MB SDRAM chip that is directly connected to PL (1). This application note describes how to enable the support for this additional memory bank. An example Vivado design is released along with this application note, based on BELK 2.1.0 (http://wiki.dave.eu/index.php/[[Bora_Embedded_Linux_Kit_%28BELK%29#BELK_software_components)|BELK 2.1.0]].
The Vivado example project can be downloaded from the following URL:
[httphttps://www.dave.eu/system/files/area-riservata/AN-BELK-003-bora-AXI-DDR3-BELK-2.1.0_no_results.xpr_.zip AN-BELK-003 Vivado project (without synthesis and implementation results)]
This project requires a 200 MHz clock source. It has been tested with
The bitstream and boot binaries can be downloaded from the following URL:
[httphttps://www.dave.eu/system/files/area-riservata/AN-BELK-003.bitstream-boot-binaries.zip AN-BELK-003 binaries]
==SDRAM bank mapping==
[[File:an-belk-003_03.png | 800px | AXI Memory Controller Address Mapping]]
The following dump shows a simple memory test run from U-Boot console:
<pre>
U-Boot 2013.04 (Aug 25 2014 - 23:52:57) [belk-2.1.0]
 
I2C: ready
Memory: ECC disabled
DRAM: 1 GiB
WARNING: Caches not enabled
Now running in RAM - U-Boot at: 3ff68000
NAND: 1024 MiB
MMC: zynq_sdhci: 0
SF: Detected S25FL256S_64K with page size 64 KiB, total 32 MiB
In: serial
Out: serial
Err: serial
Net: Gem.e000b000
Hit any key to stop autoboot: 0
zynq-uboot> help mtest
mtest - simple RAM read/write test
 
Usage:
mtest [start [end [pattern [iterations]]]]
zynq-uboot>
zynq-uboot> mtest 0x48000000 0x4FFFFFFF
Testing 48000000 ... 4fffffff:
Pattern 00000000 Writing... Reading...Iteration: 53
zynq-uboot> <INTERRUPT>
zynq-uboot>
zynq-uboot> mtest 0x48000000 0x4FFFFFFF 0xA5A5A5A5
Testing 48000000 ... 4fffffff:
Pattern A5A5A5A5 Writing... Reading...Iteration: 19
zynq-uboot> <INTERRUPT>
</pre>
It's also possible to extend Linux kernel memory with the external memory adding a second memory in the device tree:
<pre>
The kernel patch can be downloaded from the following URL:
[httphttps://www.dave.eu/system/files/area-riservata/AN-BELK-003_Add_AXI_DDR3.patch_.zip AN-BELK-003 Linux patch]
8,154
edits

Navigation menu