diff options
author | gatecat <gatecat@ds0.me> | 2022-01-19 13:22:40 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-19 13:22:40 +0000 |
commit | fbeef2b8c2734210a70e51a3ac629c2065c06d19 (patch) | |
tree | 9f0aa005ecfbb5a22a14c377a3d663465639a5a7 /mistral/io.cc | |
parent | 58a1b473b85ae8bc4312eed14af1829b93958341 (diff) | |
parent | 27d38de612ce4109723704f863ac82a6cbddf10c (diff) | |
download | nextpnr-fbeef2b8c2734210a70e51a3ac629c2065c06d19.tar.gz nextpnr-fbeef2b8c2734210a70e51a3ac629c2065c06d19.tar.bz2 nextpnr-fbeef2b8c2734210a70e51a3ac629c2065c06d19.zip |
Merge pull request #895 from galibert/master
Sync with the current state of mistral
Diffstat (limited to 'mistral/io.cc')
-rw-r--r-- | mistral/io.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/mistral/io.cc b/mistral/io.cc index dab3672e..a0a01af3 100644 --- a/mistral/io.cc +++ b/mistral/io.cc @@ -30,10 +30,12 @@ void Arch::create_gpio(int x, int y) WireId pad = add_wire(x, y, id(stringf("PAD[%d]", z))); BelId bel = add_bel(x, y, id(stringf("IO[%d]", z)), id_MISTRAL_IO); add_bel_pin(bel, id_PAD, PORT_INOUT, pad); - // FIXME: is the port index of zero always correct? - add_bel_pin(bel, id_I, PORT_IN, get_port(CycloneV::GPIO, x, y, z, CycloneV::DATAOUT, 0)); - add_bel_pin(bel, id_OE, PORT_IN, get_port(CycloneV::GPIO, x, y, z, CycloneV::OEIN, 0)); - add_bel_pin(bel, id_O, PORT_OUT, get_port(CycloneV::GPIO, x, y, z, CycloneV::DATAIN, 0)); + if(has_port(CycloneV::GPIO, x, y, z, CycloneV::DATAOUT, 0)) { + // FIXME: is the port index of zero always correct? + add_bel_pin(bel, id_I, PORT_IN, get_port(CycloneV::GPIO, x, y, z, CycloneV::DATAOUT, 0)); + add_bel_pin(bel, id_OE, PORT_IN, get_port(CycloneV::GPIO, x, y, z, CycloneV::OEIN, 0)); + add_bel_pin(bel, id_O, PORT_OUT, get_port(CycloneV::GPIO, x, y, z, CycloneV::DATAIN, 0)); + } bel_data(bel).block_index = z; } } |