Switch-Based ALU System (with Seven-Segment Display) - VHDL

Notes: This code is not dissimilar from the other simple ALU code found on this site (you can see it HERE), but adds a seven-segment display for output instead of just the binary output using the board's default indicator lights. The code performs four logic tasks (add, subtract, and, or) on two binary numbers, given by two sets of four switches. Number A is switches 12-15; number B is switches 8-11. The operation is determined by switches 1 and 0, where '00' is 'add', '01' is 'subtract', '10' is 'and', and '11' is 'or'. Switches 4 and 3 set the display mode for the final output: '00' is pass through (or standard output), '01' is 'circulate left', '10' is 'circulate right', and '11' is 'invert'. The seven-segment display uses a button as a clock, with each press displaying a different digit. The first segment is number A, the second is number B, and the third and fourth are the final output.

This VHDL code was written for an Artix-7 family Nexys 4 FPGA board. Constraints file can be downloaded by clicking HERE or in the GitHub repository.

The following code was written as part of coursework for University of Mississippi class EL E 386 (Advanced Digital Systems Lab).

You can also view and download the code by visiting the GitHub repository HERE.

Disclaimer: All of this code is listed here as samples of the work I've done both inside and outside of the classroom here at Ole Miss. Many of these coding samples were done as part of a project for a class I belonged to, or were done for my own personal practice from other years' programming assignments; if this is the case, I have labeled it with the relevant University of Mississippi course number. My code may or may not be correct- it is simply posted with the intent to serve as a demonstration of my growth over time as a programmer, and for the work to serve as a guide to other programmers who are attempting to learn the craft themselves. I DO NOT recommend copying any of my code verbatim under any circumstances due to the risk of academic disciplinary measures being taken against you, and I am NOT responsible if this or any other negative result occurs from use of my code. Using or viewing this code in any way constitutes an affirmation that you have read and consent to this disclaimer, and to the terms of the provided GNU AGPLv3 License. The full license can be found HERE.