timescale
timescale
预编译
`timescale是Verilog、Systemverilog的预编译指令,按照编译顺序,在此指令之后编译的component (module/program/interface…)都要按照timescale中规定的时间规则进行仿真,直到出现下一个timescale,
timescale是跟编译顺序密切相关的。
定义方式:
`timescale time_unit / time_precision
有定义方式可知,timescale定义了两种时间规则:
- time unit
- time precision
time unit
描述仿真系统中,描述delay的时间单位。在仿真中:
delay = delay_value * time_unit
例如 time_unit = 10ns,那么在code中 #10,代表的是延时 10 * 10 = 100 ns
支持的时间单位有:
下垂的蜗牛: 老哥,你后面说的应用没咋看明白,可以再详细解释下吗?