Re: [casper] casperfpga on a ROACH 1 - problem with get_system_information

2015-05-19 Thread James Smith
Hello again, Casperites,

Further tracking of my challenge, I removed the KatADC from the model and
the problem went away. I'm not sure why that NotImplementedError is raised.

However, even with the KatADC gone, and after loading the system
information, I tried to read from a snapshot block and this is what I got:

In [23]: fpga.snapshots.led_snap_ss.read()
---
KatcpRequestError Traceback (most recent call last)
ipython-input-23-4835bbdb7b15 in module()
 1 fpga.snapshots.led_snap_ss.read()

/usr/local/lib/python2.7/dist-packages/casperfpga/snap.pyc in read(self,
**kwargs)
188 if kkey not in ['circular_capture', 'man_trig',
'man_valid', 'offset', 'timeout', 'arm']:
189 raise RuntimeError('Invalid option for snap read:
%s' % kkey)
*-- 190 rawdata, rawtime = self.read_raw(**kwargs)*
191 # processed =
self._process_data_no_construct(rawdata['data'])
192 processed = self._process_data(rawdata['data'])

/usr/local/lib/python2.7/dist-packages/casperfpga/snap.pyc in
read_raw(self, **kwargs)
212 arm = getkwarg('arm', True)
213 if arm:
*-- 214 self.arm(man_trig=man_trig, man_valid=man_valid,
offset=offset, circular_capture=circular_capture)*
215 # wait
216 done = False

/usr/local/lib/python2.7/dist-packages/casperfpga/snap.pyc in arm(self,
man_trig, man_valid, offset, circular_capture)
150
 (man_trig  1) +
151
 (man_valid  2) +
*-- 152
 (circular_capture  3)))*
153 self.control_registers['control']['register'].write_int((1 +
154
 (man_trig  1) +

/usr/local/lib/python2.7/dist-packages/casperfpga/register.pyc in
write_int(self, uintvalue, blindwrite, word_offset)
 87 Write an unsigned integer to this device using the fpga
client.
 88 
*--- 89 self.parent.write_int(device_name=self.name
http://self.name, integer=uintvalue, blindwrite=blindwrite,
word_offset=word_offset)*
 90
 91 def _write_common(self, **kwargs):

/usr/local/lib/python2.7/dist-packages/casperfpga/casperfpga.pyc in
write_int(self, device_name, integer, blindwrite, word_offset)
243 self.blindwrite(device_name, data, word_offset*4)
244 else:
*-- 245 self.write(device_name, data, word_offset*4)*
246 LOGGER.debug('write_int %8x to register %s at word offset
%d okay%s.'
247  % (integer, device_name, word_offset, '
(blind)' if blindwrite else ''))

/usr/local/lib/python2.7/dist-packages/casperfpga/casperfpga.pyc in
write(self, device_name, data, offset)
193 :return:
194 
*-- 195 self.blindwrite(device_name, data, offset)*
196 new_data = self.read(device_name, len(data), offset)
197 if new_data != data:

/usr/local/lib/python2.7/dist-packages/casperfpga/katcp_fpga.pyc in
blindwrite(self, device_name, data, offset)
199 assert((offset % 4) == 0), 'You must write 32-bit-bounded
words!'
200 self.katcprequest(name='write',
request_timeout=self._timeout, require_ok=True,
*-- 201   request_args=(device_name, str(offset),
data))*
202
203 def bulkread(self, device_name, size, offset=0):

/usr/local/lib/python2.7/dist-packages/casperfpga/katcp_fpga.pyc in
katcprequest(self, name, request_timeout, require_ok, request_args)
116 raise KatcpRequestError(
117 'Request %s on host %s failed.\n\tRequest:
%s\n\tReply: %s' %
*-- 118 (request.name http://request.name, self.host,
request, reply))*
119 return reply, informs
120

KatcpRequestError: Request write on host localhost failed.
Request: ?write led_snap_ss_ctrl 0 \0\0\0\0
Reply: !write fail register


Reading and writing other registers works just fine. Telnetting into the
ROACH and trying to write the snap_ss_ctrl register that way also fails, so
it's quite likely that the problem is not with the casperfpga module (the
snapshot one anyway, don't know about the KatADC one).

Could there be a problem with the toolflow perhaps? I checked out from
ska-sa/mlib-devel less than a month ago so it's fairly current. I think.

I'd be glad of any ideas or suggestions to perhaps point me in the right
direction?

Regards,
James


On Wed, May 13, 2015 at 4:19 PM, James Smith jsm...@ska.ac.za wrote:

 Hi all,

 As per Paul's suggestion, I'm migrating towards using registers and snaps
 with bit-fields in them, and casperfpga instead of corr for the computer
 side of things. There was a minor problem with the program function, but
 I fixed it (I think?) and my pull request is currently waiting for the
 powers that be to deal with... https://github.com/ska-sa/casperfpga/pull/8
 I'm fairly certain that this didn't break what I'm about to describe
 because I've tried rolling back 

[casper] MUSIC open source firmware

2015-05-19 Thread I.M. Bonachera-Martin

Hello all,

I cannot find the open source firmware developed for the MUSIC project 
anywhere. It used to be at the end of this page: 
https://casper.berkeley.edu/wiki/MUSIC_Readout_%28Kinetic_Inductance_Detector_%28KIDs%29%29, 
but it is not there any more. Do someone know where I can find it?


Thank you,

Isa