赞
踩
bit b; // 双状态,单比特 bit [31:0] b32; // 双状态,32 比特无符号整数 int unsigned ui; // 双状态,32 比特无符号整数 int i; // 双状态,32 比特有符号整数 byte b8; // 双状态,8 比特有符号整数 shortint s; // 双状态,16 比特有符号整数 longint l; // 双状态,64 比特有符号整数 integer i4; // 四状态,32 比特有符号整数 time t; // 四状态,64 比特无符号整数 real r; // 双状态,双精度浮点数 initial begin b =1; b32=1; ui=1; i =1; b8 =1; s =1; l =1; i4 =1; t =1; r =1; $display("b = %b ",b ); $display("b32 = %b ",b32); $display("ui = %b ",ui ); $display("i = %b ",i ); $display("b8 = %b ",b8 ); $display("s = %b ",s ); $display("l = %b ",l ); $display("i4 = %b ",i4 ); $display("t = %b ",t ); $display("r = %b ",r ); end
b = 1
b32 = 00000000000000000000000000000001
ui = 00000000000000000000000000000001
i = 00000000000000000000000000000001
b8 = 00000001
s = 0000000000000001
l = 0000000000000000000000000000000000000000000000000000000000000001
i4 = 00000000000000000000000000000001
t = 0000000000000000000000000000000000000000000000000000000000000001
r = 0000000000000000000000000000000000000000000000000000000000000001
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。