Description
Three trackers use one free port index to check four sticky error flags. One passes on a faulty block and one fails on a good block. Explain both.
Three trackers check four sticky error flags through one free port index. One passes on a faulty block, one fails on a good block and one is honest. Choose what each result means and select the line that causes it.
Pinned interface
| Port | Direction | Bits |
|---|---|---|
| clk | input | 1 |
| rst | input | 1 |
| bad | input | 1 |
| ack | input | 1 |
| idx | input | 2 |
| err | output | 4 |
| watch | output | 2 |
Full specification
Each port has a sticky error flag. bad sets the flag of port idx, and ack clears it. Each card shows a block, a tracker with a free index f_p, and a recorded run at depth 12. watch is a copy of f_p.
For every card, choose what the result means. Then select one line. For a misleading result, select the line that causes it. For an honest result, select the line of the check.
| Recorded case | Local contract |
|---|---|
| Tracker A | Contract: a flag stays set until its own port is acknowledged. The companion trace is a cover on the same bench: only the flag of port 3 is set. |
| Tracker B | Contract: a flag stays set until its own port is acknowledged. This design has no fault. The trace is the reported failure. watch shows the free index. |
| Tracker C | Contract: a flag stays set until its own port is acknowledged. The companion trace is a cover on the same bench: only the flag of port 3 is set. |
| 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. |
Tracker A
Contract: a flag stays set until its own port is acknowledged. The companion trace is a cover on the same bench: only the flag of port 3 is set.
PASS · bmc · depth 12 · 623 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, input bad, input ack, input [1:0] idx, output reg [3:0] err=0, output [1:0] watch);
2 always @(posedge clk)
3 if (rst) err <= 0;
4 else begin
5 if (bad) err[idx] <= 1;
6 if (ack) begin
7 err[idx] <= 0;
8 if (idx[0]) err[3] <= 0;
9 end
10 end
11 // the tracker: one port stands for all four
12 (* anyconst *) reg [1:0] f_p;
13 assign watch = f_p;
14 reg f_s=0;
15 always @(posedge clk) begin
16 if ($initstate) begin assume(rst); end else begin assume(!rst); end
17 if (rst) f_s <= 0;
18 else if (ack && idx == f_p) f_s <= 0;
19 else if (bad && idx == f_p) f_s <= 1;
20 assume(f_p == 2'd2);
21 if (!rst) assert(err[f_p] == f_s);
22 end
23 endmoduleTracker B
Contract: a flag stays set until its own port is acknowledged. This design has no fault. The trace is the reported failure. `watch` shows the free index.
FAIL · bmc · depth 12 · 627 ms
Samples from the measured run. Free input lanes are shaded; the terminal VCD record is omitted.
Numbered source and task
1 module top(input clk, input rst, input bad, input ack, input [1:0] idx, output reg [3:0] err=0, output [1:0] watch);
2 always @(posedge clk)
3 if (rst) err <= 0;
4 else begin
5 if (bad) err[idx] <= 1;
6 if (ack) begin
7 err[idx] <= 0;
8 end
9 end
10 // the tracker: one port stands for all four
11 wire [1:0] f_p = $anyseq;
12 assign watch = f_p;
13 reg f_s=0;
14 always @(posedge clk) begin
15 if ($initstate) begin assume(rst); end else begin assume(!rst); end
16 if (rst) f_s <= 0;
17 else if (ack && idx == f_p) f_s <= 0;
18 else if (bad && idx == f_p) f_s <= 1;
19 if (!rst) assert(err[f_p] == f_s);
20 end
21 endmoduleTracker C
Contract: a flag stays set until its own port is acknowledged. The companion trace is a cover on the same bench: only the flag of port 3 is set.
PASS · bmc · depth 12 · 555 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, input bad, input ack, input [1:0] idx, output reg [3:0] err=0, output [1:0] watch);
2 always @(posedge clk)
3 if (rst) err <= 0;
4 else begin
5 if (bad) err[idx] <= 1;
6 if (ack) begin
7 err[idx] <= 0;
8 end
9 end
10 // the tracker: one port stands for all four
11 (* anyconst *) reg [1:0] f_p;
12 assign watch = f_p;
13 reg f_s=0;
14 always @(posedge clk) begin
15 if ($initstate) begin assume(rst); end else begin assume(!rst); end
16 if (rst) f_s <= 0;
17 else if (ack && idx == f_p) f_s <= 0;
18 else if (bad && idx == f_p) f_s <= 1;
19 if (!rst) assert(err[f_p] == f_s);
20 end
21 endmoduleRequirements
- 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 how each tracker declares f_p, and what else it says about it.
Hint 2
In each trace, follow watch from step to step.
Hint 3
Use the two mistakes in the "When a free variable misleads" section of F4.4.
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