whitequark changed the topic of #glasgow to: glasgow debug tool · code https://github.com/GlasgowEmbedded/Glasgow · logs https://freenode.irclog.whitequark.org/glasgow
<esden> Tnt you should make small tubes for the led guide like they did here: https://youtu.be/I6iSovdd1Nc
<esden> But the high aspect ratio hole might be problematic. Not sure...
hellsenberg has quit [Ping timeout: 245 seconds]
hellsenberg has joined #glasgow
karlyeurl has quit [Ping timeout: 268 seconds]
pie_ has quit [Ping timeout: 252 seconds]
karlyeurl has joined #glasgow
karlyeurl has quit [Ping timeout: 258 seconds]
jcreedon3 is now known as jcreedon
karlyeurl has joined #glasgow
asy_ has joined #glasgow
_whitelogger has joined #glasgow
_whitelogger has joined #glasgow
pie_ has joined #glasgow
pie_ has quit [Remote host closed the connection]
pie_ has joined #glasgow
pie__ has joined #glasgow
pie_ has quit [Ping timeout: 250 seconds]
<electronic_eel> whitequark: about the PCA6408 on the test jig - would have preferred to use it
<electronic_eel> but it has only one addr pin - address clash with the ones on glasgow
<electronic_eel> so I used the TCA9534 as it is on revC0, so you already have written software support
pie__ has quit [Ping timeout: 250 seconds]
HexGlaze has quit [Ping timeout: 245 seconds]
HexGlaze has joined #glasgow
_whitelogger has joined #glasgow
pie__ has joined #glasgow
pie__ has quit [Ping timeout: 252 seconds]
<tnt> Arf, just my luck, I have a 93c66 to program and it's neither I2C or SPI :/
<hellsenberg> I thought these were i2c, but now that I checked it looks like something else
<tnt> Yeah "microwire"
<electronic_eel> looks like spi to me, but with different commands than normal
<electronic_eel> ah, their cs is active-high. weird stuff
<tnt> Also it has a 'start bit' ...
owo_uwu_owo has joined #glasgow
owo has quit [Ping timeout: 272 seconds]
owo_uwu_owo has quit [Quit: Leaving]
owo has joined #glasgow
<whitequark> electronic_eel: ah, crap :/
<whitequark> tnt: re microwire. I looked at adding support for it. I have some of those devices.
<whitequark> but I've been busy lately, so no hard guarantees.
<whitequark> it's hard for me to switch between tasks like that.
<whitequark> it'll be supported eventually.
<tnt> whitequark: I'll probably hack something together so I can read/write it ... but I need to figure out that cksum algorithm first :/
<tnt> Anyone know what Agilent could have used as checksum in the 90s or so. ( 32 16-bit values in a 93c66, the last one probably being the checksum)
<whitequark> tnt: try the python crcmod module
<whitequark> well, probably try 2's and 1's complement first
<electronic_eel> whitequark: yeah, the vccio of the PCA6408 is a good idea, don't know why they didn't add more addresses
<electronic_eel> about the i2c pullups - I increased them, but I fear that there could be false pulses detected during connection
devanagram has left #glasgow [#glasgow]
<electronic_eel> so I think it is better to do the whole plugging in of the dut without power
<electronic_eel> my idea is to have a power switch which disconnects the whole power from the jig and dut
<electronic_eel> the operator puts in the dut and then flips the switch
<electronic_eel> autodetection logic in the glasgow cli will find the new board and automatically connect to it and starts the test cycle
<electronic_eel> so you don't have a button you press, but a switch you flip
<electronic_eel> it will also help if the operator sees smoke - he can immediately switch off power
<electronic_eel> good idea?
<whitequark> yup
<electronic_eel> ok, will change it, is just a few pins
<electronic_eel> esden: I drew up schematics for the test jig. please have a look if that all makes sense to you
pie__ has joined #glasgow
<kc8apf> tnt: feed some observed values into http://reveng.sourceforge.net/
<tnt> kc8apf: I don't think it's a CRC. I think it's something simpler.
<tnt> I have 2 dumps, one valid and one where I suspect there is a small corruption. The only idfference in the data is the serial number of the board and the checksum values are very close to each other.
<whitequark> kc8apf: ooooh that's super neat
<whitequark> I looked for a tool like that but never found any
<kc8apf> Sum every byte and truncate result to desired width was pretty common for a while
<tnt> kc8apf: yeah, must be something like that because doing it for both the good and what I think is a 'fixed' bad image (i.e. the bad image where I fixed the byte which I think is wrong), and including the checksum, the sum comes up to the same value ... but it's not 0xffff or 0x0000 or anything 'recognizable'.
<tnt> but still it'd be weird if this was just a coincidence.
<whitequark> it could be an arbitrary value, like a "crc residue"
<gruetzkopf> neat
<gruetzkopf> this will be quite useful to me once i get a certain bus sniffer working
<tnt> whitequark: yup, that's what I'm guessing. So I will flash my "hopefully fixed" eeprom image and see if that works out.
<tnt> but I need to finish writing microwise and 93xx support first.
pie__ has quit [Ping timeout: 252 seconds]
<tnt> So in migen is x[0] the MSB or LSB ?
<whitequark> tnt: like in Python, so LSB
<tnt> whitequark: Ok, thanks.
<tnt> whitequark: I'm reading the spi master code atm and more specifically the clkgen part and something is bothering me
<tnt> The whole state machine can get held up if for some reason the fifo (in/out) are not ready. Which makes sense. However AFAICT the SCK edge won't be paused and will still happen ...
<tnt> I must be missing something.
<whitequark> tnt: without looking again at the code: it is 100% possible that the SPI master applet is buggy.
<whitequark> in fact, rewriting it in a more principled way has been on my TODO list for a while.
<whitequark> mostly so that it can support IOB registers..
<whitequark> tnt: wait
<whitequark> self.comb += self.clkgen.reset.eq(~self.fsm.ongoing("TRANSFER")),
<tnt> self.comb += self.clkgen.reset.eq(~self.fsm.ongoing("TRANSFER")),
<whitequark> yeah
<tnt> yeah ... just saw that.
pie__ has joined #glasgow
pie__ has quit [Ping timeout: 250 seconds]
<tnt> There was a built-in logic analyzer to debug applets right ? How does that work ?
<whitequark> glasgow run --trace trace.vcd ...
<whitequark> it's fully automatic
<whitequark> note that noise on undriven inputs tends to exhaust buffers super fast
<tnt> Thanks.
<whitequark> btw, anyone here interested in helping me port applets to nmigen?
<whitequark> this isn't yet *quite* easily doable, there are still a few (but only a few) core modifications needed
<tnt> I guess I can have a look for the applets I use (mostly ice40 / spi).
<tnt> I've never used nmigen though