Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Create a Verilog module for the 7-segment decoder. Connect the c2c1c0 inputs to

ID: 1804094 • Letter: C

Question

Create a Verilog module for the 7-segment decoder. Connect the c2c1c0 inputs to switches SW2??0, and connect the outputs of the decoder to the HEX0 display on the DE2 board. The segments in this display are called HEX00, HEX01, . . . , HEX06, corresponding to Figure 5. You should declare the 7-bit port:output [ 0 : 6 ] HEX0 ; in your Verilog code so that the names of these outputs match the corresponding names in the DE2 User Manual and the DE2 pin assignments.csv file.

Explanation / Answer

#include #include #include using namespace std; void findLowest(int north, int south, int east, int west, int central,int numAccidents); void findHighest(int north, int south, int east, int west, int central,int numAccidents); int getNumAccidents(string regionName); int main() { string regName; int north, south, east, west, central, numAccidents; cout south) { regName = "south"; numAccidents = south; } if (numAccidents > east) { regName = "east"; numAccidents = east; } if (numAccidents > west) { regName = "west"; numAccidents = west; } if (numAccidents > central) { regName = "central"; numAccidents = central; } cout