likewise
Newbie level 5
- Joined
- Jun 22, 2012
- Messages
- 10
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,281
- Activity points
- 1,372
I have a simulator and a synthesize tool which have conflicting results in the following code / case:
lessthan = ((B << 1) <= B_t'(-N));
lessthan is "logic"
N is "logic [11:0]" and has value 53;
B is "logic signed [18:0]" and has value -26;
B_t is a typedef for "logic signed [18:0]";
The simulated design results in lessthan being 0 / false.
The synthesized design results in lessthan being 1 / true.
Which tool is right? In other words, how should the SystemVerilog be interpreted.
- There is a negation of an unsigned logic value 53, followed by a cast to logic signed, on the right hand side of the equation.
- The left hand side has a shift-left by 1, on an logic signed value -26. I expect this to result in -52.
I think B_t'(-N))) is interpreted differently by the two tools.
What is the correct interpretation? Preferably with reference to the SystemVerilog standard.
Thanks for any insight.
lessthan = ((B << 1) <= B_t'(-N));
lessthan is "logic"
N is "logic [11:0]" and has value 53;
B is "logic signed [18:0]" and has value -26;
B_t is a typedef for "logic signed [18:0]";
The simulated design results in lessthan being 0 / false.
The synthesized design results in lessthan being 1 / true.
Which tool is right? In other words, how should the SystemVerilog be interpreted.
- There is a negation of an unsigned logic value 53, followed by a cast to logic signed, on the right hand side of the equation.
- The left hand side has a shift-left by 1, on an logic signed value -26. I expect this to result in -52.
I think B_t'(-N))) is interpreted differently by the two tools.
What is the correct interpretation? Preferably with reference to the SystemVerilog standard.
Thanks for any insight.