Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions include/mockturtle/io/genlib_reader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,14 @@ class genlib_reader : public lorina::genlib_reader
formula.erase( found, found + 5 );
}

/* detect constant gates (e.g., Z=1, Z=0, O=CONST0, O=CONST1) and
discard spurious pin names produced by tokenization of "0"/"1" */
if ( formula == "0" || formula == "1" )
{
pp.clear();
Comment on lines +151 to +155
pin_names.clear();
}

uint32_t num_vars = pin_names.size();

kitty::dynamic_truth_table tt{ num_vars };
Expand Down
Loading