aboutsummaryrefslogtreecommitdiffstats
path: root/machxo2/arch.cc
diff options
context:
space:
mode:
authorgatecat <gatecat@ds0.me>2021-02-11 13:46:29 +0000
committergatecat <gatecat@ds0.me>2021-02-12 10:36:59 +0000
commit8f5133d8111d83137195b8cdae5d80747f8ee315 (patch)
tree67883d70946c4d4e4046faea6e9c687db906c78f /machxo2/arch.cc
parentb539363cd05a2841661be3cc4fb0c2804dc35376 (diff)
downloadnextpnr-8f5133d8111d83137195b8cdae5d80747f8ee315.tar.gz
nextpnr-8f5133d8111d83137195b8cdae5d80747f8ee315.tar.bz2
nextpnr-8f5133d8111d83137195b8cdae5d80747f8ee315.zip
machxo2: Use snake_case for non-ArchAPI functions
Signed-off-by: gatecat <gatecat@ds0.me>
Diffstat (limited to 'machxo2/arch.cc')
-rw-r--r--machxo2/arch.cc34
1 files changed, 17 insertions, 17 deletions
diff --git a/machxo2/arch.cc b/machxo2/arch.cc
index c2b2e0ad..21129f07 100644
--- a/machxo2/arch.cc
+++ b/machxo2/arch.cc
@@ -109,7 +109,7 @@ Arch::Arch(ArchArgs args) : args(args)
}
}
-bool Arch::isAvailable(ArchArgs::ArchArgsTypes chip) { return get_chip_info(chip) != nullptr; }
+bool Arch::is_available(ArchArgs::ArchArgsTypes chip) { return get_chip_info(chip) != nullptr; }
std::string Arch::getChipName() const
{
@@ -130,7 +130,7 @@ std::string Arch::getChipName() const
}
}
-std::string Arch::getFullChipName() const
+std::string Arch::get_full_chip_name() const
{
std::string name = getChipName();
name += "-";
@@ -187,7 +187,7 @@ BelId Arch::getBelByName(IdStringList name) const
loc.x = id_to_x.at(name[0]);
loc.y = id_to_y.at(name[1]);
ret.location = loc;
- const TileTypePOD *loci = tileInfo(ret);
+ const TileTypePOD *loci = tile_info(ret);
for (int i = 0; i < loci->num_bels; i++) {
if (std::strcmp(loci->bel_data[i].name.get(), name[2].c_str(this)) == 0) {
ret.index = i;
@@ -207,7 +207,7 @@ BelId Arch::getBelByLocation(Loc loc) const
ret.location.x = loc.x;
ret.location.y = loc.y;
- const TileTypePOD *tilei = tileInfo(ret);
+ const TileTypePOD *tilei = tile_info(ret);
for (int i = 0; i < tilei->num_bels; i++) {
if (tilei->bel_data[i].z == loc.z) {
ret.index = i;
@@ -241,8 +241,8 @@ WireId Arch::getBelPinWire(BelId bel, IdString pin) const
{
NPNR_ASSERT(bel != BelId());
- int num_bel_wires = tileInfo(bel)->bel_data[bel.index].num_bel_wires;
- const BelWirePOD *bel_wires = &*tileInfo(bel)->bel_data[bel.index].bel_wires;
+ int num_bel_wires = tile_info(bel)->bel_data[bel.index].num_bel_wires;
+ const BelWirePOD *bel_wires = &*tile_info(bel)->bel_data[bel.index].bel_wires;
for (int i = 0; i < num_bel_wires; i++)
if (bel_wires[i].port == pin.index) {
@@ -262,8 +262,8 @@ PortType Arch::getBelPinType(BelId bel, IdString pin) const
{
NPNR_ASSERT(bel != BelId());
- int num_bel_wires = tileInfo(bel)->bel_data[bel.index].num_bel_wires;
- const BelWirePOD *bel_wires = &*tileInfo(bel)->bel_data[bel.index].bel_wires;
+ int num_bel_wires = tile_info(bel)->bel_data[bel.index].num_bel_wires;
+ const BelWirePOD *bel_wires = &*tile_info(bel)->bel_data[bel.index].bel_wires;
for (int i = 0; i < num_bel_wires; i++)
if (bel_wires[i].port == pin.index)
@@ -277,8 +277,8 @@ std::vector<IdString> Arch::getBelPins(BelId bel) const
std::vector<IdString> ret;
NPNR_ASSERT(bel != BelId());
- int num_bel_wires = tileInfo(bel)->bel_data[bel.index].num_bel_wires;
- const BelWirePOD *bel_wires = &*tileInfo(bel)->bel_data[bel.index].bel_wires;
+ int num_bel_wires = tile_info(bel)->bel_data[bel.index].num_bel_wires;
+ const BelWirePOD *bel_wires = &*tile_info(bel)->bel_data[bel.index].bel_wires;
for (int i = 0; i < num_bel_wires; i++) {
IdString id(bel_wires[i].port);
@@ -314,7 +314,7 @@ WireId Arch::getWireByName(IdStringList name) const
loc.x = id_to_x.at(name[0]);
loc.y = id_to_y.at(name[1]);
ret.location = loc;
- const TileTypePOD *loci = tileInfo(ret);
+ const TileTypePOD *loci = tile_info(ret);
for (int i = 0; i < loci->num_wires; i++) {
if (std::strcmp(loci->wire_data[i].name.get(), name[2].c_str(this)) == 0) {
ret.index = i;
@@ -340,7 +340,7 @@ PipId Arch::getPipByName(IdStringList name) const
loc.x = id_to_x.at(name[0]);
loc.y = id_to_y.at(name[1]);
ret.location = loc;
- const TileTypePOD *loci = tileInfo(ret);
+ const TileTypePOD *loci = tile_info(ret);
for (int i = 0; i < loci->num_pips; i++) {
PipId curr;
curr.location = loc;
@@ -354,10 +354,10 @@ PipId Arch::getPipByName(IdStringList name) const
IdStringList Arch::getPipName(PipId pip) const
{
- auto &pip_data = tileInfo(pip)->pips_data[pip.index];
+ auto &pip_data = tile_info(pip)->pips_data[pip.index];
WireId src = getPipSrcWire(pip), dst = getPipDstWire(pip);
- const char *src_name = tileInfo(src)->wire_data[src.index].name.get();
- const char *dst_name = tileInfo(dst)->wire_data[dst.index].name.get();
+ const char *src_name = tile_info(src)->wire_data[src.index].name.get();
+ const char *dst_name = tile_info(dst)->wire_data[dst.index].name.get();
std::string pip_name =
stringf("%d_%d_%s->%d_%d_%s", pip_data.src.x - pip.location.x, pip_data.src.y - pip.location.y, src_name,
pip_data.dst.x - pip.location.x, pip_data.dst.y - pip.location.y, dst_name);
@@ -465,9 +465,9 @@ const std::vector<std::string> Arch::availablePlacers = {"sa",
const std::string Arch::defaultRouter = "router1";
const std::vector<std::string> Arch::availableRouters = {"router1", "router2"};
-bool Arch::cellsCompatible(const CellInfo **cells, int count) const { return false; }
+bool Arch::cells_compatible(const CellInfo **cells, int count) const { return false; }
-std::vector<std::pair<std::string, std::string>> Arch::getTilesAtLocation(int row, int col)
+std::vector<std::pair<std::string, std::string>> Arch::get_tiles_at_location(int row, int col)
{
std::vector<std::pair<std::string, std::string>> ret;
auto &tileloc = chip_info->tile_info[row * chip_info->width + col];