diff options
author | gatecat <gatecat@ds0.me> | 2021-05-15 21:28:48 +0100 |
---|---|---|
committer | gatecat <gatecat@ds0.me> | 2021-05-15 21:28:48 +0100 |
commit | 9d7f90dd89d98457e00579615ef9251d0f69f3a4 (patch) | |
tree | 8748a12e0f510d18f7a70b51a562f662206c0c3a /mistral | |
parent | 6cef569155b5934893109d4ae509c94bdd1dc16a (diff) | |
download | nextpnr-9d7f90dd89d98457e00579615ef9251d0f69f3a4.tar.gz nextpnr-9d7f90dd89d98457e00579615ef9251d0f69f3a4.tar.bz2 nextpnr-9d7f90dd89d98457e00579615ef9251d0f69f3a4.zip |
mistral: Add MISTRAL_CLKBUF cell type
Signed-off-by: gatecat <gatecat@ds0.me>
Diffstat (limited to 'mistral')
-rw-r--r-- | mistral/arch.cc | 4 | ||||
-rw-r--r-- | mistral/arch.h | 4 | ||||
-rw-r--r-- | mistral/bitstream.cc | 2 | ||||
-rw-r--r-- | mistral/constids.inc | 1 | ||||
-rw-r--r-- | mistral/globals.cc | 5 |
5 files changed, 15 insertions, 1 deletions
diff --git a/mistral/arch.cc b/mistral/arch.cc index 516d1de8..cfa3e8b3 100644 --- a/mistral/arch.cc +++ b/mistral/arch.cc @@ -248,6 +248,8 @@ bool Arch::isValidBelForCellType(IdString cell_type, BelId bel) const return is_comb_cell(cell_type); else if (bel_type == id_MISTRAL_IO) return is_io_cell(cell_type); + else if (bel_type == id_MISTRAL_CLKENA) + return is_clkbuf_cell(cell_type); else return bel_type == cell_type; } @@ -258,6 +260,8 @@ BelBucketId Arch::getBelBucketForCellType(IdString cell_type) const return id_MISTRAL_COMB; else if (is_io_cell(cell_type)) return id_MISTRAL_IO; + else if (is_clkbuf_cell(cell_type)) + return id_MISTRAL_CLKENA; else return cell_type; } diff --git a/mistral/arch.h b/mistral/arch.h index c7d369f1..5913a615 100644 --- a/mistral/arch.h +++ b/mistral/arch.h @@ -480,6 +480,10 @@ struct Arch : BaseArch<ArchRanges> // ------------------------------------------------- + bool is_clkbuf_cell(IdString cell_type) const; // globals.cc + + // ------------------------------------------------- + static const std::string defaultPlacer; static const std::vector<std::string> availablePlacers; static const std::string defaultRouter; diff --git a/mistral/bitstream.cc b/mistral/bitstream.cc index e31b94af..92d86410 100644 --- a/mistral/bitstream.cc +++ b/mistral/bitstream.cc @@ -201,7 +201,7 @@ struct MistralBitgen int bi = ctx->bel_data(ci->bel).block_index; if (ctx->is_io_cell(ci->type)) write_io_cell(ci, loc.x, loc.y, bi); - else if (ci->type == id_MISTRAL_CLKENA) + else if (ctx->is_clkbuf_cell(ci->type)) write_clkbuf_cell(ci, loc.x, loc.y, bi); } } diff --git a/mistral/constids.inc b/mistral/constids.inc index 4f7d3ecf..6bb45c3c 100644 --- a/mistral/constids.inc +++ b/mistral/constids.inc @@ -75,3 +75,4 @@ X(Y) X(LOC) X(MISTRAL_CLKENA) +X(MISTRAL_CLKBUF) diff --git a/mistral/globals.cc b/mistral/globals.cc index 9cbabbca..3203893b 100644 --- a/mistral/globals.cc +++ b/mistral/globals.cc @@ -38,4 +38,9 @@ void Arch::create_clkbuf(int x, int y) } } +bool Arch::is_clkbuf_cell(IdString cell_type) const +{ + return cell_type == id_MISTRAL_CLKENA || cell_type == id_MISTRAL_CLKBUF; +} + NEXTPNR_NAMESPACE_END |