DOC PREVIEW
Toronto ECE 532 - LAB 4 - Adding the OPB EMAC Peripheral

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

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

Unformatted text preview:

University of Toronto ECE532 Digital Hardware LAB 4 Adding the OPB EMAC Peripheral Version 1 1 1 29 2004 10 48 PM Acknowledgement This 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 OPB 10 100 EMAC peripheral to the MicroBlaze system Search through more documentation to see where to find various bits of information and examples Preparation 1 Read through this lab first to get an idea of what you are about to do 2 Find the data sheet for the OPB Ethernet Media Access Controller EMAC v1 00m and review it A copy is also posted directly on the course web page 3 In this lab you will be modifying an example program that can be found in the Processor IP drivers library for the device On the lab machines look in O Xilinx EDK6 1i sw XilinxProcessorIPLib drivers emac v1 00 d examples 4 The first step is to copy the previous lab You can do this in advance by going to your ugsparc directory where you can find lab3 cp r lab3 lab4 You should of course check to see if you have enough space first You may need to clean up some files i e do some cleaning If you want to clean lab3 you can also do this from the ugsparcs using the system make file in the lab3 directory In the lab3 directory type 1 University of Toronto ECE532 Digital Hardware LAB 4 Adding the OPB EMAC Peripheral make f system make hwclean to clean the hardware directory make f system make will give you all the options But this still does not work Why Try this first dos2unix system make usystem make and try the above commands but using usystem make What s going on Just one of the many kinds of things you have to deal with when working with CAD tools 5 During the lab you will be working with the example called xemac intr fifo example c This file is also posted on the course web site for you to look at before the lab You will be asked to modify it so that it will work with your system You might want to try to understand what it does so that you will not have to spend time during the lab doing this You can also do some modifications and adding of print statements Put your file in your ugsparc directory where you can access it later If you did step 3 above then put it in the code directory of the lab4 project directory Background As peripherals become more complex there are more signals to be brought out of the FPGA and possibly more timing issues including the need for timing constraints and Digital Clock Managers DCM The DCM is a block in the FPGA that contains functions like DLLs that can be used to help synchronize internal logic and clocks with external logic and their clocks You will not have to deal with them here In this lab you will be connecting the FPGA to an external Ethernet chip 2 University of Toronto ECE532 Digital Hardware LAB 4 Adding the OPB EMAC Peripheral Ethernet is a widely used peripheral so it is beneficial to learn how to properly include the OPB EMAC into an XPS project Outside of the FPGA is the physical layer interface PHY that actually connects to the Ethernet cable on one side and the FPGA pins on the other side The EMAC is the peripheral that is inside the FPGA that connects from the FPGA pins to the OPB bus of the MicroBlaze allowing the processor to talk to the Ethernet chip This lab is built on top of the previous week s lab It expects a MicroBlaze system with an interrupt controller and serial Uart device for standard I O If you didn t successfully add the DIP switch to last week s lab you can build onto the simpler design Note that at 27MHz the speed of the OPB bus the EMAC will only function correctly at 10Mbps Using XPS Base System Builder 1 Copy the XPS project directory of the previous lab and rename the copy to lab4 This will be the working project directory for this lab You may need to delete the implementation directory of the previous lab to free up disk space Use clean under the Tools menu 2 Open the lab4 project using XPS 3 From the Project menu select the Add Edit Cores dialog submenu item Add the opb ethernet peripheral to the system Define the base address of the device to be a 16K aligned address following the address of the previous peripheral in the list Attach the EMAC as a slave to the OPB bus Note that two devices appear Configure only the sopb slave version When would you attach the EMAC as a master to the OPB bus The minimum address range of the OPB EMAC core is 16K 0x4000 The tools require that the base address begin at a 16K aligned address 4 In the Add Edit Cores ports tab dialog box add the PHY ports except PHY rx en and PHY rst n and the interrupt output port of the EMAC to the 3 University of Toronto ECE532 Digital Hardware LAB 4 Adding the OPB EMAC Peripheral design so that they can be connected to other signals or pins of the FPGA Make sure all PHY ports are external such that they are connected to their corresponding FPGA pins Later you will use the board user s guide or schematic for information on pin assignments for each signal Note that the net names chosen for each port will need to match the net names in the system UCF file The default net names will suffice for the PHY connections You ll change the interrupt name later 5 Add a vector range on the PHY receive and transmit data ports Determine the width of the vector from the data sheet For an n bit bus input the range of n 1 0 6 There are two PHY signals connected to the FPGA that do not have corresponding ports in the EMAC device These signals are inputs to the PHY and should be tied high tied to net vcc in the design Click Add Port in the Ports tab to create a system port Name the port PHY slew1 make it an output and connect it to net vcc in the Add External Port dialog box Click OK Do the same for PHY slew2 7 Make the interrupt output of the EMAC an internal port We will be connecting this net to the interrupt input of the interrupt controller device Rename the net name of the EMAC interrupt output port to emac intr This can be done by typing the new name in the Net Name box of the port in the Ports tab Recall that the interrupt controller can …


View Full Document

Toronto ECE 532 - LAB 4 - Adding the OPB EMAC Peripheral

Documents in this Course
Load more
Download LAB 4 - Adding the OPB 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 LAB 4 - Adding the OPB 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 LAB 4 - Adding the OPB EMAC Peripheral 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?