project Verilog

User Generated

zbr_2211

Programming

Description

It is required to make program that do 8 operations and has numbers R1, R2, R3 and R4 as inputs each is a 4-bit and have the result Y.

But due to the limitation of the current FPGA module (only have 16 switches), memory is needed to store all the four input numbers and then do the ALU operation from the memory.


it must be using Verilog

and it is simulated using Nexyes 4 FPGA

Unformatted Attachment Preview

Lab Project It is required to make program that do 8 operations and has numbers R1, R2, R3 and R4 as inputs each is a 4-bit and have the result Y. But due to the limitation of the current FPGA module (only have 16 switches), memory is needed to store all the four input numbers and then do the ALU operation from the memory. Register modules is a memory element that can save an array of bits, the register module is shown on figure9.4 page 57 has an input signal d which is the value to be stored with n-bits length, the load signal that should be ‘1’ to allow the input signal to be stored in the register at the positive edge of CLK and an output signal q which shows the value that is stored in the register. The idea of this project is to create 4 registers to store the values of R1, R2, R3 and R4, and then do the selected operation and the result should be displayed in the first 2 digits from the right of the 7-segment display, the selected operation should be displayed in the fourth digit from the right of the 7-segment display. The four digits from the left of the 7-segment display will show the values stored in the registers R1, R2, R3 and R4 as shown in the figure. The remaining digit will show ‘E’ if you went into edit mode so that you can change the values stored in the registers and the digit will show nothing otherwise. When you are in edit mode by making the ‘Edit switch’ into ‘1’, you can select which register that you want to edit using 2 switches called ‘Register Selector’, then the selected register value will blink in a speed that is chosen using another 2 switches called ‘Blink Selector’ ( the blinking speeds are shown in a table), then by using 4 switches named ‘Value Selector’ you can select the required value to be written in the register, finally the ‘Load’ button need to be pressed to write the selected value into the selected register. There will be a ‘Reset’ button that will reset the selected register into 0000. Another button called ‘Reset All’ that will reset all the registers into 0000. Lastly, there will be a ‘7-Segment Enable’ switch that will turn off all the digits if it is ‘0’ and will work normally if it is ‘1’ A program that consists of several modules to manage the entire system is needed, and the features of this program is illustrated in the figure below. All the numbers displayed in the 7segemnt display will be in hexadecimal. The Led lights will show the binary values of all the registers combined, like in the given example shown in the last, the LEDs will be 1111110000111010 There will be a ‘LEDs Enable’ switch that will turn off all the LEDs if it is ‘0’ and will work normally if it is ‘1’ You can work individually or in group of two, a detailed project report is required (if you are in a group then the group should have one report) the template will be the same as lab report (objectives – equipment – introduction – lab work – conclusion) but with more details. The grading will depend on how it meets the requirements, the project report and heavily dependent on your contribution and understanding of your work. Here is an example of R1=1111 (F)16, R2=1100 (C)16, R3=0011 (3)16, and R4=1010 (A)16. Operation Selector Type of Operation Details 000 Addition Perform an addition between R1 and R2 001 Subtraction Perform a subtraction between R2 and R3 010 Product Perform a product between R3 and R4 011 Highest Value Shows the highest value of the four registers 100 Lowest Value Shows the lowest value of the four registers 101 OR Perform the logic OR between all the registers 110 AND Perform the logic AND between all the registers 111 Decimal Value Shows the decimal Value of R4 Blinking Selector 00 01 10 11 Result Blinking Speed in Hz 0.75 1.5 3 6 Lab Project It is required to make program that do 8 operations and has numbers R1, R2, R3 and R4 as inputs each is a 4-bit and have the result Y. But due to the limitation of the current FPGA module (only have 16 switches), memory is needed to store all the four input numbers and then do the ALU operation from the memory. Register modules is a memory element that can save an array of bits, the register module is shown on figure9.4 page 57 has an input signal d which is the value to be stored with n-bits length, the load signal that should be ‘1’ to allow the input signal to be stored in the register at the positive edge of CLK and an output signal q which shows the value that is stored in the register. The idea of this project is to create 4 registers to store the values of R1, R2, R3 and R4, and then do the selected operation and the result should be displayed in the first 2 digits from the right of the 7-segment display, the selected operation should be displayed in the fourth digit from the right of the 7-segment display. The four digits from the left of the 7-segment display will show the values stored in the registers R1, R2, R3 and R4 as shown in the figure. The remaining digit will show ‘E’ if you went into edit mode so that you can change the values stored in the registers and the digit will show nothing otherwise. When you are in edit mode by making the ‘Edit switch’ into ‘1’, you can select which register that you want to edit using 2 switches called ‘Register Selector’, then the selected register value will blink in a speed that is chosen using another 2 switches called ‘Blink Selector’ ( the blinking speeds are shown in a table), then by using 4 switches named ‘Value Selector’ you can select the required value to be written in the register, finally the ‘Load’ button need to be pressed to write the selected value into the selected register. There will be a ‘Reset’ button that will reset the selected register into 0000. Another button called ‘Reset All’ that will reset all the registers into 0000. Lastly, there will be a ‘7-Segment Enable’ switch that will turn off all the digits if it is ‘0’ and will work normally if it is ‘1’ A program that consists of several modules to manage the entire system is needed, and the features of this program is illustrated in the figure below. All the numbers displayed in the 7segemnt display will be in hexadecimal. The Led lights will show the binary values of all the registers combined, like in the given example shown in the last, the LEDs will be 1111110000111010 There will be a ‘LEDs Enable’ switch that will turn off all the LEDs if it is ‘0’ and will work normally if it is ‘1’ You can work individually or in group of two, a detailed project report is required (if you are in a group then the group should have one report) the template will be the same as lab report (objectives – equipment – introduction – lab work – conclusion) but with more details. The grading will depend on how it meets the requirements, the project report and heavily dependent on your contribution and understanding of your work. Here is an example of R1=1111 (F)16, R2=1100 (C)16, R3=0011 (3)16, and R4=1010 (A)16. Operation Selector Type of Operation Details 000 Addition Perform an addition between R1 and R2 001 Subtraction Perform a subtraction between R2 and R3 010 Product Perform a product between R3 and R4 011 Highest Value Shows the highest value of the four registers 100 Lowest Value Shows the lowest value of the four registers 101 OR Perform the logic OR between all the registers 110 AND Perform the logic AND between all the registers 111 Decimal Value Shows the decimal Value of R4 Blinking Selector 00 01 10 11 Result Blinking Speed in Hz 0.75 1.5 3 6
Purchase answer to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

Hello,I'm done with the program, I'm attaching the program and testbench along with the elabor...


Anonymous
Great content here. Definitely a returning customer.

Studypool
4.7
Indeed
4.5
Sitejabber
4.4

Related Tags