diff options
author | myrtle <gatecat@ds0.me> | 2022-08-10 18:26:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-10 18:26:56 +0100 |
commit | a20d21bd135aceb9155eaee714488d1d76c60898 (patch) | |
tree | 5104973e4c3d390c65f2eb09ffc3d1e7e4d31d7f /nexus/pack.cc | |
parent | 66722096edaff35f1620ebfc9acaab13ae149377 (diff) | |
parent | f7354d092ddcb6020f1fc0a23267920884cf8641 (diff) | |
download | nextpnr-a20d21bd135aceb9155eaee714488d1d76c60898.tar.gz nextpnr-a20d21bd135aceb9155eaee714488d1d76c60898.tar.bz2 nextpnr-a20d21bd135aceb9155eaee714488d1d76c60898.zip |
Merge pull request #1011 from YosysHQ/gatecat/nexus-lram-tmg
nexus: Add timing data for LRAM
Diffstat (limited to 'nexus/pack.cc')
-rw-r--r-- | nexus/pack.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/nexus/pack.cc b/nexus/pack.cc index 0aa61144..e727364d 100644 --- a/nexus/pack.cc +++ b/nexus/pack.cc @@ -2614,6 +2614,19 @@ void Arch::assignCellInfo(CellInfo *cell) cell->tmg_index = get_cell_timing_idx(id(str_or_default(cell->params, id_MODE, "DP16K") + "_MODE")); NPNR_ASSERT(cell->tmg_index != -1); + } else if (cell->type == id_LRAM_CORE) { + // Strip off bus indices to get the timing ports + // as timing is generally word-wide + for (const auto &port : cell->ports) { + const std::string &name = port.first.str(this); + size_t idx_end = name.find_last_not_of("0123456789"); + std::string base = name.substr(0, idx_end + 1); + // Strip off bus index + cell->tmg_portmap[port.first] = id(base); + } + + cell->tmg_index = get_cell_timing_idx(id_LRAM_CORE); + NPNR_ASSERT(cell->tmg_index != -1); } else if (is_dsp_cell(cell)) { // Strip off bus indices to get the timing ports // as timing is generally word-wide |