+ 1

guys i wanna write a 4-bit complementary 2-bit multiplier circuit in verilog code

module multiplier (); reg signed [3 : 0] number1; reg signed [3 : 0] number2; wire signed [7 : 0] result; assign result = number1 * number2; //test bench initial begin // -4 * 3 number1 = 4'b1100; //-4 number2 = 4'b0011; //3 // 5 * 6 #1000 number1 = 4'b0101; //5 number2 = 4'b0110; //6 end endmodule

25th Oct 2020, 7:22 PM
Coder
Coder - avatar
11 Respuestas
+ 1
What language is that?From where you can learn it?
25th Oct 2020, 9:38 PM
HBhZ_C
HBhZ_C - avatar
+ 1
Verilog.
25th Oct 2020, 9:42 PM
Coder
Coder - avatar
+ 1
Verilog is that a powerful lang Coder ?what kind of programs you can build with it?
25th Oct 2020, 9:44 PM
HBhZ_C
HBhZ_C - avatar
+ 1
We create circuits, make fulladder,half adder,multipliers with verilog code
25th Oct 2020, 9:48 PM
Coder
Coder - avatar
+ 1
It has warnings like memory warnings
25th Oct 2020, 9:54 PM
Coder
Coder - avatar
0
@Coder don't you wanna put your test bench and design code in separate files first
25th Oct 2020, 9:48 PM
Khaled ^^ خالد القريشي‎
Khaled ^^ خالد القريشي‎ - avatar
0
Coder what are the errors you get when you run it?
25th Oct 2020, 9:53 PM
Khaled ^^ خالد القريشي‎
Khaled ^^ خالد القريشي‎ - avatar
0
If it is a warning it should work. But if it is an error that's another thing Coder
25th Oct 2020, 9:57 PM
Khaled ^^ خالد القريشي‎
Khaled ^^ خالد القريشي‎ - avatar
0
It's on xilinx. It has warnings so test bech won't run successfully
25th Oct 2020, 9:59 PM
Coder
Coder - avatar
0
Coder could you try just with wire instead of wire signed and in the test bench take the - off and try it if it works
25th Oct 2020, 10:02 PM
Khaled ^^ خالد القريشي‎
Khaled ^^ خالد القريشي‎ - avatar
0
Also try to use just reg instead of reg signed. This just to debug and see what my cause the problem
25th Oct 2020, 10:03 PM
Khaled ^^ خالد القريشي‎
Khaled ^^ خالد القريشي‎ - avatar