aboutsummaryrefslogtreecommitdiffstats
path: root/ice40
diff options
context:
space:
mode:
Diffstat (limited to 'ice40')
-rw-r--r--ice40/cells.cc6
-rw-r--r--ice40/chip.h9
-rw-r--r--ice40/pack.cc4
3 files changed, 11 insertions, 8 deletions
diff --git a/ice40/cells.cc b/ice40/cells.cc
index 004bdb30..ad728d2c 100644
--- a/ice40/cells.cc
+++ b/ice40/cells.cc
@@ -33,8 +33,8 @@ CellInfo *create_ice_cell(Design *design, IdString type, IdString name)
static int auto_idx = 0;
CellInfo *new_cell = new CellInfo();
if (name == IdString()) {
- new_cell->name =
- IdString("$nextpnr_" + type + "_" + std::to_string(auto_idx++));
+ new_cell->name = IdString("$nextpnr_" + type.str() + "_" +
+ std::to_string(auto_idx++));
} else {
new_cell->name = name;
}
@@ -82,7 +82,7 @@ void lut_to_lc(CellInfo *lut, CellInfo *lc, bool no_dff)
void dff_to_lc(CellInfo *dff, CellInfo *lc, bool pass_thru_lut)
{
lc->params["DFF_ENABLE"] = "1";
- std::string config = std::string(dff->type).substr(6);
+ std::string config = dff->type.str().substr(6);
auto citer = config.begin();
replace_port(dff, "C", lc, "CLK");
diff --git a/ice40/chip.h b/ice40/chip.h
index 96416c04..73e8d33b 100644
--- a/ice40/chip.h
+++ b/ice40/chip.h
@@ -217,7 +217,8 @@ NEXTPNR_NAMESPACE_END
namespace std {
template <> struct hash<NEXTPNR_NAMESPACE_PREFIX BelId>
{
- std::size_t operator()(const NEXTPNR_NAMESPACE_PREFIX BelId &bel) const noexcept
+ std::size_t operator()(const NEXTPNR_NAMESPACE_PREFIX BelId &bel) const
+ noexcept
{
return bel.index;
}
@@ -225,7 +226,8 @@ template <> struct hash<NEXTPNR_NAMESPACE_PREFIX BelId>
template <> struct hash<NEXTPNR_NAMESPACE_PREFIX WireId>
{
- std::size_t operator()(const NEXTPNR_NAMESPACE_PREFIX WireId &wire) const noexcept
+ std::size_t operator()(const NEXTPNR_NAMESPACE_PREFIX WireId &wire) const
+ noexcept
{
return wire.index;
}
@@ -233,7 +235,8 @@ template <> struct hash<NEXTPNR_NAMESPACE_PREFIX WireId>
template <> struct hash<NEXTPNR_NAMESPACE_PREFIX PipId>
{
- std::size_t operator()(const NEXTPNR_NAMESPACE_PREFIX PipId &wire) const noexcept
+ std::size_t operator()(const NEXTPNR_NAMESPACE_PREFIX PipId &wire) const
+ noexcept
{
return wire.index;
}
diff --git a/ice40/pack.cc b/ice40/pack.cc
index a6e17378..a971dcc3 100644
--- a/ice40/pack.cc
+++ b/ice40/pack.cc
@@ -38,7 +38,7 @@ static void pack_lut_lutffs(Design *design)
ci->type.c_str());
if (is_lut(ci)) {
CellInfo *packed = create_ice_cell(design, "ICESTORM_LC",
- std::string(ci->name) + "_LC");
+ ci->name.str() + "_LC");
packed_cells.insert(ci->name);
new_cells.push_back(packed);
log_info("packed cell %s into %s\n", ci->name.c_str(),
@@ -77,7 +77,7 @@ static void pack_nonlut_ffs(Design *design)
CellInfo *ci = cell.second;
if (is_ff(ci)) {
CellInfo *packed = create_ice_cell(design, "ICESTORM_LC",
- std::string(ci->name) + "_LC");
+ ci->name.str() + "_LC");
packed_cells.insert(ci->name);
new_cells.push_back(packed);
dff_to_lc(ci, packed, true);