Need help with strange Verilog Syntax

S

Stephen Williams

Guest
Hi all,

I've received a bug report from a user who wants Icarus Verilog to be
able to parse statements like this (within specify blocks):

$setup (posedge dudu[0], edge[0x,01,1x] C &&& (dude === 1'b1),
hu, ooooh12_0);

In particular, note the "edge[0x,01,1x]", in the place where I expect
a posedge or negedge. I can guess what this means, but I need more
information. Like, what is the syntax for it? (It is not part of the
IEEE standard 1364 as far as I can tell.) Which tools support it?
How widespread is it? How do I handle it lexically? I can't just make
"edge" a keyword, that'll break valid Verilog programs. It appears
that "edge[...]" may be a lexical token, but "edge[01]" is for example
also perfectly valid Verilog that would break if I did that.

This is going to be a tough nut, any pointers will be much appreciated.

Thanks,
 
Stephen Williams wrote:
In particular, note the "edge[0x,01,1x]", in the place where I expect
a posedge or negedge. I can guess what this means, but I need more
information. Like, what is the syntax for it? (It is not part of the
IEEE standard 1364 as far as I can tell.)
It turns out that it is. See section 14.5.9 "Edge control specifiers"
in the
1995 LRM or section 15.4 in the 2001 LRM.

Which tools support it?
Verilog-XL and NC-Verilog do. I assume that others do as well.

I can't just make
"edge" a keyword, that'll break valid Verilog programs.
Except that "edge" is listed as a keyword in the IEEE LRMs, so
this is not an issue.
 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

sharp@cadence.com wrote:
Stephen Williams wrote:
In particular, note the "edge[0x,01,1x]", in the place where I expect
a posedge or negedge. I can guess what this means, but I need more
information. Like, what is the syntax for it? (It is not part of the
IEEE standard 1364 as far as I can tell.)

It turns out that it is. See section 14.5.9 "Edge control specifiers"
in the
1995 LRM or section 15.4 in the 2001 LRM.
OK, I'm blind. Thanks, I'll go look it up. Now I have a clear
path to follow to deal with this.


- --
Steve Williams "The woods are lovely, dark and deep.
steve at icarus.com But I have promises to keep,
http://www.icarus.com and lines to code before I sleep,
http://www.picturel.com And lines to code before I sleep."
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFGK+CIrPt1Sc2b3ikRAseLAKCzKlGS/iVzzNYANNqdYNkRI15jIwCeMdFq
89uvadG1HAf9z0AoI18Lw3c=
=G/G3
-----END PGP SIGNATURE-----
 

Welcome to EDABoard.com

Sponsor

Back
Top