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
mmicko has quit [Quit: leaving]
mmicko has joined #apicula
<pepijndevos> trabucayre, I'm going to try to reproduce your problem now... hold on...
<pepijndevos> I guess first I'll try with my current versions, and then one by one upgrade to latest, and if it breaks, debug/bisect.
<trabucayre> pepijndevos: this one I ask for your yosys version :-)
<trabucayre> If I could help :)
<pepijndevos> Yosys 0.9+3833 (git sha1 092767514, clang 11.0.0 -O0 -fPIC)
<pepijndevos> But it's hiiiighly ulikely it's related to that.
<trabucayre> I know :)
<pepijndevos> Either it's an nextpnr regression, or more likely... a particular placement that uncovers a bug in Apicula.
<pepijndevos> I'm hoping for the later, and that it's the same bug that is breaking picosoc
<trabucayre> but why it's working in your computer?
<pepijndevos> I'll do a few runs to make sure it's reproducible
<pepijndevos> Firs tending to some PRs in other projects...
<trabucayre> ok
<pepijndevos> Are you testing on runber or tec0117
<trabucayre> tec0117
<pepijndevos> yea seems to work reliably for me... ok onto updating stuff
<trabucayre> which target is better for this issue ?
<pepijndevos> Doesn't matter, just wanted to make sure I'm using the same as you
<pepijndevos> Gw1n-1 compiles faster because it's smaller, which is sometimes easy for testing.
<pepijndevos> But if your problem only shows on gw1n-9 then it's no use
<trabucayre> both
<pepijndevos> huh tang nano only has an RGB led, but you said it only breaks for 7 or 8 leds right
<pepijndevos> still works for me on master nextpnr
<trabucayre> runber & tec
<pepijndevos> ah ok right
<pepijndevos> 4 should still be a bit faster than 9
<pepijndevos> can you give me your nextpnr seed? Not sure how exactly that works but that should make pnr reproducible I think
<pepijndevos> You can just pass --seed apparently
<pepijndevos> updated yosys and still working great on my end...
<pepijndevos> Runber, on the other hand, does NOT work!
<pepijndevos> Blinky is fine, shift is not
<pepijndevos> 5 leds works
<pepijndevos> 6 breaks
<pepijndevos> seems like I have my bug to play with...
<pepijndevos> with bonuspoints for being 5k less luts
<pepijndevos> Actually maybe even 4 leds is subtly broken
<pepijndevos> it seems to work, but reset doesn't properly reset. It does not zero out all the leds, just enable the first one and disable the last one. If you press it while it's in another position it continues to shift
<pepijndevos> eh 5 that is
<pepijndevos> 4:0
<pepijndevos> seems like still wrong flop types are unpacked...
<trabucayre> sorry lunch time...
<pepijndevos> same
<pepijndevos> but im on the right track now i think
<trabucayre> cool !
<pepijndevos> I guess flip flop modes didn't receive as much testing... with them never being supported in the generic flow
<pepijndevos> but it's such a basic thing it's not what I was expecting to break hehe
<pepijndevos> durrrrrr I think I know what's going on
<pepijndevos> yeeeeeaaaaaa so you can't put two different ff types on the same slice...
_whitelogger has joined #apicula
<pepijndevos> wat... I fixed a bug that makes 5 leds work, but all 8 is still dead
<pepijndevos> alright there isn't any of dff overwriting each other anymore I hope...
<pepijndevos> so it's progress
<pepijndevos> weirdly it seems to go about twice as fast as before???
<pepijndevos> ahhhh probably because the tick_hz reset wasn't triggering?
<pepijndevos> hah! with 6 LED it's back to being slow... so I bet the FFRS/R are still somehow broken
<trabucayre> whoua!
<pepijndevos> Yea pretty sure somehow with 5 LED it's properly resetting, but with 6 it just overflows the counter.
<pepijndevos> you program is producing a true waterfall of apicula bugs
<trabucayre> I've seen this behaviour with a blink fastest yes
<trabucayre> It's amazing to see a really small program producing a so big serie of bug :)
<pepijndevos> I believe it is because flip flop types were not tested well and this program contains almost all types
<trabucayre> when you need crash test ask me ;-)
<pepijndevos> hrmmmm tick_hz is not present in the yosys output. I guess it's optimized away?
<pepijndevos> Current hypothesis is that this reset is not properly triggered. 12e6 contains 10 ones and 14 zeros, which matches the number of DFFS and DFFR.
<pepijndevos> So I'm trying to trace down how these S/R are driven...
<pepijndevos> What would hertz_cpt == 0 synth to? Some sort of tree of LUTs I suppose?
<disasm[m]> I'm trying to decrypt the encrypted part of the EMPU IP core. Any ideas how to build a Gowin IDE project from a terminal?
<pepijndevos> which ide version?
<pepijndevos> For the version Gowin uses, the fuzzers contain an example
<pepijndevos> for the latest version better look at LiteX
<disasm[m]> V1.9.5.02Beta currently, but I can install any of these
<disasm[m]> <pepijndevos "for the latest version better lo"> Oh, thanks!
<disasm[m]> LiteX should generate everything I need, I think
<pepijndevos> Well, if you want to fuzz it and contribute to apicula, using that version would be best ofc, but if you just want to poke around or use it with a vendor design, just go with the latest version
<pepijndevos> Latest version has a nice TCL API tbh, but very different from what they had when I started Apicula.
<disasm[m]> Yeah, I understand. First I need to figure out which parts are used in a vendor design.
<pepijndevos> Until I need features not present in the old version, there is no benefit to upgrade and rewrite some fuzzers and debug all the stuff
<disasm[m]> Oh, the whole gw_sh execution is 40 billion instructions, I need a bigger HDD to save and analyze that
_whitelogger has joined #apicula