差别
这里会显示出您选择的修订版和当前版本之间的差别。
变量 [2018/09/11 09:02] group001 创建 |
变量 [2018/09/11 09:08] group001 |
||
---|---|---|---|
行 8: | 行 8: | ||
-注意:real和realtime是等价的,都是64-bit双精度浮点数,只不过realtime变量常和$realtime函数一起使用。 | -注意:real和realtime是等价的,都是64-bit双精度浮点数,只不过realtime变量常和$realtime函数一起使用。 | ||
-注意:不能对real和realtime使用位索引(bit-select)和部分索引(part-select)。 | -注意:不能对real和realtime使用位索引(bit-select)和部分索引(part-select)。 | ||
+ | |||
+ | <code verilog> | ||
+ | |||
例子: | 例子: | ||
integer i = 32'h1234_5678; | integer i = 32'h1234_5678; | ||
time t = 64'habcd_efab_1234_5678; | time t = 64'habcd_efab_1234_5678; | ||
$display ("%x, %x", i[15:0], t[63:60]); | $display ("%x, %x", i[15:0], t[63:60]); | ||
+ | </code> |