Systemverilog datatypes are essentially the keywords which are used to store a certain kind of data. Most of the datatypes in Systemverilog are derived from the Verilog HDL language, with a couple of additional datatypes. The most important contribution of SystemVerilog in "Datatypes" is, the addition of "2 State Variable" datatypes. For more info regarding this topic, you can refer to the SystemVerilog Language Reference Maual ( LRM ).
reg
wire
logic
bit
byte
integer
int
long/short
signed/unsigned
real
time
module top; logic out; reg [3:0] a,b; initial begin a = 5; b = 6; out = b; $display( "out : %0d", out ); end assign out = a; endmodule
module top; bit [31:0] A; reg [15:0] B; initial begin A = {32{1'b1}}; B = A; $display( "B : %0b", B ); B = ~B; $display( "B : %0b", B ); end endmodule
/* B : 1111111111111111 B : 0 */
module top; time t; int i; initial begin i = 15; t = 15/2; $display( "Output : %0t", t ); end endmodule
/* Output : 7.0 */
module top; bit a0; int a1; integer a2; real a3; time a4; wire a5; reg a6; logic a7; initial begin $display( "A0 : %0d", a0 ); $display( "A1 : %0d", a1 ); $display( "A2 : %0d", a2 ); $display( "A3 : %0d", a3 ); $display( "A4 : %0d", a4 ); $display( "A5 : %0d", a5 ); $display( "A6 : %0d", a6 ); $display( "A7 : %0d", a7 ); end endmodule
/* A0 : 0 A1 : 0 A2 : x A3 : x A4 : 0 A5 : z A6 : x A7 : x */
module top; int M; initial begin M = $urandom; M[31] = 1; // Sinice int is signed :D $display( "M : %0d", M ); end endmodule