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.
always(*) is not an error accoding to verilog 2001 std.
assgn a=b; will take more simulation time than
always(*) a=b; where a has to be of type reg as pointed out by Echo!
For more information please refer to ncsim simulation guide.
When the number of input variables to a combination logic block are very large, sensitivity lists can become very cumbersome to write. Moreover, if an input variable is missed from the sensitivity list, the block will not behave like a combinational logic block. To solve this problem, Verilog HDL contains two special symbols: @* and @(*). Both symbols exhibit identical behavior. These special symbols are sensitive to a change on any signal that may be read by the statement group that follows this symbol.[1] Example 7-17 shows an example of this special symbol for combinational logic sensitivity lists.
[1] See IEEE Standard Verilog Hardware Description Language document for details and restrictions on the @* and @(*) symbols.
Example 7-17 Use of @* Operator
//Combination logic block using the or operator
//Cumbersome to write and it is easy to miss one input to the block
always @(a or b or c or d or e or f or g or h or p or m)
begin
out1 = a ? b+c : d+e;
out2 = f ? g+h : p+m;
end
//Instead of the above method, use @(*) symbol
//Alternately, the @* symbol can be used
//All input variables are automatically included in the
//sensitivity list.
always @(*)
begin
out1 = a ? b+c : d+e;
out2 = f ? g+h : p+m;
end
the main difference between the two statements(assuming no syntax error):
both will evaluate the LHS expression, but
in case of
a) the expression within the always will be evaluated with respect to sensitivity list.
b) the expression is evaluated whenever the RHS changes.
in the first one,the operand on the left side has to be a reg...however as far as synthesis is concerned,both if them will synthesize the same logic...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.