ChanServ changed the topic of #nmigen to: nMigen hardware description language · code at https://github.com/nmigen · logs at https://freenode.irclog.whitequark.org/nmigen · IRC meetings each Monday at 1800 UTC · next meeting August 24th
FFY00 has quit [Remote host closed the connection]
FFY00 has joined #nmigen
jaseg has quit [Ping timeout: 260 seconds]
jaseg has joined #nmigen
awe00 has quit [Ping timeout: 258 seconds]
<cr1901_modern> whitequark: Do you want me to add the check for no ".." as part of my ssh PR, or do you want to do it after it's merged?
electronic_eel has quit [Ping timeout: 256 seconds]
electronic_eel has joined #nmigen
SpaceCoaster has quit [Quit: ZNC 1.7.2+deb3 - https://znc.in]
SpaceCoaster has joined #nmigen
d1b2 has quit [Remote host closed the connection]
d1b24 has joined #nmigen
d1b24 is now known as d1b2
PyroPeter_ has joined #nmigen
Yehowshua has joined #nmigen
PyroPeter has quit [Ping timeout: 256 seconds]
PyroPeter_ is now known as PyroPeter
<Yehowshua> I wonder if it could make sense to pass `Sim` as a platform during elaboration
Yehowshua has quit [Remote host closed the connection]
Degi has quit [Ping timeout: 258 seconds]
Degi has joined #nmigen
lkcl_ has quit [Ping timeout: 265 seconds]
<d1b2> <SpaimaCarpatilor> Not sure if it was already posted on this discord but I found this nmigen tutorial in my twitter feed: https://vivonomicon.com/2020/04/14/learning-fpga-design-with-nmigen/
nelgau has quit [Remote host closed the connection]
nelgau has joined #nmigen
lkcl has joined #nmigen
nelgau has quit [Ping timeout: 240 seconds]
nelgau has joined #nmigen
nelgau has quit [Ping timeout: 265 seconds]
nelgau has joined #nmigen
nelgau has quit [Ping timeout: 258 seconds]
nelgau has joined #nmigen
nelgau has quit [Ping timeout: 240 seconds]
jaseg has quit [Ping timeout: 260 seconds]
jaseg has joined #nmigen
jeanthom has joined #nmigen
hitomi2507 has joined #nmigen
Asu has joined #nmigen
Asu has quit [Client Quit]
Asu has joined #nmigen
emeb_mac has quit [Quit: Leaving.]
<DaKnig> to use `ResetSynchronizer` should I just put it anywhere with the right params?
<DaKnig> or is there some special ritual for it, adding it to `comb`/some other weirdness?
<DaKnig> how would nmigen know what module this is part of?
<DaKnig> ah I think I have to add it as a submodule... I missed this part somehow.
awe00 has joined #nmigen
<DaKnig> I get the "domain used but not defined" error, even though I think I have it defined...?
nurelin has quit [Quit: Idle for 30+ days]
<lkcl> DaKnig: not entirely sure what it's for, however look in nmigen/build/plat.py there is a function "create_missing_domain" which uses ResetSynchronizer
<lkcl> although it is an internal function it may give some clues
nelgau has joined #nmigen
jeanthom has quit [Ping timeout: 240 seconds]
nelgau has quit [Ping timeout: 264 seconds]
<lkcl> ha, create_missing_domains is the function being called :)
nelgau has joined #nmigen
<lkcl> DaKnig, ahh.... you're gonna find this very odd: change the name from cd_40 to cd40
<lkcl> that's all that's needed :)
<lkcl> m.submodules.vgen = vgen = DomainRenamer("cd40")(VGA_signal_gen())
<lkcl> not ("cd_40")
nelgau has quit [Ping timeout: 256 seconds]
nelgau has joined #nmigen
<DaKnig> wot
<DaKnig> why
<DaKnig> lkcl: so should I not invoke ResetSynchronizer myself?
<DaKnig> I dont understand; I think I should?
<lkcl> nono, you misunderstand: just wherever you use "cd_40", *replace* it with "cd40" and, as if by magic, "everything will work".
<DaKnig> but why
<lkcl> no clue, and i've learned not to be concerned with "why" - you can get hung up forever on "why"
nelgau has quit [Ping timeout: 256 seconds]
<lkcl> that's not to say it shouldn't be raised as a bug (because there was no warning)
<DaKnig> I do seem to be hung up forever on "why"
<lkcl> :)
<DaKnig> there's just too much of it in nmigen
<DaKnig> or in HDL in general
<lkcl> i've noticed that it's a common thing, in programming in general
<DaKnig> in software I get it much less
<lkcl> this _is_ software
<DaKnig> and usually I can program around it much easier
<DaKnig> this is hardware, come on
<DaKnig> HDL is hardware
<lkcl> it's software that is *used* to *define* hardware
<DaKnig> describe* :)
<lkcl> or... more clearly: it's software that is used to define a *representation* of hardware.
<lkcl> the (at least 3) levels of indirection is... yeah
<lkcl> i love it
<DaKnig> ok I get an .. assertion error
<DaKnig> ` assert defs[sig] is self
<DaKnig> AssertionError
<lkcl> ah ha! different!
<lkcl> 1 sec let me copy the modified file to somewhere you can grab it
<DaKnig> different? what?
<lkcl> as in, "not the same error". this is progress
<DaKnig> https://paste.debian.net/1161119/ <- here's my code
<DaKnig> well , there are other files
<lkcl> i got it earlier, i was experimenting with it
<DaKnig> you mean you got the error?
<lkcl> no, i mean i *fixed* the error... by renaming "cd_40" to "cd40".
<lkcl> i happen to have vivado 2016.2 installed so was able to test it
nelgau has joined #nmigen
<lkcl> i don't believe it's necessary to rename the local variable "cd_40" to "cd40"
<lkcl> but the call to DomainRenamer() it definitely matters that the name does not have an underscore in it
<lkcl> DaKnig: you got the file? https://ftp.libre-soc.org/arty_pll_test.py
<DaKnig> I got the file; I dont understand what you fixed or why
<DaKnig> I changed to cd40 and got that other assertion error
<DaKnig> not in the MCVE I sent at first
<lkcl> the other thing i did: i moved the "m.domains +=" to *above* where they're set
<DaKnig> but in the ful code I sent later
<lkcl> oh it's different? 1 sec
nelgau has quit [Ping timeout: 256 seconds]
<DaKnig> you cant compile it without more files though; you can make a simple stub i guess
<lkcl> i'll help you when _you've_ done that :)
<DaKnig> I did; I put that += line right after the declaration of the ClockDomain
<DaKnig> didnt help at all
<lkcl> err... line 65 isn't making any sense
<DaKnig> yes I copied this code from somebody
<DaKnig> I dont understand what it does so I moved the `return m` above it
<lkcl> ok back up a bit. did you try the modified (simple) version i did?
<lkcl> ah yes i see that
<DaKnig> doesnt seem to do anything I need or anything useful
<DaKnig> you modified the MCVE version; that one compiles.
<lkcl> yeah they will, somewhere have added something called "sync" to the module then added another object called "clk200" to it
<lkcl> ok good
<DaKnig> I have a rule - if code works (or should work), never delete it unless you are 100% sure you dont need it
<DaKnig> and Im not 100% sure here
<DaKnig> in C I'd comment it out
<DaKnig> but no multiline comments in python
<DaKnig> well it's good either way I think
<lkcl> btw as a general rule, try not to expect other people to modify examples before they can help you...
<DaKnig> you are right; I should have made another MCVE.
<DaKnig> for this assertion error
<DaKnig> I can make one ; would take me 10 minutes
<DaKnig> sorry.
<lkcl> ok the error's somewhere in PLL.
<lkcl> i substituted the previous PLL class back in
<lkcl> error goes away
lkcl_ has joined #nmigen
<lkcl_> wark, sorry, mobile internet connection, got reset
<DaKnig> previous PLL class? I dont thnk I modified it at all
<DaKnig> where'd you get that previous PLL class?
<lkcl_> you added a 200mhz clock
<lkcl_> from the previous cut/pastebin
<lkcl_> ah got it
lkcl has quit [Ping timeout: 258 seconds]
<lkcl_> you had also added pll_125 without defining self.pll_125
<lkcl_> and then tried to link to self.clk_125
<lkcl_> comment out this line
<lkcl_> #Instance("BUFG", i_I=pll_125, o_O=self.clk_125),
<DaKnig> I added it?
<lkcl_> yes
<DaKnig> maybe I deleted it from the previous one
<DaKnig> hm
<lkcl_> you commented out line 49
<lkcl_> but had not commented out line 57
<lkcl_> ok i gotta get something to eat
<DaKnig> tbh I am not sure why the person who did this put the input clock just to get the same one out
key2 has quit [Ping timeout: 272 seconds]
key2 has joined #nmigen
<DaKnig> ok nice
<DaKnig> thanks
<DaKnig> it seems like just removing those lines that generate the unnecessary clocks is enough
awe00_ has joined #nmigen
awe00 has quit [Ping timeout: 240 seconds]
<DaKnig> ok now I have another problem
<DaKnig> it says that the io standard was not specified
<DaKnig> for what wire? I dont know. I assume it's the PMOD connector.
<DaKnig> how should I do this?
<DaKnig> add the Attrs to each subsignal in the resource that describes the connected board?
<vup> you can also add "Attrs" to a Resource directly
<vup> also generating a clock with the same frequency as the input clock from a PLL could used to have a fixed phase relation between the output clocks
<DaKnig> aha
<DaKnig> I thought the output clocks are phase locked to the input clock anyways though?
<vup> True, but it has a absolute phase shift
<vup> Not sure how big it is for the 7series pll though
tannewt has quit [Ping timeout: 240 seconds]
esden has quit [Ping timeout: 272 seconds]
peepsalot has joined #nmigen
peeps has quit [Ping timeout: 246 seconds]
esden has joined #nmigen
tannewt has joined #nmigen
Asu has quit [Remote host closed the connection]
Asu has joined #nmigen
nelgau has joined #nmigen
nelgau has quit [Ping timeout: 256 seconds]
<anuejn> sorry for not being here for the meeting
<anuejn> maybe i am just outright wrong with what i wrote in https://github.com/nmigen/nmigen/issues/485
<anuejn> what lead me to think that there might occur a cdc issue is that we somehow need to do something similiar to https://github.com/anuejn/nmigen/blob/803496110faff8300e8136684de4f66007960707/nmigen/lib/fifo.py#L512 for the w_level
<anuejn> but that is difficult because we cant juts sample self.r_rdy / self.r_en in the write domain
nelgau has joined #nmigen
lkcl_ is now known as lkcl
DaKnig has quit [Ping timeout: 240 seconds]
DaKnig has joined #nmigen
zignig_ has quit [Quit: Lost terminal]
zignig has joined #nmigen
* zignig does a happy dance , closer to a nice shell on a pure nmigen processor.
<zignig> it should work with any nmigen-board with a uart and a clock < 22Mhz, luna usb interface is next.
alexhw has quit [Ping timeout: 256 seconds]
alexhw has joined #nmigen
moony has quit [Ping timeout: 244 seconds]
moony has joined #nmigen
<_whitenotifier-3> [nmigen-boards] mglb opened pull request #106: Arty A7: Fix `rst` pin polarity - https://git.io/JUUrr
<_whitenotifier-3> [nmigen/nmigen-boards] whitequark pushed 1 commit to master [+0/-0/±1] https://git.io/JUUKI
<_whitenotifier-3> [nmigen/nmigen-boards] mglb 8be37da - arty_a7: fix `rst` pin polarity.
<_whitenotifier-3> [nmigen-boards] whitequark closed pull request #106: Arty A7: Fix `rst` pin polarity - https://git.io/JUUrr
<Degi> Is "IndexError: Cannot index 15 bits into 15-bit value" a bug? I think it should say "IndexError: Cannot index 16 bits into 15-bit value" since the index is zero-based but 'bits' language-wise should be 1 based.
<DaKnig> "index 1 bits into 1-bit value"
<DaKnig> sounds about right to me
<Degi> Hmh, doesnt the 1 bit value have only one bit which can be indexed? (not 0)
<DaKnig> I mean, you can index "0 bits into 1-bit value", but not "1 bits into 1-bit value"
<DaKnig> to me that sounds alright
<Degi> Hmm
<DaKnig> but then again, Im not in charge
<Degi> What does "index n bits into a x bit value" mean?
<DaKnig> this is an engineer tool; language doesnt have to make sense :-)
<Degi> I mean I get that it says that since it is 0-indexed but it kinda sounds weird tbh
<DaKnig> I would prefer a "gramatically incorrect" answer that makes sense in terms of programming since well, I am writing my code 0-based and anything else would distract me from that
<Degi> I mean x[15] is still the 16th bit of x hmm. Maybe formulating it as "IndexError: Index 15 is out of range for a 15-bit value"
<DaKnig> it is the 16th bit but it's index 15
<DaKnig> yeah maybe saying that would be more correct.
<Degi> Yes, '15 bits' sounds like it means the 15th bit and that has caused some confusion for me, specifying that the index 15 is meant would make that clear.
<whitequark> Degi: feel free to open an issue about it
<Degi> Okay
<whitequark> DaKnig: "why" is a totally reasonable question; any decent specification or doc has a "rationale" section
<Degi> Oh, what happened to the issue I tried to post... Should not have clicked on notifications.
<cr1901_modern> whitequark: Do you want me to handle the "no .." as part of PRs, or do you want to do it later?
<cr1901_modern> the PR*
<_whitenotifier-3> [nmigen] ECP5-PCIe opened issue #488: Change error message for IndexError for increased clarity - https://git.io/JUU6R
<whitequark> cr1901_modern: oh, it's not merged yet? then as a part of the PR
<cr1901_modern> ack
<whitequark> DaKnig: regarding "ilang" vs "RTLIL", I asked Claire
<whitequark> >I'm absolutely okay with renaming the commands. (Currently "ilang" is the text language and "RTLIL" the data structure. It's an astonishingly pointless distinction.)
<whitequark> awygle: you were right :p
<_whitenotifier-3> [nmigen] cr1901 synchronize pull request #461: SSH Client Support via Paramiko - https://git.io/JJarq
<cr1901_modern> Hmmm, not that I'm complaining, but I thought pushing after approval causes approval to be reset
hitomi2507 has quit [Quit: Nettalk6 - www.ntalk.de]
jeanthom has joined #nmigen
jeanthom has quit [Ping timeout: 258 seconds]
<DaKnig> how can I add clk of sync domain to the output of the simulation?
<DaKnig> the wave file, I mean.
<whitequark> should already be there
<whitequark> do you not see it in gtkwave? nowhere in hierarchy?
<DaKnig> dont see it in the configuration loaded from the .gtkw file
<whitequark> oh
jeanthom has joined #nmigen
<whitequark> you're not creating the sync domain explicitly, right?
<DaKnig> right
<DaKnig> if it matters at all- I dont have any process attached
<DaKnig> since the circuit has no input (besides clk and rst
<DaKnig> I think the sim should , when it starts to run, output all clock domain clocks and resets to the gtkwave
<DaKnig> should I make an issue?
<agg> cr1901_modern: it's a GitHub option per repo whether pushes clear existing reviews
<cr1901_modern> ahhh
<whitequark> agg: hm i should turn that on
<Sarayan> The cyclone shows me something annoying with single-clock-and-enables: you can't use the dedicated clock routes to move enable signals afaict
<DaKnig> I think I'll make an issue about the clock domain underscore weirdness
<whitequark> sure, go ahead
<whitequark> i'll take a look later
<FL4SHK> whew, that was an episode
<Sarayan> it also has the capability of inverting clocks before the ff, but you can't really use that either
<whitequark> agg: can't find it
<FL4SHK> finally got a new OS installed on my laptop
<FL4SHK> the existing Arch Linux installation I had wouldn't let me log in even after a `passwd root` command I ran in a chroot
<FL4SHK> now I can use my laptop again!
<DaKnig> nice
<agg> whitequark: checkbox under branch protection settings iirc
<whitequark> oh
<agg> After "require reviews" is ticked
<whitequark> ok that's kinda different
jeanthom has quit [Ping timeout: 258 seconds]
<agg> Yea, not at a pc right now so couldn't check exact details but I think that's the setting that controls the behaviour cr1901_modern was thinking of
<_whitenotifier-3> [nmigen] DaKnig opened issue #489: nMigen doesn't like clock domains with underscores - https://git.io/JUUDq
<_whitenotifier-3> [nmigen] DaKnig edited issue #489: nMigen doesn't like clock domains with underscores - https://git.io/JUUDq
<agg> DaKnig: it's not the underscore, starting a cd name with "cd_" is handled differently and only the part after cd_ is considered iirc
<agg> (in other words changing cd_x to dd_x should also fix your issue, but better to just name the cd without a cd prefix, this feature allows the python binding to have the prefix while naming the clock domain itself without it)
jeanthom has joined #nmigen
<_whitenotifier-3> [nmigen] whitequark commented on issue #489: nMigen doesn't like clock domains with underscores - https://git.io/JUUD4
jeanthom has quit [Ping timeout: 240 seconds]
<DaKnig> agg: should use the more common way to have "magic global names" - in C that'd be prefixing the thing with _nmigen_cd and in python either _cd or __cd
<DaKnig> that is very unexpected
jeanthom has joined #nmigen
<DaKnig> cc lkcl
<DaKnig> here's the reason
<whitequark> it's not magic (moreso than any other names in nmigen) or global
<agg> It wouldn't be appropriate to use _cd in context anyway, it's not meant to be private
<agg> I think maybe the confusion here is because you were explicitly specifying a name starting with cd_ rather than using the automatic naming from the binding name
<agg> It's less surprising that "cd_io = ClockDomain()" creates a cd named "io" than that "x = ClockDomain("cd_io")" does too, perhaps
jeanthom has quit [Ping timeout: 240 seconds]
Asu has quit [Remote host closed the connection]
Asu has joined #nmigen
Asu has quit [Remote host closed the connection]
Asu has joined #nmigen
ronyrus has quit [Ping timeout: 260 seconds]
ronyrus has joined #nmigen
<awygle> yaaaay i was right :p
jeanthom has joined #nmigen
jeanthom has quit [Remote host closed the connection]
jeanthom has joined #nmigen
awe00 has joined #nmigen
awe00_ has quit [Ping timeout: 240 seconds]
emeb_mac has joined #nmigen
jeanthom has quit [Ping timeout: 240 seconds]
jeanthom has joined #nmigen
Yehowshua has joined #nmigen
Yehowshua has quit [Ping timeout: 245 seconds]
peeps[zen] has joined #nmigen
peepsalot has quit [Ping timeout: 240 seconds]
Asu has quit [Remote host closed the connection]
awe00 has quit [Ping timeout: 240 seconds]
<DaKnig> how can I use pypy with nmigen? for some reason it doesnt recognize nmigen at all
<DaKnig> "No module named 'nmigen'"
<whitequark> pypy has a different, separate set of installed packages
awe00 has joined #nmigen
<_whitenotifier-3> [nmigen] whitequark reviewed pull request #461 commit - https://git.io/JUUbO
awe00 has quit [Ping timeout: 256 seconds]
emeb_mac has quit [Ping timeout: 240 seconds]
emeb_mac has joined #nmigen