cr1901_modern has quit [Ping timeout: 272 seconds]
Gurty has quit [Ping timeout: 264 seconds]
Gurty has joined #m-labs
<whitequark>
sb0: random thought: you know what would be interesting? adding native parameter support to nMigen
<whitequark>
that is, in most places where it uses constant integers right now, allow formulas from some computer algebra system
<whitequark>
like signal widths
<whitequark>
or even easier, allow a subset of Values there.
<whitequark>
the *idea* is that this would allow formally verifying a class of modules instead of a single module. the reality is that model checkers can only check single instantiations anyway
<whitequark>
this could *also* be interesting in that it could let nMigen emit parameterized Verilog... except then it would not be able to reuse Yosys
<whitequark>
because in Yosys parameterized modules are represented with ASTs anyway
<whitequark>
so you could as well emit text
cr1901_modern has joined #m-labs
<sb0>
whitequark: that's tricky to do properly. if you have a signal with parameterized lenght that you pass into another module, and then that module does various things with len(signal), what happens?
<whitequark>
sb0: as long as it never tries to branch on the results of those manipulations, it is fine
<sb0>
this is a common use case, and the things that can be done are e.g. signal2 = Signal(len(signal)//4), if len(signal) > threshold, for i in range(len(signal))
<whitequark>
the former thing is fine
<whitequark>
the latter will not work, which is a price you have to pay
<sb0>
then it does not seem very useful
<whitequark>
hmm
<whitequark>
well, hypothetically, one could map to generate statements
<whitequark>
but that seems like it'd involve non-obvious issues
<sb0>
yep.
<sb0>
and there are many python features that do not map to generate statements
<whitequark>
i think it'd still be useful for designs where one has to interoperate back and forth with verilog. not that i have this use case.
<sb0>
what would that len() return? and what happens if you attempt to branch on it?
<_whitenotifier-c>
[m-labs/nmigen] whitequark pushed 1 commit to master [+0/-0/±2] https://git.io/fh45V
<_whitenotifier-c>
[m-labs/nmigen] whitequark 66466a8 - back.rtlil: only emit each AnyConst/AnySeq cell once.
<whitequark>
sb0: it'd return a Value. probably an Operator
<whitequark>
and if you tried to compare and branch it'd be the same "tried to convert nMigen value to bool"
<whitequark>
exception that is
<whitequark>
(which actually works in nmigen for comparisons as well)
<whitequark>
so, you could do something like Signal(len(foo))
<GitHub-m-labs>
[artiq] jordens commented on issue #1157: Based on a quick check this seems to work at 10 MHz. Someone would need to check how good or bad the loop filter is and what the optimal values are for 10 MHz and pll_n=100. https://github.com/m-labs/artiq/issues/1157#issuecomment-455533326
proteusguy has quit [Ping timeout: 250 seconds]
rohitksingh_work has quit [Read error: Connection reset by peer]