Lofty changed the topic of #prjmistral to: Project Mistral: Yosys (and hopefully nextpnr) on Cyclone FPGAs - https://github.com/ZirconiumX/mistral - logs: https://freenode.irclog.whitequark.org/prjmistral
futarisIRCcloud has joined #prjmistral
futarisIRCcloud has quit [Quit: Connection closed for inactivity]
_whitelogger has joined #prjmistral
chipb has quit [Ping timeout: 276 seconds]
chipb has joined #prjmistral
<Lofty> ping Sarayan
<Lofty> Happy to report the bottle of cider I had yesterday has very much worn off
<Sarayan> :-)
<Sarayan> How's your head?
<Lofty> Much clearer today, thanky ou
<Sarayan> huhuhu
<Lofty> Okay, so
<Sarayan> As long as you avoided a hangover, it's good
<Lofty> I guess the best starting point here is probably getBelPins
<Sarayan> okay?
<Lofty> So, a nextpnr-cyclonev Bel has flops and LUTs. It looks like the libmistral pnode is...an ALM?
<Sarayan> hmmm no
<Sarayan> in fact there's no type for an alm
<Sarayan> perhaps we should add it, dunno
<Sarayan> but an alm is a pair (block_type_t, pos_t)
<Sarayan> a pnode_t is one pin of an alm
<Sarayan> a rnode_t is one node in the routing grid
<Sarayan> some pnode_t are not connected to anything, but most pnode_t are connected to one specific rnode_t
<Lofty> What about the intra-ALM connections? Am I going to have to somehow model those myself?
<Sarayan> and most (all? not sure yet) input pnode_t of peripheral alms have an optional inverter
<Sarayan> yes, you're going to have to
<Lofty> daveshah: any advice on how best to do that?
<Sarayan> there are multiple strategies possible, and I have to idea what is the best one, which is why I decided that the lib will just describe what's there
<Lofty> Mhm
<Sarayan> I mean, you take the LAB graphs, what should be routing and what shouldn't in there, I really have no clue
<Sarayan> fwiw, quartus has everything in the routing tables for the peripheral alms, and almost nothing for the internal ones. Go figure
<Lofty> I've been writing so much Rust that I forgot C++ switch/case falls through
<daveshah> Yeah you'll need to add wires and pips for the intra ALM connections
<daveshah> I'm afk right now with limited phone signal so answers may be limited for the next 30 mins
<Lofty> Hmmm
<Sarayan> rnode_type_t is 0-24, while there's space for 8 bits in rnode_t, so you can feel very free to add your own types
<Lofty> As long as libmistral never sees them, right? :P
<daveshah> Yeah adding some kind of flag to wire/pip ids that way so you know which ones are intra alm makes sense
<Sarayan> the only things that will care is rn2s() because the string for the type name will be out-of-bounds
<Sarayan> plus of course they will not exist in the grid, but that's expected
<Lofty> https://puu.sh/HeekJ/ddaea26656.png <-- so, here's the Quartus ALM diagram
<Sarayan> It has issues, use mine
<Lofty> I kinda feel like laying all that out >.>
<Sarayan> what do you mean?
<Lofty> Well, I guess you'll see
<Sarayan> :-)
<Sarayan> There's an unspoken code, green is an internal connection, black is external, on the left of the connection point in input, on the right is output
<Lofty> What do the triangles with a number in mean?
<Lofty> Near like bpkreg0 and bsload_en
<Sarayan> force-to-0 or force-to-1 when the bit is set
<Sarayan> what is forced to being the number
<Lofty> Ah, okay.
<Lofty> Sarayan: https://puu.sh/HefoP/b85c48274d.png <-- gonna take a break from this now, but
<Sarayan> ahhh, you're redrawing it on a real schematics program instead of inkscape?
<Sarayan> sounds like a good idea
<Lofty> Sarayan: KiCad :P
QDX45 has joined #prjmistral