EmbDev.net

Forum: FPGA, VHDL & Verilog Verilog Query


Author: Jay (Guest)
Posted on:

Rate this post
0 useful
not useful
Is there a tool that tells which variable is assigned more then it 
size(no. of bits). VHDL will throw an error but verilog does not throw 
an error. It just truncates the extra bits assigned to the variable. 
Please Help!

Author: Erik (Guest)
Posted on:

Rate this post
0 useful
not useful
Synthesis Size Mismatch Warning
Lint Tools

Author: Andy (Guest)
Posted on:

Rate this post
0 useful
not useful
In Verilog the bitsize of the destination (on the left) dictate the size 
that is used for the whole expression. All the nets on the right side of 
the expression get truncated or expandend to that bitsize automatically. 
That's one of the big advantages of Verilog over VHDL (for me).

Author: Erik (Guest)
Posted on:

Rate this post
0 useful
not useful
An implicit truncation is bad coding style and will lead to 
synthesis/lint warnings.

An implicit expansion can be discussed.

Author: Andy (Guest)
Posted on:

Rate this post
0 useful
not useful
Agreed, there is normally something wrong if it gets truncated.

Author: Jay (Guest)
Posted on:

Rate this post
0 useful
not useful
Thanks!

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [vhdl]VHDL code[/vhdl]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig