lec chip
Don't take things to your heart. If you read my question, I asked a simple and a straight question and I did not get an answer from any one. I will repeat the question:
"Can anyone tell me with authority will the Rx[0] will get the inverted of TX_IN or all the bits of Rx will get inverted of TX_IN ?
The reason i am asking is cause i thought only the LSB gets inverted so i changed the code to
Rx [12:1] = 12'b0;
Rx[0] = ~TX_IN;
and when I LEC the two code, the LEC reported that the two codes are unequivalent "
It was not my code and it was a part of a chip working for 10 years as a CHIP. Also, it has been written by a guru, I have noticed that gurus does these sort of things to hide or prove themselves when things could be done in a very simple way. I HATE THAT. I know that it should have been explicit and simple. Having said that, the code lies within the Verilog LRM specifications.
To prove the point, I quote the Verilog 2001 LRM sec 4.1.10 Bit-wise operators page 48
"When the operands are of unequal bit length, the shorter operand is zero-filled in the most significant bit"
Here the code is stuffing zeros in the MSBs and then performing the inversion and that is the reason we get flip-flops which are set upon reset.
So the reason why LEC was showing unequivalent is that I specified Rx[12:1] to be 0 and if you change them to all 1s the LEC passes.
You suggested the following in your previous message.
- ambiguity in the code
- tool will make any sort guesses
- It is dangerous
- It is a mistake and
- It is not very poor coding technique.
All your suggestions are plain WRONG according to the LRM. The LRM nowhere suggests not to use this style while on many ocassion it does say not to do blah-blah
It is perfect, legal and explicit from the tool point of view. From readability point of view, i agree this is poor.
I have checked this code and experemented using the follwoing:
Verilog LRM
Cadence LEC (did rtl-to-rtl and rtl-to-netlist check)
Design Compiler (synthesis)
Synplicity
VCS
Xilinx XST
I saw consistency with what I am saying
This might not be a mystery for you but for me it was and I am glad that I spent days on it (not my official time).
In the end, please do not make suggestions as you did without some concrete knowledge, we are logical community and logic shall prevail.