DOC PREVIEW
Toronto ECE 532 - Using External ZBT Memory

This preview shows page 1-2-3 out of 9 pages.

Save
View full document
Premium Document
Do you want full access? Go Premium and unlock all 9 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

University of Toronto ECE532 Digital Hardware Using External ZBT Memory Version for EDK 6 3 Feb 14 2005 1 Goals You will be learning how to connect external memory to the OPB bus controller If you wish to use a controller that does not have the OPB bus interface you should still go through this module to become familiar with the clocking issues and then look at Section 7 2 Background In previous designs you have used internal memory structures instantiated within the FPGA This memory has been connected to the LMB the Local Memory Bus The external memory on the Multimedia Board is ZBT memory and will be connected to the system with the OPB On chip Peripheral Bus External memory can be connected to an EDK system using Xilinx s External Memory Controller EMC core The EMC is an OPB peripheral that can connect up to 8 external banks into the address space of the MicroBlaze The Base System Builder wizard has the ability to create a design that contains a connection to a single ZBT bank The design provided by the Base System Builder works However it does not properly handle the memory clocking In more complicated designs the clock synchronization becomes very relevant This document describes how to modify the design provided by the Base System Builder so that the clock to the external memory is properly synchronized to the internal clock For high speed interfaces such as the ZBT memory it is necessary to account for delays through the FPGA and on the traces of the PCB The Digital Clock Manager DCM available on the Xilinx Virtex II FPGA can be used to account for these delays A clock feedback wire with delay equal to the clock lines to the five memory chips according to the Multimedia User Guide is available to align the phase of the internal clocks to the clock arriving at the memory chips using a DCM The Multimedia board contains a total of five banks of ZBT memory providing 10MB of space After learning how to use the EMC to connect to a single bank this document will address how to connect all five banks 3 Requirements Module 1 Building a Base System Module 2 Adding Drivers and IP 4 Preparation Summaries of how to connect external memories are given in the Connecting to Memory section of the documentation for the OPB External Memory Controller Core You might also want to look at the Xilinx DCM Digital Clock Manager documentation found in the Virtex II FPGA data sheet 5 Connecting a Single ZBT Bank 5 1 Step by step 1 Create a new system with Base System Builder as you normally would Ensure that in ZBT 512Kx32 is selected with the OPB EMC option in the Configure Additional IO Interfaces screen You may also 1 University of Toronto ECE532 Digital Hardware Using External ZBT Memory wish to select Generate Sample Application and Linker Script in the Software Configuration screen as the application includes a test of the ZBT memory 2 Open the Add Edit Cores dialog and add two instances of dcm module The two DCM modules will be used to create the clocking scheme shown in Figure 1 Add the following to the ports table for each of the DCM modules CLKIN CLKFB RST DSSEN PSEN CLK0 LOCKED Set them all as internal in scope External Clock OPB Clk CLK0 CLKIN CLK0 CLKIN OBUF CLKFB Syncmem Clk fb CLKFB BUFG DCM FPGA DCM Syncmem Clk Synchronous Memory Bank CLK Figure 1 The clocking scheme required for external ZBT memory with clock feedback Taken from Xilinx s OPB EMC datasheet Connect the ports of the first DCM module to the following nets RST CLKIN CLKFB PSEN DSSEN CLK0 LOCKED dcm rst sys clk predcm sys clk s net gnd net gnd sys clk s opb dcm locked Connect the ports of the second DCM modules to the following nets RST CLKIN CLKFB PSEN DSSEN CLK0 LOCKED dcm rst sys clk s zbt dcm feedback net gnd net gnd zbt dcm clk zbt dcm locked 3 Locate the system port that connects the external sys clk pin to the net sys clk s Change the net to sys clk predcm 4 Using the Add Port button create an output port named ZBT 512Kx32 EMC CLK FEEDBACK OUT and an input port named ZBT 512Kx32 EMC CLK FEEDBACK IN It is not necessary to classify the ports as CLK signals Connect the two new ports to the zbt dcm clk and zbt dcm feedback nets respectively Change the C CLKIN PERIOD parameter for each DCM to 37 037 The default values for the 2 University of Toronto ECE532 Digital Hardware Using External ZBT Memory other parameters should be sufficient The DCM will lock when the edges of its CLKFB and CLKIN inputs are aligned 5 Locate the generated port ZBT 512Kx32 EMC CLK OUT This was generated by System Builder Notice that it is by default connected to sys clk s Connect it to zbt dcm clk instead 6 Edit the system ucf file to connect the two new ports to appropriate pins This can be accomplished by adding the following lines Net Net Net Net ZBT 512Kx32 EMC CLK FEEDBACK IN LOC AE15 ZBT 512Kx32 EMC CLK FEEDBACK IN FAST ZBT 512Kx32 EMC CLK FEEDBACK OUT LOC AH14 ZBT 512Kx32 EMC CLK FEEDBACK OUT FAST 7 The DCM takes time to synchronize the clocks and lock During this time it is undesirable for the MicroBlaze or other components to be operating The LOCKED signal of the DCM can be used to keep other components in a reset state until the DCM is ready A custom core clk align v1 00 a has been created that helps accomplish this It can be found in the zip file for this module Copy the clk align core into the system s pcores directory Restart the EDK and add the core 8 Add an instance of the clk align core to the system and add all of its ports ports with the internal connections that follow external clk extend dcm reset dcm0 locked dcm1 locked fpga reset dcm reset Connect the sys clk predcm sys rst preclkalign zbt dcm locked opb dcm locked sys rst s dcm rst 9 Locate the system port that connects the external sys rst pin to the sys rst s net it so that it connects to the sys rst preclkalign net Alter 10 The system is now ready to be built and downloaded Be aware that Base System Builder connected the system reset signal to User Switch SW0 on the Multimedia board It is best to download the system with the switch in the reset state However the signal must be low in order for XMD to connect to the MicroBlaze 11 Do a quick sanity check by running XMD and doing a memory read and a memory write to the address space associated with the ZBT The address space associated with the ZBT is not the same as the address space associated with the EMC To find the address space check the Parameters tab of Add Edit Cores and …


View Full Document

Toronto ECE 532 - Using External ZBT Memory

Documents in this Course
Load more
Download Using External ZBT Memory
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Using External ZBT Memory and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Using External ZBT Memory and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?