Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Kindly explain some queries in Verilog Code

Status
Not open for further replies.

moonnightingale

Full Member level 6
Joined
Sep 17, 2009
Messages
362
Helped
5
Reputation
10
Reaction score
5
Trophy points
1,298
Activity points
3,832
I am stuck with these two statements. Why book has used them. Kindly explain me
As far as always@(clock) or always@(posedge clock) that i understand but i am confused with these.Plz help me
 

Attachments

  • q1.jpg
    q1.jpg
    116.5 KB · Views: 77
  • q2.jpg
    q2.jpg
    101.7 KB · Views: 83

Whats the difference of always@(clock) and always@(code)? Both are inputs... The always is going to be trigged when its argument changes or the logic result of the argument changes... If you have something as always@(clock or code), that means that the always is will be trigged when clock or code changes...
 

I am stuck with these two statements. Why book has used them. Kindly explain me
As far as always@(clock) or always@(posedge clock) that i understand but i am confused with these.Plz help me

Its a simulator-related issue nowdays. in verilog/vhdl, a change to a signal(reg/wire) will force the simulator to start looking for how this will change the design. The always @ (conditions) is a way to tell the simulator that this code is/is-not affected by the change/event on the signal. The simulator then evaluates all of the always blocks/assigns that the change to this signal would cause. in most cases, it is only after the evaluation of all blocks that the other signals are actually updated.

If you fail to include the signals in the "sensitivity list" is can infer a latch. but some synthesizers will just ignore the sensitivity list, which means the method can't be used to describe a latch in all cases.

systemverilog is adding some new constructs that allow the user to define the always block as combinatorial, and the tools will fill in the sensitivity list.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top