1
// DESCRIPTION: Verilator: Verilog Test module
3
// This file ONLY is placed into the Public Domain, for any use,
4
// without warranty, 2015 by Iztok Jeras.
6
`define checkh(gotv,expv) do if ((gotv) !== (expv)) begin $write("%%Error: %s:%0d: got='h%x exp='h%x\n", `__FILE__,`__LINE__, (gotv), (expv)); $stop; end while(0)
8
module t (/*AUTOARG*/);
11
logic signed [8-1:0] src;
13
// destination structure
15
logic signed [16-1:0] s;
16
logic unsigned [16-1:0] u;
21
// verilator lint_off WIDTH
23
dst = '{s: src, u: src};
24
`checkh (dst.s, 16'h0005);
25
`checkh (dst.u, 16'h0005);
28
dst = '{s: src, u: src};
29
`checkh (dst.s, 16'hfff5);
30
`checkh (dst.u, 16'hfff5);
31
// verilator lint_on WIDTH
33
$write("*-* All Finished *-*\n");