In sat: 'x' in init attr should not override constant
[yosys.git] / tests / sat / initval.v
1 module test(input clk, input [3:0] bar, output [3:0] foo);
2 reg [3:0] foo = 0;
3 reg [3:0] last_bar = 0;
4 reg [3:0] asdf = 4'b1xxx;
5
6 always @*
7 foo[1:0] <= bar[1:0];
8
9 always @(posedge clk)
10 foo[3:2] <= bar[3:2];
11
12 always @(posedge clk)
13 last_bar <= bar;
14
15 always @*
16 asdf[2:0] <= 3'b111;
17
18 assert property (foo == {last_bar[3:2], bar[1:0]});
19 endmodule