|
|
1 module casting_data();
2
3 int a = 0;
4 shortint b = 0;
5
6 initial begin
7 $monitor ("%g a = %d b = %h", $time, a , b);
8 #1 a = int'(2.3 * 3.3);
9 #1 b = shortint'{8'hDE,8'hAD,8'hBE,8'hEF};
10 #1 $finish;
11 end
12
13 endmodule
You could download file casting_data.sv here
|