input a,b,sel; wire sel_,a1,b1; not ` not_delay not1(sel_,sel); and ` and_delay and1(a1,a,sel_); and ` and_delay and2(b1,b,sel); or ` or_delay or1(out,a1,b1); endmodule 解除定义的宏,使用 `undef macro_name 使用编译指导`define,可以: 提高描述的可读性 定义全局设计参数,如延时和矢量的位数。这些参数可以定义在同一位置。这样,当要修改设计配置时,只需要在一个地方修改。 例:定义Verilog命令的简写形式 `define vectors_ file "/usr1/chrisz/library/vectors" `define results_ file "/ usr1/chrisz/library/results" 可以将`define放在一个文件中,与其它文件一起编译。 |
|关于本站|小黑屋|Archiver|手机版|无线电爱好网
( 粤ICP备14010847号 )
GMT+8, 2014-5-23 12:47 , Processed in 0.104627 second(s), 27 queries .
Powered by Discuz! X3.1 Licensed
© 2001-2013 Comsenz Inc.