aboutsummaryrefslogtreecommitdiffstats
path: root/machxo2
diff options
context:
space:
mode:
authorgatecat <gatecat@ds0.me>2021-06-02 10:01:36 +0100
committergatecat <gatecat@ds0.me>2021-06-02 15:05:19 +0100
commitecc19c2c083f7e3ed7da95557731ded803d2cb1d (patch)
tree864780d38cb9a49b6846a0045ac93e1b4dfcc88d /machxo2
parentf4fed62c05a9595e22a8ec54add5531225911741 (diff)
downloadnextpnr-ecc19c2c083f7e3ed7da95557731ded803d2cb1d.tar.gz
nextpnr-ecc19c2c083f7e3ed7da95557731ded803d2cb1d.tar.bz2
nextpnr-ecc19c2c083f7e3ed7da95557731ded803d2cb1d.zip
Using hashlib in arches
Signed-off-by: gatecat <gatecat@ds0.me>
Diffstat (limited to 'machxo2')
-rw-r--r--machxo2/arch.h4
-rw-r--r--machxo2/cells.cc2
-rw-r--r--machxo2/cells.h2
-rw-r--r--machxo2/pack.cc9
4 files changed, 8 insertions, 9 deletions
diff --git a/machxo2/arch.h b/machxo2/arch.h
index 15535fe1..219e87f2 100644
--- a/machxo2/arch.h
+++ b/machxo2/arch.h
@@ -403,12 +403,12 @@ struct Arch : BaseArch<ArchRanges>
const ChipInfoPOD *chip_info;
const PackageInfoPOD *package_info;
- mutable std::unordered_map<IdStringList, PipId> pip_by_name;
+ mutable dict<IdStringList, PipId> pip_by_name;
// fast access to X and Y IdStrings for building object names
std::vector<IdString> x_ids, y_ids;
// inverse of the above for name->object mapping
- std::unordered_map<IdString, int> id_to_x, id_to_y;
+ dict<IdString, int> id_to_x, id_to_y;
// Helpers
template <typename Id> const TileTypePOD *tile_info(Id &id) const
diff --git a/machxo2/cells.cc b/machxo2/cells.cc
index 03ba0a41..c71247f2 100644
--- a/machxo2/cells.cc
+++ b/machxo2/cells.cc
@@ -175,6 +175,6 @@ void dff_to_lc(Context *ctx, CellInfo *dff, CellInfo *lc, bool pass_thru_lut)
}
}
-void nxio_to_iob(Context *ctx, CellInfo *nxio, CellInfo *iob, std::unordered_set<IdString> &todelete_cells) {}
+void nxio_to_iob(Context *ctx, CellInfo *nxio, CellInfo *iob, pool<IdString> &todelete_cells) {}
NEXTPNR_NAMESPACE_END
diff --git a/machxo2/cells.h b/machxo2/cells.h
index a6de219e..afb08138 100644
--- a/machxo2/cells.h
+++ b/machxo2/cells.h
@@ -49,7 +49,7 @@ void lut_to_lc(const Context *ctx, CellInfo *lut, CellInfo *lc, bool no_dff = tr
void dff_to_lc(Context *ctx, CellInfo *dff, CellInfo *lc, bool pass_thru_lut = false);
// Convert a nextpnr IO buffer to a GENERIC_IOB
-void nxio_to_iob(Context *ctx, CellInfo *nxio, CellInfo *sbio, std::unordered_set<IdString> &todelete_cells);
+void nxio_to_iob(Context *ctx, CellInfo *nxio, CellInfo *sbio, pool<IdString> &todelete_cells);
NEXTPNR_NAMESPACE_END
diff --git a/machxo2/pack.cc b/machxo2/pack.cc
index 26bda946..6f2ee8e4 100644
--- a/machxo2/pack.cc
+++ b/machxo2/pack.cc
@@ -20,7 +20,6 @@
#include <algorithm>
#include <iterator>
-#include <unordered_set>
#include "cells.h"
#include "design_utils.h"
#include "log.h"
@@ -33,7 +32,7 @@ static void pack_lut_lutffs(Context *ctx)
{
log_info("Packing LUT-FFs..\n");
- std::unordered_set<IdString> packed_cells;
+ pool<IdString> packed_cells;
std::vector<std::unique_ptr<CellInfo>> new_cells;
for (auto &cell : ctx->cells) {
CellInfo *ci = cell.second.get();
@@ -91,7 +90,7 @@ static void pack_remaining_ffs(Context *ctx)
{
log_info("Packing remaining FFs..\n");
- std::unordered_set<IdString> packed_cells;
+ pool<IdString> packed_cells;
std::vector<std::unique_ptr<CellInfo>> new_cells;
for (auto &cell : ctx->cells) {
@@ -130,7 +129,7 @@ static void set_net_constant(Context *ctx, NetInfo *orig, NetInfo *constnet, boo
{
(void)constval;
- std::unordered_set<IdString> packed_cells;
+ pool<IdString> packed_cells;
std::vector<std::unique_ptr<CellInfo>> new_cells;
orig->driver.cell = nullptr;
@@ -233,7 +232,7 @@ static bool is_facade_iob(const Context *ctx, const CellInfo *cell) { return cel
// attributes.
static void pack_io(Context *ctx)
{
- std::unordered_set<IdString> packed_cells;
+ pool<IdString> packed_cells;
log_info("Packing IOs..\n");