CE433 2022 Spring
Week 8
John Hitti
jdhitti@fortlewis.edu
Week 8
Introduction In
this week's
project we will be exploring the softCore capabilities of the FPGA. We
will be using PicoBlaze, a softprocessor from Xilinx, and programming
simple instructions using assembly.
Task 1
In
this task we will start by initializing the FPGA to run the
softprocessor and use a simple program to turn on an led when a switch
is flipped. We start by copying over the proper code from Xilinx and
placing it in our project folder. Then we can connect the processor to
the proper i/o on our FPGA.
Then we can create our assembly code.
We can then run the program
to generate a ROM file from the assembly code. Once this is done, we can
load it into Vivado and upload it to the FPGA bard as usual to verify
the functionality.
Task 2 In
this task we will now create a simple assembly program to output 13 to
the leds of the FPGA. Using the same main code and process as the
previous task we can upload our new assembly code to the FPGA!
Task 3 In
this task we will use the MASK fuction in assembly. This function can
force bits to wither zero or one. In this case we will force the bottom
two bits to be one and light up the leds regardless of the input switch
position.
Task 4
In
this task we we will reuse the code from task one but we will shift the input to the right by one bit.
Task 5 In
this task we will create a program to demonstrate the jump, load, and
return instructions. When the switch is zero the output will show 5.
When a switch is pressed the output will show 6. This is done by
jumping between two different sections that change the output of the
code.
Task 6 In
this task we will create a program that will work with multiple
subroutines. When the counter reduces by one the LED will increment by
one.
Task 7
In
this task we will revise the above code using the compare statements to achieve the same outcome.
Task 8
In
this task we will create our own assembly program that will take the
input (in the form of switches flipped) and sum the amount of bits in
the input and return a binary value as the output (in the form of led
output).
Discussion This
project was an excellent introduction into softprocessors and more
specifically their implementation with FPGA devices. Xilinx's PicoBlaze
processor is very useful and unlocks a lot more potential for FPGA
devices.