Description
Six benches pass. Four of the passes hide a bug in the design. Decide which, and why.
Six small benches pass at depth 20. Read each contract, source and property file. Decide which proofs are honest and which hide a bug, and select the line that causes each lie.
Pinned interface
| Port | Direction | Bits |
|---|---|---|
| clk | input | 1 |
| rst | input | 1 |
| hit | input | 1 |
| hold | input | 1 |
| kick | input | 1 |
| take | input | 1 |
| give | input | 1 |
| req | input | 1 |
| bypass | input | 1 |
| op | input | 2 |
| ph | output | 1 |
| v | output | 1 |
| tok | output | 4 |
| pos | output | 2 |
| busy | output | 1 |
| gnt | output | 1 |
| cmd | output | 2 |
Full specification
Each card shows one small design, its property file and a recorded PASS at depth 20. Each card also states the contract the engineer meant to check. Some proofs check that contract. Others pass on a design that breaks it.
For every card, choose what the proof really is. Then select one line. For a proof that lies, select the check or the assumption that causes the lie. For an honest proof, select its assert property line.
Each case uses only the ports that its own source declares. A passing bounded run has no counterexample. So each card shows a companion trace: one cover, reached on the same bench.
| Recorded case | Local contract |
|---|---|
| Stretch for four cycles | Contract: v must stay high for four cycles of sys_clk after it rises. The companion trace is a cover on the same bench: v rises and falls. |
| Stretch, sampled on ph | Contract: v must stay high for four cycles of sys_clk after it rises. The companion trace is a cover on the same bench: v rises and falls. |
| The token under hold | Contract: While hold was high in the last cycle, no bit of tok may change. The token is never lost. The companion trace is a cover on the same bench: a kick while hold is high. |
| The meter after a take | Contract: busy must be high one cycle after every take. The neighbour sends give one cycle after each take. The companion trace is a cover on the same bench: three cycles after reset, under the same assumption. |
| Service within four cycles | Contract: Every req must see gnt within four cycles. The companion trace is a cover on the same bench: a request and its grant. |
| The legal command | Contract: cmd must never be 3, with or without bypass. The companion trace is a cover on the same bench: cmd reaches 3. |
| Execution rule | Meaning |
|---|---|
| Interface | Use the pinned port names, directions and bit widths shown above. Observed state and tracker outputs are not environment inputs. |
| Sampling | One positive edge of clk; binary values. Non-overlapping implication observes the next sample. Reset and initialization follow the source and contract above. |
| Submission | Select a cause and a numbered line for every recorded case. Checking these choices runs no engine. |
| How this is graded | The cause and responsible line must agree with each recorded local contract. A timeout or induction candidate must not be diagnosed as a reachable RTL failure. |
Stretch for Four Cycles
Contract: v must stay high for four cycles of sys_clk after it rises. The companion trace is a cover on the same bench: v rises and falls.
PASS · bmc · depth 20 · 649 ms
Samples from the separately reported companion check. Free input lanes are shaded; the terminal VCD record is omitted.
Companion check: PASS · reported step 9
Numbered source and task
1 module top(input clk, input rst, hit, output reg ph=0, output reg v=0);
2 reg [1:0] n=0;
3 always @(posedge clk) begin
4 ph <= !ph; // sys_clk = ph: two ticks of clk per sys_clk cycle
5 if (rst) begin v <= 0; n <= 0; end
6 else if (ph) begin // a rising edge of sys_clk
7 if (!v && hit) begin v <= 1; n <= 2'd2; end
8 else if (v) begin if (n == 0) v <= 0; else n <= n - 2'd1; end
9 end
10 end
11 always @(posedge clk) begin if ($initstate) begin assume(rst); end else begin assume(!rst); end end
12 endmodule
13 // props.sv
14 assert property (@(posedge clk) disable iff (rst) $rose(v) |-> v ##1 v ##1 v ##1 v);Stretch, Sampled on Ph
Contract: v must stay high for four cycles of sys_clk after it rises. The companion trace is a cover on the same bench: v rises and falls.
PASS · bmc · depth 20 · 664 ms
Samples from the separately reported companion check. Free input lanes are shaded; the terminal VCD record is omitted.
Companion check: PASS · reported step 11
Numbered source and task
1 module top(input clk, input rst, hit, output reg ph=0, output reg v=0);
2 reg [1:0] n=0;
3 always @(posedge clk) begin
4 ph <= !ph; // sys_clk = ph: two ticks of clk per sys_clk cycle
5 if (rst) begin v <= 0; n <= 0; end
6 else if (ph) begin // a rising edge of sys_clk
7 if (!v && hit) begin v <= 1; n <= 2'd3; end
8 else if (v) begin if (n == 0) v <= 0; else n <= n - 2'd1; end
9 end
10 end
11 always @(posedge clk) begin if ($initstate) begin assume(rst); end else begin assume(!rst); end end
12 endmodule
13 // props.sv
14 assert property (@(posedge clk) disable iff (rst) ph && v && !$past(v, 2) |-> v ##2 v ##2 v ##2 v);The Token Under Hold
Contract: While hold was high in the last cycle, no bit of tok may change. The token is never lost. The companion trace is a cover on the same bench: a kick while hold is high.
PASS · bmc · depth 20 · 629 ms
Samples from the separately reported companion check. Free input lanes are shaded; the terminal VCD record is omitted.
Companion check: PASS · reported step 3
Numbered source and task
1 module top(input clk, input rst, hold, kick, output reg [3:0] tok=4'b0001, output reg [1:0] pos=0);
2 reg hold_q=0;
3 reg at_pos_q=1; // last cycle's tok[pos]
4 always @(posedge clk) begin
5 hold_q <= hold;
6 at_pos_q <= tok[pos];
7 if (rst) begin tok <= 4'b0001; pos <= 0; end
8 else if (kick) begin tok <= {tok[2:0], tok[3]}; pos <= pos + 2'd1; end
9 if (!rst && hold_q) assert(tok[pos] == at_pos_q);
10 end
11 always @(posedge clk) begin if ($initstate) begin assume(rst); end else begin assume(!rst); end end
12 endmodule
13 // props.sv
14 assert property (@(posedge clk) disable iff (rst) tok != 4'd0);The Meter After a Take
Contract: busy must be high one cycle after every take. The neighbour sends give one cycle after each take. The companion trace is a cover on the same bench: three cycles after reset, under the same assumption.
PASS · bmc · depth 20 · 562 ms
Samples from the separately reported companion check. Free input lanes are shaded; the terminal VCD record is omitted.
Companion check: PASS · reported step 5
Numbered source and task
1 module top(input clk, input rst, take, give, output reg busy=0);
2 reg [1:0] idle=0; // idle cycles since the last take, saturating at 2
3 always @(posedge clk)
4 if (rst) begin busy <= 0; idle <= 0; end
5 else begin
6 busy <= take && idle != 2'd2;
7 idle <= take ? 2'd0 : idle == 2'd2 ? 2'd2 : idle + 2'd1;
8 end
9 always @(posedge clk) begin if ($initstate) begin assume(rst); end else begin assume(!rst); end end
10 endmodule
11 // props.sv
12 assume property (@(posedge clk) take ##1 give);
13 assert property (@(posedge clk) disable iff (rst) take |=> busy);Service Within Four Cycles
Contract: Every req must see gnt within four cycles. The companion trace is a cover on the same bench: a request and its grant.
PASS · bmc · depth 20 · 731 ms
Samples from the separately reported companion check. Free input lanes are shaded; the terminal VCD record is omitted.
Companion check: PASS · reported step 5
Numbered source and task
1 module top(input clk, input rst, req, output reg gnt=0);
2 reg [1:0] wait_n=0;
3 reg pending=0;
4 always @(posedge clk)
5 if (rst) begin gnt <= 0; pending <= 0; wait_n <= 0; end
6 else begin
7 gnt <= (pending || req) && wait_n == 2'd2 && !gnt;
8 if (gnt) begin pending <= req; wait_n <= req ? 2'd1 : 2'd0; end
9 else if (pending || req) begin pending <= 1; if (wait_n != 2'd2) wait_n <= wait_n + 2'd1; end
10 end
11 always @(posedge clk) begin if ($initstate) begin assume(rst); end else begin assume(!rst); end end
12 endmodule
13 // props.sv
14 assert property (@(posedge clk) disable iff (rst) req |-> ##[1:4] gnt);The Legal Command
Contract: cmd must never be 3, with or without bypass. The companion trace is a cover on the same bench: cmd reaches 3.
PASS · bmc · depth 20 · 632 ms
Samples from the separately reported companion check. Free input lanes are shaded; the terminal VCD record is omitted.
Companion check: PASS · reported step 2
Numbered source and task
1 module top(input clk, input rst, bypass, input [1:0] op, output [1:0] cmd);
2 // cmd 3 is illegal. The original check sat in a function, called as: ok = bypass || legal(cmd);
3 // legal() asserts cmd != 3. The property below keeps the guard that the call order applies.
4 assign cmd = bypass ? op : op == 2'd3 ? 2'd0 : op;
5 always @(posedge clk) begin if ($initstate) begin assume(rst); end else begin assume(!rst); end end
6 endmodule
7 // props.sv
8 assert property (@(posedge clk) disable iff (rst) !bypass |-> cmd != 2'd3);Requirements
- Use the published ports and widths. The checker and the DUT variants are owned by the judge.
- Do not add assumptions unless the statement explicitly asks for one. A passing assertion without a reachable trigger is insufficient.
Hints
Hint 1
Read the contract first. Then compare the companion trace with it, cycle by cycle.
Hint 2
Ask which samples the property reads and how many of them it counts.
Hint 3
For each assumption, ask which input cycles it removes.
Hint 4
A proof can be honest. Two of these are.
Single clock, binary values, synchronous reset. The judge checks the pinned interface, reachability and the declared proof or bound. UNKNOWN, resource limits and timeouts remain inconclusive.
The recordings are fixed. Checking a diagnosis does not run an engine.
More problems on this topic