Dec 24, 2004 #1 E echo47 Advanced Member level 6 Joined Apr 7, 2002 Messages 3,933 Helped 638 Reputation 1,274 Reaction score 90 Trophy points 1,328 Location USA Activity points 33,176 I'm running ModelSim SE 5.8d on Win2k. Why does this Verilog 2001 module return the value 49 instead of 35? Code: module foo (y); wire signed [15:0] a, b; output signed [15:0] y; assign a = 5; assign b = 7; assign y = 1 * a * b; endmodule
I'm running ModelSim SE 5.8d on Win2k. Why does this Verilog 2001 module return the value 49 instead of 35? Code: module foo (y); wire signed [15:0] a, b; output signed [15:0] y; assign a = 5; assign b = 7; assign y = 1 * a * b; endmodule
Dec 24, 2004 #2 Z z81203 Full Member level 5 Joined Aug 1, 2001 Messages 308 Helped 5 Reputation 10 Reaction score 1 Trophy points 1,298 Activity points 2,356 ModelSim, unexpected output value. interesting, the problem is 1 or signed. for signed, if you try 1*b*a, it's 25; & if you write 16'd1, there is no problem. for unsigned, there is right also. i don't know why. who can explain it?
ModelSim, unexpected output value. interesting, the problem is 1 or signed. for signed, if you try 1*b*a, it's 25; & if you write 16'd1, there is no problem. for unsigned, there is right also. i don't know why. who can explain it?
Dec 24, 2004 #3 N nand_gates Advanced Member level 3 Joined Jul 19, 2004 Messages 899 Helped 175 Reputation 350 Reaction score 53 Trophy points 1,308 Activity points 7,037 This is possibly a bug in Modelsim version you are working with. I am getting correct result on ModelSim SE vlog 5.5d Linux
This is possibly a bug in Modelsim version you are working with. I am getting correct result on ModelSim SE vlog 5.5d Linux
Dec 24, 2004 #4 Z z81203 Full Member level 5 Joined Aug 1, 2001 Messages 308 Helped 5 Reputation 10 Reaction score 1 Trophy points 1,298 Activity points 2,356 hi, i try it with 6.0b on sun. same problem.
Dec 24, 2004 #5 N nand_gates Advanced Member level 3 Joined Jul 19, 2004 Messages 899 Helped 175 Reputation 350 Reaction score 53 Trophy points 1,308 Activity points 7,037 Ya, Ur right on Modelsim 6.0b linux its giving wrong response!