Hi all, I think the problem has to do with the fact that BORPH treats the integer as a signed integer regardless of the setting in the "yellow block" for the register. If you use fwrite() in C to write to the /proc register file it works though; you need to explicitly use an unsigned variable type though.
Peter -----Original Message----- From: casper-boun...@lists.berkeley.edu [mailto:casper-boun...@lists.berkeley.edu] On Behalf Of Jason Manley Sent: 31 March 2008 11:48 AM To: John Ford Cc: casper@lists.berkeley.edu Subject: Re: [casper] borph interface question Peter was having this same problem using 'echo >' this past weekend. I do not see this issue with the UDP_framework on the correlator, so i suspect the problem is that some underlying code is assuming signed values. C code reading/writing in binary transfer mode to the proc-ioreg filesystem seems to work fine. Jason On 31 Mar 2008, at 10:44, John Ford wrote: > Hi all. We're rapidly closing in on a testable version of our system. > I'm writing some scripts to set up some variables using the ioreg > interface, and I've come across a very strange problem. Trying to set > large values through the shell seems to fail. For instance, setting > the > ip address in a register fails if we use an address of 192.168.3.5. > It > works if we use a 10.0.0.5 address, that is, it seems to fail if our > number overflows a signed 32 bit value. Even if the register is > declared > unsigned in the register definition in the fpga. > > Oddly, you can still set this using hex in the tinysh interface, > although > the readback in the regr command shows it as being negative... > > It just seems to fail altogether using the ioreg mapped interface. > > Any idea how to make this work? > > John > > >