00:40
Degi_ has joined #nmigen
00:43
Degi has quit [Ping timeout: 256 seconds]
00:43
Degi_ is now known as Degi
00:57
<
Vinalon >
it looks like forwarding all of the bus signals manually with If/Else or Mux(...)s works, but I feel like that might not be the 'right' way to do it
01:55
Degi has quit [Ping timeout: 265 seconds]
02:13
Degi has joined #nmigen
03:27
Vinalon has quit [Remote host closed the connection]
03:27
Vinalon has joined #nmigen
04:33
_whitelogger has joined #nmigen
04:42
_whitelogger has joined #nmigen
06:11
chipmuenk has joined #nmigen
06:15
chipmuenk has quit [Client Quit]
06:16
chipmuenk has joined #nmigen
06:28
thinknok has joined #nmigen
06:50
<
whitequark >
Vinalon: well, the reason Decoder has that implementation is to conserve resources
06:51
<
whitequark >
if you don't want that for some reason (which I don't understand), then yes, If/Else is the way to do it
07:28
Asu has joined #nmigen
08:07
<
_whitenotifier-3 >
[nmigen] sjolsen opened pull request #348: back.pysim performance improvements -
https://git.io/JvA42
08:18
<
_whitenotifier-3 >
[nmigen] whitequark commented on pull request #348: back.pysim performance improvements -
https://git.io/JvA4d
08:19
<
_whitenotifier-3 >
[nmigen] whitequark edited a comment on pull request #348: back.pysim performance improvements -
https://git.io/JvA4d
08:19
<
_whitenotifier-3 >
[nmigen] codecov[bot] commented on pull request #348: back.pysim performance improvements -
https://git.io/JvA4F
08:19
<
_whitenotifier-3 >
[nmigen] codecov[bot] edited a comment on pull request #348: back.pysim performance improvements -
https://git.io/JvA4F
08:20
<
_whitenotifier-3 >
[nmigen] codecov[bot] edited a comment on pull request #348: back.pysim performance improvements -
https://git.io/JvA4F
08:20
<
_whitenotifier-3 >
[nmigen] codecov[bot] edited a comment on pull request #348: back.pysim performance improvements -
https://git.io/JvA4F
08:39
<
_whitenotifier-3 >
[nmigen] sjolsen commented on pull request #348: back.pysim performance improvements -
https://git.io/JvABR
08:48
____ has joined #nmigen
08:51
<
_whitenotifier-3 >
[nmigen] whitequark commented on pull request #348: back.pysim performance improvements -
https://git.io/JvABQ
08:52
<
_whitenotifier-3 >
[nmigen] whitequark edited a comment on pull request #348: back.pysim performance improvements -
https://git.io/JvABQ
08:54
<
_whitenotifier-3 >
[nmigen] whitequark edited a comment on pull request #348: back.pysim performance improvements -
https://git.io/JvABQ
08:59
hmn has joined #nmigen
09:04
hmn is now known as hhmmnn
09:16
<
_whitenotifier-3 >
[nmigen] sjolsen synchronize pull request #348: back.pysim performance improvements -
https://git.io/JvA42
09:16
Vinalon has quit [Ping timeout: 256 seconds]
09:17
<
_whitenotifier-3 >
[nmigen] codecov[bot] edited a comment on pull request #348: back.pysim performance improvements -
https://git.io/JvA4F
09:18
<
_whitenotifier-3 >
[nmigen] codecov[bot] edited a comment on pull request #348: back.pysim performance improvements -
https://git.io/JvA4F
09:18
<
_whitenotifier-3 >
[nmigen] sjolsen commented on pull request #348: back.pysim performance improvements -
https://git.io/JvARr
09:18
<
_whitenotifier-3 >
[nmigen] codecov[bot] edited a comment on pull request #348: back.pysim performance improvements -
https://git.io/JvA4F
09:23
<
_whitenotifier-3 >
[nmigen/nmigen] sjolsen 2398b79 - back.pysim: Reuse clock simulation commands
09:23
<
_whitenotifier-3 >
[nmigen/nmigen] sjolsen 1e74409 - back.pysim: Eliminate duplicate dict lookup in VCD update
09:29
<
_whitenotifier-3 >
[nmigen] whitequark commented on pull request #348: back.pysim performance improvements -
https://git.io/JvARx
10:04
<
_whitenotifier-3 >
[nmigen] sjolsen commented on pull request #348: back.pysim performance improvements -
https://git.io/JvAEh
10:21
chipmuenk1 has joined #nmigen
10:23
chipmuenk has quit [Ping timeout: 260 seconds]
10:23
chipmuenk1 is now known as chipmuenk
11:35
hhmmnn has quit [Remote host closed the connection]
11:42
<
_whitenotifier-3 >
[nmigen] sjolsen commented on pull request #348: back.pysim performance improvements -
https://git.io/JvAwA
11:45
<
_whitenotifier-3 >
[nmigen] whitequark commented on pull request #348: back.pysim performance improvements -
https://git.io/JvArU
11:47
<
_whitenotifier-3 >
[nmigen] whitequark commented on pull request #348: back.pysim performance improvements -
https://git.io/JvArq
11:53
<
_whitenotifier-3 >
[nmigen] sjolsen synchronize pull request #348: back.pysim performance improvements -
https://git.io/JvA42
11:53
<
_whitenotifier-3 >
[nmigen] codecov[bot] edited a comment on pull request #348: back.pysim performance improvements -
https://git.io/JvA4F
11:55
<
_whitenotifier-3 >
[nmigen] codecov[bot] edited a comment on pull request #348: back.pysim performance improvements -
https://git.io/JvA4F
11:56
<
_whitenotifier-3 >
[nmigen] codecov[bot] edited a comment on pull request #348: back.pysim performance improvements -
https://git.io/JvA4F
12:00
lkcl_ has quit [Ping timeout: 265 seconds]
12:07
<
_whitenotifier-3 >
[nmigen] whitequark commented on pull request #348: back.pysim performance improvements -
https://git.io/JvArj
12:08
<
_whitenotifier-3 >
[nmigen] whitequark commented on pull request #348: back.pysim performance improvements -
https://git.io/JvAoU
12:15
chipmuenk has quit [Quit: chipmuenk]
12:58
lkcl has joined #nmigen
13:55
lkcl has quit [Ping timeout: 265 seconds]
14:10
lkcl has joined #nmigen
14:16
Vinalon has joined #nmigen
14:17
<
Vinalon >
well, I was using a Decoder to multiplex access to RAM (inside the chip) and NVM (outside the chip). The NVM takes a lot longer to access and starts an access when its 'stb' signal is asserted, and the RAM's 'ack' signal causes the bus to assert 'ack' before it finishes fetching data.
14:18
<
Vinalon >
so I need to switch those signals as well. I guess I'll stick with if/else then, thanks
14:19
<
whitequark >
that seems like a logic error elsewhere in the design
14:19
<
whitequark >
absolutely nothing should be happening unless cyc is asserted
14:20
<
whitequark >
that's why the other signals are not multiplexed
14:21
<
Vinalon >
oh...yeah, I've just been setting 'cyc' equal to 'stb' and driving 'stb' to mediate transactions. Thanks, this is what happens when I only skim the timing diagrams
14:22
<
whitequark >
we should have formal tests for that kind of thing
14:23
<
Vinalon >
so it sounds like I should make the subordinate buses not assert anything and ignore inputs if their 'cyc' signal isn't active? That makes sense.
14:23
<
whitequark >
but don't for now
14:24
<
Vinalon >
well, that still wouldn't keep people like me from using the bus signals incorrectly. Thanks for the information!
14:27
<
ZirconiumX >
wq: when I was talking about my chess code you suggested using a resetless domain instead of passing reset_less to Signal; how do I do that?
14:27
<
ZirconiumX >
Presumably it involves DomainRenamer, right?
14:27
<
whitequark >
are you currently not using any domains?
14:28
<
ZirconiumX >
Just the default comb and sync
14:28
<
whitequark >
try m.domains.sync = sync = ClockDomain(reset_less=True)
14:28
<
whitequark >
m.d.comb += sync.clk.eq(platform.request(platform.default_clk))
14:28
<
whitequark >
*.d.comb += sync.clk.eq(platform.request(platform.default_clk).i)
14:31
<
ZirconiumX >
Does that propagate into submodules?
14:34
<
whitequark >
domains are global unless specified otherwise
14:35
<
ZirconiumX >
AttributeError: 'NoneType' object has no attribute 'request'
14:35
<
ZirconiumX >
I don't think this works when you're just using nMigen to dump Verilog output
14:36
<
whitequark >
oh, yeah
14:36
<
whitequark >
then ditch the platform part
14:36
<
whitequark >
it'll do the right thing
14:39
<
ZirconiumX >
Apparently not, because when I replace the sync domain Yosys optimises out my code
14:40
<
ZirconiumX >
as in, it synthesises to zero cells
14:42
<
whitequark >
do you use ports=[...]?
14:42
<
whitequark >
if yes, you need to add sync.clk there
14:42
<
ZirconiumX >
Right, okay.
15:31
chipmuenk has joined #nmigen
16:01
proteus-guy has quit [Ping timeout: 250 seconds]
16:27
proteus-guy has joined #nmigen
17:12
Vinalon has quit [Remote host closed the connection]
17:13
Vinalon has joined #nmigen
17:27
<
ZirconiumX >
Do you still need to create a new simulator if you want to run multiple tests with an Elaboratable?
17:28
<
whitequark >
you can reset the existing one
17:29
<
whitequark >
this was one of the features I worked towards with the pysim rewrite
17:57
<
ZirconiumX >
Except reset() doesn't clear processes, so you need a new simulator to add a new process.
18:00
<
ZirconiumX >
Unless I pipeline my tests, anyway.
18:12
<
whitequark >
that seems like a major issue with this API
18:13
<
whitequark >
you could easily work around that by adding a level of indirection in your tests
18:13
<
whitequark >
like `yield from self.current_testcase()`
18:13
<
whitequark >
but it does seem like smoething I did not account for
18:14
<
ZirconiumX >
So I'm guessing the problem is more involved than an API that clears the internal process list?
18:19
<
whitequark >
well, you might want to keep some of those processes, if they're replacing e.g. a PHY with a behavioral model
18:34
<
Vinalon >
I toggle the clock domain's reset signal between individual tests inside of one process function, and it seems to work pretty well.
18:38
<
whitequark >
yup, that also works if you have no reset_less signals
20:16
<
awygle >
Ugh fine ill learn rosette, are you happy now?
20:16
<
awygle >
(you keep tweeting Cool Shit)
20:34
futarisIRCcloud has joined #nmigen
20:49
chipmuenk has quit [Quit: chipmuenk]
20:49
<
ZirconiumX >
Is it possible to stop the simulation on a particular signal changing? (i.e. a done bit)
20:50
<
ZirconiumX >
I'm asking mostly because I have no idea how many cycles something will take
20:50
<
whitequark >
while not (yield sig): yield
20:50
<
ZirconiumX >
That works
20:52
<
cr1901_modern >
awygle: Yea I'm thinking of joining the Cool Kids and reinstalling Racket as well
20:53
<
awygle >
I have been meaning to try out SMT based code generation on a particular problem
20:53
<
awygle >
Was gonna try this thing that expressed x86 semantics in z3 in python
20:54
<
cr1901_modern >
Python bindings are hit or miss for me
20:54
<
cr1901_modern >
when they work, they're great. But getting them installed (on _Linux_, mind you) can be a pain. I don't remember the details
20:54
<
cr1901_modern >
so for once this isn't a Windoze problem
20:55
<
ZirconiumX >
Now I have the fun of writing a 1024-bit popcount.
20:56
<
cr1901_modern >
in mnigen?
20:56
<
cr1901_modern >
err, nmigen
20:58
<
whitequark >
ZirconiumX: literally just `sum(value)`
20:58
<
ZirconiumX >
...Yeah, but what on earth does that synthesise to?
20:58
<
whitequark >
try it?
21:01
<
ZirconiumX >
RecursionError
21:02
<
whitequark >
yeah, sec
21:02
<
cr1901_modern >
1024-bit popcount: 512 1-bit full adders, 256 2-bit full adders, 128 4-bit full adders, etc
21:02
<
whitequark >
sys.setrecursionlimit(10240)
21:03
<
whitequark >
the binary tree of adders might work better tho
21:03
<
whitequark >
not sure
21:04
<
cr1901_modern >
I don't even want to think about optimizing that damn thing tho
21:04
<
ZirconiumX >
I'm expecting the actual number of values to be < 256, though...
21:05
<
ZirconiumX >
5 seconds just for this :P
21:06
<
cr1901_modern >
Then you write out the 256 values you care about into a table, mark the other 2^1024 - 256 as-don't cares, and do a 1204-bit K-map :)
21:06
<
cr1901_modern >
1024*
21:06
<
whitequark >
cursed
21:06
<
ZirconiumX >
Not quite what I meant, but sure
21:06
<
ZirconiumX >
Answer: 2143 SB_LUT4s and 12 SB_CARRYs
21:08
<
ZirconiumX >
Rather I meant that "I'm expecting at most 256 populated bits within the 1024-bit input"
21:09
<
ZirconiumX >
# Ask not what your stack can do for you, ask what you can do for your stack
21:14
<
daveshah >
Does it need to be single-cycle?
21:15
<
ZirconiumX >
I suppose not, but it's going to be used pretty often
21:15
<
ZirconiumX >
At least for testing
21:16
<
daveshah >
I guess an iterative 1024 cycle approach would be no good then
21:17
<
whitequark >
this is one of those things you would use retiming for, right?
21:17
<
daveshah >
Yeah, stick a few registers afterwards and let the tool put them in the best place
21:18
<
daveshah >
Some tools might even be able to infer cr1901_modern's tree structure
21:18
<
daveshah >
(although that is balancing rather than retiming)
21:18
<
cr1901_modern >
I can't fathom that the tree structure is timing friendly if you need single cycle output
21:19
<
whitequark >
well it sure as heck is better than my structure
21:19
<
whitequark >
which is a 1024 bit long chain of increasingly large adders
21:19
<
whitequark >
specifically the output is 1025 bits long because of nmigen integer promotion rules
21:20
<
ZirconiumX >
Eddie's static timing analysis gives a
*pure logic* delay of 8ns :P
21:21
<
ZirconiumX >
(ice40HX)
21:23
<
ZirconiumX >
Wonder if setting the intended output width to 8 bits persuades Yosys to chop off some bits
21:23
<
ZirconiumX >
Answer: yes
21:24
<
daveshah >
8ns seems like there might be some kind of tree going on already
21:25
<
ZirconiumX >
Well, we're deep in the middle of "autoname has no idea what to do" land
21:25
<
ZirconiumX >
1116 o_SB_DFF_Q_D_SB_LUT4_O_I1_SB_LUT4_O_I3_SB_LUT4_O_I2_SB_LUT4_O_I1_SB_LUT4_O_I3_SB_LUT4_O_I1_SB_LUT4_O_I0_SB_LUT4
21:25
<
ZirconiumX >
_O_I3_SB_LUT4_O_I3_SB_LUT4_O_I2_SB_LUT4_O (SB_LUT4.I3->O)
21:25
<
daveshah >
How long is the longest path according to ltp?
21:26
<
daveshah >
Hmm, sounds a lot like a tree structure
21:27
<
ZirconiumX >
Wonder if ABC9 does any better here
21:27
<
daveshah >
As it is mostly pure logic with only a few carries, wouldn't expect a big difference
21:28
<
ZirconiumX >
So it's notable
21:30
<
daveshah >
So, looks like Yosys packs the whole chain into a $macc cell and then maccmap as part of techmap converts that into a tree
21:30
<
daveshah >
rarely, Yosys is cleverer than expected
21:31
<
ZirconiumX >
ltp with ABC9 is 23
21:31
<
ZirconiumX >
So it packed it slightly better
21:31
<
ZirconiumX >
Let's see how flowmap does!
21:33
<
ZirconiumX >
Better than ABC1 (7.6ns) and same depth as ABC9 (23), and not
*that* much worse area-wise
21:42
<
ZirconiumX >
I'm reading through the chess-programming wiki and there's a bit trick to turn a 2^N - 1 array of things to popcount into an N array of things to popcount after some bit manipulation
21:44
<
ZirconiumX >
So if I have 16 64-bit things to popcount (= 1024 bits), that can be turned to 4 64-bit things to popcount (= 256 bits)
21:54
<
tpw_rules >
don't you mean 5?
21:55
<
ZirconiumX >
You can apply the 3->2 trick again
22:15
Asu has quit [Ping timeout: 256 seconds]
22:43
futarisIRCcloud has quit [Quit: Connection closed for inactivity]