Current Server Time: 23:48 (Central Europe)

#apertus IRC Channel Logs

2016/02/06

Timezone: UTC


01:24
GrahamM
left the channel
02:02
slikdigit
left the channel
02:04
Bertl_oO
comradekingu: not yet
02:04
Bertl_oO
off to bed now ... have a good one everyone!
02:04
Bertl_oO
changed nick to: Bertl_zZ
03:58
John_K`
changed nick to: John_K
06:05
gnufan
joined the channel
07:04
jucar
joined the channel
07:28
jucar
left the channel
08:08
intracube_
changed nick to: intracube
08:40
John_K
hello
08:42
LordVan
joined the channel
08:47
intracube
comradekingu: you don't need a voucher for the first payment
08:52
John_K
Bertl_zZ: when you're around, I have a svf for the lattice now, with icsp.bit loaded I can't seem to figure out how you load it
08:53
John_K
I assumed it would be pic_jtag_flash.py but it errors out on the first i2c write
08:53
John_K
by "how you load it" I mean, how you program the svf to the Lattice
08:59
intracube
comradekingu: I mean, you don't need to enter it
09:18
jucar
joined the channel
09:22
Bertl_zZ
changed nick to: Bertl
09:22
Bertl
morning folks!
09:23
Bertl
John_K: you need to use the .jed file for the pic_jtag_flash.py
09:23
John_K
aha
09:23
Bertl
but you also need to adapt the script to the 640HC
09:23
John_K
it's still dieing before that on the first i2c write
09:23
John_K
let me gist it
09:24
Bertl
I have to run to the post office to get a package, I'll be back in half an hour or so
09:24
John_K
ok I'll likely be gone by then
09:24
John_K
but will check channel later
09:24
Bertl
hmm, okay, what output do you get?
09:26
John_K
https://gist.github.com/anonymous/2830eecf8ab10f2892a1
09:27
Bertl
ah, you get the error on the pic_jtag_id?
09:27
jucar
left the channel
09:28
John_K
it's pretty much the same on _prog
09:28
John_K
err _flash rather
09:28
Bertl
did you select one of the FPGAs with ./icsp_sel.py
09:28
Bertl
option A or B is valid
09:28
John_K
yes, that's in there
09:28
John_K
B
09:29
John_K
this is the code that's dieing:
09:29
John_K
i2c = SMBus(2)
09:29
John_K
i2c.write_byte(0x38, 0x01) # TDO_W input
09:29
Bertl
i2cdetect -r -y -a 2 ?
09:29
Bertl
without the '?'
09:29
John_K
looks fine
09:30
John_K
70 in lower left
09:30
Bertl
that's all?
09:30
John_K
yes
09:30
Bertl
if you have the pic programmed, it should show entries in row 10 and 30 as well
09:30
John_K
one sec
09:30
Bertl
(if the mux (70) is steered properly)
09:31
John_K
hrm
09:31
John_K
i re-programmed the pic to be sure, it programs fine but i2cdetect still returns the same thing
09:31
John_K
channel A looks to work
09:31
John_K
I get things in row 10 and 20
09:31
Bertl
10 and 30
09:32
John_K
yes
09:32
John_K
and jtag id works there
09:32
Bertl
so that bus/pic is working
09:32
John_K
so, it looks like there is an issue with PIC A?
09:32
Bertl
note that you need to program both pics
09:32
John_K
it programs just fine
09:32
Bertl
does it detect the pic fine as well?
09:33
Bertl
./icsp_picid.py
09:33
John_K
hrm, after I did that, picB now seems to work
09:33
John_K
very weird
09:34
Bertl
./icsp_picid.py A
09:34
John_K
I had to switch to A, query it, then switch back and now B gives correct results on i2cdetect and pic_jtag_id
09:34
Bertl
./icsp_picid.py B
09:34
John_K
they both work fine
09:34
John_K
now, anyway
09:35
Bertl
okay, then the flash should work as well, but you need to adapt it to the 640HC first
09:35
John_K
ok I think things are ok now
09:35
John_K
the flash script?
09:35
Bertl
yep, it wasn't tested yet with anything but a 2000
09:35
John_K
it has a 640hc devid in it
09:36
Bertl
yes, I added this for the future :)
09:36
John_K
any advice on what I'd need to change / look for?
09:36
John_K
ah :)
09:37
Bertl
page numbers, feature row comes to my mind
09:37
Bertl
anyway, really have to run now ... bbl
09:37
Bertl
changed nick to: Bertl_oO
09:39
John_K
ok, thanks
09:47
John_K
Bertl_oO: can you post your Jtag class? the jtag.py in /root doesn't have the Jtag class required by the pic_jtag_flash.py
09:47
John_K
I'm off to bed, will pick this up in 7 hours or so
09:53
aombk2
joined the channel
09:56
aombk
left the channel
10:28
LordVan
left the channel
10:41
Bertl_oO
changed nick to: Bertl
10:41
Bertl
back now ...
11:48
se6astian|away
changed nick to: se6astian
12:49
Bertl
off for a little ... bbl
12:49
Bertl
changed nick to: Bertl_oO
14:14
gnufan
left the channel
15:45
se6astian
changed nick to: se6astian|away
18:22
LordVan
joined the channel
18:25
Bertl_oO
changed nick to: Bertl
18:25
Bertl
back now ...
18:28
Bertl
John_K: ping me when you're around, I've updated most of the code for flashing the fpgas (should now work for the 640 as well)
18:32
jucar
joined the channel
19:13
John_K
Bertl: hi
19:14
Bertl
hey, grab everything from ICSP
19:15
Bertl
then start with ./pic_jtag_id2.py
19:18
John_K
ok
19:18
Bertl
if that identifies and outputs proper info, the other files should work as well
19:19
Bertl
I switched from using the .jed file to an intermediate state where you generate .cfg and .ufm from the .svf.flash
19:19
John_K
ok, will get things setup and test
19:20
John_K
so the tools generate either a jedec or bitstream
19:20
John_K
you need to use a separate tool to generate svf
19:20
Bertl
correct, you got my makefile?
19:20
John_K
unless you're doing it differently somehow
19:20
John_K
apparently not
19:20
Bertl
ah, I see, sec
19:21
Bertl
btw, do you have some way to check that the FPGA works as intended? i.e. some logic analyzer or PMOD debug module or center solder on?
19:24
Bertl
http://vserver.13thfloor.at/Stuff/AXIOM/BETA/LATTICE/
19:26
John_K
I can hookup a LA
19:26
Bertl
okay, just checking ...
19:27
John_K
I may be interested in implementing some code in that CPLD, we should talk about goals for it at some point
19:27
Bertl
sure, no problem
19:27
Bertl
it is also possible to run code on the PICs to some extend
19:28
Bertl
they have some connectivity throughout the main board
19:28
John_K
I'm more interested in the global shutter trigger that's hooked up to RFE
19:29
Bertl
it was one of the basic ideas to provide different programmable parts with the Beta so that crazy (or not so crazy) ideas can be realized
19:29
John_K
in the current state you could just replace PIC+CPLD with 5 wires
19:29
Bertl
yep, similar in the dummy interface board, which currently is "just wires"
19:29
John_K
true
19:29
Bertl
(and will be replaced by a proper FPGA solution later)
19:35
Bertl
ah, I forgot, I updated the PIC code, you have a new i2c_slave.c there, you need to build and programm it into the pics first
19:35
Bertl
cd /opt/PIC/PIC16/PIC16F1718/
19:35
Bertl
update the file and run make
19:39
John_K
aha thanks
19:40
John_K
oh, the code is already in the image, it just needs to be recompiled?
19:40
Bertl
yeah the i2c_slave.c needs to be updated though
19:42
John_K
ah, in the ICSP dir, got it
19:49
John_K
wrestling with flexlm on linux
19:50
Bertl
yeah, that's always annoying
19:50
John_K
I was using the windows version yesterday, just installed it in my linux machine to use your makefiles
19:50
John_K
and it doesn't want to seem to parse the new license file I got for it
19:51
John_K
checking to see if I need to install flexlm on its own or something
19:51
John_K
does synplify need to be licensed other than via "free diamond license"?
19:52
Bertl
everything should work with the free license
19:52
Bertl
but you can run the svf generating command on windows as well I guess?
19:52
John_K
ok, did you have to start a license server or set an environment variable?
19:52
Bertl
yes, I set a bunch of environment variables
19:53
John_K
ahh
19:53
Bertl
let me upload the script for that
19:53
John_K
many thanks
19:54
Bertl
http://vserver.13thfloor.at/Stuff/AXIOM/BETA/LATTICE/env.sh
19:55
LordVan
left the channel
20:05
John_K
well I had to install lsb, just to get lmutil to even start
20:08
Bertl
you can be happy that they support 64bit and you don't have to mess with 32bit libraries as well :)
20:08
John_K
well this is sort of that
20:08
John_K
ldd said all of the libraries were present, internet hinted at lsb
20:43
John_K
gah this still isn't working
20:43
John_K
&$%& DRM licensing crap
20:48
Bertl
shall I generate the .svf for 640HC for you?
20:49
Bertl
(i.e. evil ascii blob :)
20:51
John_K
if you wouldn't mind :)
20:51
John_K
will try spinning up a RedHat VM to see if Lattice crap works in that
20:52
Bertl
I'm using it on mageia, not a problem there
20:52
Bertl
was also testing centos in a container (worked as well)
20:52
John_K
mageia?
20:52
John_K
ok I'll try centos
20:53
jucar
left the channel
20:54
Bertl
http://vserver.13thfloor.at/Stuff/AXIOM/BETA/LATTICE/640/
20:55
Bertl
what version is your main board?
20:58
John_K
0.33
20:58
Bertl
okay, then those are fine
20:59
Bertl
what you do now is the following:
20:59
Bertl
you use the svf2cfg.gawk and svf2ufm.gawk to create two files
21:00
Bertl
gawk -f svf2cfg.gawk pass.svf.flash >pass.cfg
21:00
Bertl
gawk -f svf2ufm.gawk pass.svf.flash >pass.ufm
21:00
Bertl
both should have one line per flash page/row for your device
21:01
Bertl
hmm, sec, is it a 640 or 640U?
21:03
John_K
640HC i believe
21:05
John_K
# python pic_jtag_id2.py
21:05
John_K
found MXO2-640HC [00000001001010111001000001000011]
21:05
John_K
usercode 00000000 [00000000000000000000000000000000]
21:05
John_K
traceid 00:443307090C5242 [00000000:01000100001100110000011100001001000011000101001001000010]
21:05
John_K
looks good
21:07
John_K
which file do I pass first to pic_jtag_prog?
21:07
Bertl
sec, I think they are wrong
21:07
John_K
ok
21:10
Bertl
okay, was a bug in the makefile
21:10
Bertl
I've update the makefile and the resulting files
21:11
John_K
any way we can throw these into git?
21:11
John_K
it's a bit of a pain to sync the website all the time
21:11
Bertl
I will do that soon
21:11
John_K
ok
21:11
John_K
happy to help there as well
21:12
John_K
so i'll re-download the binaries for the 640
21:12
Bertl
only the svf.flash is relevant for now
21:12
Bertl
you process it as explained and get two files
21:12
Bertl
1151 1151 37983 pass.cfg
21:13
Bertl
192 192 6336 pass.ufm
21:13
John_K
right
21:13
John_K
did that
21:13
Bertl
./pic_jtag_prog.py pass.cfg pass.ufm
21:13
Bertl
will flash the FPGA with the config and usermem
21:14
Bertl
you might need to adjust the feature row after that, but the default should be fine in this case
21:15
Bertl
you can check the result with pic_jtag_dump.py
21:16
Bertl
note that you only want to program the RFE (sel B)
21:17
John_K
ok
21:20
Bertl
if you just want to test code, you can use the pic_jtag_sram.py (not optimized yet) to upload the data to the SRAM
21:20
John_K
ok
21:20
John_K
so this all looks good
21:20
Bertl
the lattice FPGAs have a surprisingly low rewrite count for their flash (~ 10k)
21:27
John_K
hrm, if I attach the sensor to the system now, I get a ton of emmc1 spew to the console
21:27
John_K
mmc1 rather
21:27
John_K
I seem to remember you saying that's normal and that I should disable it? is that right?
21:28
John_K
only seems to happen when I attach the sensor though
21:44
Bertl
interesting, the sensor should have no effect on that
21:45
John_K
sensor locates in the bottom left of the socket correct?
21:45
Bertl
top left
21:52
John_K
# ./cmv_init.sh
21:52
John_K
0x0000026F
21:53
Bertl
\o/
21:53
Bertl
so now we are right there where we left of two weeks ago :)
21:54
John_K
hah, yep
21:54
Bertl
next step is to train the LVDS
21:54
Bertl
./cmv_train3 -a
21:55
Bertl
upload the output to a pastebin please
21:55
John_K
of course
21:55
John_K
https://gist.github.com/anonymous/31dac6d8858cd0ea0117
22:01
Bertl
excellent
22:01
Bertl
everything seems to be working fine
22:01
John_K
\o/
22:01
John_K
does cmv_snap3 have the ability to capture pixels to a file?
22:02
Bertl
yes, but I would suggest that you now reactivate the startup scripts
22:02
John_K
ah yes
22:02
Bertl
or alternatively start them manually
22:03
Bertl
they will activate live HDMI out (doesn't matter if you have a plugin module inserted or not :)
22:04
Bertl
and you should be able to check that everything is working with ./cmv_perf3
22:04
Bertl
(which gives you the frame rates)
22:04
John_K
trying to figure out what I did when I deactivated the systemd service
22:05
Bertl
probably just an exit 0, at least that is what I would have suggested :)
22:06
John_K
I think i removed the file
22:06
Bertl
/etc/systemd/system/cmv12k.service ?
22:06
John_K
gone
22:07
Bertl
bad boy
22:07
John_K
:P
22:07
John_K
is it short enough to pastebin?
22:07
John_K
or should I just re-image?
22:08
Bertl
http://pastebin.com/raw/d5TNuUpX
22:08
Bertl
nevertheless double check /root/kick.sh for exit 0 :)
22:10
John_K
ok rebooting
22:12
John_K
so what needs to be done manually now that we've re-enabled this?
22:13
Bertl
not much, try the ./cmv_perf3 on the camera
22:13
Bertl
it should give you 60FPS HDMI and probably 10-15FPS for the sensor
22:13
John_K
I don't have HDMI attached
22:14
Bertl
as I said, doesn't matter
22:14
John_K
it just prints this and I can't ctrl+c it
22:14
John_K
# ./cmv_perf3
22:14
John_K
mapped 0x60000000+0x00400000 to 0x60000000.
22:14
John_K
mapped 0x80000000+0x00400000 to 0x80000000.
22:14
Bertl
double check that the kick.sh was activated
22:15
Bertl
when access to the registers hangs, it is usually because the firmware is missing
22:15
John_K
yeah I've seen that
22:15
John_K
how do I tell if kick has run?
22:15
Bertl
systemctl status cmv12k
22:16
John_K
hrm
22:16
John_K
https://gist.github.com/anonymous/503950c537e01c7c7cbd
22:16
John_K
training doesn't appear to have worked
22:17
Bertl
get the full logs
22:17
John_K
zynq is at 86c
22:17
Bertl
you have some heat sink/fan attached, yes?
22:17
John_K
not yet
22:17
Bertl
then I would suggest doing that
22:17
John_K
of course
22:18
Bertl
the zynq will go up to 130°C and then reboot :)
22:18
Bertl
journalctl -u cmv12k
22:20
John_K
https://gist.github.com/anonymous/dc54c81251e2278c8fe3
22:22
John_K
looks like the power isn't coming up correctly
22:25
Bertl
why do you conclude that? power looks fine in the first dump
22:26
Bertl
but there is no CMV temperature
22:26
John_K
yes it does, I was looking at the wrong dump
22:26
Bertl
this might be related to the missing feature bits
22:26
Bertl
try the following on the RFE
22:27
Bertl
./pic_jtag_feat.py 0000000000000000 0620
22:28
John_K
sec, need to stop kick to do that
22:29
John_K
https://gist.github.com/anonymous/b8b95c10e08576199965
22:30
Bertl
okay, try a reboot now
22:32
John_K
still no dice
22:32
John_K
bit pattern of 0's
22:32
John_K
hrm I don't think i re-flashed the PIC
22:33
Bertl
bad boy, again! :)
22:33
Bertl
but that is not the problem here
22:33
Bertl
the problem is that the RFE doesn't come up properly
22:34
John_K
does the training rely on the RFE?
22:34
Bertl
it relies on communicating with the sensor
22:34
Bertl
i.e. on the SPI bus
22:34
John_K
so the RFE came up when we did it manually
22:34
Bertl
in your log, the CMV reports 0000 as temp
22:35
Bertl
0x0000026F -> 0x00000000
22:37
Bertl
so, either the FPGA is kept from initializing (because of bad inputs)
22:37
Bertl
or it was not flashed properly
22:38
John_K
so I took the latest sfv.flash that you gave and generated new files
22:38
John_K
[root@beta 640]# openssl sha1 pass.svf.flash
22:38
John_K
SHA1(pass.svf.flash)= a8a209b81042d3b084deca83940ac06c70f3a1fd
22:39
Bertl
4e8c703ecb76d31a500f044932165c0f /tmp/pass.cfg
22:39
Bertl
ff1188444f287a9e407d47966d91aced /tmp/pass.ufm
22:40
John_K
mine are diff
22:40
John_K
one sec, let me regen
22:40
Bertl
sorry, those are md5
22:41
John_K
md5's match
22:41
Bertl
./icsp_sel.py B
22:41
Bertl
./pic_gpio.py
22:43
John_K
https://gist.github.com/anonymous/131f49c643fd44703a88
22:43
John_K
wait wrong script
22:43
John_K
I don't have pic_gpio.py
22:44
John_K
I should
22:44
John_K
one sec
22:44
Bertl
quick, get it :)
22:44
John_K
I swear I mirrored that
22:47
John_K
https://gist.github.com/John-K/7272794004b842c0546b
22:48
Bertl
. ./i2c2.func
22:49
Bertl
i2c2_set 0x38 0x01
22:49
Bertl
i2c2_set 0x39 0xFE
22:49
Bertl
./pic_gpio.py
22:50
John_K
https://gist.github.com/John-K/7272794004b842c0546b
22:50
John_K
appended
22:52
John_K
only C* values appear to have changed
22:53
Bertl
yeah, INITN and DONE should go high when the RFE initializes
22:54
John_K
ah, so RFE isn't initializing correctly
22:54
Bertl
yes, for whatever reason
22:54
John_K
shall I dump it?
22:55
Bertl
yes, please
22:57
John_K
https://gist.github.com/John-K/1dd8279fcbd263ee9f96
22:57
John_K
dump script seems to not be 640 aware
22:57
John_K
looks like its dumping a lot of extra data
22:58
Bertl
yeah, I got the page count wrong :)
22:59
John_K
that's just in the dump though I think
22:59
Bertl
please update mxo2.py