F10.4.1 Prove the Glue

MediumVerify20 minSymbiYosys · serverReview the topic

Problem

Description

The sender is proven and the receiver is proven. Nobody has checked the two wires between them. Write the properties that do.

A sender and a receiver are each proven. Write top-level properties, from the inputs to the outputs, that prove the good connection. They must fail a crossed pair of wires, an inverted wire and a delayed wire.

Pinned interface
PortDirectionBits
clkinput1
rstinput1
pushinput1
last_ininput1
beatoutput1
doneoutput1
Full specification

The sender registers push and last_in. The receiver registers its r_valid input as beat, and raises done for a valid beat that is also the last. Each block has its own passing proof.

The top level connects the two blocks. Its contract has two lines. beat is high exactly two cycles after a cycle with push. done is high exactly two cycles after a cycle with both push and last_in.

Write properties on the top-level ports only. They must prove the good top level. They must also fail three top levels with faulty glue. The faults are a crossed pair of wires, an inverted wire and a wire with one extra register.

This engine has no $past on an input. Write each rule forward from the input, with |-> and ##2.

The two blocks and the good top level. The judge also runs three top levels with other glue.
module snd(input clk, input rst, input push, input last_in, output reg s_valid=0, output reg s_last=0);
always @(posedge clk)
  if (rst) begin s_valid <= 0; s_last <= 0; end
  else begin s_valid <= push; s_last <= last_in; end
endmodule
module rcv(input clk, input rst, input r_valid, input r_last, output reg beat=0, output reg done=0);
always @(posedge clk)
  if (rst) begin beat <= 0; done <= 0; end
  else begin beat <= r_valid; done <= r_valid && r_last; end
endmodule
module top(input clk, input rst, input push, input last_in, output beat, output done);
wire s_valid, s_last;
snd u_snd(.clk(clk), .rst(rst), .push(push), .last_in(last_in), .s_valid(s_valid), .s_last(s_last));
rcv u_rcv(.clk(clk), .rst(rst), .r_valid(s_valid), .r_last(s_last), .beat(beat), .done(done));
endmodule

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.
SubmissionSubmit assertion properties using the starter’s format. The checks apply to this stated model and scope.
How this is gradedThe 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 12 · smtbmc yices · 2161 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.

Recorded solver trace
01234clkfreerstfreepushfreelast_inbeatdonesampled violation
Scroll horizontally ↔

Samples from the measured run. Free input lanes are shaded; the terminal VCD record is omitted.

Sample 3: beat=0, done=0. Two cycles earlier push was high with last_in low, so beat must be high here. With crossed glue the receiver takes the last wire as its valid input, and beat stays low. Both block proofs still pass.

Examples

One Beat

push is high at cycle 5 with last_in low.
beat is high at cycle 7. done is low at cycle 7.

The word "exactly" also says what the outputs do after a cycle without the input.

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

A property that reads only outputs cannot tell which wire feeds the receiver.

Hint 2

"Exactly" is two statements for each output: when it must be high, and when it must be low.

Hint 3

Use the top-level property of the F10.4 lab: it relates an input to an output across both blocks.

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

Report a problem with this page

Worked solution

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

Your Property File

SymbiYosys · server

Recent Submissions