2006-08-26 11:35:28 +00:00
|
|
|
// DESCRIPTION: Verilator: Verilog Test module
|
|
|
|
//
|
|
|
|
// This file ONLY is placed into the Public Domain, for any use,
|
|
|
|
// without warranty, 2003 by Wilson Snyder.
|
|
|
|
|
|
|
|
module t;
|
|
|
|
reg signed [20:0] longp; initial longp = 21'shbbccc;
|
|
|
|
reg signed [20:0] longn; initial longn = 21'shbbccc; initial longn[20]=1'b1;
|
2007-06-14 21:27:40 +00:00
|
|
|
reg signed [40:0] quadp; initial quadp = 41'sh1_bbbb_cccc;
|
|
|
|
reg signed [40:0] quadn; initial quadn = 41'sh1_bbbb_cccc; initial quadn[40]=1'b1;
|
2006-08-26 11:35:28 +00:00
|
|
|
reg signed [80:0] widep; initial widep = 81'shbc_1234_5678_1234_5678;
|
|
|
|
reg signed [80:0] widen; initial widen = 81'shbc_1234_5678_1234_5678; initial widen[40]=1'b1;
|
|
|
|
|
|
|
|
initial begin
|
|
|
|
// Display formatting
|
2007-06-14 21:27:40 +00:00
|
|
|
$display("[%0t] lp %%x=%x %%x=%x %%o=%o %%b=%b %%0d=%0d %%d=%d", $time,
|
2019-06-13 02:22:36 +00:00
|
|
|
longp, longp, longp, longp, longp, longp);
|
2007-06-14 21:27:40 +00:00
|
|
|
$display("[%0t] ln %%x=%x %%x=%x %%o=%o %%b=%b %%0d=%0d %%d=%d", $time,
|
2019-06-13 02:22:36 +00:00
|
|
|
longn, longn, longn, longn, longn, longn);
|
2007-06-14 21:27:40 +00:00
|
|
|
$display("[%0t] qp %%x=%x %%x=%x %%o=%o %%b=%b %%0d=%0d %%d=%d", $time,
|
2019-06-13 02:22:36 +00:00
|
|
|
quadp, quadp, quadp, quadp, quadp, quadp);
|
2007-06-14 21:27:40 +00:00
|
|
|
$display("[%0t] qn %%x=%x %%x=%x %%o=%o %%b=%b %%0d=%0d %%d=%d", $time,
|
2019-06-13 02:22:36 +00:00
|
|
|
quadn, quadn, quadn, quadn, quadn, quadn);
|
2007-06-14 21:27:40 +00:00
|
|
|
$display("[%0t] wp %%x=%x %%x=%x %%o=%o %%b=%b", $time,
|
2019-06-13 02:22:36 +00:00
|
|
|
widep, widep, widep, widep);
|
2007-06-14 21:27:40 +00:00
|
|
|
$display("[%0t] wn %%x=%x %%x=%x %%o=%o %%b=%b", $time,
|
2019-06-13 02:22:36 +00:00
|
|
|
widen, widen, widen, widen);
|
2006-08-26 11:35:28 +00:00
|
|
|
$display;
|
|
|
|
$write("*-* All Finished *-*\n");
|
|
|
|
$finish;
|
|
|
|
end
|
|
|
|
endmodule
|