Saturday, 2019-02-09

*** tpb has joined #tomu00:00
xobsmithro: I took a stab at refactoring some of the tests yesterday. I got all the "rx" tests to pass, but I had to move from toggling "CE" to adding a "i_valid" signal, because otherwise the "o_put" signal would get stuck.01:19
mithroHrm?01:21
mithroGot the diff somewhere?01:21
xobshttps://github.com/xobs/valentyusb/commit/d8e03e0c13be32b58cc67aa7709cb9172d98b279 (and https://github.com/xobs/valentyusb/commit/21b3234f0ed77ddba0936d43b412efe5ba864b9e (and to a lesser extent https://github.com/xobs/valentyusb/commit/fd7de9f959a91d2ffc9dd12c8b0d35bd4ec5cf3c))01:22
tpbTitle: usbcore: rx: shifter: BREAKING CHANGE: add `i_valid` signal · xobs/valentyusb@d8e03e0 · GitHub (at github.com)01:22
mithroxobs: you probably don't want to do that if I understand correctly01:24
xobsmithro: why not?01:25
mithroIt will take about 3 to 4 times the logic unless the optimiser is clever01:25
xobsHmm... but the trick of just stopping the clock doesn't work, because e.g. the "data ready" line won't go high if the last bit is stuffed.01:27
xobsLikewise, if the second-to-last bit is stuffed, then the "o_put" line will go high for an extra cycle, due to the synchronizer being stalled01:28
mithroThe bitstuffer effectively causes the shifter to never "see" the stuffed bits01:29
mithroIt should be stalling the *whole* pipeline after it01:29
xobsSo the tests are wrong?01:30
mithroLikely01:30
mithroI wouldn't trust the tests any more than I would trust the code :-P01:32
mithroLuke's code originally used your i_valid approach01:32
mithroWhich is possible why it seemed like it was the right solution?01:32
mithroThe flipflops have 3 input signals, D, SR, CE01:33
mithroSo, doing things like stalling or resetting a pipeline tend to be pretty logic efficient01:37
mithroThe optimisers tend to be pretty good at trying to make stuff into those - so maybe it doesn't matter...01:39
mithroThe i_valid signal (rather than using CE) is a pretty ASIC method of doing things01:40
mithroWhich makes sense given that the CE stuff can be a lot harder to get right01:42
mithroSpecially around resets...01:44
mithroxobs: makes sense?01:44
xobsThat makes sense.  I think the edge cases the tests were finding were related to that 0x1c bug we saw.01:46
mithroPossibly01:46
mithroI can't remember the exact symptoms01:50
xobsBasically, I think the sentinal approach is incompatible with the CE approach.  I suspect we might have a similar problem in the tx path.01:57
mithroxobs: sentinel?03:51
xobsmithro: where the "o_put" signal is tied to a 1 that marches down a counter03:52
mithroxobs: definitely works, I had it working before03:54
mithroYou just need to be careful about when you are checking for the put03:55
mithroYou need it one cycle before you think you need it03:55
*** futarisIRCcloud has quit IRC03:56
mithroxobs: the old Migen simulator is a bit weirr04:05
mithroWeird04:05
*** futarisIRCcloud has joined #tomu04:37
*** futarisIRCcloud has quit IRC06:56
*** futarisIRCcloud has joined #tomu08:09
*** xkapastel has joined #tomu12:04
*** futarisIRCcloud has quit IRC12:16
*** andi- has quit IRC12:31
*** andi- has joined #tomu12:39
*** AmosSam has left #tomu12:44
*** AmosSam has joined #tomu12:45
*** andi- has quit IRC12:48
*** andi- has joined #tomu12:57
*** xkapastel has quit IRC14:14
*** AmosSam has left #tomu16:08
*** AmosSam has joined #tomu16:13
*** asymmetric has joined #tomu17:57
asymmetrichi! i'm trying to use tomu as a u2f key on github but it's not working17:57
asymmetrici built the firmware and used dfu-util17:57
asymmetricalthough the instructions for dfu-util on tomu.im differ from the ones on gl-sergei/u2f-token17:58
asymmetricthe -d 1209:70b1 is missing17:58
asymmetrici also added the udev rules17:59
asymmetricany idea how to debug what's not working?17:59
asymmetrici tried github on both chromium and firefox17:59
asymmetric(i'm on a nixos linux machine)17:59
asymmetricalso the idVendor in the udev rule is different18:09
asymmetricand it seems the one on the github project is correct for my key18:09
asymmetricis this normal?18:09
*** asymmetric has quit IRC19:07
*** asymmetric has joined #tomu19:13
*** asymmetric has quit IRC19:37
*** asymmetric has joined #tomu19:39
asymmetrichttps://github.com/gl-sergei/u2f-token/issues/2120:14
tpbTitle: Different udev rules · Issue #21 · gl-sergei/u2f-token · GitHub (at github.com)20:14
*** gio has quit IRC20:29
*** xkapastel has joined #tomu20:30
*** gio has joined #tomu20:31
*** gio has quit IRC20:42
*** gio has joined #tomu20:47
*** asymmetric has quit IRC21:40

Generated by irclog2html.py 2.13.1 by Marius Gedminas - find it at mg.pov.lt!