Verilog homwork assignment: in this assignment we\'re going to design a simple v
ID: 3773585 • Letter: V
Question
Verilog homwork assignment:in this assignment we're going to design a simple version of a shops selling mechanism.the system must have 10 input keys consisting of keys 0 to 9 for entering the products price.the system must also have 4 keys under the names Clear,Total,Enter and Number which are used for(in order from left to right) reseting,calculating the total price of the selected products,entering the items price and the number of products which have been entered till now into the system. the system here will always take the input prices in 4 digits and the user will always enter the input from left to right as in first entering the thousands digit(left most digit) then the hundreds digit then the tens digit and finally the ones digit(right most digit) —> for example if the price of a product was $23,the user would enter 0023,if the price was $432,the user would enter 0432 after entering the items value and pressing the Enter key,by hitting the Number key,the user can enter how many of that item he/she wants (for example 5 items of the value i just entered) and then by hitting Enter again the system will move on to the next item. finally,for displaying the sum price of everything entered the user can hit the Total key and the sum of the prices must be calculated by the system
for doing this assignment pay attention to these notes: -for calculating the total price you can use the * operator in the verilog language -the maximum number of items must be 99(highest 2 digit decimal) -sum price must be shown as a decimal number -if the sum price is over 5 digits long,after the user enters the Total key,the system must activate the output ERR(as in Error). -the Clear key must delete the total price calculated
Thank you very much! Verilog homwork assignment:
in this assignment we're going to design a simple version of a shops selling mechanism.the system must have 10 input keys consisting of keys 0 to 9 for entering the products price.the system must also have 4 keys under the names Clear,Total,Enter and Number which are used for(in order from left to right) reseting,calculating the total price of the selected products,entering the items price and the number of products which have been entered till now into the system. the system here will always take the input prices in 4 digits and the user will always enter the input from left to right as in first entering the thousands digit(left most digit) then the hundreds digit then the tens digit and finally the ones digit(right most digit) —> for example if the price of a product was $23,the user would enter 0023,if the price was $432,the user would enter 0432 after entering the items value and pressing the Enter key,by hitting the Number key,the user can enter how many of that item he/she wants (for example 5 items of the value i just entered) and then by hitting Enter again the system will move on to the next item. finally,for displaying the sum price of everything entered the user can hit the Total key and the sum of the prices must be calculated by the system
for doing this assignment pay attention to these notes: -for calculating the total price you can use the * operator in the verilog language -the maximum number of items must be 99(highest 2 digit decimal) -sum price must be shown as a decimal number -if the sum price is over 5 digits long,after the user enters the Total key,the system must activate the output ERR(as in Error). -the Clear key must delete the total price calculated
Thank you very much!
in this assignment we're going to design a simple version of a shops selling mechanism.the system must have 10 input keys consisting of keys 0 to 9 for entering the products price.the system must also have 4 keys under the names Clear,Total,Enter and Number which are used for(in order from left to right) reseting,calculating the total price of the selected products,entering the items price and the number of products which have been entered till now into the system. the system here will always take the input prices in 4 digits and the user will always enter the input from left to right as in first entering the thousands digit(left most digit) then the hundreds digit then the tens digit and finally the ones digit(right most digit) —> for example if the price of a product was $23,the user would enter 0023,if the price was $432,the user would enter 0432 after entering the items value and pressing the Enter key,by hitting the Number key,the user can enter how many of that item he/she wants (for example 5 items of the value i just entered) and then by hitting Enter again the system will move on to the next item. finally,for displaying the sum price of everything entered the user can hit the Total key and the sum of the prices must be calculated by the system
for doing this assignment pay attention to these notes: -for calculating the total price you can use the * operator in the verilog language -the maximum number of items must be 99(highest 2 digit decimal) -sum price must be shown as a decimal number -if the sum price is over 5 digits long,after the user enters the Total key,the system must activate the output ERR(as in Error). -the Clear key must delete the total price calculated in this assignment we're going to design a simple version of a shops selling mechanism.the system must have 10 input keys consisting of keys 0 to 9 for entering the products price.the system must also have 4 keys under the names Clear,Total,Enter and Number which are used for(in order from left to right) reseting,calculating the total price of the selected products,entering the items price and the number of products which have been entered till now into the system. the system here will always take the input prices in 4 digits and the user will always enter the input from left to right as in first entering the thousands digit(left most digit) then the hundreds digit then the tens digit and finally the ones digit(right most digit) —> for example if the price of a product was $23,the user would enter 0023,if the price was $432,the user would enter 0432 after entering the items value and pressing the Enter key,by hitting the Number key,the user can enter how many of that item he/she wants (for example 5 items of the value i just entered) and then by hitting Enter again the system will move on to the next item. finally,for displaying the sum price of everything entered the user can hit the Total key and the sum of the prices must be calculated by the system
for doing this assignment pay attention to these notes: -for calculating the total price you can use the * operator in the verilog language -the maximum number of items must be 99(highest 2 digit decimal) -sum price must be shown as a decimal number -if the sum price is over 5 digits long,after the user enters the Total key,the system must activate the output ERR(as in Error). -the Clear key must delete the total price calculated
Thank you very much!
Explanation / Answer
module conv ( input signed [15:0] a, b, output signed [15:0] o); assign o = a + b; endmodule module conv_tb(); reg signed [15:0] a,b,o; conv u0(.a(a),.b(b),.o(o)); reg [15:0] Mem [0:4]; reg [15:0] Mem1 [0:4]; integer j,k,oo; initial begin $readmemh("x.txt",Mem); $readmemh("d.txt",Mem1); oo = $fopen("o.txt","w"); end initial begin for (k=0; kRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.