Some cleanup and added formal for the banks and timer
This commit is contained in:
@@ -75,12 +75,10 @@ module formal_wb_master_checker (
|
||||
// C1: We eventually get an ACK during an active request
|
||||
cover(f_past_valid && !i_rst && !i_wb_rst && i_wb_cyc && i_wb_stb && o_wb_ack);
|
||||
|
||||
// C2: ACK in the *same* cycle as the request (allowed by your A1)
|
||||
cover(f_past_valid && !i_rst && !i_wb_rst && (i_wb_cyc && i_wb_stb) && o_wb_ack);
|
||||
|
||||
// C3: ACK one cycle *after* the request (also allowed by your A1)
|
||||
// cover(f_past_valid && !i_rst && !i_wb_rst &&
|
||||
// $past(i_wb_cyc && i_wb_stb) && o_wb_ack && !(i_wb_cyc && i_wb_stb));
|
||||
// C2: A delayed ACK occurs for a request issued in a previous cycle.
|
||||
// This does not require the request to drop in the ACK cycle.
|
||||
cover(f_past_valid && !i_rst && !i_wb_rst &&
|
||||
$past(i_wb_cyc && i_wb_stb) && o_wb_ack);
|
||||
|
||||
// C4: A “wait state” happens: request asserted, no ACK for at least 1 cycle
|
||||
cover(f_past_valid && !i_rst && !i_wb_rst &&
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
`timescale 1ns/1ps
|
||||
|
||||
module formal_wb_slave_checker (
|
||||
module formal_wb_slave_checker #(
|
||||
parameter combinatorial_ack = 0
|
||||
) (
|
||||
input wire i_clk,
|
||||
input wire i_rst,
|
||||
input wire i_wb_rst,
|
||||
@@ -73,14 +75,19 @@ module formal_wb_slave_checker (
|
||||
// C2: ACK happens during a request (basic progress)
|
||||
cover(f_past_valid && !i_rst && !i_wb_rst && i_wb_cyc && i_wb_stb && o_wb_ack);
|
||||
|
||||
// C3: ACK same-cycle vs one-cycle-late (mirrors your R1 definition)
|
||||
cover(f_past_valid && !i_rst && !i_wb_rst && (i_wb_cyc && i_wb_stb) && o_wb_ack);
|
||||
cover(f_past_valid && !i_rst && !i_wb_rst && $past(i_wb_cyc && i_wb_stb) && o_wb_ack);
|
||||
// C3: Exercise the expected ACK timing style for this slave.
|
||||
if (combinatorial_ack) begin
|
||||
cover(f_past_valid && !i_rst && !i_wb_rst &&
|
||||
(i_wb_cyc && i_wb_stb) && o_wb_ack);
|
||||
end else begin
|
||||
cover(f_past_valid && !i_rst && !i_wb_rst &&
|
||||
$past(i_wb_cyc && i_wb_stb) && o_wb_ack);
|
||||
|
||||
// C4: “wait state” from the slave POV: request persists without ACK
|
||||
cover(f_past_valid && !i_rst && !i_wb_rst &&
|
||||
$past(i_wb_cyc && i_wb_stb && !o_wb_ack) &&
|
||||
(i_wb_cyc && i_wb_stb && !o_wb_ack));
|
||||
// C4: Wait-state behavior for registered/non-zero-wait slaves.
|
||||
cover(f_past_valid && !i_rst && !i_wb_rst &&
|
||||
$past(i_wb_cyc && i_wb_stb && !o_wb_ack) &&
|
||||
(i_wb_cyc && i_wb_stb && !o_wb_ack));
|
||||
end
|
||||
|
||||
// C5: Master ends a cycle (CYC drops) after at least one request
|
||||
cover(f_past_valid && !i_rst && !i_wb_rst &&
|
||||
|
||||
Reference in New Issue
Block a user