Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

non block

Altera_Forum
Honored Contributor II
1,286 Views

plese help me check"DataInVld" and "DataIn"...,they are driven more than one time,is it dangerous?

0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
573 Views

It isn't dangerous. I'm not a Verilog expert, but I believe that when you are in an 'always' block, the statements ale taken sequentially, not concurrently. In that case, you can have several assignments in the block, and the last valid one wins.

0 Kudos
Altera_Forum
Honored Contributor II
573 Views

 

--- Quote Start ---  

It isn't dangerous. I'm not a Verilog expert, but I believe that when you are in an 'always' block, the statements ale taken sequentially, not concurrently. In that case, you can have several assignments in the block, and the last valid one wins. 

--- Quote End ---  

 

 

 

Hi, 

 

as long as you are using the non-blocking assignment it behaves like Daixiwen says. The 

evaluation take s place at the end of the cycle and the last assignment wins, but maybe you can re-write your code in order to make it easier to read. E.g a defalut should be a "default" without an exception. 

 

Kind regards 

 

GPK
0 Kudos
Altera_Forum
Honored Contributor II
573 Views

thanks for your kindly help! 

it changes my known about verilog.
0 Kudos
Reply