N
Navneet Rao
Guest
Hi:
Has anybody seen this...
always @ ( * ) begin
......
......
......
end
Thanks
-Navneet
Has anybody seen this...
always @ ( * ) begin
......
......
......
end
Thanks
-Navneet
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Hi:
Has anybody seen this...
*always @ ( * ) begin*
* ......*
* ......*
* ......*
*end***
Thanks
-Navneet
Yes, this was introduced in the 2001 language revision. Basically itHi:
Has anybody seen this...
always @ ( * ) begin
......
......
......
end
Unfortunately it is ambiguous. Since it is not literally defined as a singleI'm one of those compiler writers who had a run in with the syntax,
but unlike some other things in Verilog, it is not ambiguous. I had
to detect "(*)" in the lexical analyzer, and if matched, convert it
to a single '*' token. This prevents "(*" from being interpreted as
the start-of-attribute token. It's a little quirky, but not difficult.
Granted.I think the rant was more that other tools don't always get the @(*)
parsing right, particularly in more subtle cases, and in getting it
wrong make the feature more problematic.
You got me there. "@ (* /* comment */ )" confounds my lexor, leadingWhile I agree that with a competent lexer and parser generator it
isn't too difficult to get the parsing mostly correct, I'm not so
certain about entirely correct. As a result, I'm not surprised that
some vendors get it subtly wrong, given that there are several almost
hacks that come close. For example, the case of code like:
`define empty
always @(*`empty)
is tricky if one does maximal munch and one wants to treat (* as a
single token when appropriate. Are you really certain, you have all
the cases where something can become syntacticly invisible between
the (* and the ).
Sorry. I didn't mean to "get you", but I'm glad you see the point.You got me there. "@ (* /* comment */ )" confounds my lexor, leading
to the token stream @ (* ) and an error. The fix is rather obvious,
but I get the point.