pepijndevos changed the topic of #apicula to: Project Apicula: bitstream documentation and tooling for Gowin FPGAs https://github.com/YosysHQ/apicula -- logs https://freenode.irclog.whitequark.org/apicula
<pepijndevos_> daveshah, fyi Python 3.9 gives some deprecation warnings
<pepijndevos_> hmmm... so Gowin has their own IBUF/OBUF primitives, which synth_gowin also generates with iopadmap. But nexpnr *on top of that* creates $nextprn_ibuf etc
<pepijndevos_> Wondering if I should write a packer that deletes the $nextpnr ones and packs the custom ones into a bel, or tell yosys to just not generate them.
<pepijndevos_> Packing is some tricky business... very easy to crash all the things with dangling pointers.
<daveshah> remove the $nextpnr ones
<daveshah> eventually I want to get rid of IO buffer insertion in nextpnr, it's more error prone than it needs to be when it comes to complex inout patterns
<pepijndevos_> ooops
<pepijndevos_> ERROR: net 'led[5]' driver port 'O' missing on cell 'cpu.alu_out[0]_LUT4_F_I2_LUT4_F_1_LC'
<pepijndevos_> huuuhhh, I'm not sure I understand what that means. uh... so the LC is driving net led[5] yea? LC doesn't have a port called 'O', so that's... weird.
<pepijndevos_> so led[5] is the top level output, which should be driven by an IOB, not by a slice... still no clue how tf that is happening.
<daveshah> make sure you are removing the nextpnr_iob s properly
<pepijndevos_> daveshah, pretty sure I'm *not* removing them properly...
<pepijndevos_> what does disconnect_port(ctx, ci, p.first); do compared to ctx->nets.erase(dnet);? Because the generic code does... both in different cases
<pepijndevos_> that just seems to delete the net and remove it from the port, and then delete the whole device
<pepijndevos_> but then a bit later in another case it just calls disconnect_port https://github.com/YosysHQ/nextpnr/blob/master/generic/pack.cc#L242-L244
<daveshah> they are different things
<daveshah> disconnect_port doesn't delete the net
<daveshah> ctx->nets.erase deletes the net, but doesn't disconnect any ports first, you have to do that with disconnect_port first
<pepijndevos_> right... but the first part just seems to do iob->ports.at(ctx->id("PAD")).net = nullptr; rather than calling disconnect.
<pepijndevos_> but okay, so the correct procedure is calling disconnect and then deleting the net?
<pepijndevos_> Because that's what I was doing.
<daveshah> yes that's correct
<pepijndevos_> this is my currently incredibly broken IO packing code: https://github.com/pepijndevos/nextpnr/blob/gowin2/gowin/pack.cc#L212
<pepijndevos_> *somehow* the driver of the top-level net... which should have been deleted... becomes a nonexistant slice output.
<pepijndevos_> oh... maybe?? hmmmm
<pepijndevos_> waaaat...
<pepijndevos_> problem magically went away after shuffling some things around...
<pepijndevos_> it's now happily running the placer
<pepijndevos_> hurray!!
<pepijndevos_> routing doesn't work yet, but that's a challenge for tomorrow.
<pepijndevos_> from the error seems like some dumb name mismatch, and still need to properly set up timing info.
FabM has quit [Quit: Leaving]
pepijndevos_ has quit [Ping timeout: 256 seconds]
pepijndevos has joined #apicula