From 27d38de612ce4109723704f863ac82a6cbddf10c Mon Sep 17 00:00:00 2001 From: Olivier Galibert Date: Wed, 19 Jan 2022 08:42:29 +0100 Subject: Mistral: Use log_error, remove leftover debugging printf. --- mistral/arch.h | 39 +++------------------------------------ 1 file changed, 3 insertions(+), 36 deletions(-) (limited to 'mistral/arch.h') diff --git a/mistral/arch.h b/mistral/arch.h index 98340d4e..e931df2d 100644 --- a/mistral/arch.h +++ b/mistral/arch.h @@ -461,42 +461,9 @@ struct Arch : BaseArch void add_bel_pin(BelId bel, IdString pin, PortType dir, WireId wire); - CycloneV::rnode_t find_rnode(CycloneV::block_type_t bt, int x, int y, CycloneV::port_type_t port, int bi = -1, int pi = -1) const - { - auto pn1 = CycloneV::pnode(bt, x, y, port, bi, pi); - auto rn1 = cyclonev->pnode_to_rnode(pn1); - if(rn1) - return rn1; - - if(bt == CycloneV::GPIO) { - auto pn2 = cyclonev->p2p_to(pn1); - if(!pn2) { - auto pnv = cyclonev->p2p_from(pn1); - if(!pnv.empty()) - pn2 = pnv[0]; - } - auto pn3 = cyclonev->hmc_get_bypass(pn2); - auto rn2 = cyclonev->pnode_to_rnode(pn3); - return rn2; - } - - return 0; - } - - WireId get_port(CycloneV::block_type_t bt, int x, int y, int bi, CycloneV::port_type_t port, int pi = -1) const - { - auto rn = find_rnode(bt, x, y, port, bi, pi); - if(rn) - return WireId(rn); - - fprintf(stderr, "Trying to connect unknown node %s\n", CycloneV::pn2s(CycloneV::pnode(bt, x, y, port, bi, pi)).c_str()); - exit(1); - } - - bool has_port(CycloneV::block_type_t bt, int x, int y, int bi, CycloneV::port_type_t port, int pi = -1) const - { - return find_rnode(bt, x, y, port, bi, pi) != 0; - } + CycloneV::rnode_t find_rnode(CycloneV::block_type_t bt, int x, int y, CycloneV::port_type_t port, int bi = -1, int pi = -1) const; + WireId get_port(CycloneV::block_type_t bt, int x, int y, int bi, CycloneV::port_type_t port, int pi = -1) const; + bool has_port(CycloneV::block_type_t bt, int x, int y, int bi, CycloneV::port_type_t port, int pi = -1) const; void create_lab(int x, int y, bool is_mlab); // lab.cc void create_gpio(int x, int y); // io.cc -- cgit v1.2.3