It's okay, I don't need compatibility this time around. I just want need performance better than what a telnet to the ROACH can give me. Future revisions of this project will be on a custom board anyways....

Thanks for all of your (collective) help.  Problem solved... for now ;-)

--Ryan

On 03/18/2013 11:16 PM, Jason Manley wrote:
You can only use tcpborphserver's katcp interface if you program the FPGA through that 
too. If you program the FPGA "behind its back" (ie from the command line), then 
you can't read/write registers over katcp.

I strongly advise you to use katcp in your new design, because BORPH is not 
provided with ROACH-2 and will probably not be provided with ROACH-3 etc. So if 
you want forwards compatibility, I recommend katcp for all your interfacing.

Jason

On 19 Mar 2013, at 00:11, Ryan Monroe wrote:

Hi David, thanks for the response!

I guess I wasn't really sure which ioreg_mode value corresponded to which, so I just tried 
them both.  So <1=binary> and <0=ascii>.  Armed with that knowledge (plus your 
mad BASH chops), I successfully controlled some registers through BORPH. Still no luck in 
ASCII mode, but I don't really need it.  Also, tcpborphserver didn't work when I programmed 
the ROACH through BASH.  See below:

(tcpborphserver fails)
$ telnet 192.168.1.92 7147
Trying 192.168.1.92...
Connected to 192.168.1.92.
Escape character is '^]'.
#version poco-0.1
#build-state poco-0.2804
?read spec_count 0 4
#log error 4294538676790 poco register\_spec_count\_not\_found
!read fail program


(successful write)
root@roach:/proc/618/hw/ioreg# echo 1 > ../ioreg_mode
root@roach:/proc/618/hw/ioreg# echo -en "\x00\x00\x01\x00" > acc_len_m1
root@roach:/proc/618/hw/ioreg# echo -en "\x00\x00\x00\x01" > acc_always_valid
root@roach:/proc/618/hw/ioreg# echo -en "\x00\x00\x00\x01" > acc_sw_rst
root@roach:/proc/618/hw/ioreg# echo -en "\x00\x00\x00\x00" > acc_sw_rst
root@roach:/proc/618/hw/ioreg# cat spec_count
Lroot@roach:/proc/618/hw/ioreg# cat -An spec_count
     1    ^@^A^UBroot@roach:/proc/618/hw/ioreg#
root@roach:/proc/618/hw/ioreg# cat spec_count | hd
00000000  00 05 d1 4d                                       |...M|
00000004


Looks good!  Thanks everyone

--Ryan

On 03/18/2013 02:49 PM, David MacMahon wrote:
Hi, Ryan,

On Mar 18, 2013, at 2:21 PM, Ryan Monroe wrote:

root@roach:/proc/618/hw/ioreg# echo 0 > ../ioreg_mode
root@roach:/proc/618/hw/ioreg# echo -e \x00\x00\x00\x00 > acc_always_valid
-bash: echo: write error: Invalid argument
You need to either double up the backslashes or put the \x00\x00\x00\x00 in 
quotes.  Also adding -n is probably needed to suppress the newline.  I think 
the invalid argument error is due to writing too many bytes (when ioreg_mode is 
0).

root@roach:/proc/618/hw/ioreg# echo 1 > ../ioreg_mode
root@roach:/proc/618/hw/ioreg# echo -e \x00\x00\x00\x00 > acc_always_valid
root@roach:/proc/618/hw/ioreg# cat acc_always_valid
x00xroot@roach:/proc/618/hw/ioreg#
Here the shell ate the backslashes so you as before you tried to write "x00x00x00x00" to 
the register.  I guess ioreg_mode of 1 is more tolerant of trailing data, so only the first 4 
bytes, "x00x" got written to the register (as confirmed by the output of the cat command).

Hope this helps,
Dave




Reply via email to