<ZirconiumX>
There's a mul2dsp.v script that maps multiplication to fixed-size DSP blocks
<ld-cd>
awesome, are there any areas in yosys that could use some work thats within the grasp of a newer contributer
<ZirconiumX>
Currently it works for MULT18x18
<ld-cd>
inferring these kind of large blocks seems really interesting
<ZirconiumX>
But if you want to add 9x9 support - and if there's support for it in nextpnr - then it would be a case of running mul2dsp again after the 18x18 block
<ZirconiumX>
Inference is an incredibly tricky thing
<ld-cd>
thats what I've gathered, but its also fascinating
<ld-cd>
oh also, sorry if this is a dumb question but I've been wondering
<ZirconiumX>
To paraphrase whitequark, it's a case where you're trying to guess the programmer's intentions, but all you have is the code they wrote.
<ZirconiumX>
There are no dumb questions, especially not from newbies
<ld-cd>
it seems like yosys can easily make a netlist with more dsp/ebr blocks than the device has, does nextpnr know how to demote those to luts
<ZirconiumX>
~~I still consider myself a newbie~~
<ZirconiumX>
It doesn't, as far as I know
<ZirconiumX>
And I would argue it shouldn't
<ld-cd>
that does seem to make sense
<ld-cd>
can you give yosys on limits of certain kinds of resources
<ZirconiumX>
Yosys maps the netlist assuming given timings, but if nextpnr silently changes them to LUTs it will almost certainly majorly distort the timings
<ZirconiumX>
And be more difficult to route.
<ZirconiumX>
As for resource limits: not at present, for a few different reasons
<ZirconiumX>
The primary one is that almost everything works in a vacuum
<ZirconiumX>
mul2dsp is not charged with mapping *all* multiplications
<ZirconiumX>
It's charged with mapping *a* multiplication
<ZirconiumX>
And then it gets called on every multiplication it can find
<ZirconiumX>
It is completely unaware of what the rest of the netlist looks like.
<ZirconiumX>
To impose a resource limit, you basically have to throw away mul2dsp and write a whole new pass
<ZirconiumX>
And that's going to be very tricky, because even if you are in charge of mapping *all* multipliers, you are *still* in a vacuum.
<ZirconiumX>
Which multipliers are on the critical path? Which aren't?
<ZirconiumX>
You can't know at the stage mul2dsp works at.
ld-cd has quit [Ping timeout: 260 seconds]
<ZirconiumX>
Welp.
<ZirconiumX>
Though they did say their WiFi was crap.
<ld-cd>
moving from one place to another drops it pretty much instantly
<ZirconiumX>
I think you missed much of my monologue
<ld-cd>
yeah I've been following along there while it was out
<ZirconiumX>
If you want to do this "properly" you need to simultaneously map everything at the same time.
<ld-cd>
I didn't realize some mapping was done in verilog like that
<ZirconiumX>
Ah, yeah, techmap is incredibly versatile for this kind of thing.
<ld-cd>
so if ABC supported multiplies for example it would be done there?
<ZirconiumX>
When you want to transform from A to B, we generally point you in the direction of techmap.
<ZirconiumX>
Indeed it could.
<ZirconiumX>
But it doesn't.
<ZirconiumX>
Additionally, memory is another point.
<ld-cd>
Is there a split between yosys development philosophy and abc's
<ZirconiumX>
ABC predates Yosys and is a separate project as such
<ZirconiumX>
But it gets used for LUT mapping because there is presently nothing better.
<ZirconiumX>
I have the aim of changing that for a few reasons, but I'm basically incapable of getting stuff done alone ^.^;;
<ZirconiumX>
So I've instead spent what energy I can muster on a way of quantifying improvements to Yosys in a more scientific manner than "it seems good to me"
ld-cd has quit [Ping timeout: 260 seconds]
ld-cd55 has joined #yosys
ld-cd55 is now known as ld-cd
<ld-cd>
yikes today is a bad day, literally sitting still
<ld-cd>
yeah thats what I'd gathered, I was just surprised to notice that yosys pulls in what I can tell is a fairly patched versionIs it theoretically possible to support memories and things in ABC and the author doesn't want to or would it just be a massive undertaking?
<ld-cd>
:/
<mwk>
heh
<ld-cd>
that was supposed to be two messages
<mwk>
people who have been studying long enough at my uni remember which desks in a room have working wifi and which do not
<ld-cd>
<insert newline here> Is it theoretically possible to support memories and things in ABC and the author doesn't want to or would it just be a massive undertaking?
<mwk>
because it's that bad and that's crucial information when picking a seat
<ld-cd>
unfortunatly I'm in a basement hallway rn waiting for my lab to start
<ld-cd>
literally the worst spot
<ZirconiumX>
ld-cd: Actually Yosys just vendors vanilla ABC
<ld-cd>
might be the extra people here for the primary, although they shouldn't be on this ap
<ld-cd>
ah
<ZirconiumX>
There are no patches involved :P
<ZirconiumX>
Well anyway
<ZirconiumX>
As far as I can tell, the author of ABC considers it out of scope
<ZirconiumX>
And hasn't done much research on it as such
<ld-cd>
I could go ask him I guess
<ld-cd>
I think he works here
<ZirconiumX>
Mishchenko?
<ld-cd>
but he's a reasearcher from what I can tell
<ld-cd>
yeah
<ZirconiumX>
Yeah, ABC is a research project:tm:
<ZirconiumX>
And to be fair, as far as I can tell it's pretty state of the art
<ZirconiumX>
It's just missing an awful lot of things that would be nice to have
<ld-cd>
does it handle timing information?
<ZirconiumX>
Yes, that's ABC9
<ZirconiumX>
(you ever wondered what the shiny -abc9 option does? that's your answer)
<ld-cd>
very neat
<ZirconiumX>
Well. Kind of.
<ZirconiumX>
I wrote ~~an essay~~ a thought piece based on an instance where ABC9 does *worse* than ABC1