sb0 changed the topic of #m-labs to: https://m-labs.hk :: Mattermost https://chat.m-labs.hk :: Logs http://irclog.whitequark.org/m-labs
<_whitenotifier-3> [nmigen-boards] whitequark commented on pull request #15: Digilent Atlys spartan6 board - https://git.io/fji1e
<_whitenotifier-3> [nmigen-boards] mithro opened issue #22: Support silkscreen references (and other information) in platform definitions - https://git.io/fji1O
<_whitenotifier-3> [nmigen-boards] whitequark commented on issue #22: Support silkscreen references (and other information) in platform definitions - https://git.io/fji13
<_whitenotifier-3> [nmigen-boards] mithro commented on issue #22: Support silkscreen references (and other information) in platform definitions - https://git.io/fji1E
<_whitenotifier-3> [nmigen-boards] whitequark reviewed pull request #20 commit - https://git.io/fji1V
<cr1901_modern> whitequark: Like this? http://ix.io/1O5z
<whitequark> cr1901_modern: yep
<whitequark> you should add assert_width while you're at it
<whitequark> for a device that would be 1, i think?
<whitequark> nit: i usually use tuples in checks like `if role not in ("host", "device")` but it's not important
<cr1901_modern> well I didn't push or commit yet
<cr1901_modern> so I'll change it
<whitequark> also, why can't devices have interrupt pins?
<whitequark> also, mm, `miso` should have `dir="oe"`
<whitequark> because it's common to have multiple devices sharing everything except CS
<whitequark> and you can't make that work with dir="o"
<cr1901_modern> >why can't devices have interrupt pins?
<cr1901_modern> Oversight
<cr1901_modern> >`miso` should have `dir="oe"`
<cr1901_modern> Only for device mode, correct?
<whitequark> yes
<cr1901_modern> http://ix.io/1O5C Checkpoint. Before I go on w/ assert widths, everything look good?
<whitequark> I think the reset in SPI resources only really makes sense for jellybean devices like SPI flash
<whitequark> for an FPGA you'd normally have a dedicated reset pin
<whitequark> but actually, whatever
<whitequark> just keep it there for symmetry
<whitequark> doesn't hurt
<whitequark> maybe you're emulating a flash or whatever
<cr1901_modern> There is at least one project for this recently
<cr1901_modern> not using nmigen tho :(
<whitequark> also re that ValueError, I normally simply use `assert role in ("host", "device")`
<whitequark> Python shows you where the program crashed and that has the exact same information content
<whitequark> with less effort
<cr1901_modern> Idk when to use ValueError or asserts (beyond False) in nmigen
<cr1901_modern> assert False is obvious enough as in "if you got here, you really f***ed up"
<cr1901_modern> But I'll change it
<whitequark> asserts are for 2 things:
<whitequark> - things that should never be true by design and ensured elsewhere, but would have bad consequences if they were true
<whitequark> - checks for misuse of internal APIs
<cr1901_modern> I guess this is the latter
<whitequark> honestly it's more that if people don't have to write verbose messages for every possible assertion i think we'll have more assertions
<whitequark> sprinkle them liberally
* cr1901_modern nods
<cr1901_modern> You'll tell me anyway when I screw up :P
<cr1901_modern> AFAICT: cs, clk, mosi, miso, int, and reset's assert_width should be == 1 for device.
<cr1901_modern> clk, mosi, miso should be == 1 for host
<whitequark> correct
<cr1901_modern> http://ix.io/1O5D Looks good? If so, I'm gonna test locally w/ mercury (including refactoring out ADC and spiserial) and then push.
<whitequark> cr1901_modern: "int" should be "oe" too for the same reasons
<whitequark> and i'm not yet entirely sure what to do with the name argument
<whitequark> other than that looks good
<cr1901_modern> Ack. Lemme know, any changes you want to make won't affect my testing locally right now.
<cr1901_modern> well, they will, but 90% of the work is done
<whitequark> here's what I want to do I think
<cr1901_modern> Unfortunate that the name param can't go first, unless you had something in mind for consistent naming of SPI peripherals
<cr1901_modern> So where does that snippet go?
<cr1901_modern> as a nested fcn inside SPIResource?
<whitequark> no
<whitequark> it'd be a function somewhere in nmigen-boards
<whitequark> or... hm
<whitequark> maybe in Resource() itself?
<whitequark> yeah probably the latter
<whitequark> I'll put it in....
<cr1901_modern> Where is a resource going to get it's default_name?
<whitequark> for SPI it's, well, "spi".
<cr1901_modern> Actually I didn't even know it was possible to go from pos args to kwargs and then back
<whitequark> you can't go back
<whitequark> that's a keyword-only required argument
<cr1901_modern> Oh...
<whitequark> makes it so that downstream code is *unable* to pass a boolean as positional, even
<whitequark> very good feature
<whitequark> the only thing better would be to completely remove booleans from the language
<cr1901_modern> haha
<cr1901_modern> I don't see how default_name factors into Resources that a user defines themselves without using any of the wrappers under nmigen_boards.dev
<cr1901_modern> if you're defining a vanilla resource, chances are you will be supplying the name already
<cr1901_modern> so a default_name is redundant
<whitequark> yeah but nmigen-boards isn't the *only* boards repo that should be possible
<whitequark> so it's better to provide an abstraction that's more baked in
<whitequark> also, that solves the question of where to put it
<cr1901_modern> I will have to see what you mean. Does this mean that _every_ Resource now gets a mandatory default_name argument to fill in now?
<whitequark> not mandatory
<whitequark> if it's in nmigen.build.dsl.Resource it just becomes optional
<whitequark> and there's another check that you supply it if you're missing the name
<whitequark> kind of a lot of checks, but that's kind of how eDSLs roll
<cr1901_modern> Well, providing a default keeps stuff like SPIFlashResources convenient
<cr1901_modern> where you just supply the number and the names will be autogenned for you
<cr1901_modern> I just can't visualize how this'll be implemented right this moment
<cr1901_modern> It'll click once I see it
<whitequark> ughhh that doesn't quite work
<whitequark> because Resource() accepts *args
<cr1901_modern> >yeah but nmigen-boards isn't the *only* boards repo that should be possible
<cr1901_modern> Putting this aside for a moment, my view is if you're using a wrapper Resource under nmigen_boards.dev, the name in general will be decided for you. SPIResource should be an exception to this rule, but it should also >>
<cr1901_modern> have a consistent interface w/ the other Resource wrappers
<whitequark> and why is SPI so special?
<cr1901_modern> the "only supply a number as mandatory argument" is the consistent interface.
<cr1901_modern> B/c we've already decided on spi_flash_{1x,2x,4x} and you'll make ppl unhappy if you change that
<cr1901_modern> Should be consistent on each board
<cr1901_modern> Basically, I think SPI is "unfortunate" that the abstraction breaks, rather than being special
<whitequark> to repeat: and why is SPI so special?
<whitequark> why does its abstraction break? you haven't answered that
<cr1901_modern> Because you've already hardcoded names for the uart and spiflash and irda resources
<cr1901_modern> If you didn't, there's no problem.
<whitequark> why would the current hardcoded names be a problem?
<cr1901_modern> And an spi device can be much more general than a uart, irda, or spiflash
<cr1901_modern> Because the interface of the resource wrappers becomes inconsistent if you're allowed to supply names to some resource wrappers but not others
* cr1901_modern retrieves a comment
<whitequark> so why is it that UART is less general than SPI?
<cr1901_modern> https://github.com/m-labs/nmigen-boards/pull/20#discussion_r300914419 I thought this was the whole crux of your comment
<whitequark> yes, it breaks the signature *because you've added a mandatory argument*
<whitequark> the whole point of the function i described above is that it accepts either 1 argument (number) or 2 arguments (name and number)
<cr1901_modern> >so why is it that UART is less general than SPI
<cr1901_modern> let me think about this
<whitequark> (it isn't, it's perfectly sensible to have uart_gsm#0, uart_gsm#1, uart_bt#0 and so on)
<whitequark> even for SPI flash...
<whitequark> there is SPI PSRAM that has the same 2x/4x interface
<whitequark> so really we should have SPIMemoryResource and SPIFlashResource as an alias with a hardcoded name
<cr1901_modern> mmm
<cr1901_modern> point taken
<cr1901_modern> Afraid Idk how to implement this though lol, and looks like *args in Resource throws a wrench into matters :/
<whitequark> it'd just be Resource.something() instead of Resource()
<whitequark> well you could slice that tuple but it's bad
<cr1901_modern> Nothing uses SPIResource yet, from a git grep. So I didn't feel bad breaking it.
<cr1901_modern> Only occurred to me later that that's not what you meant by breaking shit
tweakoz has joined #m-labs
<whitequark> yeah
<cr1901_modern> >(10:29:46 PM) whitequark: it'd just be Resource.something() instead of Resource()
<cr1901_modern> Could you elaborate when you get the chance?
<whitequark> literally just a different class method than __new__
<cr1901_modern> ahhh
<cr1901_modern> one for "name and number required", the other for default-but-overrideable name argument (if only number is supplied)?
<whitequark> the former is Resource() itself
<cr1901_modern> right
tweakoz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<_whitenotifier-3> [m-labs/nmigen] whitequark pushed 1 commit to master [+0/-0/±2] https://git.io/fjiMn
<_whitenotifier-3> [m-labs/nmigen] whitequark 367ad5a - build.dsl: add Resource.family abstraction.
<_whitenotifier-3> [nmigen-boards] whitequark opened issue #23: Use Resource.family where appropriate - https://git.io/fjiMc
<_whitenotifier-3> [nmigen-boards] whitequark commented on issue #22: Support silkscreen references (and other information) in platform definitions - https://git.io/fjiMW
tweakoz has joined #m-labs
<_whitenotifier-3> [nmigen] Success. The Travis CI build passed - https://travis-ci.org/m-labs/nmigen/builds/556092965?utm_source=github_status&utm_medium=notification
<_whitenotifier-3> [nmigen] Success. 80.76% (+0.01%) compared to 7b4fbf8 - https://codecov.io/gh/m-labs/nmigen/commit/367ad5aee76228916677acf2937f6f1c346686ea
<_whitenotifier-3> [nmigen] Success. 100% of diff hit (target 80.74%) - https://codecov.io/gh/m-labs/nmigen/commit/367ad5aee76228916677acf2937f6f1c346686ea
<_whitenotifier-3> [nmigen-boards] mithro commented on issue #22: Support silkscreen references (and other information) in platform definitions - https://git.io/fjiM4
<_whitenotifier-3> [nmigen-boards] whitequark commented on issue #22: Support silkscreen references (and other information) in platform definitions - https://git.io/fjiMR
<_whitenotifier-3> [nmigen-boards] mithro commented on issue #22: Support silkscreen references (and other information) in platform definitions - https://git.io/fjiME
<_whitenotifier-3> [nmigen] mithro commented on commit 367ad5aee76228916677acf2937f6f1c346686ea - https://git.io/fjiMu
<_whitenotifier-3> [nmigen] programmerjake opened issue #141: tracer.get_var_name returns None instead of default on pypy3 - https://git.io/fjiM6
<_whitenotifier-3> [nmigen] whitequark commented on issue #141: tracer.get_var_name returns None instead of default on pypy3 - https://git.io/fjiMD
<_whitenotifier-3> [nmigen-boards] whitequark commented on issue #22: Support silkscreen references (and other information) in platform definitions - https://git.io/fjiMH
<_whitenotifier-3> [nmigen] whitequark commented on commit 367ad5aee76228916677acf2937f6f1c346686ea - https://git.io/fjiMQ
<_whitenotifier-3> [nmigen-boards] mithro commented on issue #22: Support silkscreen references (and other information) in platform definitions - https://git.io/fjiMF
<_whitenotifier-3> [nmigen] programmerjake opened pull request #142: allow tracer.get_var_name to work on pypy3 - https://git.io/fjiMN
<_whitenotifier-3> [nmigen] Success. The Travis CI build passed - https://travis-ci.org/m-labs/nmigen/builds/556108061?utm_source=github_status&utm_medium=notification
<_whitenotifier-3> [nmigen] codecov[bot] commented on pull request #142: allow tracer.get_var_name to work on pypy3 - https://git.io/fjiMp
<_whitenotifier-3> [nmigen] whitequark commented on pull request #142: allow tracer.get_var_name to work on pypy3 - https://git.io/fjiMh
<_whitenotifier-3> [nmigen-boards] whitequark commented on issue #22: Support silkscreen references (and other information) in platform definitions - https://git.io/fjiMj
<_whitenotifier-3> [nmigen] mithro opened issue #143: Support silkscreen references (and other information) in platform definitions - https://git.io/fjiDe
<_whitenotifier-3> [nmigen] mithro commented on issue #143: Support silkscreen references (and other information) in platform definitions - https://git.io/fjiDU
tweakoz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<_whitenotifier-3> [nmigen] whitequark commented on issue #143: Support silkscreen references (and other information) in platform definitions - https://git.io/fjiDI
<_whitenotifier-3> [nmigen] programmerjake synchronize pull request #142: allow tracer.get_var_name to work on pypy3 - https://git.io/fjiMN
<_whitenotifier-3> [nmigen] Failure. The Travis CI build failed - https://travis-ci.org/m-labs/nmigen/builds/556113100?utm_source=github_status&utm_medium=notification
<_whitenotifier-3> [nmigen] programmerjake synchronize pull request #142: allow tracer.get_var_name to work on pypy3 - https://git.io/fjiMN
tweakoz has joined #m-labs
<_whitenotifier-3> [nmigen] mithro commented on issue #143: Support silkscreen references (and other information) in platform definitions - https://git.io/fjiDm
<_whitenotifier-3> [nmigen] whitequark commented on issue #143: Support silkscreen references (and other information) in platform definitions - https://git.io/fjiDO
<_whitenotifier-3> [nmigen] Failure. The Travis CI build failed - https://travis-ci.org/m-labs/nmigen/builds/556114599?utm_source=github_status&utm_medium=notification
rohitksingh_work has joined #m-labs
<_whitenotifier-3> [nmigen] programmerjake synchronize pull request #142: allow tracer.get_var_name to work on pypy3 - https://git.io/fjiMN
<_whitenotifier-3> [nmigen] Success. Absolute coverage decreased by -0.27% but relative coverage increased by +19.23% compared to 367ad5a - https://codecov.io/gh/m-labs/nmigen/compare/367ad5aee76228916677acf2937f6f1c346686ea...3dda0126dae2ba79f10902fc1f867be7c2f07f40
<_whitenotifier-3> [nmigen] whitequark commented on pull request #142: allow tracer.get_var_name to work on pypy3 - https://git.io/fjiDg
<_whitenotifier-3> [nmigen] Success. The Travis CI build passed - https://travis-ci.org/m-labs/nmigen/builds/556125449?utm_source=github_status&utm_medium=notification
<_whitenotifier-3> [nmigen] Success. Absolute coverage decreased by -0.27% but relative coverage increased by +19.23% compared to 367ad5a - https://codecov.io/gh/m-labs/nmigen/compare/367ad5aee76228916677acf2937f6f1c346686ea...7f94549b2c521a9271233f4a459b6ab300b2d834
proteusguy has joined #m-labs
m4ssi has joined #m-labs
tweakoz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<_whitenotifier-3> [nmigen] whitequark closed issue #141: tracer.get_var_name returns None instead of default on pypy3 - https://git.io/fjiM6
<_whitenotifier-3> [nmigen] whitequark closed pull request #142: allow tracer.get_var_name to work on pypy3 - https://git.io/fjiMN
<_whitenotifier-3> [m-labs/nmigen] whitequark pushed 1 commit to master [+0/-0/±2] https://git.io/fjiy7
<_whitenotifier-3> [m-labs/nmigen] programmerjake 62b3e36 - tracer: add PyPy support to get_var_name().
<_whitenotifier-3> [nmigen] Success. The Travis CI build passed - https://travis-ci.org/m-labs/nmigen/builds/556167880?utm_source=github_status&utm_medium=notification
<_whitenotifier-3> [nmigen] Failure. 80.73% (-0.03%) compared to 367ad5a - https://codecov.io/gh/m-labs/nmigen/commit/62b3e36612504aa5fab4182541a240807aafde6e
<_whitenotifier-3> [nmigen] Failure. 60% of diff hit (target 80.76%) - https://codecov.io/gh/m-labs/nmigen/commit/62b3e36612504aa5fab4182541a240807aafde6e
<_whitenotifier-3> [nmigen] Success. Absolute coverage decreased by -0.27% but relative coverage increased by +19.23% compared to 367ad5a - https://codecov.io/gh/m-labs/nmigen/commit/62b3e36612504aa5fab4182541a240807aafde6e
<_whitenotifier-3> [nmigen] Success. 100% of diff hit (target 80.76%) - https://codecov.io/gh/m-labs/nmigen/commit/62b3e36612504aa5fab4182541a240807aafde6e
<_whitenotifier-3> [nmigen] Success. The Travis CI build passed - https://travis-ci.org/m-labs/nmigen/builds/556167880?utm_source=github_status&utm_medium=notification
<zignig> whitequark: did you wait until I was on an away mission to drop the bonless v3 ? ;P
* zignig is nowhere near his workshop.
<whitequark> zignig: it is still very, very far from being complete
<whitequark> much less from running at a respectable frequency on up5k
<zignig> After landing in SA I saw that it updated..
<zignig> :) looking better though. I like what you have done with the assembler.
<whitequark> yea
<whitequark> i'm open to extending it with more directives
<whitequark> though they should be well motivated
<zignig> I was wondering how to handle the EXTI instructions and shifing labels.
<zignig> I have a bunch of commands and macros that I am using, but it will need to be well considered before adding.
<zignig> some guru meditations will be needed.
<zignig> some thoughts that I had after reading the source...
<zignig> Is it possible to make CMPI imm8 ?
<whitequark> that wouldn't fit well into the ISA, I think
<whitequark> why?
<zignig> being able to compare +/- 127 rather than the 3 bit table might be more flexible.
<whitequark> you can use EXTI;CMPI if you need more flexibility
<whitequark> (EXTI works on any instruction)
<zignig> indeed , it's only 1 instruction...
<zignig> and ... in the fullness of time an interrupt controller :)
<zignig> Is it in a runnable state at the moment, looking forward to having a poke at it.
<whitequark> not really, conditional jumps aren't even implemented
<zignig> once this 5MW is commisioned.
<whitequark> and it's untested...
<whitequark> 5MW?
<zignig> 5 Mega Watts of solar.
<whitequark> oooh sweet
<whitequark> that's really cool
<zignig> ' do not lick '
<zignig> :)
<zignig> still keep up the good work, looking forward to getting one running.
<whitequark> yea
<_whitenotifier-3> [nmigen] programmerjake commented on pull request #142: allow tracer.get_var_name to work on pypy3 - https://git.io/fji9B
<_whitenotifier-3> [nmigen] whitequark commented on pull request #142: allow tracer.get_var_name to work on pypy3 - https://git.io/fji90
owo has joined #m-labs
X-Scale has quit [Read error: Connection reset by peer]
flammit has quit [*.net *.split]
adamgreig has quit [*.net *.split]
daveshah has quit [*.net *.split]
mithro has quit [*.net *.split]
whitequark has quit [*.net *.split]
uberardy has quit [*.net *.split]
uberardy has joined #m-labs
flammit has joined #m-labs
daveshah has joined #m-labs
adamgreig has joined #m-labs
mithro has joined #m-labs
whitequark has joined #m-labs
owo has quit [Quit: Leaving]
rohitksingh_work has quit [Read error: Connection reset by peer]
rohitksingh has joined #m-labs
cr1901_modern has quit [Read error: Connection reset by peer]
cr1901_modern has joined #m-labs
cr1901_modern1 has joined #m-labs
cr1901_modern1 has quit [Client Quit]
cr1901_modern1 has joined #m-labs
cr1901_modern1 has quit [Client Quit]
cr1901_modern has quit [Ping timeout: 244 seconds]
cr1901_modern has joined #m-labs
mumptai has joined #m-labs
m4ssi has quit [Remote host closed the connection]
MLichtman has joined #m-labs
MLichtman has quit [Remote host closed the connection]
<_whitenotifier-3> [nmigen] whitequark commented on issue #134: Add FSM state name annotations to generated Verilog output - https://git.io/fjijQ
rohitksingh has quit [Ping timeout: 244 seconds]
<_whitenotifier-3> [nmigen] Fatsie commented on issue #143: Support silkscreen references (and other information) in platform definitions - https://git.io/fjPvU
<_whitenotifier-3> [nmigen] mithro commented on issue #143: Support silkscreen references (and other information) in platform definitions - https://git.io/fjPvu
<_whitenotifier-3> [nmigen] mithro commented on issue #134: Add FSM state name annotations to generated Verilog output - https://git.io/fjPv2
benreynwar has quit [*.net *.split]
benreynwar has joined #m-labs
<_whitenotifier-3> [nmigen-boards] Fatsie commented on pull request #15: Digilent Atlys spartan6 board - https://git.io/fjPfJ
<_whitenotifier-3> [nmigen] Fatsie commented on issue #143: Support silkscreen references (and other information) in platform definitions - https://git.io/fjPfw
<_whitenotifier-3> [nmigen-boards] Fatsie commented on pull request #15: Digilent Atlys spartan6 board - https://git.io/fjPfS
<_whitenotifier-3> [nmigen] mithro commented on issue #143: Support silkscreen references (and other information) in platform definitions - https://git.io/fjPfh
X-Scale has joined #m-labs
acathla has quit [Remote host closed the connection]
acathla has joined #m-labs
mumptai has quit [Quit: Verlassend]
<mtrbot-ml> [mattermost] <mgielda> mgielda joined the team.
<_whitenotifier-3> [nmigen] mithro commented on issue #143: Support silkscreen references (and other information) in platform definitions - https://git.io/fjPUN