Need VHDL code This project consists of two main components. A counter programmed with VHDL and an ALU based on MicroBlaze running a C code to perform ALU functionality.
1. This project requires the students to implement a 10-bit counter design using VHDL. The counter will have the ability to count up and down from 0 and 1000. This requires the utilization of 16 slide switches and the center push button of the Basys3 board. The 10 right- most switches (SW0 – SW9) will be used to input a preset value to the counter or the ALU. SW0 represents the LSB and SW9 represents the MSB of the input value.
The center push button (BTNC) is used as the manual clock for the counter. The count should increase or decrease (depending on the selector switch, SW13) by 1 on every rising edge of this button.
SW14 will be a synchronous preset to the counter. SW15 will be an asynchronous reset. If the asynchronous reset goes “high” (logic ‘1’, switch slides to the top), the count should reset to 0 regardless of the clock signal. As long as the reset stays “high”, the count should stay at 0 even if the clock is toggled or the preset is applied.
The synchronous preset should set the count value to the value on the slide switches SW0- SW9. This is synchronous, so nothing should happen to the count until the preset goes “high” (logic ‘1’) AND the clock signal (BTNC) is toggled.
2. Using the knowledge from Lab 8 implement a MicroBlaze design which has GPIO and UART capabilities. GPIO input must be 22bits wide and should read the value of the counter out and the slide switches SW11 and SW0. The GPIO output must be 16bits wide and should be assigned to 16 LEDs (LD0 – LD15) on Basys3 Board.
Reset of the MicroBlaze Clock Wizard should be connected to the SW15. Modify the C code given in Lab 7 to do the following.
Assign the counter out to the variable “numA” and assign SW0-SW9 to the variable “numB”. Then, perform different arithmetic operations based on the value of SW10 and SW11.