My name is Sven Andersson and I
work as a consultant in embedded
system design, implemented in ASIC
In my spare time I write this blog
and I hope it will inspire others to
learn more about this fantastic field.
I live in Stockholm Sweden and have
my own company
You are welcome to contact me
and ask questions or make comments
about my blog.
This program will read a 4-bit value from the DIP switches and write this value to the LED register driving the LEDs. DIP_Read is a 32-bit global variable defined in xbasic_types.h. XGpio_ReadReg and XGpio_WriteReg are a low level drivers defined in xgpio_l.h
Save the file. The application will be compiled when saved. The Project menu gives options to change the behavior for building the application.
Generate a linker script
In the SDK Project Explorer View, right-click on the Tutorial_Test project and select Generate Linker Script. This time we are going to put all the code in internal BRAM. The program will be recompiled when the linker script has changed.
Test the generated system with the new application
In SDK, click on the Program FPGA icon.
Click the program button to start the programming.
Run the program
In the SDK Project Explorer View, right-click on the Tutorial_Test project and select Run As -> Run Configuration.
Select Xilinx C/C++ ELF and click the New Launch Configuration icon.
In the SDK Run Configurations window select the STDIO Connection tab
Check the Connect STDIO to Console box
Leave the baud rate at 9600
Click the RUN button to start the program execution. Carefully modify the DIP switches positions to turn the LEDs on and off. Make sure the text "--Entering Mani()---" is displayed on the console. TopPreviousNext