Professional Documents
Culture Documents
XPS Flow
Design system Define hardware for system Setup software environment Write software to implement system Synthesize and compile system Download implementation
Introduction
Define hardware
Add modules to system Define memory map Connect modules to buses Connect non-bus module I/O Set any necessary module parameters Define user constraints (pin-outs)
Introduction
Select interface level to devices Generate libraries and device drivers to use C code that implements system Use libraries and drivers generated previously Add source files to system
Write software
Introduction
Download
Download bitstream
Define Hardware
Add/Edit Cores Dialog Boxes
MicroBlaze module (microblaze) BRAM module (bram_module) 2 LMB BRAM controllers (lmb_bram_if_cntlr)
Data side and instruction side
Other modules have minimum memory requirements, set these appropriately No address ranges may overlap
Connect buses
Select one port for each memory controller Rename connector if desired
I/O depends on module See documentation or lab assistant for necessary I/O to use Select first signal Hold Ctrl and select other signals Click Connect button
Net Names that are the same are connected External is visible outside system (to pins)
Add an external port for signals that are not part of a module I/O
Click Add Port button Give signal name (i.e., sclk) Give polarity based on signal use
Ignore Port Class (leave NONE) Connect to existing net (i.e., sys_clk)
Select module from drop down list Values listed on right are default To change a value:
Select module and parameter Click the <<Add button Change parameter in left window Click on Open PDF Doc with module selected
Save in file with ucf extension (e.g., system.ucf) within data folder of main project folder Text file with one constraint (pin definition) per line Format for one signal: NET net_name LOC = pin#; Example: NET sys_clk LOC = B8; Format for a signal within a vector: NET net_name<num> LOC = pin#; Example: NET led_pin<0> LOC = C15; pin# is found from documentation or lab assistant
0 is a very low level (register-level) interface 1 is a higher level (system call-level) interface Right click on module name Set Interface Level to desired value Set Interface Level of MicroBlaze to 1
Write Software
Write Software
Implement system functionality in C code Use the libraries and drivers generated previously when applicable
Driver API depends on interface level Check documentation and generated files for information and and API description Example: my_code in main project directory Do NOT store source files in code directory within MicroBlaze directory
Compile =>
or run from Tools menu
Synthesize
XPS generates VHDL for system Modules generated based on system definition
Compile
BRAMs initially empty Updating places compiled code in correct memory locations of BRAM
Code Size
If compilation is successful the size of your compiled code is shown The code size must be small enough to fit in the BRAM block If the HEX entry (code size in hexadecimal) is larger than the HIGHADDR of the memory controllers, then your code will not fit
Restructure code to decrease size Ask lab assistants for hints if needed
Download
Select Configure Devices => Click Next Select Boundary-Scan Mode => Click Next Select Automatically connect => Click Next
Ignore the warning about wrong identification Right-click device and select Program
Summary
Define hardware for system Setup software environment for program Write software to implement functionality Synthesize and compile system Download implementation
Repeat the steps if the system is changed