module top; reg [0:7] mem [0:2]; initial mem[1] = '1; wire [31:0] a, b, c, d; assign a = mem[1]; assign b = mem[-1]; assign c = mem[-1][0]; assign d = mem[-1][0:1]; always @* begin assert ($countbits(a, '0) == 24); assert ($countbits(a, '1) == 8); assert ($countbits(a, 'x) == 0); assert ($countbits(b, '0) == 24); assert ($countbits(b, 'x) == 8); assert ($countbits(c, '0) == 31); assert ($countbits(c, 'x) == 1); assert ($countbits(d, '0) == 30); assert ($countbits(d, 'x) == 2); end endmodule ef='/cgit/'>cgit logo index : iCE40/yosys
clone of https://github.com/YosysHQ/yosys
aboutsummaryrefslogtreecommitdiffstats
path: root/examples/aiger/README
blob: 4e7694e95a352d1f58708e08991eaec8bf88acc4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22