Skip to content

Commit c23892b

Browse files
committed
vpr: base: atom_netlist_utils: add support for printing netlist with falling edge clocked FFs as blif
Signed-off-by: Pawel Czarnecki <pczarnecki@antmicro.com>
1 parent 9b41b8d commit c23892b

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

vpr/src/base/atom_netlist_utils.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,14 @@ void print_netlist_as_blif(FILE* f, const AtomNetlist& netlist) {
189189
clk_net = make_unconn(unconn_count, PinType::SINK);
190190
}
191191

192-
//Latch type: VPR always assumes rising edge
193-
auto type = "re";
192+
//Latch type
193+
auto type = "xy";
194+
if ((blk_model->name == std::string(MODEL_LATCH)) && (blk_model->inputs[1].is_clock))
195+
if (blk_model->inputs[1].trigg_edge == TriggeringEdge::FALLING_EDGE)
196+
type = "fe";
197+
else
198+
//Always assume rising edge
199+
type = "re";
194200

195201
//Latch initial value
196202
int init_val = 3; //Unkown or unspecified

0 commit comments

Comments
 (0)