aboutsummaryrefslogtreecommitdiffstats
path: root/ecp5/pack.cc
diff options
context:
space:
mode:
authorDavid Shah <davey1576@gmail.com>2018-10-01 17:45:35 +0100
committerDavid Shah <davey1576@gmail.com>2018-10-01 17:45:35 +0100
commitc8a9bb807c21db935985a6be0d7f7deb1afd16d0 (patch)
tree49bc1f512542c2fb8b52d15707547343b2a121a6 /ecp5/pack.cc
parent9518c5d7629bfac996f9a3585a8d7bd86789357d (diff)
downloadnextpnr-c8a9bb807c21db935985a6be0d7f7deb1afd16d0.tar.gz
nextpnr-c8a9bb807c21db935985a6be0d7f7deb1afd16d0.tar.bz2
nextpnr-c8a9bb807c21db935985a6be0d7f7deb1afd16d0.zip
ecp5: Debugging DRAM packing
Signed-off-by: David Shah <davey1576@gmail.com>
Diffstat (limited to 'ecp5/pack.cc')
-rw-r--r--ecp5/pack.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/ecp5/pack.cc b/ecp5/pack.cc
index fbe3879a..53203e33 100644
--- a/ecp5/pack.cc
+++ b/ecp5/pack.cc
@@ -108,7 +108,7 @@ class Ecp5Packer
}
// Return whether or not an FF can be added to a tile (pairing checks must also be done using the fn above)
- bool can_add_ff_to_file(const std::vector<CellInfo *> &tile_ffs, CellInfo *ff0)
+ bool can_add_ff_to_tile(const std::vector<CellInfo *> &tile_ffs, CellInfo *ff0)
{
for (const auto &existing : tile_ffs) {
if (net_or_nullptr(existing, ctx->id("CLK")) != net_or_nullptr(ff0, ctx->id("CLK")))
@@ -512,7 +512,7 @@ class Ecp5Packer
NetInfo *f0net = slice->ports.at(ctx->id("F0")).net;
if (f0net != nullptr) {
ff0 = net_only_drives(ctx, f0net, is_ff, ctx->id("DI"), false);
- if (ff0 != nullptr && can_add_ff_to_file(tile_ffs, ff0)) {
+ if (ff0 != nullptr && can_add_ff_to_tile(tile_ffs, ff0)) {
ff_to_slice(ctx, ff0, slice.get(), 0, true);
tile_ffs.push_back(ff0);
packed_cells.insert(ff0->name);
@@ -524,7 +524,7 @@ class Ecp5Packer
if (f1net != nullptr) {
ff1 = net_only_drives(ctx, f1net, is_ff, ctx->id("DI"), false);
if (ff1 != nullptr && (ff0 == nullptr || can_pack_ffs(ff0, ff1)) &&
- can_add_ff_to_file(tile_ffs, ff1)) {
+ can_add_ff_to_tile(tile_ffs, ff1)) {
ff_to_slice(ctx, ff1, slice.get(), 1, true);
tile_ffs.push_back(ff1);
packed_cells.insert(ff1->name);
@@ -592,7 +592,7 @@ class Ecp5Packer
NetInfo *f0net = slice->ports.at(ctx->id("F0")).net;
if (f0net != nullptr) {
ff0 = net_only_drives(ctx, f0net, is_ff, ctx->id("DI"), false);
- if (ff0 != nullptr && can_add_ff_to_file(tile_ffs, ff0)) {
+ if (ff0 != nullptr && can_add_ff_to_tile(tile_ffs, ff0)) {
ff_to_slice(ctx, ff0, slice, 0, true);
tile_ffs.push_back(ff0);
packed_cells.insert(ff0->name);
@@ -604,7 +604,7 @@ class Ecp5Packer
if (f1net != nullptr) {
ff1 = net_only_drives(ctx, f1net, is_ff, ctx->id("DI"), false);
if (ff1 != nullptr && (ff0 == nullptr || can_pack_ffs(ff0, ff1)) &&
- can_add_ff_to_file(tile_ffs, ff1)) {
+ can_add_ff_to_tile(tile_ffs, ff1)) {
ff_to_slice(ctx, ff1, slice, 1, true);
tile_ffs.push_back(ff1);
packed_cells.insert(ff1->name);
@@ -888,6 +888,7 @@ class Ecp5Packer
{
pack_io();
pack_constants();
+ pack_dram();
pack_carries();
find_lutff_pairs();
pack_lut5s();
@@ -895,6 +896,7 @@ class Ecp5Packer
pack_lut_pairs();
pack_remaining_luts();
pack_remaining_ffs();
+ ctx->check();
}
private: