3
0
Fork 0
mirror of https://github.com/YosysHQ/sby.git synced 2025-04-23 05:15:30 +00:00

Refactor flow to use a common prep model

The goal of this is to make sure that all backend flows are compatible
and we can map between them, so that e.g. the aiger model can be used to
minimize a counterexample trace produced by smtbmc. Reducing the parts
that differ per backend (including parts that receive different input
depending on the used backend) also makes testing more effective as the
common parts are easier to cover.
This commit is contained in:
Jannis Harder 2022-07-25 11:35:10 +02:00
parent edb068bff4
commit 5265a52b65
3 changed files with 55 additions and 41 deletions

View file

@ -1,17 +1,16 @@
module test (input CP, CN, CX, input A, B, output reg XP, XN, YP, YN);
module test (input CP, CN, input A, B, output reg XP, XN);
reg [7:0] counter = 0;
always @* begin
assume (A || B);
assume (!A || !B);
assert (A != B);
cover (A);
cover (B);
cover (counter == 3 && A);
cover (counter == 3 && B);
end
always @(posedge CP)
counter <= counter + 1;
always @(posedge CP)
XP <= A;
always @(negedge CN)
XN <= B;
always @(posedge CX)
YP <= A;
always @(negedge CX)
YN <= B;
endmodule