<cyrozap> It details going from GDSII->netlist/Verilog, and then simplifying that code and running it through an SMT solver to find the flag (this was for a CTF competition).
gnufan has quit [Quit: Leaving.]
<rqou> right, we can probably achieve most of that with yosys
<rqou> they cheated because they started with a GDS-II :P
<rqou> now try starting with a folder of .jpgs and a .pto file :P
<cr1901_modern> It's still cool
<cyrozap> rqou: Sounds like a job for .-*-.-*-.nEuRaL NeTwOrKs.-*-.-*-. and .-*-.-*-.MaChInE lEaRnInG.-*-.-*-. :P
<rqou> yes, i think digshadow can tell you all about those attempts
<cyrozap> Also, re: doing this with Yosys: "What we need is a netlist - a description of all the electrical nets in the design and how they connect all the logic cells together. There's a few ways to go about this: 1) Use a commercial EDA suite (like Cadence or Synopsys) to perform netlist extraction. 2) Learn to use Magic VLSI. 3) [Build your own fucking birdfeeder](https://q3k.org/birdfeeder.pdf).";
<rqou> yeah, we don't have the netlist extraction part yet
<rqou> it's on the todo list :P
<cyrozap> I'm just saying the author applied option 3 to the rest of the post as well, by building their own tools instead of just using Yosys. While I personally would have gone with Yosys because I'm familiar with it, there's something to be said for building the tools yourself as a learning experience.
<rqou> ah true
<cyrozap> So far, Yosys has been really good at simplifying the Verilog generated from PSoC PLD configs down to the original equations, which has saved me a ton of work because I don't have to do any simplification/minimization myself.
<rqou> that's actually abc :P
<rqou> but yeah, yosys is an amazing framework
<cyrozap> Oh, well I'm using Yosys for the read_verilog etc. etc. write_verilog stuff.
<digshadow> hmm thats actually an interesting point that there isn't a polished netlist extractor yet
<digshadow> because there are a few tools that people use for ic reversing, but don't think there is general acceptance which to use
<rqou> there are polished netlist extractors, but they're all commercial
<digshadow> think sarayan's is the most popular though
<rqou> they're used for LVS checking
<digshadow> right I mean FOSS
<cr1901_modern> Huh, sarayan isn't in this room
<cr1901_modern> I wish SVG was conducive to multiple people editing without trampling each other's work.
<cr1901_modern> (we tried w/ ym2151 and inkscape. It doesn't work exceptionally well.)
<digshadow> cr1901_modern: and yes, most used is possibly "2 people"
<digshadow> actually
<digshadow> doesn't magic have some LVS?
<cr1901_modern> what's LVS?
<rqou> i've never actually used magic
<rqou> layout-vs-schematic
<cr1901_modern> ahh
<pointfree> cyrozap: Speaking of which, I've been figuring out the inverting action at the portpins/dsi. I just ran through all possible combinations of PRT2_OUT_SEL0/1 and DSI5_DSIOUTT1 and recorded the output from the live hw. I was thinking maybe I should minimize the output of those + PRT2_PS (portpin states). It would give me an expression for the logic at the portpins. Probably simple enough to finish figuring out by
<pointfree> visual inspection though.
<cr1901_modern> digshadow: I use sarayan's tools, fwiw :P. For some metric of "use"
<cr1901_modern> digshadow: like all tools intended for one person, it's difficult to actually use dietools
<digshadow> cr1901_modern: right, point is nothing really reached critical mass there
<digshadow> where it was made for others
<cr1901_modern> digshadow: Jotego proposed making a GUI for a vectorizing-to-netlist workflow, but it didn't pan out
<cr1901_modern> I think we both know why
<cr1901_modern> (I agree w/ his ideas in principle, fwiw)
<digshadow> heh
<cyrozap> pointfree: So you'd just be minimizing a truth table? If you wrote it as a Verilog LUT, would Yosys be able to simplify that?
<pointfree> cyrozap: Yes, just a truth table.
<pointfree> cyrozap: I have an inkling that this may be the same inverting logic used by the PLD's on the input terms, just copy-pasted to the area of the dsi port interfaces. Although I could be totally wrong about that.
<pointfree> cyrozap: Would you recommend it over blif?
<cyrozap> pointfree: Verilog over blif? For the Yosys input? I only mentioned Verilog because I don't know the Yosys blif/ilang/json formats.
<rqou> er, my recommendation is verilog for outputting and json for tool-to-tool interchange
<rqou> yosys json isn't standardized, but it's much easier to work with than blif
<cyrozap> pointfree: Also, I just checked, and Yosys _can_ simplify LUTs into logic equations.
<rqou> ilang is even weirder and i don't know when i would use it right now
<rqou> json = netlist, ilang = ast
<cyrozap> rqou: Yosys JSON isn't documented anywhere, so I haven't used it for any of my tools.
<rqou> it's a fairly obvious dump of yosys's internal data model
<rqou> but yes, fair point
<pointfree> Well is there a yosys source file documenting it?
<rqou> there's a parse_json.cc somewhere :P
<pointfree> thnx
<rqou> there's also my rust code
<pointfree> RE by logic synthesis..
<pointfree> Your rust code?
<rqou> i have a rust crate for working with yosys json files
<pointfree> TIL even better
<cyrozap> rqou: Also, I found Verilog to be easier to template. i.e., I can represent the PLDs as some SOP expressions in Verilog that I can then fill-in-the-blanks with the extracted configuration memory.
<rqou> that's what i thought too originally
<rqou> but then i wrote the code and found it easier to directly emit json
<cyrozap> Hmm, maybe I'll revisit that, then.
ZipCPU|Laptop has quit [Ping timeout: 248 seconds]
promach_ has joined ##openfpga
digshadow has quit [Ping timeout: 248 seconds]
promach_ has quit [Quit: Leaving]
<pie_> rqou, where do individual assembly instructions place in the chomsky hierarchy?
<pie_> at first i thought theyd be context free, but then all that weirdass prefix stuff and heck knows, i didnt look into it much yet
<Bike> what architecture?
<pie_> * x86
<pie_> ( ARM, MIPS, ... )
<pie_> well, for that question x86 specifially
<Bike> i mean, encodings vary... mips instructions are probably pretty simple
<Bike> x86 instruction encoding is apparently terrible
<Bike> mips would probably be star-free, or maybe finite if you're being pedantic
<pie_> x86 is one of the most complicated so id mainly be interested in that as a least common denominator i guess
<pie_> i dunno if theres something esoteric that would need a higher level but eh
<Bike> you could probably make one up that's not even decidable :p
<Bike> no loops other than the prefix however
<cr1901_modern> if it weren't for a > 16-byte exception, the longest x86 instruction is infinitely long
<cr1901_modern> I mean even VAX couldn't top that
<Bike> i googled "weirdest instruction encoding" and all the top results are x86, weak
<Bike> there's gotta be some funky microcontroller or whatever
<cr1901_modern> I think 68k is the worst insn encoding, tbh (which is a shame, b/c the ISA is actually pleasant to handwrite)
<fouric> Bike: you're the same Bike from #lisp?
<Bike> this is still freenode, no?
<Bike> well, i don't know if homograph attacks are allowd, come think...
<Bike> (yes)
* fouric wasn't sure about that
<fouric> i'm not too well-versed on IRC nick allowed characters
<fouric> i haven't *seen* unicode yet
<fouric> but that could just be because it's impolite and not because it's technically restricted
<Bike> yó. irc itself doesn't specify encodings, it's all in terms of octets
<fouric> oh, got it
<Bike> freenode rejects Biké, terrible
<fouric> lol
<cr1901_modern> So you're not meant to be a Bicycle?
<fouric> i was just a bit surprised that Lisper would also be into hardware
<Bike> i'm not named after bicycles, no
<fouric> good surprise, though
<Bike> my actual training is EE, i just find lisp pleasant for programming
* fouric is the same
<Bike> #lisp does occasionally get people who are super into lisp machines tho
<Bike> check it out. what if words... were thirty four bits
<fouric> (lol, but also that's an actual architecture, isn't it?)
<cr1901_modern> Lisp machines are interesting, but after hearing horror stories about repairing them, they aren't for me
<fouric> was that the...bus size of a symbolics lisp machine?
* fouric is half-guessing
<Bike> something like that. i don't know the details. but there were a few low bits you could use for tagging values.
<Bike> it's not really necessary for modern machines but people have weird misconceptions about computer architecture
<fouric> such as?
<cr1901_modern> tagging values?
<Bike> "it's a lisp machine, so lisp goes fast on it, right"
* fouric wants to make a lisp machine, is interested in computer architecture stuff
<Bike> cr1901_modern: lisp is "dynamically typed" which means actual runtime values have some kind of type information with them as a "tag"
<Bike> like an integer has different bits from a float, kind of thing
<cr1901_modern> oh, that.
awygle has quit [Ping timeout: 246 seconds]
<Bike> so on a lisp machine i guess you'd have a 34 or 36 or whatever bit word, use the high 32 bits as an actual pointer, and the rest as the tag
awygle has joined ##openfpga
Bike has quit [Quit: Lost terminal]
ZipCPU|Laptop has joined ##openfpga
<cyrozap> "irc itself doesn't specify encodings, it's all in terms of octets"
<cyrozap> c̶͙͍̯̼̦̯̣̪̺͉̃͊̉͌̇̂̂͋̏̕Ḩ̷̠̣̞̤̬̞̙͔̓̋̃͆̒͆̒̾͘͠ͅa̵͉̘̬̟̖̯̙͇͈̋͗̀̉͛͛͛̈́̄͘͜L̷̨̛̪̼͖͖͉̪͖͚͈̈́̔̒̒̓́͘͘͝L̷̛̪̪̲̻̗͚̗͑̋̌̃͂͐̒̀͘͜ͅͅe̴̡̺̪̬̮̗̰͙͖̫̍́͋̓̋̄̈́͘̚̚N̶̢̟͖͚̹̳̳̯̍͑̉̎͐͗̇̕̕͜͜͝ġ̸̛̼̪͈̱̩͙̝̻̫͑̓͂͛̐͂̿͘ͅe̸̛̪̻̫̞̱̝̜̪̭̾͐͑̄́̓̈́̃͜͝
<cyrozap> ̵͇͍̝͚͖̦̩̭̩̣͌̄͐̍̈́̃͂̃̓͠À̸̧͉̥̲̟̪̞̰̩̬̓̀͑͊̍̌͌̇͆c̶̨͉̻̟͉͕̥̰̖̆̈́͐͛͋̍̌̓̀͊ͅç̴̛͈̰͚͓̬͓̲͋̉̇͒͗͛̆͘̕͜ͅĘ̶̧̥̭̯̪̱̜̤͕͂̎̆̓̓̓̐͝͝͝p̶̢̧̧̜̗̻͕̪͎̰͛̌́̾̈̔̃͋̂̅T̶̨͍̳̥̤̳̮͖̜̦͂̇̌̍̊̐̎̽̓̕Ē̷̘̙̩̼̥̻̝̟̰̱̔̔̓̽͗̓̋̀̌ḑ̴̮̤̠̬̱̱͍̭̳̋̓̐̃̓͐́͂̽̆
<cyrozap> 😉
* cyrozap is curious to see how everyone's clients handled that
<pie_> i guess my irc sucks
<pie_> it places a lot of stuff next to eachother instead of under
<pie_> so the lenny face gets kinda messed up :(
<pie_> might be my font? idk
cr1901_modern1 has joined ##openfpga
Xark has quit [Ping timeout: 240 seconds]
cr1901_modern has quit [Ping timeout: 240 seconds]
Xark has joined ##openfpga
digshadow has joined ##openfpga
cr1901_modern1 is now known as cr1901_modern
teepee has quit [Ping timeout: 258 seconds]
teepee has joined ##openfpga
pie_ has quit [Ping timeout: 248 seconds]
m_t has joined ##openfpga
<rqou> x86 opcode encoding is "simple" because it has a max length of iirc 16 bytes
<rqou> as for weirdest, iirc some vendor actually shipped a chip with an embedded SUBLEQ cpu
<rqou> hmm now that i'm looking for it, i can't find it
<rqou> maybe it was just an experiment after all
nrossi has joined ##openfpga
fpgacraft1 has quit [Quit: ZNC 1.7.x-git-709-1bb0199 - http://znc.in]
fpgacraft2_ has joined ##openfpga
fpgacraft1 has joined ##openfpga
fpgacraft2 has quit [Ping timeout: 258 seconds]
fpgacraft2_ is now known as fpgacraft2
[X-Scale] has joined ##openfpga
X-Scale has quit [Ping timeout: 248 seconds]
[X-Scale] is now known as X-Scale
<plaes> rqou: 15
brizzo has quit [Ping timeout: 248 seconds]
hobbes- has quit [Ping timeout: 248 seconds]
brizzo has joined ##openfpga
azonenberg has quit [Ping timeout: 246 seconds]
balrog_ has joined ##openfpga
azonenberg has joined ##openfpga
balrog has quit [Ping timeout: 248 seconds]
nmz787 has quit [Ping timeout: 248 seconds]
Ellied has quit [Ping timeout: 248 seconds]
nmz787 has joined ##openfpga
hobbes- has joined ##openfpga
Ellied has joined ##openfpga
balrog_ is now known as balrog
<plaes> according to Sandsifter paper..
hobbes- has quit [Ping timeout: 248 seconds]
hobbes- has joined ##openfpga
enriq has joined ##openfpga
Hootch has joined ##openfpga
fpgacraft1 has quit [Quit: ZNC 1.7.x-git-709-1bb0199 - http://znc.in]
fpgacraft2 has quit [Quit: ZNC 1.7.x-git-709-1bb0199 - http://znc.in]
fpgacraft2 has joined ##openfpga
fpgacraft1 has joined ##openfpga
digshadow has quit [Ping timeout: 240 seconds]
<qu1j0t3> rqou: that's a weird definition of 'simple'.
nrossi has quit [Quit: Connection closed for inactivity]
kmehall has quit [K-Lined]
kmehall has joined ##openfpga
eduardo__ has joined ##openfpga
azonenberg_work has quit [Ping timeout: 246 seconds]
eduardo_ has quit [Ping timeout: 260 seconds]
pie_ has joined ##openfpga
digshadow has joined ##openfpga
enriq has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
enriq has joined ##openfpga
enriq has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
enriq has joined ##openfpga
azonenberg_work has joined ##openfpga
Hootch has quit [Quit: Leaving]
pie___ has joined ##openfpga
pie_ has quit [Read error: Connection reset by peer]
pie___ has quit [Remote host closed the connection]
pie___ has joined ##openfpga
pie___ is now known as pie_
gnufan has joined ##openfpga
pie_ has quit [Ping timeout: 260 seconds]
pie_ has joined ##openfpga
noobineer has joined ##openfpga
noobineer has quit [Quit: Leaving]
Bike has joined ##openfpga
m_t has quit [Quit: Leaving]
azonenberg_work has quit [Ping timeout: 240 seconds]
<mithro> Does anyone know where is the iverilog code it generates the "bin hash" line when generating a script with -o ?