F10.4.2 The Case Split with a Hole

EasyDebug10 minRecorded formal evidenceReview the topic

Problem

Description

A case split passes. Decide whether a case is missing, and pick the one line that proves the answer.

Two soft case splits pass at depth 12. For each one, decide which legal operation has no assertion, or that none is missing. Then select the candidate line that proves it.

Pinned interface
PortDirectionBits
clkinput1
rstinput1
vinput1
opinput2
ainput2
binput2
v_qoutput1
op_qoutput2
youtput3
Full specification

Each card shows a small arithmetic block with a soft case split: one assertion per operation. Both benches pass at depth 12.

For every card, choose which legal case has no assertion, or choose that none is missing. Then select one of the four candidate lines at the end of the source. Select the line that, added to the bench, proves whether the split is complete.

Recorded caseLocal contract
Four operations, three casesThe block has four operations. The plan lists the cases that have an assertion. The companion run adds one of the four candidate lines to this bench, and that run fails.
Three operations, three casesThis build never sends operation 3. The companion run is a cover of the third case on this bench.
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.

Four Operations, Three Cases

The block has four operations. The plan lists the cases that have an assertion. The companion run adds one of the four candidate lines to this bench, and that run fails.

PASS · bmc · depth 12 · 517 ms

Recorded companion trace
0123clkfreerstfreevfreeop2'b002'b102'b00freea2'b00freeb2'b002'b012'b00v_qop_q2'b002'b102'b00y3'b0003'b0013'b000sampled violation
Scroll horizontally ↔

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

Companion check: FAIL · reported step 3

Numbered source and task
  1  module top(input clk, input rst, v, input [1:0] op, a, b, output reg v_q=0, output reg [1:0] op_q=0, output reg [2:0] y=0);
  2  reg [1:0] a_q=0, b_q=0;
  3  always @(posedge clk)
  4    if (rst) begin v_q <= 0; y <= 0; end
  5    else begin
  6      v_q <= v; op_q <= op; a_q <= a; b_q <= b;
  7      case (op)
  8        2'd0: y <= a + b;                 // ADD
  9        2'd1: y <= {1'b0, a} - {1'b0, b}; // SUB
 10        2'd2: y <= {1'b0, a | b};         // AND
 11        default: y <= {1'b0, a ^ b};      // XOR
 12      endcase
 13    end
 14  // the case split
 15  always @(posedge clk) if (!rst && v_q) begin
 16    if (op_q == 2'd0) assert(y == a_q + b_q);
 17    if (op_q == 2'd1) assert(y == {1'b0, a_q} - {1'b0, b_q});
 18    if (op_q == 2'd3) assert(y == {1'b0, a_q ^ b_q});
 19  end
 20  always @(posedge clk) begin if ($initstate) begin assume(rst); end else begin assume(!rst); end end
 21  endmodule
 22  // candidate lines for the review
 23  cover property (@(posedge clk) op_q == 0 || op_q == 1 || op_q == 3);
 24  assert property (@(posedge clk) disable iff (rst) v_q |-> op_q == 0 || op_q == 1 || op_q == 3);
 25  assume property (@(posedge clk) op_q == 0 || op_q == 1 || op_q == 3);
 26  assert property (@(posedge clk) disable iff (rst) v_q |-> y <= 7);

Three Operations, Three Cases

This build never sends operation 3. The companion run is a cover of the third case on this bench.

PASS · bmc · depth 12 · 532 ms

Recorded companion trace
0123clkfreerstfreevfreeop2'b002'b102'b00freea2'b00freeb2'b00v_qop_q2'b002'b102'b00y3'b000
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, v, input [1:0] op, a, b, output reg v_q=0, output reg [1:0] op_q=0, output reg [2:0] y=0);
  2  reg [1:0] a_q=0, b_q=0;
  3  always @(posedge clk)
  4    if (rst) begin v_q <= 0; y <= 0; end
  5    else begin
  6      v_q <= v; op_q <= op; a_q <= a; b_q <= b;
  7      case (op)
  8        2'd0: y <= a + b;                 // ADD
  9        2'd1: y <= {1'b0, a} - {1'b0, b}; // SUB
 10        2'd2: y <= {1'b0, a & b};         // AND
 11        default: y <= {1'b0, a ^ b};      // XOR
 12      endcase
 13    end
 14  always @(posedge clk) assume(op != 2'd3);   // this build has no XOR
 15  // the case split
 16  always @(posedge clk) if (!rst && v_q) begin
 17    if (op_q == 2'd0) assert(y == a_q + b_q);
 18    if (op_q == 2'd1) assert(y == {1'b0, a_q} - {1'b0, b_q});
 19    if (op_q == 2'd2) assert(y == {1'b0, a_q & b_q});
 20  end
 21  always @(posedge clk) begin if ($initstate) begin assume(rst); end else begin assume(!rst); end end
 22  endmodule
 23  // candidate lines for the review
 24  cover property (@(posedge clk) op_q == 0 || op_q == 1 || op_q == 2);
 25  assert property (@(posedge clk) disable iff (rst) v_q |-> op_q == 0 || op_q == 1 || op_q == 2);
 26  assume property (@(posedge clk) op_q == 0 || op_q == 1 || op_q == 2);
 27  assert property (@(posedge clk) disable iff (rst) v_q |-> y <= 7);

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

Count the operations the block can receive. Then count the case assertions.

Hint 2

A complete split needs a proof, not an observation. Ask which candidate can fail.

Hint 3

Use the last row of the case table in F10.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

Report a problem with this page

Worked solution

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

Your Diagnosis

Four operations, three cases
Three operations, three cases

Recorded evidence · no engine run

Recent Submissions