clifford changed the topic of #yosys to: Yosys Open SYnthesis Suite: http://www.clifford.at/yosys/ -- Channel Logs: https://irclog.whitequark.org/yosys
Cerpin has quit [Quit: leaving]
Degi has quit [Ping timeout: 240 seconds]
Degi has joined #yosys
futarisIRCcloud has joined #yosys
FFY00 has quit [Remote host closed the connection]
FFY00 has joined #yosys
FFY00 has quit [Remote host closed the connection]
FFY00 has joined #yosys
FFY00 has quit [Max SendQ exceeded]
FFY00 has joined #yosys
citypw has joined #yosys
FFY00 has quit [Max SendQ exceeded]
FFY00 has joined #yosys
FFY00 has quit [Max SendQ exceeded]
Cerpin has joined #yosys
FFY00 has joined #yosys
FFY00 has quit [Max SendQ exceeded]
FFY00 has joined #yosys
FFY00 has quit [Remote host closed the connection]
FFY00 has joined #yosys
FFY00 has quit [Max SendQ exceeded]
FFY00 has joined #yosys
az0re has joined #yosys
futarisIRCcloud has quit [Quit: Connection closed for inactivity]
strongsaxophone has joined #yosys
strongsa1ophone has joined #yosys
strongsa1ophone has quit [Client Quit]
emeb_mac has quit [Quit: Leaving.]
jakobwenzel has joined #yosys
dys has joined #yosys
_whitelogger has joined #yosys
dys has quit [Remote host closed the connection]
dys has joined #yosys
N2TOH_ has joined #yosys
N2TOH has quit [Ping timeout: 240 seconds]
janrinze has quit [Ping timeout: 240 seconds]
jfcaron has joined #yosys
emeb has joined #yosys
rswarbrick has joined #yosys
jakobwenzel has quit [Remote host closed the connection]
<rswarbrick> Hi all! Does Yosys (vanilla) support any form of the SystemVerilog 'bind' construct? I've got a whole host of formal assertions, which I think might be easier to foist on a project if they didn't appear at the bottom of the design RTL :-) I realise that I could do some nasty hack with `ifdef FORMAL and `include, but it would be nice if there was a cleaner option.
<daveshah> No, it doesn't support bind
<daveshah> It does support .* which is half the problem
wifasoi has joined #yosys
<az0re> daveshah: .* ?
<rswarbrick> Oh, that's good news! I guess that support for the non-hierarchical version of the bind statement wouldn't be massively difficult? I don't know much about RTLIL though: after I've read a module, do I still have enough information to bind something in at the moment?
<daveshah> az0re: systemverilog automatic port connection
<az0re> You should have all information in the RTLIL
<daveshah> Yeah, bind shouldn't be too hard to implement, it is probably doable inside hierarchy
<az0re> Does it really? I haven't seen that in verilog_parser.y...
* az0re goes looking
<daveshah> az0re: TOK_WILDCARD_CONNECT
<daveshah> All the parser does is set the wildcard_port_conns attribute
<daveshah> The connections are dealt with inside hierarchy
<daveshah> rswarbrick: as I understand bind, it could probably use similar code paths to a submodule instance
<rswarbrick> I think I don't know what submodule means here. Can you point me where I need to go look?
<az0re> Ah thanks
<daveshah> I mean a non-blackbox cell instance
<daveshah> Probably looking at how hierarchy resolves instantiations would be a starting point
<az0re> Yep I see
<rswarbrick> daveshah: Great, that makes sense. Thanks!
<rswarbrick> (Oh, submod.cc sounds promising!)
<daveshah> No, that is a special pass
<az0re> ./passes/hierarchy/hierarchy.cc:997
<rswarbrick> Ah, great. Thanks.
<rswarbrick> So am I right in thinking that a "bind" parser basically wants to shove a copy of the new module into each matching module? (And presumably leave itself a note in case the user reads anything else that will match in the future)
<az0re> And `find_implicit_port_wire()` at line 548
<daveshah> rswarbrick: I don't know how bind works well enough
<rswarbrick> Ok. I'm looking at the LRM and... I'm not sure I do yet either :-)
<daveshah> If you want to copy a module into another, then flatten/techmap might be the passes to look at
<daveshah> But if your bind implementation is more like creating an instance, which may or may not be flattened later, then it would be done in hierarchy
<daveshah> I don't think you want to be doing any copying in the parser, all that stuff should happen during or after hierarchy so parameterization and external frontends work properly
<az0re> From https://www.sunburst-design.com/papers/CummingsSNUG2009SJ_SVA_Bind.pdf: "Binding an SVA file to another design is like poking or projecting an instantiation of an SVA module into the unmodified target file. Binding an SVA file to a target file is an out-of-body experience for the target file!"
<rswarbrick> :-)
<rswarbrick> daveshah: Ah, good point. So it's more that I'll be setting some flags somewhere to tell the hierarchy pass what to do?
<daveshah> Yeah, creating an instantiation would be done in hierarchy
<daveshah> Yeah, you might create an empty "bind" module with attributes that tell hierarchy what to do
<az0re> Make sure to set the keep attribute, too
<rswarbrick> Right, that makes sense. Time to go and do some reading. Are there any similar things that already exist so that I can crib the rough shape?
<daveshah> Not really sure, tracing the general flow of cell instantiations and parameterised module derivations would make sense
<rswarbrick> Ok, that makes sense to me. Thank you very much for the help.
adjtm_ has joined #yosys
adjtm has quit [Ping timeout: 265 seconds]
citypw has quit [Ping timeout: 240 seconds]
wifasoi has quit [Ping timeout: 240 seconds]
rswarbrick has left #yosys ["rcirc on GNU Emacs 26.3"]
Moe_Icenowy has joined #yosys
MoeIcenowy has quit [Quit: ZNC 1.7.2+deb3 - https://znc.in]
Sarayan has quit [Ping timeout: 246 seconds]
Moe_Icenowy is now known as MoeIcenowy
Sarayan has joined #yosys
FFY00 has quit [Remote host closed the connection]
FFY00 has joined #yosys
emeb_mac has joined #yosys
jfcaron has quit [Ping timeout: 258 seconds]