Description
This bench proves a faulty block. One assumption leaves the solver with no legal trace at all. Find it and repair the bench.
A bench proves a faulty enable block because one assumption contradicts the reset setting. Enter the line number of that assumption. Then submit a repaired file that keeps idle cycles legal and fails three faulty blocks.
Pinned interface
| Port | Direction | Bits |
|---|---|---|
| clk | input | 1 |
| rst | input | 1 |
| set | input | 1 |
| clr | input | 1 |
| go | input | 1 |
| en | output | 1 |
| run | output | 1 |
Full specification
The block holds an enable bit. set raises it and clr clears it. go starts a run in the next cycle, but only while the block is enabled. The neighbour never sends set and clr together. It may leave all three inputs idle for any number of cycles.
The bench setting applies reset in the first step and releases it after that. The starter file has three assumptions and three assertions. With this file, an unbounded proof with the abc pdr engine passes on the good block. It also passes on three faulty blocks.
Enter the line number of the assumption that contradicts the reset setting. Then submit a repaired file. It must keep every legal input sequence, prove the good block and fail all three faulty blocks. Assumptions may only name the inputs.
1 assume property (@(posedge clk) rst |-> !set && !clr && !go);
2 assume property (@(posedge clk) disable iff (rst) !(set && clr));
3 assume property (@(posedge clk) set || clr || go);
4 assert property (@(posedge clk) disable iff (rst) go && en |=> run);
5 assert property (@(posedge clk) disable iff (rst) !en |=> !run);
6 assert property (@(posedge clk) disable iff (rst) clr |=> !en);
module top(input clk, input rst, input set, input clr, input go, output reg en=0, output reg run=0);
always @(posedge clk)
if (rst) begin en <= 0; run <= 0; end
else begin
en <= set ? 1'b1 : clr ? 1'b0 : en; // the neighbour never sends set with clr
run <= go && en;
end
always @(posedge clk) begin if ($initstate) begin assume(rst); end else begin assume(!rst); end end
endmodule
| 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 | Submit assertion properties using the starter’s format. The checks apply to this stated model and scope. |
| How this is graded | The reference obligations, independent reachability checks and fault checks must all succeed. An unresolved proof or resource limit is inconclusive and is never a rated miss. |
Measured Counterexample
FAIL · bmc · depth 8 · smtbmc yices · 1190 ms
This measured failing run uses the published interface. Follow the sampled violation back to the preceding inputs and state. The worked solution below explains the required behaviour and the failure mechanisms.
Samples from the measured run. Free input lanes are shaded; the terminal VCD record is omitted.
Sample 2: en=0, run=1. Previous sample: go=1, en=0. The enable bit was low when go arrived, so no run may start. This faulty block ignores the enable bit. A bench with no legal trace cannot show this step.
Examples
An Empty World
Bench setting: rst is 1 in step 0. Assumption: rst is never 1.
No trace satisfies both, so every assertion passes.
The solver finds no counterexample because it finds no trace of any kind.
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
Evaluate each assumption in step 0, where the bench holds rst high.
Hint 2
An assumption that helps a proof converge can still remove legal traffic. Read the first paragraph again.
Hint 3
Use the "When no trace exists" table of F10.2, then cover an idle cycle.
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.
INCONCLUSIVE never counts as acceptance or a rated miss. Run previews the same checks that Submit uses.
More problems on this topic