Skip to content

Commit deb2565

Browse files
committed
base: read netlist: fixup asserts
Signed-off-by: Pawel Czarnecki <[email protected]>
1 parent 64bb81c commit deb2565

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

vpr/src/base/read_netlist.cpp

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1171,8 +1171,18 @@ static void load_atom_pin_mapping(const ClusteredNetlist& clb_nlist) {
11711171
VTR_ASSERT_MSG(pb, "Atom block must have a matching PB");
11721172

11731173
const t_pb_graph_node* gnode = pb->pb_graph_node;
1174-
VTR_ASSERT_MSG(gnode->pb_type->model == atom_ctx.nlist.block_model(blk),
1175-
"Atom block PB must match BLIF model");
1174+
if (strcmp(atom_ctx.nlist.block_model(blk)->name, MODEL_LATCH) == 0) {
1175+
if (atom_ctx.nlist.block_model(blk)->inputs->trigg_edge == TriggeringEdge::FALLING_EDGE) {
1176+
VTR_ASSERT_MSG(gnode->pb_type->model_sec == atom_ctx.nlist.block_model(blk),
1177+
"Atom block PB must match BLIF model");
1178+
} else {
1179+
VTR_ASSERT_MSG(gnode->pb_type->model == atom_ctx.nlist.block_model(blk),
1180+
"Atom block PB must match BLIF model");
1181+
}
1182+
} else {
1183+
VTR_ASSERT_MSG(gnode->pb_type->model == atom_ctx.nlist.block_model(blk),
1184+
"Atom block PB must match BLIF model");
1185+
}
11761186

11771187
// Always assign primary pins
11781188
t_pb_graph_pin* pins;

0 commit comments

Comments
 (0)