File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed
regression/verilog/expressions Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change 1+ CORE
2+ integer_literals2.sv
3+
4+ ^EXIT=0$
5+ ^SIGNAL=0$
6+ --
7+ ^warning: ignoring
Original file line number Diff line number Diff line change 1+ module main ;
2+
3+ // 1800-2017 5.7.1
4+
5+ // "If the size of the unsigned number is smaller than the size specified
6+ // for the literal constant, the unsigned number shall be padded to the
7+ // left with zeros."
8+ initial assert (4'b1 === 4'b0001 );
9+
10+ // "If the leftmost bit in the unsigned number is an x or a z, then
11+ // an x or a z shall be used to pad to the left, respectively."
12+ initial assert (4'bz1 === 4'bzzz1 );
13+ initial assert (4'bx1 === 4'bxxx1 );
14+
15+ // "If the size of the unsigned number is larger than the size specified
16+ // for the literal constant, the unsigned number shall be truncated from
17+ // the left."
18+ initial assert (4'b1111_1111 === 4'b1111 );
19+
20+ endmodule
You can’t perform that action at this time.
0 commit comments