I can find several v2k full grammars with google -- but either I am losing my mind or they are all broken in the same way with regard to port declarations. Example input:
module foo (
input x,
output [2:0] y);
endmodule;
I can t find a grammar which will parse that syntax, but they will accept things like this as a port in the list_of_port:
{ name[3:0], name2[2:0]}
.. or .. .name( othername )
也就是说,我希望在模块实例化端口绑定的语法中看到的东西是为模块端口声明提供的。
示例
http://www.externsoft.ch/download/verilog.html#module_declaration
http://www.syncad.com/VeriLogger_bnf_Syntax_Verilog_2001.htm#list_of_ports
我想我可以查看icarus源代码,或者Perl::Verilog。不过,我希望能得到一个确认,即上面的语法已经被破坏了——或者,如果没有,有人能指出我遗漏了什么吗。一个正确语法的来源将是伟大的。。。