Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
13 years ago

always@(*) statement

Hi,

I've seen always@(*) in a few tutorials but i'm unsure on where this is a valid sensitive list or whether they're refering the * to be any input you want? And whether it should be used, if it is a valid sensitive list?

Unfortunately, I can't find much information on it.

Help is much appreciated

2 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Don't use it for a clocked process, but for a combinatorial process, as you don't have to list the inputs that the outputs are based on. This task always caused problems whereby if you forget to add something to the sensitivity list, a latch can get inferred when you don't want it.

    On a similar note, I'm a fan of the system verilog commands always_comb, which doesn't require a sensitivity list, and always_ff. Minimally, I think it keeps things clear. (I think there's supposed to be an error or warning if code the wrong thing, like a latch in an always_comb block, but I haven't really tested it out.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Is there a general name for the always commands always_comb and always_ff? It might make it easier to Google. :)

    What's the general name for the * in the sensitive list?