I've wrote a verilog code for Multiplier (8bit). I'm not getting the right result. Kindly tell me where i went wrong.
module Multiplier (x,y,z); input [7:0]x,y; output [15:0] z; assign z=x*y; endmodule
It got compiled without any errors. But when simulating, it gives me wrong results. It gives wrong results only when the MSB of the numbers is 1 (i.e when negative numbers are considered). Here is the picture of the simulation.
Kindly help me with how to rectify this problem. Also, I have another question to ask. While writing a code in modelsim, I observed some line numbers marked in red, Can anyone tell what they mean?