Updated naming convention Signed-off-by: Maciej Kurc <mkurc@antmicro.com>
diff --git a/ql-iob-plugin/ql-iob.cc b/ql-iob-plugin/ql-iob.cc index 8910cd3..fa8d8ba 100644 --- a/ql-iob-plugin/ql-iob.cc +++ b/ql-iob-plugin/ql-iob.cc
@@ -146,22 +146,22 @@ log(" type | instance | net | pad | loc | cell \n"); log(" ------------+----------------------+------------+------------+----------+----------\n"); for (auto cell : topModule->cells()) { - auto cellType = RTLIL::unescape_id(cell->type); + auto ysCellType = RTLIL::unescape_id(cell->type); // Not an IO cell - if (ioCellTypes.count(cellType) == 0) { + if (ioCellTypes.count(ysCellType) == 0) { continue; } - log(" %-10s | %-20s ", cellType.c_str(), cell->name.c_str()); + log(" %-10s | %-20s ", ysCellType.c_str(), cell->name.c_str()); std::string netName; std::string padName; std::string locName; - std::string cellName; + std::string cellType; // Get connections to the specified port - std::string port = RTLIL::escape_id(ioCellTypes.at(cellType)); + std::string port = RTLIL::escape_id(ioCellTypes.at(ysCellType)); if (cell->connections().count(port)) { // Get the sigspec of the connection @@ -198,9 +198,9 @@ ); } - // Cell name - if (entry.count("cell")) { - cellName = entry.at("cell"); + // Cell type + if (entry.count("type")) { + cellType = entry.at("type"); } } } @@ -212,13 +212,13 @@ netName.c_str(), padName.c_str(), locName.c_str(), - cellName.c_str() + cellType.c_str() ); // Annotate the cell by setting its parameters cell->setParam(RTLIL::escape_id("IO_PAD"), padName); cell->setParam(RTLIL::escape_id("IO_LOC"), locName); - cell->setParam(RTLIL::escape_id("IO_TYPE"), cellName); + cell->setParam(RTLIL::escape_id("IO_TYPE"), cellType); } }
diff --git a/ql-iob-plugin/tests/pinmap.csv b/ql-iob-plugin/tests/pinmap.csv index 0344662..1587df5 100644 --- a/ql-iob-plugin/tests/pinmap.csv +++ b/ql-iob-plugin/tests/pinmap.csv
@@ -1,4 +1,4 @@ -name,x,y,z,cell +name,x,y,z,type FBIO_0,2,2,0,BIDIR FBIO_1,4,2,0,BIDIR FBIO_2,6,2,0,BIDIR