diff options
author | gatecat <gatecat@ds0.me> | 2021-05-09 16:51:28 +0100 |
---|---|---|
committer | gatecat <gatecat@ds0.me> | 2021-05-15 14:54:33 +0100 |
commit | 386b5b901c9e62d527e84bbd0833f5908f778413 (patch) | |
tree | 39ad000b5a07756ba3c6741dadf227e4b4cf81ff /mistral/globals.cc | |
parent | c5d983066df541ad93a13904e96e0298489e2fcd (diff) | |
download | nextpnr-386b5b901c9e62d527e84bbd0833f5908f778413.tar.gz nextpnr-386b5b901c9e62d527e84bbd0833f5908f778413.tar.bz2 nextpnr-386b5b901c9e62d527e84bbd0833f5908f778413.zip |
mistral: Implement some misc. things
Signed-off-by: gatecat <gatecat@ds0.me>
Diffstat (limited to 'mistral/globals.cc')
-rw-r--r-- | mistral/globals.cc | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/mistral/globals.cc b/mistral/globals.cc new file mode 100644 index 00000000..34e569d3 --- /dev/null +++ b/mistral/globals.cc @@ -0,0 +1,37 @@ +/* + * nextpnr -- Next Generation Place and Route + * + * Copyright (C) 2021 gatecat <gatecat@ds0.me> + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + */ + +#include "log.h" +#include "nextpnr.h" +#include "util.h" + +NEXTPNR_NAMESPACE_BEGIN + +void Arch::create_clkbuf(int x, int y) +{ + for (int z = 0; z < 4; z++) { + // For now we only consider the input path from general routing, other inputs like dedicated clock pins are + // still a TODO + BelId bel = add_bel(x, y, id(stringf("CLKBUF[%d]", z)), id_MISTRAL_CLKBUF); + add_bel_pin(bel, id_A, PORT_IN, get_port(CycloneV::CMUXHG, x, y, -1, CycloneV::CLKIN, z)); + add_bel_pin(bel, id_Q, PORT_OUT, get_port(CycloneV::CMUXHG, x, y, z, CycloneV::CLKOUT)); + } +} + +NEXTPNR_NAMESPACE_END |