F10.3.1 Which Model Hid It?

MediumDebug20 minRecorded formal evidenceReview the topic

Problem

Description

Four proofs pass. In three of them something outside the property file decided the result. Name it.

Four small proofs pass at depth 20. In three of them a cell model or a bench setting decided the result. Read each contract and source. Choose what decided the result and select the line that carries the unstated assumption.

Pinned interface
PortDirectionBits
clkinput1
rstinput1
goinput1
xinput2
yinput2
reqinput1
dbg_eninput1
validinput1
dinput4
wantinput1
sel_aoutput1
sel_boutput1
mxoutput2
ackoutput1
busyoutput1
outoutput4
tkoutput2
phoutput1
enoutput1
gclkoutput1
Full specification

Each card shows a small design, one property and a recorded PASS at depth 20. Each card also states the contract and one fact about the real hardware.

For every card, choose what decided the result. Then select one line. For a model or a setting, select the line that carries the unstated assumption. For an honest proof, select the line of its main check.

Each case uses only the ports that its own source declares. Each card shows a companion trace: one cover, reached on the same bench.

Recorded caseLocal contract
The selectorContract: mx follows x while A is selected. The block ships with the MX1H cell. The companion trace is a cover on the same bench: both selects high.
The synchronised requestContract: An idle block acknowledges a request in the same cycle. req comes from another clock domain through SYNC2. The companion trace is a cover on the same bench: a request and its acknowledge.
The output in debugContract: out is zero whenever valid is low, in every mode of the shipped block. The companion trace is a cover on the same bench: a held word while valid is low.
The gated clockContract: A request sampled at tick 2 gets a clock pulse in the next cycle. The cell is the library latch gate. The companion trace is a cover on the same bench: a wanted pulse.
Execution ruleMeaning
InterfaceUse the pinned port names, directions and bit widths shown above. Observed state and tracker outputs are not environment inputs.
SamplingOne positive edge of clk; binary values. Non-overlapping implication observes the next sample. Reset and initialization follow the source and contract above.
SubmissionSelect a cause and a numbered line for every recorded case. Checking these choices runs no engine.
How this is gradedThe 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.

The Selector

Contract: mx follows x while A is selected. The block ships with the MX1H cell. The companion trace is a cover on the same bench: both selects high.

PASS · bmc · depth 20 · 1082 ms

Recorded companion trace
0123clkfreerstfreegofreex2'b00freey2'b00sel_asel_bmx2'b00
Scroll horizontally ↔

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, go, input [1:0] x, y, output reg sel_a=1, output reg sel_b=0, output [1:0] mx);
  2  // MX1H library cell: a pass-gate selector. Its formal model is the line below.
  3  // Data sheet: correct only while exactly one select is high.
  4  assign mx = sel_a ? x : y;
  5  always @(posedge clk)
  6    if (rst) begin sel_a <= 1; sel_b <= 0; end
  7    else begin
  8      if (go) sel_b <= !sel_b;
  9      sel_a <= !sel_b;
 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) sel_a |-> mx == x);

The Synchronised Request

Contract: An idle block acknowledges a request in the same cycle. req comes from another clock domain through SYNC2. The companion trace is a cover on the same bench: a request and its acknowledge.

PASS · bmc · depth 20 · 667 ms

Recorded companion trace
012clkfreerstfreereqackbusy
Scroll horizontally ↔

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, req, output ack, output reg busy=0);
  2  // SYNC2 library cell: two flops in the destination clock. Its formal model is the line below.
  3  wire req_s = req;
  4  assign ack = req_s && !busy;
  5  always @(posedge clk)
  6    if (rst) busy <= 0;
  7    else busy <= ack;
  8  always @(posedge clk) begin if ($initstate) begin assume(rst); end else begin assume(!rst); end end
  9  endmodule
 10  // props.sv
 11  assert property (@(posedge clk) disable iff (rst) req && !busy |-> ack);

The Output in Debug

Contract: out is zero whenever valid is low, in every mode of the shipped block. The companion trace is a cover on the same bench: a held word while valid is low.

PASS · bmc · depth 20 · 607 ms

Recorded companion trace
0123clkfreerstfreedbg_enfreevalidfreed4'b00004'b10004'b0000out4'b00004'b10004'b0000
Scroll horizontally ↔

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, dbg_en, valid, input [3:0] d, output [3:0] out);
  2  reg [3:0] held=0;
  3  always @(posedge clk)
  4    if (rst) held <= 0;
  5    else if (valid) held <= d;
  6  assign out = dbg_en ? held : valid ? d : 4'd0;
  7  always @(posedge clk) assume(!dbg_en);   // bench setting: debug off
  8  always @(posedge clk) begin if ($initstate) begin assume(rst); end else begin assume(!rst); end end
  9  endmodule
 10  // props.sv
 11  assert property (@(posedge clk) disable iff (rst) !valid |-> out == 4'd0);

The Gated Clock

Contract: A request sampled at tick 2 gets a clock pulse in the next cycle. The cell is the library latch gate. The companion trace is a cover on the same bench: a wanted pulse.

PASS · bmc · depth 20 · 684 ms

Recorded companion trace
0123456clkfreerstfreewanttk2'b002'b012'b102'b112'b002'b01phengclk
Scroll horizontally ↔

Samples from the separately reported companion check. Free input lanes are shaded; the terminal VCD record is omitted.

Companion check: PASS · reported step 6

Numbered source and task
  1  module top(input clk, rst, want, output reg [1:0] tk=0, output ph, output reg en=0, output gclk);
  2    assign ph = !tk[1];                              // clk1: high in ticks 0 and 1
  3    always @(posedge clk) begin
  4      tk <= rst ? 2'd0 : tk + 2'd1;
  5      if (rst) en <= 0;
  6      else if (tk == 2'd2) en <= want;               // the enable settles in the low phase
  7    end
  8    reg en_lat=0;                                    // the latch inside the cell
  9    always @(posedge clk)
 10      if (rst) en_lat <= 0;
 11      else if (!ph) en_lat <= en;                     // open while clk1 is low
 12    assign gclk = ph && en_lat;
 13  `ifdef FORMAL
 14    always @(posedge clk) begin
 15      if ($initstate) begin assume(rst); end else begin assume(!rst); end
 16    end
 17    reg want_c=0;                                    // the request, as sampled with the enable
 18    reg pulse=0;                                     // a gclk tick was seen since the last tick 2
 19    reg gclk_q=0;
 20    always @(posedge clk) begin
 21      gclk_q <= gclk;
 22      if (tk == 2'd2) want_c <= !rst && want;
 23      pulse <= tk == 2'd2 ? 1'b0 : pulse || gclk;
 24      if (!rst && tk == 2'd2 && want_c) assert(pulse);            // a wanted cycle gets its clock pulse
 25    end
 26  `endif
 27  endmodule
 28  // props.sv
 29  assert property (@(posedge clk) disable iff (rst) gclk |-> ph);

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

Compare each comment about a library cell with the line of code under it.

Hint 2

Ask which input values the bench never tries, and whether the contract covers them.

Hint 3

One proof is honest. Its cell model keeps the state element of the real cell.

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

Report a problem with this page

Worked solution

Opening the solution ends an unsolved rated attempt. Solving it first costs nothing.

Your Diagnosis

The selector
The synchronised request
The output in debug
The gated clock

Recorded evidence · no engine run

Recent Submissions