Académique Documents
Professionnel Documents
Culture Documents
Xilinx Literatures
Xilinx University Program:
http://www.xilinx.com/university/
MicroBlaze System
Task: Add XPS TFT Controller to your embedded system design (based on Lab 2)
BRAM LMB BRAM Cntlr Instruction MicroBlaze MDM
LEDs
PSBs DIP
SRAM Flash
You will add the Xilinx TFT Controller instances and connect them to the VGA connector on the board
(3. DVI interface is included in the design if the parameter C_TFT_INTERFACE = 1.) *4. VGA interface is included in the design if the parameter C_TFT_INTERFACE = 0 is set.
Supports separate clock (asynchronous) domain for PLB interface and TFT interface
Step 1-2-3
Copy all contents of the Lab2 folder into the Lab3. Start XPS/EDK. Open Lab3 project From IP Catalog view add an IO Modules XPS TFT v.1.00.a peripheral
0x90000000
User Tab all settings are default except for the following Unselect the TFT Interface Base Address of the PLB Attached Video Memory: = 0x90000000 (map to Micron SRAM base address) System Tab Set manually or generate addresses properly Base Address: 0x90000000 16 MB! High Address: 0x9000ffff (Map to the whole Micron SRAM memory capacity)
Step 3
Bus Interface Tab: Rename IP core xps_tft_0 tft_controller Select mb_plb both for MPLB and SPLB ports (OR click on brown circles in bus connections, alternatively) Addresses Tab: Check the address parameters of the tft_controller NOTE: addresses does not overlap to each other and can be generated automatically (also try it!)
Step 3
Double click on the clock_generator_0
In ports view select CLKOUT1 Required frequency (for TFT controller): 25,000,000 Hz Buffered: TRUE Connected to: New Connection
Check SYS_TFT_Clk (clock_generator_0_CLKOUT1 added) Click on Validate Clocks
Note
The 25 MHz DCM clock is connected to the TFT VGA clock (640x480@60Hz)
If CLKOUT1 port of the clock_generator_0 instance is not displayed on the System Assembly View Ports tab then you must refresh the GUI.
Step 3
Make external the selected 6 signals as below: *TFT_VGA_B: 2-bit Blue ch.
*TFT_VGA_G: 3-bit Green ch TFT_VGA_R: 3-bit Red ch
* See Nexys2_rm.pdf for details.
**TFT_DE: Data Enable TFT_VSYNC: Vertical Synchronization TFT_HSYNC: Horizontal Synchronization signal
** See xps_tft.pdf for details.
Tie tft_controller_TFT_DE_pin to 1, therefore select net_vcc (it always enables data out):
### Additional signals for TFT controller NET NET NET NET NET NET NET NET tft_controller_TFT_VGA_R_pin<3> LOC = R9; # Bank = 2, Pin name = IO/D5, Type = DUAL, Sch name = RED0 tft_controller_TFT_VGA_R_pin<4> LOC = T8; # Bank = 2, Pin name = IO_L10N_2, Type = I/O, Sch name = RED1 tft_controller_TFT_VGA_R_pin<5> LOC = R8; # Bank = 2, Pin name = IO_L10P_2, Type = I/O, Sch name = RED2 tft_controller_TFT_VGA_G_pin<3> LOC = N8; # Bank = 2, Pin name = IO_L09N_2, Type = I/O, Sch name = GRN0 tft_controller_TFT_VGA_G_pin<4> LOC = P8; # Bank = 2, Pin name = IO_L09P_2, Type = I/O, Sch name = GRN1 tft_controller_TFT_VGA_G_pin<5> LOC = P6; # Bank = 2, Pin name = IO_L05N_2, Type = I/O, Sch name = GRN2 tft_controller_TFT_VGA_B_pin<4> LOC = U5; # Bank = 2, Pin name = IO/VREF_2, Type = VREF, Sch name = BLU1 tft_controller_TFT_VGA_B_pin<5> LOC = U4; # Bank = 2, Pin name = IO_L03P_2/DOUT/BUSY, Type = DUAL, Sch name = BLU2
Step 5
Run Generate Netlist
Running synthesis process (XST) Elaborating IPs (check all components in MHS file) create HDL wrappers of the embedded BSB Finally generate HW netlist <Project_name>.ngc (e.g. system.ngc file)
Generate bitstream file for dowloading it to the FPGA with <Project_name>.bit (e.g. system.bit)
Questions
Open the system.mhs file, study its contents, and answer the following questions
Number of external ports: ___________________ Number of external ports that are output (O): ___________________ Number of external ports that are input (I): ___________________ Num. of external ports that are bidirectional (IO): ___________________ Number of clock ports: ___________________ Freq: _________ Number of reset ports: ___________________ Polarity: _________
Questions
List the instances to which the dcm_clk_s is connected: ________________________________________ _____ List the instances connected to the mb_plb bus: ________________________________________ ______ List the instances connected to the clock_generator_0_CLKOUT1 bus: ________________________________________
Questions
Draw the address map of the system, providing instance names:
Questions
Check Report files (system.par) or log messages in Consol window after the placement process step):
_____ out of _____ out of _____ out of _____ out of 250 _____ _____ _____ 17,344 17,344 8,672 22% 11% 19% 29%
Logic Utilization: Number of Slice Flip Flops: Number of 4 input LUTs: Logic Distribution: Number of occupied Slis: Number of External IOBs Number of External Input IOBs Number of External Output IOBs Number of External Bidir IOBs
of of of of of of of
BSCANs _____ out of 1 100% BUFGMUXs _____ out of 24 8% DCMs _____ out of 8 12% MULT18X18SIOs _____ out of 28 RAMB16s _____ out of 28 71% Slices _____ out of 8672 29% SLICEMs _____ out of 4336 6%
10%
VGATest main.c
Simple VGATest main.c application created Note: Automatic build is set by default (if you want to change: Project Build Automatically is not checked) SW platform will be created (generated from .MSS file)
SW platform
microblaze_0_sw_platform (right click -> generate Libraries and BSP or LIBGen icon) Archives: .a (binary) Microblaze_0
Code Include*
See xparameters.h (generated from .MHS)
Lib LibSrc
DipTest SW application
VGATest {microblaze_0_sw_platform} Binaries (.elf) Debug (.elf) main.c Additional headers and sources
gpio_header.h
Declares XTft_DrawSolidBox () function for prototyping Declares TftExample () function for prototyping Dependencies:
#include #include #include #include #include #include <stdio.h> <xio.h> "xbasic_types.h" "xstatus.h" "xparameters.h" "xtft.h" See driver\example\xtft_example.c for further details!
dec 12270
hexfilename 2feeVGATest.elf
Build complete for project VGATest OK. It is (12 270 bytes of total program code) fitted to the 32KByte BRAM internal memory.
Connect the Xilinx JTAG-Platform USB cable to Nexys-2 boards JTAG interface Select Device Configuration menu -> Program FPGA
Bitstream (system.bit) BRAM Memory Map (.bmm) + VGATest.elf -> D:\FPGA\BEAGYAZOTT_RENDSZEREK\10_1\03_LAB\SDK\ SDK_projects\implementation\download_sdk.bit
Question
What is the size of .elf program, and the different
program sections? Which is the base_address and high_address (or address size) of the push button TFT_LCD peripheral? Which header .h file contains the MicroBlaze system parameters for various peripherals?
Lab2 Intro
2011 Xilinx, Inc. All Rights Reserved