diff options
author | David Shah <davey1576@gmail.com> | 2018-06-13 15:10:42 +0200 |
---|---|---|
committer | David Shah <davey1576@gmail.com> | 2018-06-13 15:10:42 +0200 |
commit | 14b5e46b5df76973dccd26bb07dc12c26e5d6efc (patch) | |
tree | dfdef863b1e195fc0dd660663ca9d0088081f723 /ice40/cells.cc | |
parent | d80e60cce210b58c036003f6812eb876c632d19e (diff) | |
download | nextpnr-14b5e46b5df76973dccd26bb07dc12c26e5d6efc.tar.gz nextpnr-14b5e46b5df76973dccd26bb07dc12c26e5d6efc.tar.bz2 nextpnr-14b5e46b5df76973dccd26bb07dc12c26e5d6efc.zip |
ice40: Promote one clock to a global buffer
Signed-off-by: David Shah <davey1576@gmail.com>
Diffstat (limited to 'ice40/cells.cc')
-rw-r--r-- | ice40/cells.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ice40/cells.cc b/ice40/cells.cc index b038db68..604baccb 100644 --- a/ice40/cells.cc +++ b/ice40/cells.cc @@ -79,7 +79,9 @@ CellInfo *create_ice_cell(Design *design, IdString type, IdString name) add_port(new_cell, "D_IN_0", PORT_OUT); add_port(new_cell, "D_IN_1", PORT_OUT); - + } else if (type == "SB_GB") { + add_port(new_cell, "USER_SIGNAL_TO_GLOBAL_BUFFER", PORT_IN); + add_port(new_cell, "GLOBAL_BUFFER_OUTPUT", PORT_OUT); } else { log_error("unable to create iCE40 cell of type %s", type.c_str()); } @@ -164,4 +166,8 @@ void nxio_to_sb(CellInfo *nxio, CellInfo *sbio) } } +bool is_global_net(NetInfo *net) { + return bool(net_driven_by(net, is_gbuf, "GLOBAL_BUFFER_OUTPUT")); +} + NEXTPNR_NAMESPACE_END |