Monday, 2021-08-09

*** tpb <[email protected]> has joined #yosys00:00
*** emeb_mac <[email protected]> has quit IRC (Ping timeout: 272 seconds)01:08
*** emeb_mac <[email protected]> has joined #yosys01:10
*** emeb_mac <[email protected]> has quit IRC (Ping timeout: 256 seconds)01:21
*** emeb_mac <[email protected]> has joined #yosys01:23
*** emeb_mac <[email protected]> has quit IRC (*.net *.split)04:58
*** kristianpaul <kristianpaul!~paul@user/kristianpaul> has quit IRC (*.net *.split)04:58
*** cr1901 <cr1901!~William@2601:8d:8600:911:b49d:fc45:e620:8cca> has quit IRC (*.net *.split)04:58
*** lambda <[email protected]> has quit IRC (*.net *.split)04:58
*** jevinskie[m] <jevinskie[m]!~jevinskie@2001:470:69fc:105::bb3> has quit IRC (*.net *.split)04:58
*** jryans <jryans!~jryans@2001:470:69fc:105::1d> has quit IRC (*.net *.split)04:58
*** cyrozap <cyrozap!~cyrozap@2604:180:2:69f::45de> has quit IRC (*.net *.split)04:58
*** Raito_Bezarius <Raito_Bezarius!~Raito@wireguard/tunneler/raito-bezarius> has quit IRC (*.net *.split)04:58
*** emeb_mac <[email protected]> has joined #yosys04:59
*** kristianpaul <kristianpaul!~paul@user/kristianpaul> has joined #yosys04:59
*** cr1901 <cr1901!~William@2601:8d:8600:911:b49d:fc45:e620:8cca> has joined #yosys04:59
*** lambda <[email protected]> has joined #yosys04:59
*** jevinskie[m] <jevinskie[m]!~jevinskie@2001:470:69fc:105::bb3> has joined #yosys04:59
*** jryans <jryans!~jryans@2001:470:69fc:105::1d> has joined #yosys04:59
*** cyrozap <cyrozap!~cyrozap@2604:180:2:69f::45de> has joined #yosys04:59
*** Raito_Bezarius <Raito_Bezarius!~Raito@wireguard/tunneler/raito-bezarius> has joined #yosys04:59
*** Raito_Bezarius <Raito_Bezarius!~Raito@wireguard/tunneler/raito-bezarius> has quit IRC (Max SendQ exceeded)04:59
*** Raito_Bezarius <Raito_Bezarius!~Raito@wireguard/tunneler/raito-bezarius> has joined #yosys04:59
*** Xark <[email protected]> has quit IRC (*.net *.split)05:01
*** agg <[email protected]> has quit IRC (*.net *.split)05:01
*** stefanct <stefanct!ameno@user/stefanct> has quit IRC (*.net *.split)05:01
*** stefanct__ <stefanct__!ameno@user/stefanct> has joined #yosys05:01
*** stefanct__ is now known as stefanct05:01
*** agg <[email protected]> has joined #yosys05:01
*** Xark <[email protected]> has joined #yosys05:02
*** agg is now known as Guest952105:02
*** emilazy <emilazy!~emilazy@user/emilazy> has quit IRC (Ping timeout: 252 seconds)05:02
*** promach[m] <promach[m]!~promach@2001:470:69fc:105::ca1> has quit IRC (Ping timeout: 252 seconds)05:02
*** xiretza[m] <xiretza[m]!~xiretzaxi@2001:470:69fc:105::9b1> has quit IRC (Ping timeout: 256 seconds)05:02
*** kaji <kaji!~kajiryoji@2001:470:69fc:105::405b> has quit IRC (Ping timeout: 272 seconds)05:02
*** jevinskie[m] <jevinskie[m]!~jevinskie@2001:470:69fc:105::bb3> has quit IRC (Ping timeout: 272 seconds)05:03
*** jryans <jryans!~jryans@2001:470:69fc:105::1d> has quit IRC (Ping timeout: 272 seconds)05:03
*** oldtopman <[email protected]> has quit IRC (*.net *.split)05:04
*** Ekho <Ekho!~Ekho@user/ekho> has quit IRC (*.net *.split)05:04
*** mewt <[email protected]> has quit IRC (*.net *.split)05:04
*** dys <dys!~dys@user/dys> has quit IRC (*.net *.split)05:04
*** mwk <mwk!~mwk@yosys/mwk> has quit IRC (*.net *.split)05:04
*** trabucayre <[email protected]> has quit IRC (*.net *.split)05:04
*** srk <srk!~sorki@user/srk> has quit IRC (*.net *.split)05:04
*** trabucay1e <[email protected]> has joined #yosys05:04
*** mewt_ <[email protected]> has joined #yosys05:04
*** mwk_ <mwk_!~mwk@yosys/mwk> has joined #yosys05:05
*** oldtopman <[email protected]> has joined #yosys05:05
*** whitequark <whitequark!~whitequar@2001:470:69fc:105::37> has quit IRC (Ping timeout: 250 seconds)05:06
*** Niklas[m]1 <Niklas[m]1!~nsmlzlmat@2001:470:69fc:105::c93a> has quit IRC (Ping timeout: 252 seconds)05:06
*** CarlosEDP <CarlosEDP!~carlosedp@2001:470:69fc:105::218e> has quit IRC (Ping timeout: 252 seconds)05:06
*** diadatp <diadatp!~diadatp@2001:470:69fc:105::c603> has quit IRC (Ping timeout: 272 seconds)05:06
*** srk <srk!~sorki@user/srk> has joined #yosys05:07
*** Ekho <Ekho!~Ekho@user/ekho> has joined #yosys05:10
*** FabM <FabM!~FabM@2a03:d604:103:600:504c:df67:1261:2c14> has joined #yosys05:12
*** emeb_mac <[email protected]> has quit IRC (Ping timeout: 272 seconds)05:18
*** emeb_mac <[email protected]> has joined #yosys05:22
*** jeanthom <[email protected]> has joined #yosys05:25
*** diadatp <diadatp!~diadatp@2001:470:69fc:105::c603> has joined #yosys05:34
*** xiretza[m] <xiretza[m]!~xiretzaxi@2001:470:69fc:105::9b1> has joined #yosys05:58
*** kaji <kaji!~kajiryoji@2001:470:69fc:105::405b> has joined #yosys06:00
*** promach[m] <promach[m]!~promach@2001:470:69fc:105::ca1> has joined #yosys06:04
*** whitequark <whitequark!~whitequar@2001:470:69fc:105::37> has joined #yosys06:04
*** Niklas[m]1 <Niklas[m]1!~nsmlzlmat@2001:470:69fc:105::c93a> has joined #yosys06:14
*** CarlosEDP <CarlosEDP!~carlosedp@2001:470:69fc:105::218e> has joined #yosys06:17
*** jeanthom <[email protected]> has quit IRC (Ping timeout: 272 seconds)06:25
*** emilazy <emilazy!~emilazy@user/emilazy> has joined #yosys06:31
*** jevinskie[m] <jevinskie[m]!~jevinskie@2001:470:69fc:105::bb3> has joined #yosys06:32
*** jryans <jryans!~jryans@2001:470:69fc:105::1d> has joined #yosys06:34
*** GenTooMan <GenTooMan!~cyberman@2601:547:437f:e5c6:21f:5bff:fefe:a883> has quit IRC (Ping timeout: 240 seconds)06:37
*** GenTooMan <GenTooMan!~cyberman@2601:547:437f:e5c6:21f:5bff:fefe:a883> has joined #yosys06:42
*** emeb_mac <[email protected]> has quit IRC (Quit: Leaving.)06:59
whitequarkmwk_: https://github.com/nmigen/nmigen/issues/270#issuecomment-57878337009:30
whitequarkthat's the closest thing I have to having it written down09:31
whitequarklet's have a meeting on that topic and then I could prepare something more Yosys-oriented, maybe a few slides and a small proposal?09:31
*** Guest9521 is now known as agg09:40
*** mwk_ is now known as mwk11:28
*** dormito <dormito!~dullfire@user/dormito> has joined #yosys12:00
dormitoout of curiosity: anyone know if there's a technical reason (like mandatory encrypted bitstreams) that polarfire support can't be added(to yosys & nextpnr)?12:04
mwk*shrug* it's an FPGA, it should be doable12:06
mwkbut making a nextpnr target takes a *lot* of work, especially with uncooperative vendor that needs reverse engineering (which is all of them)12:06
dormitolol, yeah. though I've no motivation to mess with porting to new targets.12:08
sorearNot sure I understood the question correctly but I believe polarfire does have mandatory encrypted bitstreams12:25
cr1901nextpnr can emit something that a downstream tool can encrypt12:26
mwkencrypted *with what* is the question12:27
mwkif this is a Xilinx-like arrangement where the user chooses the key and burns it to the fuses / uploads to eeprom — not a problem, we can do the encryption in nextpnr12:27
mwk(or whatever hypothetical downstream tool ends up being written for bitstream assembly purposes)12:28
dormitoI spoke badly12:28
dormitoI should have said "mandatory microsemi signinng" or similar. that is the bitstream needs a license(which I guess could come with a microsemi signed key) to be usable. I'm sure there are other ways as well to completely block a libre toolchain from existing12:29
mwkif it's some sort of static vendor encryption key used for all bitstreams that the user does not know... wellll then it has to be *somewhere* in the vendor binary and, while extracting it may ruffle a few feathers, it's perfectly doable12:29
dormitoanyhow. I was just curious, since I couldn't fine anything about a project for it (even though xillinx and intel have projets for their fpga). maybe polarfires just aren't as popular12:31
mwkdormito: there are two big potential threats to any given libre tool's existence12:31
mwkone is lack of people willing to do it, the other is lawyers12:31
mwktechnical limitations are secondary12:32
dormitolol, I think some lawyers are a threat to everything12:32
mwkthe question is: is the vendor willing to spend the time on lawyers to fuck up whatever open source project springs up12:32
soreari've seen some interest in pfsoc because of the riscv angle12:33
mwkin many cases this cannot be answered without trying12:33
sorearnote that even with a libre toolchain the polarfire platform is much worse for tinkering because it's only rated for 50 programs12:33
mwk"rated"?12:33
mwk... oh wait, it's NVM?12:34
sorearit's NVM12:34
dormitoyeah. I have a hifive unlead+expansion board. fooling around with the polarfire fpga would be kind of need... but I'm not going to use a non-floss toolchain to do it.12:34
dormito*hifive unleashed12:34
sorearit's NVM with flash cells in the actual fabric, which gives you much faster startup but cannot tolerate *any* worn-out bit cells12:34
dormitosomeone recently linked me the icicle key, which seems to be the evolution of that, it looks pretty neat12:34
dormitointeresting about the write endurance. I didn't know that at all12:36
dormitosounds pretty terrible for designing a system :/12:36
cr1901>the bitstream needs a license12:55
cr1901Why does Microchip keep doing this shit? I want to like their products, even PIC. But they make it so damn hard.12:55
mwkcr1901: I think that was a hypothetical that was asked about12:57
mwknot something that was actually asserted12:57
cr1901Ahhh12:58
dormitocr1901: yeah I was just hypothizing on technical reasons that could prevent a floss implementation (I  have no technical knowledge of how microsemi's polarfire toolchain works)13:29
cr1901If Microchip/Microsemi did something like that... I would not be surprised. They do some crappy things to encourage lock in13:30
cr1901like refusing to upstream their LLVM changes (which ticks me off considering that reg/stack-starved PIC isn't a good fit for LLVM in the first place and yet they made it work)13:31
sorearthose were two unrelated companies at the time13:34
*** emeb <[email protected]> has joined #yosys13:52
whitequarkcr1901: if the changes required to make LLVM work with PICs are too invasive it's possible they're not worth attempting to upstream anyway14:00
cr1901upstream isn't the right word... their changes aren't open source period14:02
whitequarkah, that's different14:07
*** GenTooMan <GenTooMan!~cyberman@2601:547:437f:e5c6:21f:5bff:fefe:a883> has quit IRC (Ping timeout: 256 seconds)14:13
*** GenTooMan <GenTooMan!~cyberman@2601:547:437f:e5c6:21f:5bff:fefe:a883> has joined #yosys14:15
*** GenTooMan <GenTooMan!~cyberman@2601:547:437f:e5c6:21f:5bff:fefe:a883> has quit IRC (Excess Flood)14:17
*** GenTooMan <GenTooMan!~cyberman@2601:547:437f:e5c6:21f:5bff:fefe:a883> has joined #yosys14:17
*** trabucay1e is now known as trabucayre14:19
*** GenTooMan <GenTooMan!~cyberman@2601:547:437f:e5c6:21f:5bff:fefe:a883> has quit IRC (Ping timeout: 272 seconds)14:25
*** GenTooMan <GenTooMan!~cyberman@2601:547:437f:e5c6:21f:5bff:fefe:a883> has joined #yosys14:28
*** GenTooMan <GenTooMan!~cyberman@2601:547:437f:e5c6:21f:5bff:fefe:a883> has quit IRC (Ping timeout: 256 seconds)14:40
*** GenTooMan <GenTooMan!~cyberman@2601:547:437f:e5c6:21f:5bff:fefe:a883> has joined #yosys14:45
*** emeb_mac <[email protected]> has joined #yosys14:52
*** emeb <[email protected]> has quit IRC (Ping timeout: 272 seconds)14:53
*** emeb <[email protected]> has joined #yosys14:54
*** gsmecher <[email protected]> has joined #yosys15:48
*** FabM <FabM!~FabM@armadeus/team/FabM> has quit IRC (Quit: Leaving)16:31
*** jeanthom <[email protected]> has joined #yosys16:36
*** jeanthom <[email protected]> has quit IRC (Ping timeout: 248 seconds)16:46
*** jeanthom <[email protected]> has joined #yosys17:16
xiretza[m]well, that's what permissive licenses are for17:25
*** jeanthom <[email protected]> has quit IRC (Remote host closed the connection)17:48
*** tlwoerner_ is now known as tlwoerner18:29
mwkwhitequark: wrt your undefinedness proposal: having (Undefined & 0) === Undefined, but (0 ? Undefined : 0) === 0 kind of worries me because it disallows the A ? B : 0 -> A & B transformation (at least without adding freezes)19:01
mwkbut then I guess I shouldn't criticize an incomplete proposal in the first place19:03
*** GenTooMan <GenTooMan!~cyberman@2601:547:437f:e5c6:21f:5bff:fefe:a883> has quit IRC (Ping timeout: 258 seconds)19:14
whitequarkmwk: oh, that comment has an important typo19:16
whitequarkshould be Uninitialized, not Undefined, because it's not intended for transformations19:17
whitequarkit's only for approximating nondeterminism in simulations19:17
mwk... so we'd have overeager Uninitialized in sim, that deterministically turns into 0 in synth here?19:18
mwkthat's... kind of weird, but not unsound19:18
whitequarkUninitialized is "a specific value, either 0 or 1, but you don't know which"19:19
whitequarkspecific in the sense that you can sample it as many times as you want and it's always the same19:19
mwkI mean, it turns into 0 because of the "& 0"19:19
whitequarkoh, sorry, I misread19:20
whitequarkthere's no Uninitialized in synthesis, well, not directly19:20
whitequarkreset_less registers and memories are Uninitialized in sim19:20
mwkis it like LLVM "freeze poison"?19:20
whitequarkin synthesis they just... don't have an init value19:20
whitequarkyou can think of Uninitialized as Verilog's X constrained to this one specific and very limited case of nondeterminism19:21
whitequarkconstrained so hard that it no longer propagates19:21
mwkthat does sound like `freeze poison`19:21
whitequarkkind of19:21
whitequarkokay, "no longer propagates" is inaccurate19:22
whitequarkwhat I mean is that you're not allowed to take two signals assigned from the same Uninitialized value and assume they have different values19:22
mwkhm19:22
mwknow about the hypothetical $freeze cell19:23
mwkI just had a realization19:23
mwkit has to be a synchronous cell that applies to a given domain, right?19:23
whitequarkhas it?19:23
mwklike what is $freeze(1'bX)?19:23
mwkis it a constant signal?19:23
mwkor, if used within sync domain, can it chance every clock cycle, or is it stable within the clock cycle?19:24
whitequarkhmm19:24
whitequarkthe one constraint here is that if you do `wire x = $freeze(1'bX); wire a = x; wire b = x;`, then always `a === b`19:24
mwkalways?19:25
mwkwhat does it mean?19:25
jixIMO it can help to specify undef/x/etc. by a mapping between abstract states (that can contain such values) and sets of corresponding concrete states represented by that... instead of trying to specify it for every operation or via allowed transformations19:25
mwkyou cannot assume (a & b) === (a & b) when synthesis is involved, unless you only sample the === at clock edges19:25
whitequarkhmm19:26
mwkbecause these two gates won't come up with the result at the same time, necessarily19:26
whitequarkI'm thinking of netlist-level equivalence here19:27
whitequarkthe idea behind the freeze cell is that it stops X-propagation in the optimizer itself19:28
mwkI'm still strongly in favor of having some kind of concrete model of what the freeze cell returns in terms of 1/0/x/... values19:29
mwkit may be that we need to tie all cells, combinatorial or not, to a clock domain and think in terms of that19:30
mwkthen $freeze does its work on every cycle19:31
mwkkind of like LLVM on every execution19:31
whitequarkI think I see what you mean19:31
mwkand if you have loose asynchronous combinatorial cells... well that's danger territory and we may want to inhibit optimizations here19:32
mwk(yosys does not handle that well atm, by the way)19:32
whitequarkif 'x means "you can replace any instances of 'x with any circuit you have around", then $freeze('x) means "you can replace all instances of this specific $freeze cell with any single circuit you have around"19:32
*** GenTooMan <[email protected]> has joined #yosys19:33
mwk... but that produces a non-'x value19:33
mwk(as in, the circuit needs to produce a non-'x value)19:33
whitequarkthat's the interesting part19:34
whitequarkduring synthesis, you cannot know whether a certain wire produces a non-x value, right?19:35
mwkhmm19:36
whitequarkyou know which wires are definitely 'x, but any inputs can be potentially 'x19:36
mwkwell, given some freezes, you can19:36
mwkbut absent a freeze, any non-constant can potentially be 'x, right19:36
whitequarkthe only definitely non-'x values around are constants, yeah19:36
whitequarknow, you could certainly freeze all inputs to the module being synthesized19:37
mwkright19:38
whitequarkand that was the original intended application: insert freezes at module boundaries, so that a stray 'x in one part of your massive SoC doesn't break something in a completely unrelated IP core from another vendor19:38
mwkheh19:38
mwkyeah, reasonable19:39
*** GenTooMan <[email protected]> has quit IRC (Ping timeout: 248 seconds)19:39
mwk(I mean you can still get hit by metastability given shitty enough IP, but other than that, yes)19:39
whitequarkone major toolchain design issue at a time, mwk!19:40
whitequark... not that i have a right to complain (looks at the HDL she maintains)19:41
mwkI kind of see them as related19:41
mwkI mean, freeze can only do its job properly if it has no metastability on input19:41
whitequarksoooort of19:42
mwkso while the optimizer on the shit module is allowed to do any kinds of logic shenanigans, it's not allowed to just optimize away a synchronizer and connect a signal from an async clock domain19:42
whitequarkthis all ties back to 'x meaning three completely unrelated things in Verilog19:42
whitequarkif we had separate 'u(ninitialized), 'm(etastable), and 'd(ontcare), then $freeze would turn 'u and 'd into "some constant", and pass through 'm19:43
mwkmhm19:43
killjoy<comment without reading backscroll> Unless that syncronizer doesn't have an effect on the output of the shit module.19:43
whitequarkthis would be really useful in simulations with timing data19:44
mwkand we'd need a different mechanism for avoiding 'm, got it19:44
whitequarkyes19:44
mwkwhich would involve guarantees in optimizer to only make a 'm for actual metastability problems and never for just an 'x19:44
mwkreasonable19:45
mwkand you could statically prove there can never be 'm by showing that every CDC involves synchronizers19:45
whitequarkwell19:46
*** GenTooMan <GenTooMan!~cyberman@2601:547:437f:e5c6:21f:5bff:fefe:a883> has joined #yosys19:46
whitequarkthere's plenty of CDC that doesn't need synchronizers19:46
whitequarkwhere you cross between related clocks19:46
mwkright, that19:46
mwkbut related domains also cannot result in 'm19:46
mwk(at least the right kind of related)19:46
whitequark(I've spent a lot of time thinking about that for CXXRTL; it's a really tricky problem!!)19:47
mwkoh it sure is19:47
whitequarkwhich neither Verilog nor VHDL actually solve in any meaningful way, so it's -also- novel research19:47
mwk... I consider special-casing "same clock signal" vs "different clock signals" in my memory inference code like the biggest wart in it19:48
mwkbecause there are meaningfully different inference options between truly async domains and related domains19:48
whitequark"are these clocks the same" currently makes a lot of possible CXXRTL outputs unsound19:48
whitequarkyes19:48
mwkbut there's no way I can learn this information given our current netlist format19:49
mwk(it may even differ between instances of a given module)19:49
whitequarkanything hierarchical in CXXRTL, even with a single clock domain, currently produces unsound simulation code19:49
whitequarkwhich normally doesn't come up because of flatten, but... blackboxes19:49
whitequarkI've considered adding clock tree analysis as a core pass just for this19:50
whitequarkto sidestep the problem a bit, at least19:50
whitequarkit's kind of a nightmare19:50
mwkI feel at some point we need a discussion about coming up with a language / set of attributs / whatever to describe interface properties of modules, blackboxes in particular19:50
whitequarkyes please19:50
mwk... and yes, that19:50
whitequarkCXXRTL has a poor approximation of it, the cxxrtl_comb and cxxrtl_sync attributes19:51
mwkarguably Verilog's specify could be this kind of language, but... I'm wary of it19:51
whitequarkthere's no domain attached to cxxrtl_sync so it has limited usefulness19:51
mwk(and it still cannot know about "this clk is twice the frequency of that and phase aligned")19:51
whitequark... it's so frustrating trying to write a decent simulator for once and then finding out you have to design entire aspects of core semantics19:51
whitequarkwhich as far as i know no one tried to systematically address in a production compiler before19:52
mwk... see also my rant about EDA tools in general19:52
mwkyes19:52
mwkand the ugly part is that there's a pull in the other direction, too19:54
mwkof the "just make it work with this output of that other shitty EDA tool that uses blackboxes with completely unknown semantics" kind19:54
whitequarkyep19:54
mwk... I mean, yosys even supports using undefined cells19:55
mwkand I'm pretty sure a lot of people would yell at me if I disallowed that19:55
whitequarkthere's nothing wrong with it, is there?19:55
whitequarkit's morally equivalent to having toplevel inputs and outputs19:55
whitequarka blackbox and a toplevel IO are duals19:56
mwkit's morally equivalent to having toplevel inouts19:56
whitequark * a blackbox and a few toplevel IOs are duals19:56
whitequarkohh, sorry19:56
whitequarkyes, that's cursed19:56
whitequarkand i'm pretty sure it doesn't actually work as it should a lot of the time?19:57
mwkwe regularly get bug reports about it, yes19:57
mwkalso to actually disallow them I'd have to fix yosys itself to not rely on it first19:57
whitequarki remember that bug with inouts i fixed in flatten19:58
mwkeg. the way memory_bram works is that for a short moment you have a $__XILINX_RAMB36 temporary cell that is never defined even as a blackbox, which is then techmapped19:58
whitequarkthat was really bad19:58
whitequarkhttps://github.com/YosysHQ/yosys/pull/2356 this one20:00
whitequarkinouts are cursed in general20:00
whitequarkI feel like maybe they shouldn't survive past the frontend20:00
mwkwell20:00
mwkthere is the issue of toplevel inouts which have to exist20:00
mwkanyway, I have a proposal for them in the wednesday slides20:01
whitequarkalright20:01
mwkI am still not sure whether I actually want this proposal to happen or to disallow them outright20:01
whitequarkthe way I'd do it is by making it a constraint violation to connect a toplevel inout to anything other than an inout cell port20:02
whitequarkin general, make it legal to connect inout ports only to other inout ports20:03
whitequarkexactly once20:03
mwk... that breaks synthesis for FPGAs where tristate OBUF and IBUF are separate primitives and you have to instantiate both for IO port20:04
whitequarkokay, scratch the "exactly once" part20:04
mwkand IBUF input is not an inout20:04
whitequarkif the synthesizer never tries to interpret wires connected to inout ports it still works out fine20:04
mwkwell20:04
whitequarkhm20:04
whitequarkokay, I hate it20:04
whitequarkwe all know what inout is supposed to mean, which is more or less an analog connection20:05
mwkmy proposal is to basically have multi-driver/tristate nets as second-class citizens in the IR20:05
whitequarkbut it's weirdly integrated with the rest of semantics20:05
whitequarkyeah20:06
mwkand while all other wires would have LLVM-like SSA behavior (wire and the cell driving it are one and the same), this kind of wires would be explicitely cursed by design and avoided by all the optimization passes20:06
whitequarkmaking it a net property rather than a port property is more reasonable in light of IBUF/OBUF20:06
whitequarkI like that approach a lot20:06
mwkalso connectable only to special cells that have special port type20:06
whitequarkthat still screws IBUF, no?20:06
mwknot necessarily20:07
mwkmy plan involves adapters in both directions20:07
mwka "wire observer" that gives you a SSA value out of a cursed wire20:07
mwkwhich you then connect to IBUF20:07
mwkand, if directly driven by non-cursed logic, you insert a "wire driver" cell20:08
mwk(which is a TBUF that may or may not have output enable tied to 1)20:08
whitequarkthis is a really contrived way to do it but I see why you're going for it20:08
mwkalso the cell port type does not need to be the same as Verilog input/inout/output20:09
mwkconsider a TBUF cell; it may have an output port type, but it's pretty obvious it's a different kind of output than an AND cell20:09
mwkand we'd want them as separate kinds in the IR20:09
whitequarkreasonable20:09
mwkand yes, this requires having that information in the cell library20:10
mwkwe might reuse (* iopad_external_pin *) for that20:10
whitequarkI wanted to say "if you annotate cells you might as well switch buffers to use inouts" but an attribute like that is less invasive and, yeah, the kind is different anyhow20:11
mwkthe thing is, there are 4 kinds of ports really20:12
mwkinput, inout, output that may be 'z, output that cannot be 'z20:13
mwkanyway... yeah, lots of things to design in the IR20:18
mwknow I'm wondering if we need first-class clock domain support in that20:18
mwkthere's a good argument for "YES PLEASE", and also the counter-argument of "but what to do with non-annotated blackboxes"20:20
mwk(at the very least I believe our IR needs to have a definite "THIS IS A SYNCHRONIZER DON'T TOUCH" marking for FFs)20:24
killjoyI would second that. You always need stuff like that.20:25
mwkwell20:30
mwk... I guess I'll need to make more slides20:30
whitequarkyes, definitely need the ability to mark synchronizers20:30
whitequarkyou need it anyway if you do retiming20:31
mwkwe already need it20:31
mwkright now a synchronizer FF can end up merged into a memory or a DSP20:31
mwknothing prevents that20:31
killjoyThat's bad, m'kay.20:33
*** dormito <dormito!~dullfire@user/dormito> has quit IRC (Ping timeout: 272 seconds)20:35
mwkwell I'll gladly fix it as soon as we have an IR where the concept of a synchronizer is actually defined20:35
cr1901I'm kinda OOTL... is the above discussion for a new yosys IR or new additions to the existing IR?21:12
mwkthe synchronizer part should go in ASAP; other than that, we're thinking of having a new IR, but this is not something we're actually commited to any time soon21:15
*** dormito <dormito!~dullfire@user/dormito> has joined #yosys21:37
*** peeps[zen] <peeps[zen]!~peepsalot@openscad/peepsalot> has quit IRC (Read error: Connection reset by peer)22:09
*** peepsalot <peepsalot!~peepsalot@openscad/peepsalot> has joined #yosys22:12
*** killjoy <killjoy!~nameless@user/killjoy> has quit IRC (Ping timeout: 258 seconds)23:20
*** emeb <[email protected]> has quit IRC (Quit: Leaving.)23:20
*** killjoy <[email protected]> has joined #yosys23:23

Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!