From 3172a38daeb4588d3aaa686816c09d64ccf08587 Mon Sep 17 00:00:00 2001 From: YRabbit Date: Mon, 4 Jul 2022 10:32:39 +1000 Subject: gowin: Let the placer know about global networks Refactor in order to detect networks that will be routed in a special mode earlier. This makes it possible to mark the source of such networks as a global buffer, thereby removing their influence on element placement. In addition, timing classes are set for some cells. Signed-off-by: YRabbit --- gowin/pack.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gowin/pack.cc') diff --git a/gowin/pack.cc b/gowin/pack.cc index 83820142..5b304f10 100644 --- a/gowin/pack.cc +++ b/gowin/pack.cc @@ -26,6 +26,8 @@ #include "log.h" #include "util.h" +#include "globals.h" + NEXTPNR_NAMESPACE_BEGIN static void make_dummy_alu(Context *ctx, int alu_idx, CellInfo *ci, CellInfo *packed_head, @@ -1009,6 +1011,7 @@ bool Arch::pack() Context *ctx = getCtx(); try { log_break(); + pre_pack(ctx); pack_constants(ctx); pack_gsr(ctx); pack_io(ctx); @@ -1018,6 +1021,7 @@ bool Arch::pack() pack_alus(ctx); pack_lut_lutffs(ctx); pack_nonlut_ffs(ctx); + post_pack(ctx); ctx->settings[id_pack] = 1; ctx->assignArchInfo(); log_info("Checksum: 0x%08x\n", ctx->checksum()); -- cgit v1.2.3