[casper] Configuring ROACH2 to work autonomously

2012-12-20 Thread Alec Rust
Follow this method to store boffiles in the on-board flash.

One can transfer the files by mounting an NFS file system or download the
file from a web serve.

NFS (Requires a NFS server):
1. Use minicom or another terminal emulator to access the console via USB.
(ttyUSB2)
2. Reboot the machine and let it soloboot or just make sure the ROACH2 has
booted from flash.
3. Login with username: root, leave the password blank
4. Mount the NFS, type at the prompt: mount -t nfs -o nolock
server_IP:nfs_path /mnt
5. Copy the boffiles across. Boffiles are stored in nfs_path/boffiles. It
is also better to gzip them as well, speeds up flash reads and you can
store more.
Copy and gzip in one example: cat /mnt/boffiles/example.bof | gzip -c - 
/usr/bof/example.bof.gz

HTTP:
1. Use minicom or another terminal emulator to access the console via USB.
(ttyUSB2)
2. Reboot the machine and let it soloboot or just make sure the ROACH2 has
booted from flash.
3. Login with username: root, leave the password blank
4. cd /usr/bof
5. Server the boffile on a web server, it is better to gzip the boffiles,
speeds up the transfer and you can store more.
webfsd is easy to use:
a) Enter the directory containing the boffiles
b) webfsd -p 8080 -r . (use any free port over 1024)
6. wget http:/server_ip:port/file

How to configure the ROACH2 to load a boffile at startup:
1. Use minicom or another terminal emulator to access the console via USB.
(ttyUSB2)
2. Reboot the machine and let it soloboot or just make sure the ROACH2 has
booted from flash.
3. Login with username: root, leave the password blank
4. cd /etc
5. vi tcpborphserver3.init
6. At the end add: ?progdev boffile (don't include a path)
7. Any other katcp commands can be added.

Any questions, please don't hesitate to ask.

Regards
Alec

PS. Please update your kernel and romfs to the latest version, I will send
an email shortly with instructions.


[casper] Updating romfs, new tcpborphserver3 and sensors

2012-12-20 Thread Alec Rust
Marc has modified tcpborphserver3 to work with normal 8 bit writes now.
Please get the latest one here: https://github.com/ska-sa/roach2_nfs_uboot (the
files are in boot). If you are running a NFS just copy the file to
nfs_path/usr/local/sbin

The latest romfs includes the new tcpborphserver3. To update:

ROACH2 Test machine set-up instructions:
https://docs.google.com/a/ska.ac.za/document/d/1tqw4C6uZ6EULl1OykTFL_vQTnK52UBr0aYqTg44E5wg/edit
)

1. Set up a tftp and dhcp server (see the tftp section in the test machine
setup instructions).
2. Create a symlink or rename the romfs image to romfs e.g. ln -s
 roach2-root-2012-10-18.romfs romfs in the tftp directory.
3. At the uboot prompt type: run tftproot
4. This takes a long time! About 5 minutes.
5. Using a terminal emulator like minicom access the console (minicom
ttyUSB2)
6. Login using root (password is blank)
7. rm /usr/.keep
8. reboot -f

To measure temperatures, voltages and currents:
All sensors are available using kcp commands. You can telnet to the board
to run kcp commands (telnet board_ip 7147) or if you have access to the
console you can run the commands using the program kcpcmd (kcpcmd
sensor-list note that there is no ?)
?sensor-list - lists all the sensors
?sensor-value - lists all the current values
?sensor-sampling sensor_name event - this will give updates when the sensor
changes.

If anything is unclear please don't hesitate to ask.

Regards
Alec

PS. For rev1 boards please make the following changes to
/etc/tcpborphserver3.init (after removing .keep and rebooting). Note that
on rev1 3v3aux is actually 12v and 12v and 5vaux will read 0:
#3v3 sense resistor: 0.002 ohm, gain resistor: 200 ohm
?sensor-limit raw.current.3v3 mult 998
?sensor-limit raw.current.3v3 div 1000
#2v5 sense resistor: 0.005 ohm, gain resistor: 499 ohm
?sensor-limit raw.current.2v5 mult 993
?sensor-limit raw.current.2v5 div 1000
#1v8 sense resistor: 0.002 ohm, gain resistor: 200 ohm
?sensor-limit raw.current.1v8 mult 998
?sensor-limit raw.current.1v8 div 1000
#1v5 sense resistor: 0.001 ohm, gain resistor: 100 ohm
?sensor-limit raw.current.1v5 mult 999
?sensor-limit raw.current.1v5 div 1000
#1v sense resistor: 0.00025 ohm, gain resistor: 100 ohm
?sensor-limit raw.current.1v mult 399
?sensor-limit raw.current.1v div 100
#12v sense resistor: 0.005 ohm
?sensor-limit raw.current.12v mult 100
?sensor-limit raw.current.12v div 500
#5v sense resistor: 0.002 ohm
?sensor-limit raw.current.5v mult 100
?sensor-limit raw.current.5v div 200
#12v voltage divider (on rev1 boards the 12v is measured on the 3v3aux line)
?sensor-limit raw.voltage.3v3aux mult 29600
?sensor-limit raw.voltage.3v3aux div 1


Re: [casper] Updating romfs, new tcpborphserver3 and sensors

2012-12-20 Thread David MacMahon
Hi, Alec (and Marc),

Thanks for all this!

On Dec 20, 2012, at 7:46 AM, Alec Rust wrote:

 Marc has modified tcpborphserver3 to work with normal 8 bit writes now. 
 Please get the latest one here: https://github.com/ska-sa/roach2_nfs_uboot 
 (the files are in boot). If you are running a NFS just copy the file to 
 nfs_path/usr/local/sbin

For those of us who like to build from source, have all the tcpborphserver3 
updates been pushed to the source code repository 
(git://github.com/ska-sa/katcp_devel.git)?

 PS. For rev1 boards please make the following changes to 
 /etc/tcpborphserver3.init (after removing .keep and rebooting). Note that on 
 rev1 3v3aux is actually 12v and 12v and 5vaux will read 0:

Is there any setup here that could be used with both rev1 and rev2 roach2s?  I 
have a netboot filesystem that I would like to use for both rev1 and rev2 
boards.  Can I completely disable the 3.3vaux, 12v, and 5vaux limits?  What 
happens if these limits are exceeded?

Thanks,
Dave




[casper] tcpborhserver architecture

2012-12-20 Thread David MacMahon
It's clear that tcpborphserver is going to become the de facto method of 
interacting with user gateware on ROACH2 boards as well as an important method 
for interacting with the ROACH2 board itself.  This is great for programming 
and configuring designs across multiple ROACH2 boards.  It's so great that 
users will want to start adding their own commands to the tcpborphserver 
program.

Instead of having users rebuilding the tcpborphserver program every time they 
add or change a custom command, I would like to propose a plug-in architecture 
for tcpborphserver.  This would allow users to create shared libraries that the 
tcpborphserver executable could load *at runtime* to register new commands with 
tcpborphserver.  This keeps the tcpborphserver program lean and focused on the 
core functionality, yet allows different sites to provide and use their own 
site-specific customizations to tcpborphserver3.

Unfortunately I don't have the mandate to do this myself, but I still wanted to 
put this idea out there for consideration.

Thanks,
Dave

Here is a simplified overview for a plugin named garbonzo:

1) Create a shared library named garbonzo.so.  The tcpborphsever executable 
would load this (when requested) using dlopen().

2) Shared library must have function named Init_garbonzo that tcpborhserver 
will locate via dlsym() and then call.  This init function will register new 
command-name-to-funtion-pointer mapping(s) with tcpborhserver.

3) Now the new commands are available!




[casper] KATADC attenuators

2012-12-20 Thread Tom Kuiper
I have two KATADCs, one each in ZDOC0 of two ROACH-1 boards (named 
roach1 and roach2).  It appears that the attenuator for input 0 of the 
KATADC in roach2 is at 0 dB for whatever attenuation setting command is 
sent to it.  The other three inputs respond as I expect.  I assume that 
this is some kind of hardware failure but I thought I'd better check if 
there was some jumper setting or control bit that I don't know about.


With thanks and best regards,

Tom



Re: [casper] KATADC attenuators (Tom Kuiper)

2012-12-20 Thread Larry D'Addario

Tom,

I suggest that you swap the KATADC boards between roach1 and roach2.  Does the 
problem stay with roach2 or does it move with the KATADC board?  Are you running 
exactly the same .bof file on both ROACHes?


--Larry

--
===
Larry R. D'Addario
Tracking Systems and Applications Section (335)
Jet Propulsion Laboratory, operated by Caltech for NASA

Mail:  M/S 238-333
   4800 Oak Grove Drive
   Pasadena, CA 91109, USA
email: ldadda...@jpl.nasa.gov
phone: +1/818/393-0389   (home 626/351-9357)
fax:   +1/818/393-2488
===



Re: [casper] spectrometer 1Ghz

2012-12-20 Thread Ryan Monroe
I'll just chime in that I've seen this error before, which I solved by 
switching to a different version of the library.  I can't help with this 
one, just wanted to say it's probably not operator error.


--Ryan


On 12/20/2012 01:24 PM, katherine viviana cortes urbina wrote:

Hi Mark,


Today I change the fft in my design , I also open up the parameter 
boxes of both and make sure that the parameters are the same, I delete 
the old and replace it with the new, but I have the same error,


 Detected Linux OS
#
##  System Update  ##
#
Error using == gen_xps_files at 199
Error due to multiple causes.


Cheers

katty

2012/12/19 Mark Wagner mwag...@ssl.berkeley.edu 
mailto:mwag...@ssl.berkeley.edu


Hi Kathy,

I think the design you opened up was built with an older version
of the libraries.  All you need to do is open up the simulink
browser and pull that fft into your design, then open up the
paramter boxes of both and make sure that the parameters are the
same.  After that, delete the old one and replace it with the new.

Mark


On Wed, Dec 19, 2012 at 5:14 PM, katherine viviana cortes urbina
kattycort...@gmail.com mailto:kattycort...@gmail.com wrote:

Hi mark,

Where I get of newer versions of fft and pfb_fir?

Cheers

Katty

El 19/12/2012 19:10, katherine viviana cortes urbina
kattycort...@gmail.com mailto:kattycort...@gmail.com
escribió:

Hi mark,

Where I try of newer versions of fft and pfb_fir ?

Cheers

El 19/12/2012 18:52, Mark Wagner
mwag...@ssl.berkeley.edu
mailto:mwag...@ssl.berkeley.edu escribió:

Hi Katty,

I think it's possible you're using older versions of
the fft and the pfb_fir.  Could you try to replacing
those with the ones from the library you have open
(with the same parameter settings)?  And then try ctrl-d?

Mark


On Wed, Dec 19, 2012 at 4:32 PM, katherine viviana
cortes urbina kattycort...@gmail.com
mailto:kattycort...@gmail.com wrote:

Dear Casperites,

I am design a Spectrometer of 1Ghz, I just be
parameters in the existing blocks. I change the
parameter 'Number of simultaneous inputs' set to
3. But when I compile design , I have the error:


#
##  System Update  ##
#
Error using == gen_xps_files at 199
Error due to multiple causes.


if I do ctrl + d , I see the attachments.


Cheers


Katty








Re: [casper] spectrometer 1Ghz

2012-12-20 Thread Hong Chen
Hi Katty,

Are you using the current version of casper-astro/mlib_devel.git
libraryhttps://github.com/casper-astro/mlib_devel?
If not, what version are you using? Would you mind doing a screen capture
of your FFT parameter box (all tabs)? We'll check on it. If this is a bug
in our current library then we definitely need to fix it as soon as
possible...

Thanks,
Hong

On Thu, Dec 20, 2012 at 1:35 PM, Ryan Monroe ryan.m.mon...@gmail.comwrote:

  I'll just chime in that I've seen this error before, which I solved by
 switching to a different version of the library.  I can't help with this
 one, just wanted to say it's probably not operator error.

 --Ryan



 On 12/20/2012 01:24 PM, katherine viviana cortes urbina wrote:

 Hi Mark,


 Today I change the fft in my design , I also open up the parameter boxes
 of both and make sure that the parameters are the same, I delete the old
 and replace it with the new, but I have the same error,

  Detected Linux OS
 #
 ##  System Update  ##
 #
 Error using == gen_xps_files at 199
 Error due to multiple causes.


 Cheers

 katty

 2012/12/19 Mark Wagner mwag...@ssl.berkeley.edu

 Hi Kathy,

  I think the design you opened up was built with an older version of the
 libraries.  All you need to do is open up the simulink browser and pull
 that fft into your design, then open up the paramter boxes of both and make
 sure that the parameters are the same.  After that, delete the old one and
 replace it with the new.

  Mark


 On Wed, Dec 19, 2012 at 5:14 PM, katherine viviana cortes urbina 
 kattycort...@gmail.com wrote:

 Hi mark,

 Where I get of newer versions of fft and pfb_fir?

 Cheers

 Katty
  El 19/12/2012 19:10, katherine viviana cortes urbina 
 kattycort...@gmail.com escribió:

  Hi mark,

 Where I try of newer versions of fft and pfb_fir ?

 Cheers
  El 19/12/2012 18:52, Mark Wagner mwag...@ssl.berkeley.edu
 escribió:

 Hi Katty,

  I think it's possible you're using older versions of the fft and the
 pfb_fir.  Could you try to replacing those with the ones from the library
 you have open (with the same parameter settings)?  And then try ctrl-d?

  Mark


 On Wed, Dec 19, 2012 at 4:32 PM, katherine viviana cortes urbina 
 kattycort...@gmail.com wrote:

 Dear Casperites,

 I am design a Spectrometer of 1Ghz, I just be parameters in the
 existing blocks. I change the parameter 'Number of simultaneous inputs' 
 set
 to 3. But when I compile design , I have the error:


 #
 ##  System Update  ##
 #
 Error using == gen_xps_files at 199
 Error due to multiple causes.


 if I do ctrl + d , I see the attachments.


 Cheers


 Katty








Re: [casper] KATADC attenuators (Tom Kuiper)

2012-12-20 Thread Tom Kuiper

On 12/20/2012 01:33 PM, Larry D'Addario wrote:
I suggest that you swap the KATADC boards between roach1 and roach2.  
Does the problem stay with roach2 or does it move with the KATADC board?
I'm pretty sure that I know how that would turn out.  Unfortunately, I'm 
at home in West LA, 30 min with no traffic.  I can ask Dong to do it but 
it's a hassle so I'll wait to make sure that I haven't missed some minor 
point.

  Are you running exactly the same .bof file on both ROACHes?

Yes.

Tom