whitequark changed the topic of #yosys to: Yosys Open SYnthesis Suite: https://github.com/YosysHQ/yosys/ | Channel logs: https://libera.irclog.whitequark.org/yosys/ | Bridged to #yosys:matrix.org
tpb has quit [Remote host closed the connection]
tpb has joined #yosys
strobo has quit [Read error: Connection reset by peer]
strobo has joined #yosys
nak has quit [Quit: Bye]
GenTooMan has quit [Read error: Connection reset by peer]
GenTooMan has joined #yosys
bjorkintosh has quit [Quit: Leaving]
strobo has quit [Read error: Connection reset by peer]
strobo has joined #yosys
Guest22 has joined #yosys
<povik> new toymap results
<povik> fixed a severe case of overconstraining the lut depths, and copied over some more abc heuristics
<povik> i think i will look into aig preprocessing next
<povik> would ping whitequark if they were here...
<povik> hah, github's rich diff is pretty good for viewing this
derekn has quit [Ping timeout: 244 seconds]
<dxld> povik: super excited to see such a small implementation get so close to what abc can do :D
derekn has joined #yosys
<dxld> I'm not familiar with the details here, could you shed some light on whether toymap would completely replace abc or are there other areas in yosys where it's still used?
<dxld> (I want to get rid of abc because it's such a huge unmaintainable pile of complexity; I've had the displeasure of trying to figure out how to get it working on all the "weird" architectures in Debian ;)
<povik> i mean, i have no idea what 98 % of abc commands do
<povik> though i guess most people ever invoke abc from yosys for techmapping, which is in scope for toymap (being a toy though!)
<povik> you are free to run abc from yosys with custom abc scripts
<Adrien[m]> corecode: at least Interesting points of potential behaviour of tools to take care of, good for not getting trapped in trivial issues because of inexperience with these tools
<povik> so in a way nothing can ever replace it...
Wolfvak has quit [Remote host closed the connection]
whitequark[cis] has joined #yosys
<whitequark[cis]> <dxld> "(I want to get rid of abc..." <- abc basically doesn't work on 64-bit platforms
<whitequark[cis]> that's a load bearing "basically"; the actual issue is that it's making assumptions incompatible with ASLR on macOS
<whitequark[cis]> and there's no apparent way to fix that
<whitequark[cis]> to clarify, the assumptions it's making are incorrect everywhere (as far as i know) but on macOS it happens to randomly segfault and the only solution for that we have is "run the thing again"
<dxld> povik: I'm not too worried about custom abc scripts, nobody understands abc so nobody is likely to use those :]
<whitequark[cis]> anyway, replacing abc wouldn't mean literally making an API-compatible application; it would mean building something much simpler and smaller that just does LUT mapping for FPGAs
<dxld> whitequark[cis]: sounds like a job for qemu-user to me honestly :P
<whitequark[cis]> and maybe sequential synthesis eventually
<whitequark[cis]> dxld: one potential solution we've seriously thought about is building it for wasm, then using wasm2c to turn it back to C, then using that in yosys
<whitequark[cis]> this sounds borderline absurd but you get almost the full performance
<whitequark[cis]> it's basically an automated way to transform C code to safe(ish) C code :D
xiretza[cis] has joined #yosys
<xiretza[cis]> I'm surprised that doesn't just make it crash all the time rather than just sometimes
<dxld> you do know what qemu-user lets you do right? it's literally a drop-in way to run i386 (or any qemu supported arch) executables on any other architecture
<whitequark[cis]> i mean i don't think there would be obstacles to shipping that except someone has to add it to yosys
<dxld> as long as it's an executable (and abc is) you're golden
<whitequark[cis]> dxld: yeah i'm familiar
<whitequark[cis]> and if it's not an executable you can write a tiny main() that calls the function you want
<dxld> well yeah, but if yosys, say, called abc as a library you'd have to compile all of yosys as 32bit which obviously sucks much more than just having it confined to abc
<whitequark[cis]> it doesn't call it as a library because of the random memory corruption that used to happen when it did
<dxld> haha :)
<whitequark[cis]> the support is there, you can enable it via an option
<whitequark[cis]> yowasp-yosys does that
<whitequark[cis]> because wasm is 32-bit (the compiler prefix i'm using anyway) it doesn't tickle those bugs at least
<whitequark[cis]> though... i tried building abc for wasm not as a library within yosys (as a standalone executable) and it segfaults with a completely inscrutable backtrace
<whitequark[cis]> i tried to make this work twice and decided to just implement what i want in some other way
<dxld> anyway point is, povik, please keep doing what you're doing <3
<whitequark[cis]> (i wanted output redirection. i ended up using some really cursed freopen tricks. but that got it done in a day)
<povik> dxld: i am happy you like it! though i can't promise it will ever amount to anything more serious
<whitequark[cis]> I second dxld
<povik> ok, that message applies to you too then :P
<dxld> famous last words "just a hobby, won't be big and professional like gnu" :D
Wolfvak has joined #yosys
<jix> besides techmapping, abc is also used for formal verification from SBY, in particular the pdr command which implements pdr/ic3 (two names for the same algorithm)
bjorkintosh has joined #yosys
bjorkintosh has quit [Changing host]
bjorkintosh has joined #yosys
bjorkintosh has quit [Client Quit]
<somlo> whitequark: not to mention that abc is broken on BE platforms (not sure if maybe that's what you meant when you said "64-bit platforms" earlier)
<whitequark[cis]> no, that's a separate issue
<whitequark[cis]> but might be related
V has quit [Ping timeout: 240 seconds]
<jix> IIRC the endianness issue was it casting pointers to access the same data as differently sized int types, with the cast and the accesses not being close to each other, so really hard to even enumerate the places where that issue is present
<jix> but that shouldn't be affected by ASLR
<dxld> I wonder if there's a ASAN/UBSAN mode for detecting misaligned accesses?
<dxld> and if not why not :)
<dxld> uuh ubsan does actually seem to support that
<jix> I don't think the accesses were misaligned, or at least even if they are not, the code would still be buggy
<dxld> maybe this isn't as hopeless as we thought
<dxld> the issue I have in mind is https://github.com/YosysHQ/yosys/issues/2645
<dxld> so yeah it was more complicated than simple alignment
<dxld> whitequark[cis]: do you know any specific instances of code that break because of the macos ASLR?
<dxld> or is there a tracking issue or something?
<jix> dxld: yeah that's the same one I'm thinking of
<whitequark[cis]> dxld: macos builds of yosys on CI fail spuriously because of it
<whitequark[cis]> it's very annoying
<whitequark[cis]> like, run the testsuite a few dozen times and it'll eventually segfault
<whitequark[cis]> there's nothing i know of beyond that
<povik> ah, so that's the reason for those fails
<povik> indeed annoying
<whitequark[cis]> ASLR causes breakage because abc makes incorrect assumptions about pointer bits
<whitequark[cis]> I don't remember exactly which
V has joined #yosys
<dxld> capturing a coredump for one of these crashes might be a start for debugging this then
<dxld> and I would try a build with all sanitizers I can get my mits on enabled as well for good measure
<dxld> but given how crusty abc is maybe that'll be information overload :]
Wanda[cis] has joined #yosys
<Wanda[cis]> it also occasionally fails on linux for the same reason as on mac, it's just much rarer
acathla_ has joined #yosys
vup2 has joined #yosys
pi3 has joined #yosys
mwk_ has joined #yosys
krispaul has joined #yosys
lambda has quit [*.net *.split]
kristianpaul has quit [*.net *.split]
acathla has quit [*.net *.split]
crzwdjk has quit [*.net *.split]
vup has quit [*.net *.split]
josuah has quit [*.net *.split]
lambda has joined #yosys
ec_ has joined #yosys
ec has quit [Ping timeout: 246 seconds]
nonchip has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
nonchip has joined #yosys
ec_ has quit [Remote host closed the connection]
ec_ has joined #yosys
<lofty> povik: looking at those results I'm reasonably confident you have a bug in your cut calculation code.
<lofty> As in, you are likely producing fewer cuts than actually possible
<lofty> I've been trying to figure out where it might be, but I'm not having too much luck from simply reading the code
<lofty> But having greater LUT depth than ABC is a symptom of not enough cut variety.