XS40 Tutorial: Onboard micro-controller (8031)
This example will show you how to control the onboard
micro-controller (8031) connected to the FPGA. Here is how you
generate the bit stream for the FPGA:
- Run Xilinx Foundation Project Manager.
- Click OK to create a new project.
- Type "tut2" for name and browse/select "c:\temp" for
directory and click the HDL flow button followed by OK.
- Download (wrled.vhd,
ctrup.vhd,
xs40.vhd,
tut2.ucf) into "c:\temp\tut2".
- Add the three VHDL files to your project using menu item
"Synthesis - Add HDL Source File(s)...".
- Click the big "Synthesis" button and select "XS40" for Top Level,
"XC4000XL" for Family and "4010XLPC84" for Device, then
click Run.
- Click the big "Implementation" button, then click Run.
When complete, exit Project Manager. You are done!
Now you have to generate the hex file for the micro-controller:
- Download main.c into the "c:\temp\tut2".
- Compile and link to generate tut2.hex.
Now you have to download the bitstream and hex files onto the XS40 board:
- Open a "Command Prompt" terminal and cd to "c:\temp\tut2".
- Make sure your XS40 board is powered up and connected to
the computer.
- Type "xsload tut2.hex tut2.bit" on the prompt and hit
"enter". You are done!