DOC PREVIEW
Toronto ECE 532 - Module m04 - Adding the XPS EMAC Peripheral

This preview shows page 1 out of 3 pages.

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

Unformatted text preview:

University of TorontoECE532 Digital HardwareModule m04: Adding the XPS EMAC PeripheralVersion for EDK 10.1.03 as of January 7, 2009AcknowledgementThis lab is derived from a Xilinx lab given at the University of Toronto EDK workshop in November 2003.Many thanks to Xilinx for allowing us to use and modify their material.Goals• Understand the procedure for adding more complex peripherals to an XPS project.• Use XPS to manually add the XPS 10/100 EMAC Lite peripheral to the MicroBlaze system.• Search through more documentation to see where to find various bits of information and examples.PrerequisitesModule m03: Adding IP and Device Drivers — Timers and InterruptsPreparation• Read through this module first to get an idea of what you are about to do.• Find the data sheet for the XPS Ethernet Lite Media Access Controller (EMACLite) and review it.• In this lab you will be modifying an example program that can be found in the Processor IP driverslibrary for the device. On the Microprocessor lab machines, look in:%XILINX_EDK%\sw\XilinxProcessorIPLib\drivers\emaclite_v1_13_a\examplesOn the ECF Linux machines, look in:$XILINX_ED$XILINX_EDK/sw/XilinxProcessorIPLib/drivers/emaclite_v1_13_a/examples• The first step is to copy the previous lab into a directory called lab4. If you like, you can delete thelab3.c source file from your lab4/code/ directory.You should, of course, check to see if you have enough space first! You may need to clean up somefiles. You can do this using the XPS interface (i.e., via Project → Clean all generated files), usingthe facilities provided by the system.make makefile (e.g., start by trying make -f system.make; youmight need to first use dos2unix on system.make if you’re running make on an UGSPARC or anECF Linux machine), or by simply deleting the implementation directory in your project (since it isautomatically generated and since it consumes the bulk of your project’s disk space).• In this module, you will be working with the example called xemaclite intr tapp example.c. Copythe file from the driver example directory.You will be asked to modify it so that it will work with your system. You might want to try tounderstand what it does so that you will not have to spend time during a lab period doing this. Youcan also make some modifications or add some xil printf statements. Put the copied (and possiblymodified) xemaclite intr tapp example.c in lab4/code/.1University of TorontoECE532 Digital HardwareModule m04: Adding the XPS EMAC PeripheralBackgroundAs peripherals become more complex, there are more signals to be brought out of the FPGA and possiblymore timing issues, including the need for timing constraints and Digital Clock Managers (DCMs). TheDCM is a block in the FPGA that contains functions like Delay-Locked Loops (DLLs) that can be used tohelp synchronize internal logic and clocks with external logic and their clocks. You will not have to dealwith them in this lab. In this lab, you will be connecting the FPGA to an external Ethernet chip.Ethernet is a widely used peripheral, so it is beneficial to learn how to properly include the XPS EMACinto an XPS project.Outside of the FPGA is the physical layer interface (PHY) chip that actually connects to the Ethernetcable on one side, and the FPGA pins on the other side. The EMAC is the peripheral that is inside theFPGA that connects from the FPGA pins to the PLB bus of the MicroBlaze allowing the processor to talkto the Ethernet chip.This module is built on top of Module m03. It expects a MicroBlaze system with an interrupt controllerand serial Uart device for standard I/O. If you didn’t successfully add the DIP switch in m03, you can buildonto the simpler design.Note that the clock frequency must be greather than or equal to 65MHz for the Ethernet core to beable to operate at 100MBps; as such, the design implemented in this lab can only be expected to operate at10MBps (which requires a clock frequency of only 6.5MHz).Using XPS Base System Builder1. Copy the XPS project directory of the previous lab and rename the copy to lab4 if you have not doneso already. This will be the working project directory for this lab. You may need to clean the projector delete the implementation directory of the previous module to free up disk space.2. Open the lab4 project using XPS.3. Add an xps ethernetlite peripheral to the system (use version 2.00.a). Define the base address of thedevice to be aligned at a 8K boundary following the address of the last peripheral in the list. Attachthe EMAC as a slave to the PLB bus.4. Make the PHY * ports of the xps ethernetlite 0 peripheral instance external, except for PHY rx en.PHY rst n which should only be made external if you are using the XUPV2P board. Be carefulnot to make both the bidirectional signal and the individual unidirectional componentsof that signal external! For instance, make PHY Mii data external and leave PHY Mii data I,PHY Mii data O, and PHY Mii data T as No Connection. Later, you will use the board user’s guide orschematic for information on pin assignments for each signal.5. There are two pins on the PHY that are connected to the FPGA but that do not have correspondingports in the EMAC device. These signals are inputs to the PHY and should be tied high (i.e., tied tonet vcc) in the design.Click Add External Port in the Ports tab to create a system port. Name the portxps ethernetlite 0 PHY slew0 pin, make it an output, and connect it to net vcc. Do the same forxps ethernetlite 0 PHY slew1 pin.6. Connect the IP2INTC Irpt signal of the xps ethernetlite 0 peripheral instance to a new net calledxps ethernetlite 0 IP2INTc Irpt.Recall that the interrupt controller can handle a number of interrupt input request lines. The interruptinput of the controller is really a vector of signals, not a single wire. Since there may be other interruptsignals already connected to the interrupt input of the interrupt controller, the EMAC interrupt outputmay need to be concatenated to those signals.2University of TorontoECE532 Digital HardwareModule m04: Adding the XPS EMAC PeripheralTo add a new signal to the interrupt input of the controller, click on the entry in the Net column besidethe Intr input of the xps intc 0 peripheral instance. In the dialog that opens, select the interrupt signalyou wish to add. Click on the plus symbol to add signals, the scissors symbol to remove signals, andthe arrows to change the order of signals in the list on the right. Note


View Full Document

Toronto ECE 532 - Module m04 - Adding the XPS EMAC Peripheral

Documents in this Course
Load more
Download Module m04 - Adding the XPS EMAC Peripheral
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 Module m04 - Adding the XPS EMAC Peripheral 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 Module m04 - Adding the XPS EMAC Peripheral 2 2 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?