D
DReynolds
Guest
Can anyone tell me how to check my veriloga for good style using a lint
type program? I searched this board and did a quick google, but did not
find anything that looked like a veriloga lint.
I recently had this code that did not do what I thought it would do:
generate i(0,5,+1) begin
code =code + (V(address >vth) ? pow2 : 0;
end
I was expecting it to take my address and turn it into a number, but it
didn't. It always gave 32 as an answer.
Adding a set of paren fixed it:
code =code + ((V(address >vth) ? pow2 : 0);
The original did compile and run so I was hoping lint could find an
error like this....
David Reynolds
type program? I searched this board and did a quick google, but did not
find anything that looked like a veriloga lint.
I recently had this code that did not do what I thought it would do:
generate i(0,5,+1) begin
code =code + (V(address >vth) ? pow2 : 0;
end
I was expecting it to take my address and turn it into a number, but it
didn't. It always gave 32 as an answer.
Adding a set of paren fixed it:
code =code + ((V(address >vth) ? pow2 : 0);
The original did compile and run so I was hoping lint could find an
error like this....
David Reynolds