clifford changed the topic of #yosys to: Yosys Open SYnthesis Suite: http://www.clifford.at/yosys/ -- Channel Logs: https://irclog.whitequark.org/yosys
tpb has quit [Remote host closed the connection]
craigo has joined #yosys
tpb has joined #yosys
FFY00 has quit [Ping timeout: 260 seconds]
FFY00 has joined #yosys
craigo has quit [Quit: Leaving]
futarisIRCcloud has joined #yosys
_whitelogger has joined #yosys
Degi has quit [Ping timeout: 258 seconds]
Degi has joined #yosys
mithro has joined #yosys
citypw has joined #yosys
<az0re> So, how negatively do people feel about bringing in Boost dependencies?
<az0re> I am working on adding a `partition` command to Yosys, to split a (for now, flattened) techmapped module into multiple submodules with roughly balanced amounts of logic in each partition, with an objective to minimize the number of cut edges. In other words, it's an implementation of balanced hypergraph partitioning.
<az0re> This is an NP-complete problem, but thankfully there are good heuristics for it.
<az0re> There are AFAIK only two reasonable libraries that could be included in Yosys: KaHIP ( https://github.com/KaHIP/KaHIP ) and minipart2 ( https://github.com/Coloquinte/minipart2 )
<tpb> Title: GitHub - KaHIP/KaHIP: The graph partitioning framework KaHIP -- Karlsruhe High Quality Partitioning. (at github.com)
<az0re> These are both MIT licensed
<az0re> However, including minipart2 in Yosys would bring in some Boost dependencies, and including KaHIP would bring in Scons and an old version (!) of OpenMPI
<az0re> So neither is particularly ideal... Guidance would be appreciated
<whitequark> az0re: very negatively
<whitequark> cross-compiling Boost is a nightmare and if I have any say over this at all I would never agree on having it in Yosys
<whitequark> it was bad enough in nextpnr
<whitequark> (in fact I would like to rip it out of nextpnr if possible)
<az0re> Is the best option to rely on an external executable, then? Of course, then the command only works if the other program is installed
<sorear> "minimizing the number of cut edges" is an oversimplification of the objective (we care a lot about timing, too, and depending on exactly what you're doing it may be possible to multiplex)
<sorear> and I question whether a library that _only_ minimizes the number of cut edges, is useful at all?
<az0re> Oh sure, it's not the only objective
<sorear> doesn't make sense to spend a huge amount of effort on a precise solution of an approximate problem
<az0re> And you can specify vertex and edge costs
<az0re> > doesn't make sense to spend a huge amount of effort on a precise solution of an approximate problem
<az0re> ?
<az0re> Neither try to give a precise solution
<az0re> I am not sure exactly where you're coming from, BTW. I am not talking about using this for mapping, if that's what you're thinking.
<whitequark> I would personally consider reimplementing the algorithms but usually I work on things I know will be directly useful
<whitequark> this seems to be more of an experimental project, right?
<az0re> Not really
<sorear> I only know what you said above <I am working on adding a `partition` command to Yosys, to split a (for now, flattened) techmapped module into multiple submodules with roughly balanced amounts of logic in each partition, with an objective to minimize the number of cut edges. >
<sorear> if pushed to guess I would say this is for SLRs, but it could be anything
<whitequark> what's the intended domain of the project?
<whitequark> i.e. who will be using it?
<az0re> I intend to scale GLIFT optimization by partitioning
<whitequark> glift is based on SMT solvers, right?
<az0re> And for this, classic cut-minimized partitioning is probably ideal
<whitequark> s/based on/uses/
<az0re> Yes
<whitequark> so you're already relying on an external tool for those
<az0re> Yes
<az0re> However, the command is more general than just my particular application
<whitequark> well, if it would be a part of some core synthesis or simulation flow, I would personally try to get it as seamless as possible, up to and including reimplementing the algorithms
<whitequark> but if it's a part of a single flow that requires SMT solvers, then an external tool is fine
<whitequark> that's my logic.
<az0re> I'm fine with calling an external program for my application
<az0re> But like you say, it is not the ideal implementation
<az0re> And it's a general command that may be useful to expose directly
<whitequark> okay, I can raise that question on a meeting tomorrow
<az0re> Anyway I feel like KaHIP is also a no-go
<az0re> It specifically requires an old version of OpenMPI... like, what?
<az0re> Cool, thanks
<daveshah> I am actually working on an open source permissive hypergraph partitioner for nextpnr
<daveshah> Funnily enough I went through a similar evaluation process a couple of weeks ago
<az0re> Hah, funny
<az0re> What's the state? I'd be interested in using it if it's already working
<az0re> (Even if it's not ready for merging to Yosys yet)
<az0re> Also, FWIW, I can't seem to get KaHIP to work, but hMETIS and minipart2 work fine
Xark has quit [Ping timeout: 246 seconds]
Xark has joined #yosys
kraiskil has joined #yosys
Asu has joined #yosys
X-Scale` has joined #yosys
X-Scale has quit [Ping timeout: 258 seconds]
X-Scale` is now known as X-Scale
N2TOH has quit [Ping timeout: 264 seconds]
N2TOH has joined #yosys
hitomi2500 has joined #yosys
<hitomi2500> is it normal for Yosys to yield almost 4 times more LUTs than non-free alternative? Gowin tech, 550 LUTs in native tools and 1800 in Yosys
<hitomi2500> or maybe something is wrong with my verilog?
<daveshah> Very possible
<daveshah> RAM mapping issues could be the cause, or just something wrong with the Gowin rules
<Lofty> hitomi2500: Take a look at my gowin_abc9 branch
<Lofty> You can get notable improvements in delay/area from it
<hitomi2500> Ok, thanks, i'll try that
<Lofty> (make sure to pass `-abc9` to `synth_gowin` with that)
jfcaron has joined #yosys
<hitomi2500> Alas, no luck with gowin_abc9, the result is a bit different, but overall usage is almost the same.
<Lofty> How about using `-abc9 -nowidelut`?
<Lofty> ABC is very ambitious with using wide LUTs for performance
<Lofty> hitomi2500: ^
<maartenBE> The .editorconfig of yosys doesn't set tab_width. Is it 4?
<Lofty> maartenBE: user preference
<hitomi2500> Indeed, -nowidelut works a bit better, but still not much. It seems i'm missing something else here.
<Lofty> hitomi2500: can you copy/paste your Yosys output log?
<Lofty> (to a pastebin)
<Lofty> Wondering if something is not being inferred properly
<lambda> maartenBE: what does tab width have to do with aligning comments in #2164?
<maartenBE> When using hard tabs to align them, they might not align if your tab width is 8 vs mine is 8
<maartenBE> *mine is 4
<hitomi2500> It's more than a pastebin's limit of 512K
<lambda> maartenBE: why not? where would you want to put those comments?
<nengel> CodingReadme does say that tabs are 8 spaces but I certainly don't listen to it (way too many levels of nesting in yosys for that)
<hitomi2500> There are some strange errors about bram port's clock being incompatible. Maybe it's because i use single port RAM?
<tpb> Title: 5.8. Executing MEMORY_BRAM pass (mapping $mem cells to block memories). Process - Pastebin.com (at pastebin.com)
<maartenBE> Oh, I didn't see the CodingReadme.
<mwk> maartenBE: whatever the tab width is, the field values will start at the same horizontal positions, so you can use spaces to align the commends
<mwk> comments
<maartenBE> In there, spaces are used to align comments
<mwk> that or just don't bother and use a single space everywhere
<lambda> maartenBE: tabs can't be used for alignment (for obvious reasons), that's what spaces are for - tabs are only for indentation so that anyone can make their nesting as tight or wide as they want
<mwk> either way, you're overthinking it
<maartenBE> lines 86-92 in there
josi has quit [Quit: Ping timeout (120 seconds)]
josi has joined #yosys
<Lofty> hitomi2500: that's the problem; you can't use single port RAMs in Yosys
<Lofty> They won't infer
<daveshah> They will infer, just to dual port RAMs
<Lofty> Hmm
<daveshah> But the exact pattern may be wrong
<hitomi2500> They do infer, at least what's the stats say. I will convert them to dualport anyway, just to check the difference.
dys has joined #yosys
<maartenBE> I can reproduce my cxxrtl issue of yesterday: see https://github.com/YosysHQ/yosys/issues/2166
<tpb> Title: cxxrtl backend generates non-working c++ sources when NDEBUG=1 · Issue #2166 · YosysHQ/yosys · GitHub (at github.com)
<maartenBE> dropping ENABLE_DEBUG makes it work again
<maartenBE> aargh, dropping ENABLE_NDEBUG
<daveshah> Interesting, I wonder if something is wrapped in an assert or something
<Lofty> cc whitequark
az0re has quit [Remote host closed the connection]
maartenBE has quit [Ping timeout: 246 seconds]
maartenBE has joined #yosys
hitomi2500 has quit [Quit: Nettalk6 - www.ntalk.de]
citypw has quit [Ping timeout: 240 seconds]
az0re has joined #yosys
emeb has joined #yosys
<lambda> I think I heard there was a dev meeting today - any news about the memory redesign? :)
indy has quit [Ping timeout: 256 seconds]
bwidawsk is now known as thehardway
_whitelogger has joined #yosys
X-Scale` has joined #yosys
ronyrus_ has joined #yosys
ZirconiumX has joined #yosys
Ekho- has joined #yosys
<az0re> So what's the official way to select a module programmatically?
X-Scale has quit [*.net *.split]
Lofty has quit [*.net *.split]
qu1j0t3 has quit [*.net *.split]
sensille has quit [*.net *.split]
Kamilion has quit [*.net *.split]
Ekho has quit [*.net *.split]
daddesio has quit [*.net *.split]
thardin has quit [*.net *.split]
ronyrus has quit [*.net *.split]
X-Scale` is now known as X-Scale
Ekho- is now known as Ekho
<az0re> I see Design::select(), but it's not clear what type T2 is supposed to be or what "member" should be to select the whole module
<az0re> Should I just do it manually, like `design->selection_stack.back().select(module);`?
ZirconiumX is now known as Lofty
<az0re> Or should I add a `Design::select(T1 *module)` to go along with the existing `Design::select(T1 *module, T2 *member)`?
qu1j0t3 has joined #yosys
<az0re> Yeah OK I understand now, that existing Design::select() exclusively for module members.
y2kbugger has quit [Read error: Connection reset by peer]
esden has quit [Read error: Connection reset by peer]
elms has quit [Ping timeout: 260 seconds]
thoughtpolice has quit [Ping timeout: 265 seconds]
esden has joined #yosys
ovf has quit [Ping timeout: 246 seconds]
tannewt has quit [Ping timeout: 260 seconds]
y2kbugger has joined #yosys
y2kbugger has quit [Ping timeout: 260 seconds]
esden has quit [Ping timeout: 256 seconds]
y2kbugger has joined #yosys
Kamilion has joined #yosys
kraiskil has quit [Ping timeout: 264 seconds]
Asu has quit [Remote host closed the connection]
Asu has joined #yosys
y2kbugger has quit [Read error: Connection reset by peer]
tannewt has joined #yosys
Asuu has joined #yosys
esden has joined #yosys
Asu has quit [Ping timeout: 264 seconds]
ovf has joined #yosys
y2kbugger has joined #yosys
Asuu has quit [Quit: Konversation terminated!]
FFY00 has quit [Ping timeout: 260 seconds]
FFY00 has joined #yosys
elms has joined #yosys
jfcaron has quit [Ping timeout: 256 seconds]
thoughtpolice has joined #yosys
<whitequark> adding an overload for selecting a module seems fine
emeb has quit [Quit: Leaving.]
emeb_mac has joined #yosys