3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-24 01:25:33 +00:00

abc9: use (* abc9_keep *) instead of (* abc9_scc *); apply to $_DFF_?_

instead of moving them to $__ prefix
This commit is contained in:
Eddie Hung 2020-05-14 16:44:35 -07:00
parent 02df0198b6
commit 67fc0c3698
5 changed files with 11 additions and 23 deletions

View file

@ -10,7 +10,7 @@ module $_DFF_x_(input C, D, output Q);
$_DFF_N_ ff (.C(C), .D(D_), .Q(Q));
end
else
$__DFF_N_ _TECHMAP_REPLACE_ (.C(C), .D(D), .Q(Q)); // hide from abc9 using $__ prefix
(* abc9_keep *) $_DFF_N_ _TECHMAP_REPLACE_ (.C(C), .D(D), .Q(Q));
end
else if (_TECHMAP_CELLTYPE_ == "$_DFF_P_") begin
if (_TECHMAP_WIREINIT_Q_ === 1'b0) begin
@ -18,7 +18,7 @@ module $_DFF_x_(input C, D, output Q);
$_DFF_P_ ff (.C(C), .D(D_), .Q(Q));
end
else
$__DFF_P_ _TECHMAP_REPLACE_ (.C(C), .D(D), .Q(Q)); // hide from abc9 using $__ prefix
(* abc9_keep *) $_DFF_P_ _TECHMAP_REPLACE_ (.C(C), .D(D), .Q(Q));
end
else if (_TECHMAP_CELLTYPE_ != "")
$error("Unrecognised _TECHMAP_CELLTYPE_");

View file

@ -9,15 +9,3 @@ module $__DFF_x__$abc9_flop (input C, D, Q, output n1);
$error("Unrecognised _TECHMAP_CELLTYPE_");
endgenerate
endmodule
(* techmap_celltype = "$__DFF_N_ $__DFF_P_" *)
module $__DFF_x_ (input C, D, output Q);
parameter _TECHMAP_CELLTYPE_ = "";
generate if (_TECHMAP_CELLTYPE_ == "$__DFF_N_")
$_DFF_N_ _TECHMAP_REPLACE_ (.C(C), .D(D), .Q(Q));
else if (_TECHMAP_CELLTYPE_ == "$__DFF_P_")
$_DFF_P_ _TECHMAP_REPLACE_ (.C(C), .D(D), .Q(Q));
else if (_TECHMAP_CELLTYPE_ != "")
$error("Unrecognised _TECHMAP_CELLTYPE_");
endgenerate
endmodule