[casper] Trouble Importing casperfpga Library

2016-07-21 Thread Alec Josaitis
Dear Casperites,

I recently started the Introduction to Simulink Roach2 - Casper tutorial and am 
having difficulty importing the required “casperfpga" repository from GitHub. 
After cloning the repo (git clone git://github.com/ska-sa/casperfpga 
), and while running the standard  “sudo 
python setup.py install” command, I reach the “byte-compiling” printout 
statement of file register.pyc and then receive a syntax error:

byte-compiling /usr/lib/python2.6/site-packages/casperfpga/register.py to 
register.pyc
SyntaxError: ('invalid syntax', 
('/usr/lib/python2.6/site-packages/casperfpga/register.py', 106, 38, '
new_values = {_field: None for _field in self.field_names()}\n’))


The rest of the install then continues. If I then open python and type “import 
casperfpga”, this syntax error once again appears. Here is the full print-out 
(which also includes the version of python and Red Hat Linux that I’m using):

Python 2.6.6 (r266:84292, May 22 2015, 08:34:51) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-15)] on linux2
>>> import casperfpga
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python2.6/site-packages/casperfpga/__init__.py", line 7, in 

from dcp_fpga import DcpFpga
  File "/usr/lib/python2.6/site-packages/casperfpga/dcp_fpga.py", line 3, in 

from casperfpga import CasperFpga
  File "/usr/lib/python2.6/site-packages/casperfpga/casperfpga.py", line 10, in 

import register
  File "/usr/lib/python2.6/site-packages/casperfpga/register.py", line 106
new_values = {_field: None for _field in self.field_names()}
 ^
SyntaxError: invalid syntax


Now, I doubt there actually is a syntax error because the GitHub repo doesn’t 
have any posted issues, so I then assume this is an issue with my own 
environment.  Do any of you either have suggestions on how I should change my 
environment to properly recognize the casperfpga register.py file, or have 
specific recommendations on how to edit the register.py file? 

Best Regards,
Alec

Re: [casper] Trouble Importing casperfpga Library

2016-07-29 Thread Alec Josaitis
Dear Adam,

Thanks for such a thorough list of instructions. Unfortunately, I am still
receiving the casperfpga/register.py syntax error above (now using Python
2.7.12) . However, I was able to resolve one other casperfpga issue doing
the following:

when running the "sudo python setup.py install" command, I was receving the
following error:

Warning (from warnings module):
  File "/usr/local/anaconda/lib/python2.7/distutils/dist.py", line 267
warnings.warn(msg)
UserWarning: Unknown distribution option: 'install_requires'


This was resolved by changing the line (in setup.py) from 'from
distutils.core import setup' to 'from setuptools import setup'. I made this
change because distutils does not support 'install_requires', though
setuptools does according to this StackOverflow discussion
<http://stackoverflow.com/questions/9810603/adding-install-requires-to-setup-py-when-making-a-python-package>.
After this change, I then reran the line "sudo python setup.py install”, in
the casperfpga directory.  The install_requires issue was resolved but as
mentionned above, the syntax error in register.py still exists. Then I ran
the same command in the katcp-python directory and receive the following
issue:

Traceback (most recent call last):
  File "setup.py", line 5, in 
from katcp import version
  File "/u/home/josaitis/katcp-python/katcp/__init__.py", line 23, in

from .core import (Message, KatcpSyntaxError, MessageParser,
  File "/u/home/josaitis/katcp-python/katcp/core.py", line 1625
self._waiting_futures = {state: tornado_Future() for state in
valid_states}
   ^
SyntaxError: invalid syntax

Any idea on how to fix this syntax error in the katcp-python setup?

Best,
Alec

Alec Josaitis
Candidate for B.S., Honors Physics
University of Michigan Men's Glee Club, Alumni Relations Manager

On Fri, Jul 22, 2016 at 2:56 AM, Adam Isaacson <aisaac...@ska.ac.za> wrote:

> Hi Alec,
>
> I have written this how to on installing the casperfpga python libraries -
> will eventually end up on the Wiki. If you follow this and still have
> problems then it could be a version issue. I am using Python 2.7.6 and
> IPython 1.2.1
>
> Check out:
>
>
> https://drive.google.com/open?id=1mqDIwhHo3981_Rq9Ma6Dl8UnQUzPah6DKQ55fsaeI4c
>
> Let me know if you have access issues.
>
> Kind Regards,
>
> Adam
>
>
>
> On Thu, Jul 21, 2016 at 9:49 PM, Alec Josaitis <josai...@umich.edu> wrote:
>
>> Dear Casperites,
>>
>> I recently started the *Introduction to Simulink Roach2 - Casper *tutorial
>> and am having difficulty importing the required “casperfpga" repository
>> from GitHub. After cloning the repo (git clone git
>> ://github.com/ska-sa/casperfpga <https://github.com/ska-sa/casperfpga>),
>> and while running the standard  “sudo python setup.py install” command,
>> I reach the “byte-compiling” printout statement of file register.pyc and
>> then receive a syntax error:
>>
>> byte-compiling /usr/lib/python2.6/site-packages/casperfpga/register.py to
>> register.pyc
>> SyntaxError: ('invalid syntax',
>> ('/usr/lib/python2.6/site-packages/casperfpga/register.py', 106, 38,
>> 'new_values = {_field: None for _field in self.field_names()}\n’))
>>
>>
>> The rest of the install then continues. If I then open python
>> and type “import casperfpga”, this syntax error once again appears. Here is
>> the full print-out (which also includes the version of python and Red Hat
>> Linux that I’m using):
>>
>> Python 2.6.6 (r266:84292, May 22 2015, 08:34:51)
>> [GCC 4.4.7 20120313 (Red Hat 4.4.7-15)] on linux2
>> >>> import casperfpga
>> Traceback (most recent call last):
>>   File "", line 1, in 
>>   File "/usr/lib/python2.6/site-packages/casperfpga/__init__.py", line 7,
>> in 
>> from dcp_fpga import DcpFpga
>>   File "/usr/lib/python2.6/site-packages/casperfpga/dcp_fpga.py", line 3,
>> in 
>> from casperfpga import CasperFpga
>>   File "/usr/lib/python2.6/site-packages/casperfpga/casperfpga.py", line
>> 10, in 
>> import register
>>   File "/usr/lib/python2.6/site-packages/casperfpga/register.py", line 106
>> new_values = {_field: None for _field in self.field_names()}
>>  ^
>> SyntaxError: invalid syntax
>>
>>
>> Now, I doubt there actually is a syntax error because the GitHub repo
>> doesn’t have any posted issues, so I then assume this is an issue with my
>> own environment.  Do any of you either have suggestions on how I should
>> change my environment to properly recognize the casperfpga register.py
>> file, or have specific recommendations on how to edit the register.py file?
>>
>> Best Regards,
>> Alec
>>
>
>
>
> --
>
> Adam Isaacson
>
> DBE: FPGA Engineer
>
> SKA-SA
>
> 3rd Floor
>
> The Park
>
> Park Road
>
> Pinelands
>
> 7405
>
>
> Tel: +27215067300 (W)
>
> Fax: +27215067375 (W)
>
> Cell: +27825639602
>


Re: [casper] Connecting Error using Python library with KATCP server (ROACH-2)

2016-08-12 Thread Alec Josaitis
Dear Casperites,

Unfortunately my problem was not resolved so quickly. Upon running the 'run
new root command', I received the following issue when attempting a y-modem
connection via minicom:

## Ready for binary (ymodem) download to 0x0400 at 115200 bps...
CC Timed out
xyzModem - Cksum mode, 0(SOH)/0(STX)/0(CAN) packets, 20 retries
## Total Size  = 0x = 0 Bytes



...e
Erased 512 sectors
Zero length ???

Then, whether this was right or wrong to do (I'm new to using this device
and using FPGAs at all), I exited and reset minicom and shutoff the Roach2
using the power button on the front of  the device. When I went to turn it
on, my kernel was messed-up:

U-Boot 2011.06-rc2-0-g2694c9d-dirty (Dec 04 2013 - 20:58:06)

CPU:   AMCC PowerPC 440EPx Rev. A at 533.333 MHz (PLB=133 OPB=66
EBC=66)
   No Security/Kasumi support

   Bootstrap Option C - Boot ROM Location EBC (16
bits)
   32 kB I-Cache 32 kB D-Cache

Board: ROACH2
I2C:   ready
DRAM:  512 MiB
Flash: 128 MiB
In:serial
Out:   serial
Err:   serial
CPLD:  2.1
USB:   Host(int phy)
SN:ROACH2.2 batch=D#13#25 software fixups match
MAC:   02:44:01:02:0d:19
DTT:   1 is 23 C
DTT:   2 is 22 C
Net:   ppc_4xx_eth0
Sensors Config
type run netboot to boot via dhcp+tftp+nfs
type run soloboot to run from flash independent of network

Hit any key to stop autoboot:  0
Wrong Image Format for bootm command
ERROR: can't get kernel image!
=>

Following the instructions from this Casper thread
<https://www.mail-archive.com/casper@lists.berkeley.edu/msg06085.html>, I
tried resolving the kernel image-issue by running the 'run tftpkernel'
command. I received a timeout error during the running of this macro:

=> run tftpkernel
Waiting for PHY auto negotiation to complete... done
ENET Speed is 1000 Mbps - FULL duplex connection (EMAC0)
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
BOOTP broadcast 4
BOOTP broadcast 5

Retry count exceeded; starting again
(This 'retry count exceeded' error happens until the program times-out; I
posted the above snippet of printout rather than the full-printout for the
sake of space).

I've made sure to setup minicom exactly as described in this document
<https://docs.google.com/document/d/1tqw4C6uZ6EULl1OykTFL_vQTnK52UBr0aYqTg44E5wg/edit>
.
At this point, I'm at a loss for what to do. Do any of you all have
suggestions? Thank you Jason and Shanquan for your help thus far.

Best,
Alec

Alec Josaitis
Candidate for B.S., Honors Physics
University of Michigan Men's Glee Club, Alumni Relations Manager

On Thu, Aug 4, 2016 at 10:20 AM, Shanquan Tian <sqsqt...@gmail.com> wrote:

> I think Jason is right, ROACH-2 file system and kernel on my board were
> old and didn't match the version of casperfpga.
> I updated the kernel, and now I can program my FPGA using corr package.
> I'll migrate to casperfpga if needed, but now corr is enough.
>
> Just as Jason said, do NOT overwrite uboot. It took me a long time to
> recover from a damaged uboot and it really worried me a lot.
> I'm very thankful to Mo and Jason who help me a lot. Thanks.
>
> Shanquan
>
> On Thu, Aug 4, 2016 at 2:39 AM, Jason Manley <jman...@ska.ac.za> wrote:
>
>> I suspect a mismatch between your casperfpga version and ROACH2
>> filesystem. Like progremote is not supported? We are running different
>> versions so I can't be sure which version you should be running, but it
>> looks like these are the latest public releases:
>>
>> romfs (root filesystem for Linux, which should have the new
>> tcpborphserver): https://github.com/ska-sa/roach2_nfs_uboot/blob/master/
>> boot/roach2-root-phyprog-release-2015-04-01.romfs
>>
>> and
>>
>> You might need a new kernel to go with it, if your version is very old:
>> https://github.com/ska-sa/roach2_nfs_uboot/blob/master/
>> boot/uImage-roach2-3.16-hwmon
>>
>> From https://casper.berkeley.edu/wiki/ROACH_kernel_uboot_update the
>> procedure to update the root filesystem is NOT SHOWN. Please do NOT
>> overwrite uboot (step #2 and #3), because then you can't recover from a
>> failed upload and you will brick the board (then only recoverable with a
>> jtag flash). IIRC, the command is run newroot and then you transfer the
>> file via ymodem. printenv will show you the available macros. It's quite
>> slow (many minutes) over the serial interface. You can also do it over the
>> network, but then you have to setup a tftp server. As long as you don't
>> overwrite uboot, you can recover from any failed upload by trying again.
>>
>> I'm cc'ing Marc Welz and Alec Rust for their comment in case I've got the
>> versions wrong, or there's a newer versio

Re: [casper] Connecting Error using Python library with KATCP server (ROACH-2)

2016-08-03 Thread Alec Josaitis
Dear Casperites,

I'm facing the same error that Shanquan was facing when following the
"Introduction
to Simulink
<https://casper.berkeley.edu/wiki/Introduction_to_Simulink_ROACH2#Connecting_to_the_board>"
(first tutorial) for the Roach2. Please see below:


RuntimeError  Traceback (most recent call last)
 in ()
> 1
fpga.upload_to_ram_and_program('/u/home/josaitis/mlib_devel/fpg_files_casper_tutorial/atj_t1_2016_Jul_20_1519.fpg')

/usr/local/anaconda/lib/python2.7/site-packages/casperfpga/katcp_fpga.pyc
in upload_to_ram_and_program(self, filename, port, timeout, wait_complete)
442 if request_result != '':
443 raise RuntimeError('progremote request(%s) on host %s
failed' %
--> 444(request_result, self.host))
445
446 # start the upload thread and join

RuntimeError: progremote request(Request to client roach020D19 failed.) on
host roach020D19 failed


Something to also note, when this error occurs in iPython (as instructed to
use in the tutorial), the following printout statement occurs in my minicom
connection to the Roach2 board:

call: no dispatch function for ?progremote

Does anybody have recommendation on how to help Shanquan and my issue?

Best,
Alec




Alec Josaitis
Candidate for B.S., Honors Physics
University of Michigan Men's Glee Club, Alumni Relations Manager

On Mon, Jul 18, 2016 at 3:10 PM, Shanquan Tian <sqsqt...@gmail.com> wrote:

> Dear CASPER experts,
>
> I'm sorry for this spam. I'm an exchange undergraduate student working in
> Yale university now. I had a problem while using Python to connect my PC to
> the ROACH2 board.
> I've gotten .fpg files already using Simulink and Xilinx ISE. Now my
> purpose is to load the file to the board and program it.
>
> I connected my RHEL_6 PC to ROACH-2, it loaded Busybox from flash, it also
> gets access to the Internet (my PC 192.168.1.2, board:192.168.1.3), and I
> can use telnet to log in the board successfully.
> But when I used Python, it gave me error. Look:
>
>
> /**/
> Python 2.7.10 (default, Jul 18 2016, 09:53:11)
> [GCC 4.4.7 20120313 (Red Hat 4.4.7-17)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import casperfpga
> >>> fpga=casperfpga.katcp_fpga.KatcpFpga('192.168.1.3')
> >>> fpga.upload_to_ram_and_program('/nfs_share/tut1_2016_Jul_14_1129.fpg')
> Traceback (most recent call last):
>   File "", line 1, in 
>   File "/usr/local/lib/python2.7/site-packages/casperfpga/katcp_fpga.py",
> line 358, in upload_to_ram_and_program
> raise RuntimeError('progremote request(%s) on host %s failed' %
> (request_result, self.host))
> RuntimeError: progremote request(Request to client 192.168.1.3 failed.) on
> host 192.168.1.3 failed
>
> /***/
>
> Maybe the reason is I havn't set up python client on the board correctly.
> How can I set it up?
> Help me please, thank you very much!
>
> Sincerely,
> Shanquan Tian
> Exchange undergraduate student, Yale
>


Re: [casper] Roach2 Tutorial 4 Troubles (Can't Compile .slx or Upload .fpg)

2016-10-06 Thread Alec Josaitis
Dear Casperites,

I just wanted to follow-up with you all on the above error. Do any of you
have recommendations for getting the tut4 files to run on my copy of MATLAB
and Roach2? I'm happy to provide any other information you all may need to
diagnose this issue.

Thank you all for your time.

Best,
Alec

On Tue, Oct 4, 2016 at 7:50 PM, Alec Josaitis <josai...@umich.edu> wrote:

> Dear Casperites,
>
> I've been trying to complete tutorial 4
> <https://casper.berkeley.edu/wiki/Tutorial_Wideband_Pocket_Correlator>
> for the Roach2, and have run into difficulty compiling either the .slx
> <https://github.com/casper-astro/tutorials_devel/blob/tutorials_update_2016/tut4/poco_wide_12_r316_new.slx.r2013a.tar.gz>
> or .mdl
> <https://github.com/casper-astro/tutorials_devel/blob/tutorials_update_2016/tut4/poco_wide_12_r316_new.mdl.tar.gz>files
> given for the Roach 2, or uploading the precompoliled .fpg
> <https://github.com/casper-astro/tutorials_devel/blob/tutorials_update_2016/tut4/poco_wide_1kat.fpg>
> file onto my Roach2 (using either the python scripts given or simply by
> command-line uploading the .fpg using ipython). My error messages are
> attached in this Google Drive document.
> <https://docs.google.com/document/d/1RY5LSS7mRx3o2Zm6Gyy_a8jhEjJr2bM1k9CCN9ov0bw/edit?usp=sharing>
>
> For tutorials 1-3 I have had no trouble compiling the .slx files and
> upload the corresponding .fpg files to my Roach2.
>
> I've made sure in the .slx I cite above (for tutorial 4) that the
> XSG_core_config block does not have a broken link and that the settings are
> as follows:
>
>
>- Hardware platform: Roach2:sx475t
>- User IP clock source: adc0_clk
>- User IP clock rate (MHz): 200, (and that the adc1 and adc0 are
>correspondingly clocked to 800 MHz)
>- Sample period: 1
>- Synthesis tool: XST
>
> Any advice on how I can complete tutorial 4?
>
>
> Best,
>
> Alec
>
>
>
>


[casper] Roach2 Tutorial 4 Troubles (Can't Compile .slx or Upload .fpg)

2016-10-04 Thread Alec Josaitis
Dear Casperites,

I've been trying to complete tutorial 4
 for
the Roach2, and have run into difficulty compiling either the .slx

or .mdl
files
given for the Roach 2, or uploading the precompoliled .fpg

file onto my Roach2 (using either the python scripts given or simply by
command-line uploading the .fpg using ipython). My error messages are
attached in this Google Drive document.


For tutorials 1-3 I have had no trouble compiling the .slx files and upload
the corresponding .fpg files to my Roach2.

I've made sure in the .slx I cite above (for tutorial 4) that the
XSG_core_config block does not have a broken link and that the settings are
as follows:


   - Hardware platform: Roach2:sx475t
   - User IP clock source: adc0_clk
   - User IP clock rate (MHz): 200, (and that the adc1 and adc0 are
   correspondingly clocked to 800 MHz)
   - Sample period: 1
   - Synthesis tool: XST

Any advice on how I can complete tutorial 4?


Best,

Alec


Re: [casper] Roach2 Tutorial 4 Troubles (Can't Compile .slx or Upload .fpg)

2016-11-04 Thread Alec Josaitis
Dear Glenn,

Thanks for getting back to me. Unfortunately, the .log files don't reveal
any hints to this issue; below is a print-out of the entire .log file (it
is only five lines long). None of these lines refer to
'fpga.is_connected()'.

- Version Log
--
Version Path
System Generator/opt/Xilinx/14.7/ISE_DS/ISE/sysgen
Matlab 8.0.0.783 (R2012b)   /usr/local/Matlab/2012b
ISE /opt/Xilinx/14.7/ISE_DS/ISE


Do you have a copy of tutorial 4 that you were able to successfully
compile? Upon receiving it, did you have to update any casper_XPS library
blocks, or update the .mdl file in any way before attempting to compile it
with the casper_xps script in MATLAB?

Best,
Alec

On Wed, Nov 2, 2016 at 3:29 PM, G Jones  wrote:

> Hi Alec,
> Your compilation error indicates that running system generator failed. You
> need to look in the directory created with the design name for the system
> generator logs to see where the error occurred. I can't remember the exact
> name but dig through the sub directories for .log files and the search for
> "error" to see if you can find an error message.
> I'm not familiar enough with the casper_fpga library to offer much advice.
> Does fpga.is_connected() return True?
>
> Does the .fpg file look the same as the ones that work for you?
>
>
> Glenn
> Dear Casperites,
>
> I've been trying to complete tutorial 4
> 
> for the Roach2, and have run into difficulty compiling either the .slx
> 
> or .mdl
> files
> given for the Roach 2, or uploading the precompoliled .fpg
> 
> file onto my Roach2 (using either the python scripts given or simply by
> command-line uploading the .fpg using ipython). My error messages are
> attached in this Google Drive document.
> 
>
> For tutorials 1-3 I have had no trouble compiling the .slx files and
> upload the corresponding .fpg files to my Roach2.
>
> I've made sure in the .slx I cite above (for tutorial 4) that the
> XSG_core_config block does not have a broken link and that the settings are
> as follows:
>
>
>- Hardware platform: Roach2:sx475t
>- User IP clock source: adc0_clk
>- User IP clock rate (MHz): 200, (and that the adc1 and adc0 are
>correspondingly clocked to 800 MHz)
>- Sample period: 1
>- Synthesis tool: XST
>
> Any advice on how I can complete tutorial 4?
>
>
> Best,
>
> Alec
>
>
>
>


Re: [casper] Roach2 Tutorial 4 Troubles (Can't Compile .slx or Upload .fpg)

2016-11-04 Thread Alec Josaitis
Dear Casperites,

One other thing I should clarify, is that before the XSG generation fails,
the following warning is given in Matlab, regarding inconsistent ADC time
samples. Does this provide insight as to why my compilation fails?


Warning: Inconsistent sample times. Sample time (0.25) of signal driving
input port 1 of 'tut4_update/adc2/tut4_update_adc2_user_data_valid' differs
from the expected
sample time ([0, 0]) at this input port.
> In
/opt/Xilinx/14.7/ISE_DS/ISE/sysgen/bin/lin64/xlCompileGenerateMdl.p>xlCompileGenerateMdl
at 203
  In
/opt/Xilinx/14.7/ISE_DS/ISE/sysgen/bin/lin64/xlGenerateButton.p>xlGenerateButton
at 302
  In gen_xps_files at 323
  In casper_xps>run_Callback at 158
  In casper_xps at 88
  In
@(hObject,eventdata)casper_xps('run_Callback',hObject,eventdata,guidata(hObject))


On Fri, Nov 4, 2016 at 5:02 PM, Alec Josaitis <josai...@umich.edu> wrote:

> Dear Glenn,
>
> Thanks for getting back to me. Unfortunately, the .log files don't reveal
> any hints to this issue; below is a print-out of the entire .log file (it
> is only five lines long). None of these lines refer to
> 'fpga.is_connected()'.
>
> - Version Log
> --
> Version Path
> System Generator/opt/Xilinx/14.7/ISE_DS/ISE/sysgen
> Matlab 8.0.0.783 (R2012b)   /usr/local/Matlab/2012b
> ISE /opt/Xilinx/14.7/ISE_DS/ISE
>
>
> Do you have a copy of tutorial 4 that you were able to successfully
> compile? Upon receiving it, did you have to update any casper_XPS library
> blocks, or update the .mdl file in any way before attempting to compile it
> with the casper_xps script in MATLAB?
>
> Best,
> Alec
>
> On Wed, Nov 2, 2016 at 3:29 PM, G Jones <glenn.calt...@gmail.com> wrote:
>
>> Hi Alec,
>> Your compilation error indicates that running system generator failed.
>> You need to look in the directory created with the design name for the
>> system generator logs to see where the error occurred. I can't remember the
>> exact name but dig through the sub directories for .log files and the
>> search for "error" to see if you can find an error message.
>> I'm not familiar enough with the casper_fpga library to offer much
>> advice. Does fpga.is_connected() return True?
>>
>> Does the .fpg file look the same as the ones that work for you?
>>
>>
>> Glenn
>> Dear Casperites,
>>
>> I've been trying to complete tutorial 4
>> <https://casper.berkeley.edu/wiki/Tutorial_Wideband_Pocket_Correlator>
>> for the Roach2, and have run into difficulty compiling either the .slx
>> <https://github.com/casper-astro/tutorials_devel/blob/tutorials_update_2016/tut4/poco_wide_12_r316_new.slx.r2013a.tar.gz>
>> or .mdl
>> <https://github.com/casper-astro/tutorials_devel/blob/tutorials_update_2016/tut4/poco_wide_12_r316_new.mdl.tar.gz>files
>> given for the Roach 2, or uploading the precompoliled .fpg
>> <https://github.com/casper-astro/tutorials_devel/blob/tutorials_update_2016/tut4/poco_wide_1kat.fpg>
>> file onto my Roach2 (using either the python scripts given or simply by
>> command-line uploading the .fpg using ipython). My error messages are
>> attached in this Google Drive document.
>> <https://docs.google.com/document/d/1RY5LSS7mRx3o2Zm6Gyy_a8jhEjJr2bM1k9CCN9ov0bw/edit?usp=sharing>
>>
>> For tutorials 1-3 I have had no trouble compiling the .slx files and
>> upload the corresponding .fpg files to my Roach2.
>>
>> I've made sure in the .slx I cite above (for tutorial 4) that the
>> XSG_core_config block does not have a broken link and that the settings are
>> as follows:
>>
>>
>>- Hardware platform: Roach2:sx475t
>>- User IP clock source: adc0_clk
>>- User IP clock rate (MHz): 200, (and that the adc1 and adc0 are
>>correspondingly clocked to 800 MHz)
>>- Sample period: 1
>>- Synthesis tool: XST
>>
>> Any advice on how I can complete tutorial 4?
>>
>>
>> Best,
>>
>> Alec
>>
>>
>>
>>
>


Re: [casper] Roach2 Tutorial 4 Troubles (Can't Compile .slx or Upload .fpg)

2016-11-09 Thread Alec Josaitis
Dear Glenn,

Yes, update_casper_blocks appears to run succesfully. First I ran it
inasmuch as it said at the end "done updating  blocks in ",
but it does issue warnings at some points. See below.

First, I tried updating my library, and at some point received this:
updating block xps_library/Shared BRAM/mem/sim_munge_in...
Simulink:Libraries:RefModificationViolation: Attempt to modify block in a
linked subsystem. This can only be done by the block or its parent through
their mask initialization code
Backtrace 1: reuse_block:51
Backtrace 2: munge_init:131
Backtrace 3: shared_bram_mask:119
Backtrace 4: update_casper_block:161
Backtrace 5: update_casper_blocks:107

Now, after updating my library, I ran the script on the .slx file
(poco_wide_12_r316_new); it also completes successfully but only after
providing these warning messages:
updating block poco_wide_12_r316_new/fft_wideband_real...
loading library casper_library_ffts
MATLAB:MException:MultipleErrors: Error due to multiple causes.
Backtrace 1: reuse_block:51
Backtrace 2: fft_stage_n_init:287
Backtrace 3: reuse_block:51
Backtrace 4: biplex_core_init:173
Backtrace 5: reuse_block:51
Backtrace 6: fft_biplex_real_4x_init:235
Backtrace 7: reuse_block:51
Backtrace 8: fft_wideband_real_init:257
Backtrace 9: update_casper_block:161
Backtrace 10: update_casper_blocks:107

I then updated my system diagram as you recommended, and received the
following errors:

Error in 'poco_wide_12_r316_new/fft_wideband_real/fft_biplex_real_4x':
Initialization commands cannot be evaluated.

Caused by:
Error in '
poco_wide_12_r316_new/fft_wideband_real/fft_biplex_real_4x/biplex_core':
Initialization commands cannot be evaluated.
Error in '
poco_wide_12_r316_new/fft_wideband_real/fft_biplex_real_4x/biplex_core/fft_stage_1':
Initialization commands cannot be evaluated.
Error due to multiple causes.
Unable to load block diagram 'casper_library_bus'
There is no block named 'casper_library_bus/bus_single_port_ram'
Do you have a recommendation on how to fix this error?


Best,
Alec

On Mon, Nov 7, 2016 at 10:03 PM, G Jones <glenn.calt...@gmail.com> wrote:

> Hi Alec,
> Before running casper_xps, update your system diagram (Simulation menu ->
> Update Diagram).
> That should pop up messages indicating where the errors are.
> The error messages you copied sound like there is still some
> incompatibility between the model and your libraries. Did
> update_casper_blocks run successfully?
>
> Glenn
>
> On Mon, Nov 7, 2016 at 6:39 PM, Alec Josaitis <josai...@umich.edu> wrote:
>
>> Dear All,
>>
>> My apologies, above I meant to include the following hyperlink when I
>> stated "...this .mdl
>> <https://github.com/casper-astro/tutorials_devel/blob/master/tut4/poco_wide_12_r316_new.mdl.tar.gz>".
>> Also, to clarify, I am indeed using the tutorial- recommended versions of
>> software: Xilinx System Generator 14.7 and MATLAB 2012b.
>>
>> Best,
>> Alec
>>
>> On Mon, Nov 7, 2016 at 6:34 PM, Alec Josaitis <josai...@umich.edu> wrote:
>>
>>> Dear Glenn and Jack,
>>>
>>> Thanks for the response. I've re-cloned mlib_devel and checked-out the
>>> proper version ( 4c7ba5efb4
>>> <https://github.com/casper-astro/mlib_devel/commit/4c7ba5efb421fda1cec0640cf0e3b830a9987640>).
>>> I then re-downloaded, and un-tarred this .mdl, saved is as a .slx, and then
>>> opened it in matlab to run update_casper_blocks(bdroot).
>>> I've copied below the errors that appear. Also, I should note there are
>>> no .log files in any of the subdirectories inside the directory created by
>>> casper_xps.
>>>
>>> >> casper_xps
>>> Detected Linux OS
>>> #
>>> ##  System Update  ##
>>> #
>>> MATLAB:MException:MultipleErrors: Error due to multiple causes.
>>> Backtrace 1: reuse_block:51
>>> Backtrace 2: fft_stage_n_init:287
>>> Backtrace 3: reuse_block:138
>>> Backtrace 4: biplex_core_init:173
>>> Backtrace 5: reuse_block:138
>>> Backtrace 6: fft_biplex_real_4x_init:235
>>> Backtrace 7: gen_xps_files:203
>>> Backtrace 8: run_Callback:155
>>> Backtrace 9: casper_xps:88
>>> Backtrace 10: @(hObject,eventdata)casper_xps
>>> ('run_Callback',hObject,eventdata,guidata(hObject)):0
>>> Simulink:Masking:Bad_Init_Commands: Error in
>>> 'poco_wide_12_r316_new/fft_wideband_real/fft_biplex_real_4x/biplex_core/fft_stage_1':
>>> Initialization commands cannot be evaluated.
>>> Backtrace 1: reuse_block:138
>>> Backtrace 2: biplex_core_init:173
>>> Backtrace 3: reuse_block:138
>>> Backtrace 4: fft

Re: [casper] Roach2 Tutorial 4 Troubles (Can't Compile .slx or Upload .fpg)

2016-11-07 Thread Alec Josaitis
Dear Glenn and Jack,

Thanks for the response. I've re-cloned mlib_devel and checked-out the
proper version ( 4c7ba5efb4
<https://github.com/casper-astro/mlib_devel/commit/4c7ba5efb421fda1cec0640cf0e3b830a9987640>).
I then re-downloaded, and un-tarred this .mdl, saved is as a .slx, and then
opened it in matlab to run update_casper_blocks(bdroot).
I've copied below the errors that appear. Also, I should note there are no
.log files in any of the subdirectories inside the directory created by
casper_xps.

>> casper_xps
Detected Linux OS
#
##  System Update  ##
#
MATLAB:MException:MultipleErrors: Error due to multiple causes.
Backtrace 1: reuse_block:51
Backtrace 2: fft_stage_n_init:287
Backtrace 3: reuse_block:138
Backtrace 4: biplex_core_init:173
Backtrace 5: reuse_block:138
Backtrace 6: fft_biplex_real_4x_init:235
Backtrace 7: gen_xps_files:203
Backtrace 8: run_Callback:155
Backtrace 9: casper_xps:88
Backtrace 10:
@(hObject,eventdata)casper_xps('run_Callback',hObject,eventdata,guidata(hObject)):0
Simulink:Masking:Bad_Init_Commands: Error in
'poco_wide_12_r316_new/fft_wideband_real/fft_biplex_real_4x/biplex_core/fft_stage_1':
Initialization commands cannot be evaluated.
Backtrace 1: reuse_block:138
Backtrace 2: biplex_core_init:173
Backtrace 3: reuse_block:138
Backtrace 4: fft_biplex_real_4x_init:235
Backtrace 5: gen_xps_files:203
Backtrace 6: run_Callback:155
Backtrace 7: casper_xps:88
Backtrace 8:
@(hObject,eventdata)casper_xps('run_Callback',hObject,eventdata,guidata(hObject)):0
MATLAB:MException:MultipleErrors: Error due to multiple causes.
Backtrace 1: reuse_block:51
Backtrace 2: fft_stage_n_init:287
Backtrace 3: reuse_block:138
Backtrace 4: biplex_core_init:173
Backtrace 5: reuse_block:138
Backtrace 6: fft_biplex_real_4x_init:235
Backtrace 7: gen_xps_files:203
Backtrace 8: run_Callback:155
Backtrace 9: casper_xps:88
Backtrace 10:
@(hObject,eventdata)casper_xps('run_Callback',hObject,eventdata,guidata(hObject)):0
Simulink:Masking:Bad_Init_Commands: Error in
'poco_wide_12_r316_new/fft_wideband_real/fft_biplex_real_4x/biplex_core/fft_stage_1':
Initialization commands cannot be evaluated.
Backtrace 1: reuse_block:138
Backtrace 2: biplex_core_init:173
Backtrace 3: reuse_block:138
Backtrace 4: fft_biplex_real_4x_init:235
Backtrace 5: gen_xps_files:203
Backtrace 6: run_Callback:155
Backtrace 7: casper_xps:88
Backtrace 8:
@(hObject,eventdata)casper_xps('run_Callback',hObject,eventdata,guidata(hObject)):0
Simulink:Masking:Bad_Init_Commands: Error in
'poco_wide_12_r316_new/fft_wideband_real/fft_biplex_real_4x/biplex_core':
Initialization commands cannot be evaluated.
Backtrace 1: reuse_block:138
Backtrace 2: fft_biplex_real_4x_init:235
Backtrace 3: gen_xps_files:203
Backtrace 4: run_Callback:155
Backtrace 5: casper_xps:88
Backtrace 6:
@(hObject,eventdata)casper_xps('run_Callback',hObject,eventdata,guidata(hObject)):0
Warning: did not properly cleanup after previous model terminationWarning:
sync_period_bits =

28

Error using gen_xps_files (line 203)
Error in 'poco_wide_12_r316_new/fft_wideband_real/fft_biplex_real_4x':
Initialization commands cannot be evaluated.
>>

On Fri, Nov 4, 2016 at 5:22 PM, Jack Hickish <jackhick...@gmail.com> wrote:

> Hi Alec,
>
> What version of the casper libraries are you using?
>
> The top of the tutorials page on the wiki states:
> """
>
> These tutorials were constructed using Xilinx System Generator 14.7 and
> MATLAB 2012b. Other mutually compatible versions of Xilinx and MATLAB tools
> may work correctly, but have not been tested.
>
> These tutorials use the casper-astro repository, specifically git commit
> 4c7ba5efb4
> <https://github.com/casper-astro/mlib_devel/commit/4c7ba5efb421fda1cec0640cf0e3b830a9987640>
>
> If you plan to use these tutorials on your own system, you are most likely
> to have success if you use these libraries. You can obtain them from github:
>
> git clone git://github.com/casper-astro/mlib_devel.git
>
> cd mlib_devel
>
> git checkout 4c7ba5efb4
> """
>
> I've no idea if this information is up to date, but is this what you did?
> If you're using a newer version of the libraries than the model was saved
> in, you can try opening the model and running, in the matlab prompt:
>
> update_casper_blocks(bdroot)
>
> This will [try to] update all the blocks in the model to the latest
> versions (the argument bdroot is a shortcut to the top level of your design
> heirarchy). It'll take a while. After this script has completed, you
> shouldn't have any broken links remaining.
>
> Cheers
> Jack
>
> On Tue, 4 Oct 2016 at 16:51 Alec Josaitis <josai...@umich.edu> wrote:
>
>> Dear Casperites,
>>
>> I've been trying to complete tutorial 4
>> <https://cas

Re: [casper] Roach2 Tutorial 4 Troubles (Can't Compile .slx or Upload .fpg)

2016-11-14 Thread Alec Josaitis
Dear Dave and Glenn,

You were both correct, my MLIB_DEVEL_PATH returned any empty string; the
variable was never set. I'm amazed I got to tutorial 4 without that mistake
making itself present! I am now able to implement the green blocks as
expected, and when I run the Simulation -> Update Diagram command, I do not
receive any errors in a .log file. Indeed no error.log is even generated
(as they had previously). However, I am still unable to compile the .slx
file because of the following error:

Operands to the || and && operators must be convertible to logical scalar
values.



I've checked the Casper Archive and noticed someone else having a similar
problem
, but
there wasn't a clear resolution and I'm not quite sure how to fix this. This
link

provides the warning statements offered by MATLAB while running System ->
Update Diagram (and again, this is all I have because no error log file was
created). Do you have a suggestion on what could be causing this issue?


Thank you all again for your recent and productive help!


Best,

Alec



On Thu, Nov 10, 2016 at 5:12 PM, David MacMahon  wrote:

> Hi, Alec,
>
> I suspect your MLIB_DEVEL_PATH environment variable is not getting set.
> This error message...
>
> An error or warning occurred during a callback while saving
> '/casper_library/casper_library_bus.slx'.
>
>
> …shows that matlab is trying to save the casper_library_bus.slx file in
> "/casper_library" (i.e. one level down from the root directory).  I suspect
> that’s not really where you’re mlib_devel lives.  The matlab code that
> writes this file is shown in this part of the error message...
>
> Error in casper_library_bus_init (line 285)
> filename = save_system(mdl,[getenv('MLIB_DEVEL_PATH'),
> '/casper_library/', 'casper_library_bus']);
>
>
> As you can see, if "getenv('MLIB_DEVEL_PATH')" returns an empty string,
> the the file name which will be used is "/casper_library/casper_library_bus"
> (plus any extension that gets added by matlab/simulink).  This is the path
> that is being used (see previous error message) so that indicates that
> MLIB_DEVEL_PATH is not being set in your environment (or maybe set but not
> "exported").  I think this is supposed to happen automatically as part of
> the "startsg" script.
>
> HTH,
> Dave
>
>


Re: [casper] Roach2 Tutorial 4 Troubles (Can't Compile .slx or Upload .fpg)

2016-11-14 Thread Alec Josaitis
Dear Jack,

Yup, I was working with  poco_wide_12_r316.mdl. The only substantive change
I can recall is replacing the Xilinx Black Box version of the pfb_fir_generic
to the one in the DSP blockset, programmed as specified in the tutorial
<https://casper.berkeley.edu/wiki/Tutorial_Wideband_Pocket_Correlator>.
(because, a fellow Casperite thought the reason I was facing previous XSG
config errors was due to this black box).


Thanks for the help with recreating this problem! For reference, I'm using
the mlib_devel git commit 4c7ba5efb4
<https://github.com/casper-astro/mlib_devel/commit/4c7ba5efb421fda1cec0640cf0e3b830a9987640>
.


Best,
Alec

On Mon, Nov 14, 2016 at 7:52 PM, Jack Hickish <jackhick...@gmail.com> wrote:

> Hi Alec,
>
> That's a fun one. Is this the vanilla tut4 design after running
> update_casper_blocks? I can try and recreate the problem here
>
> Cheers
> Jack
>
> On Mon, 14 Nov 2016 at 16:35 Alec Josaitis <josai...@umich.edu> wrote:
>
> Dear Dave and Glenn,
>
> You were both correct, my MLIB_DEVEL_PATH returned any empty string; the
> variable was never set. I'm amazed I got to tutorial 4 without that mistake
> making itself present! I am now able to implement the green blocks as
> expected, and when I run the Simulation -> Update Diagram command, I do not
> receive any errors in a .log file. Indeed no error.log is even generated
> (as they had previously). However, I am still unable to compile the .slx
> file because of the following error:
>
> Operands to the || and && operators must be convertible to logical scalar
> values.
>
>
>
> I've checked the Casper Archive and noticed someone else having a similar
> problem
> <https://www.mail-archive.com/casper@lists.berkeley.edu/msg05733.html>,
> but there wasn't a clear resolution and I'm not quite sure how to fix this. 
> This
> link
> <https://docs.google.com/document/d/19j-WE8WwAo2u_y2YQ07w5_TT0Nli5uXBxSoWoOdt2X8/edit?usp=sharing>
> provides the warning statements offered by MATLAB while running System ->
> Update Diagram (and again, this is all I have because no error log file was
> created). Do you have a suggestion on what could be causing this issue?
>
>
> Thank you all again for your recent and productive help!
>
>
> Best,
>
> Alec
>
>
>
> On Thu, Nov 10, 2016 at 5:12 PM, David MacMahon <dav...@berkeley.edu>
> wrote:
>
> Hi, Alec,
>
> I suspect your MLIB_DEVEL_PATH environment variable is not getting set.
> This error message...
>
> An error or warning occurred during a callback while saving
> '/casper_library/casper_library_bus.slx'.
>
>
> …shows that matlab is trying to save the casper_library_bus.slx file in
> "/casper_library" (i.e. one level down from the root directory).  I suspect
> that’s not really where you’re mlib_devel lives.  The matlab code that
> writes this file is shown in this part of the error message...
>
> Error in casper_library_bus_init (line 285)
> filename = save_system(mdl,[getenv('MLIB_DEVEL_PATH'),
> '/casper_library/', 'casper_library_bus']);
>
>
> As you can see, if "getenv('MLIB_DEVEL_PATH')" returns an empty string,
> the the file name which will be used is "/casper_library/casper_library_bus"
> (plus any extension that gets added by matlab/simulink).  This is the path
> that is being used (see previous error message) so that indicates that
> MLIB_DEVEL_PATH is not being set in your environment (or maybe set but not
> "exported").  I think this is supposed to happen automatically as part of
> the "startsg" script.
>
> HTH,
> Dave
>
>
>


Re: [casper] Roach2 Tutorial 4 Troubles (Can't Compile .slx or Upload .fpg)

2016-11-21 Thread Alec Josaitis
Dear Jack,

Yes, I ran update_casper_blocks(bdroot), which did not resolve the broken
connections. When I grab a shared bram block directly from my library, the
connections are also broken., same with the sim_munge connections inside
the mem block of each shared bram block (shared bram -> mem ). Further, in
that mem block, there is text which states: "undo data manipulation on way
in and redo on way out for simulated data". I thought about trying to undo
and redo connections as prescribed by this message, but I didn't because I
found a way to resolve all the broken connections, which is described
below.

Interestingly, I can resolve all of these broken connections (the
shared_bram connections and the mem connections) by literally dragging a
new shared bram library block from my library onto the model diagram
showing the red broken connections, not connecting this just-dragged block
to anything, and then immediately deleting this just-dragged block. After
doing that drag-and-delete step, the previous broken links of the model
become connected.

Unfortunately, even after performing this drag-and-delete operation by hand
for every shared bram block in either dir_x, I receive the same "|| and &&
operator" error described above.

Any new suggestions?

Best,
Alec

On Sat, Nov 19, 2016 at 4:15 PM, Jack Hickish <jackhick...@gmail.com> wrote:

> Hi Alec,
>
> And you ran update_casper_blocks(bdroot) after opening your model?
> If you grab a new shared bram block from the library, does that really
> have the same broken connections?
>
> Cheers
> Jack
>
> On Fri, 18 Nov 2016 at 13:40 G Jones <glenn.calt...@gmail.com> wrote:
>
>> The broken connections between blocks are causing your problem. Often
>> that happens when the ports on a block change between versions. You will
>> likely have to figure out how to connect them back up (perhaps by looking
>> at how they're connected before you run the casper_update_blocks script.
>> Not sure exactly why they're breaking in your case, but I'd suggest trying
>> to follow exactly what Jack did (i.e. using exactly the same model etc.)
>>
>> Glenn
>>
>> On Fri, Nov 18, 2016 at 1:05 PM, A. T. Josaitis <josai...@umich.edu>
>> wrote:
>>
>> Dear Jack (and the rest of the Casper family),
>>
>> I just wanted to follow-up with my last message, and see if anyone had
>> recommendations for how to correct the shared BRAM errors I'm receiving in
>> tutorial 4 (see last message in this thread). The blocks are updated, and
>> I've also tried replacing them by hand with the correct blocks in the
>> library. Neither updating nor replacing the blocks solves the errors. Other
>> thoughts?
>>
>> Best,
>> Alec
>>
>> On Nov 16, 2016, at 2:41 PM, Alec Josaitis <josai...@umich.edu> wrote:
>>
>> Dear Jack,
>>
>> So, first of all, my apologies for giving you the wrong file: I was
>> actually using poco_wide_r316_new.mdl, because the github says that newer
>> file was specificially intended to be used with MATLAB 2012b. You are
>> right, poco_wide_12_r316.mdl does not have the black box. However, when I
>> update the block diagram for this model, I receive many errors related to
>> the shared_bram block; I've attached the error log below. Did you receive
>> these errors when you updated your block diagram? I assume not because I
>> tried compiling the design via casper_xps and quickly received an error.
>>
>> I've included a screenshot of the first error, "Error 0001: Undriven
>> input port Block: 'poco_wide_12_r316/dir_x0/aa/Shared
>> BRAM/convert_din1'". I think this convert_din1 error occured in every
>> instance of the shared BRAM blocks in dir_x0 and dir_x1, and you will
>> notice in the screenshot that the error appears because of a disconnection
>> between munge_in and convert_din1. Should those blocks really be
>> disconnected? Do you know why they came disconnected in model?
>>
>> Best,
>> Alec
>>
>> On Mon, Nov 14, 2016 at 10:29 PM, Jack Hickish <jackhick...@gmail.com>
>> wrote:
>>
>> Hi Alec,
>>
>>
>> So I have MATLAB 2012b, Xilinx 14.7, and mlib_devel commit 4c7ba5efb4.
>>
>> I cloned the tutorials from github.com/casper-astro/tutorials_devel.git,
>> and unzipped poco_wide_12_r316.mdl.gz. This model doesn't seem to have any
>> black boxes in it. I ran update_casper_blocks(bdroot) and some 115 blocks
>> are found and updated. After that a block diagram update completes OK, with
>> a few warnings. I'm currently compiling the design via the casper_xps gui,
>> and so far nothing seems amiss.
>>
>> Cheers
>>

Re: [casper] Roach2 Tutorial 4 Troubles (Can't Compile .slx or Upload .fpg)

2016-12-02 Thread Alec Josaitis
Dear Jack,

I just wanted to follow-up with my last message, about the broken "shared
bram" connections. Any new suggestions? I hope we're close to resolve this
issue, as there are no other errors displayed by MATLAB. Thanks for all the
help you've given, and any more that you may be able to provide!

Best,
Alec

On Mon, Nov 21, 2016 at 4:31 PM, Alec Josaitis <josai...@umich.edu> wrote:

> Dear Jack,
>
> Yes, I ran update_casper_blocks(bdroot), which did not resolve the broken
> connections. When I grab a shared bram block directly from my library, the
> connections are also broken., same with the sim_munge connections inside
> the mem block of each shared bram block (shared bram -> mem ). Further, in
> that mem block, there is text which states: "undo data manipulation on way
> in and redo on way out for simulated data". I thought about trying to undo
> and redo connections as prescribed by this message, but I didn't because I
> found a way to resolve all the broken connections, which is described
> below.
>
> Interestingly, I can resolve all of these broken connections (the
> shared_bram connections and the mem connections) by literally dragging a
> new shared bram library block from my library onto the model diagram
> showing the red broken connections, not connecting this just-dragged block
> to anything, and then immediately deleting this just-dragged block. After
> doing that drag-and-delete step, the previous broken links of the model
> become connected.
>
> Unfortunately, even after performing this drag-and-delete operation by
> hand for every shared bram block in either dir_x, I receive the same "||
> and && operator" error described above.
>
> Any new suggestions?
>
> Best,
> Alec
>
> On Sat, Nov 19, 2016 at 4:15 PM, Jack Hickish <jackhick...@gmail.com>
> wrote:
>
>> Hi Alec,
>>
>> And you ran update_casper_blocks(bdroot) after opening your model?
>> If you grab a new shared bram block from the library, does that really
>> have the same broken connections?
>>
>> Cheers
>> Jack
>>
>> On Fri, 18 Nov 2016 at 13:40 G Jones <glenn.calt...@gmail.com> wrote:
>>
>>> The broken connections between blocks are causing your problem. Often
>>> that happens when the ports on a block change between versions. You will
>>> likely have to figure out how to connect them back up (perhaps by looking
>>> at how they're connected before you run the casper_update_blocks script.
>>> Not sure exactly why they're breaking in your case, but I'd suggest trying
>>> to follow exactly what Jack did (i.e. using exactly the same model etc.)
>>>
>>> Glenn
>>>
>>> On Fri, Nov 18, 2016 at 1:05 PM, A. T. Josaitis <josai...@umich.edu>
>>> wrote:
>>>
>>> Dear Jack (and the rest of the Casper family),
>>>
>>> I just wanted to follow-up with my last message, and see if anyone had
>>> recommendations for how to correct the shared BRAM errors I'm receiving in
>>> tutorial 4 (see last message in this thread). The blocks are updated, and
>>> I've also tried replacing them by hand with the correct blocks in the
>>> library. Neither updating nor replacing the blocks solves the errors. Other
>>> thoughts?
>>>
>>> Best,
>>> Alec
>>>
>>> On Nov 16, 2016, at 2:41 PM, Alec Josaitis <josai...@umich.edu> wrote:
>>>
>>> Dear Jack,
>>>
>>> So, first of all, my apologies for giving you the wrong file: I was
>>> actually using poco_wide_r316_new.mdl, because the github says that newer
>>> file was specificially intended to be used with MATLAB 2012b. You are
>>> right, poco_wide_12_r316.mdl does not have the black box. However, when I
>>> update the block diagram for this model, I receive many errors related to
>>> the shared_bram block; I've attached the error log below. Did you receive
>>> these errors when you updated your block diagram? I assume not because I
>>> tried compiling the design via casper_xps and quickly received an error.
>>>
>>> I've included a screenshot of the first error, "Error 0001: Undriven
>>> input port Block: 'poco_wide_12_r316/dir_x0/aa/Shared
>>> BRAM/convert_din1'". I think this convert_din1 error occured in every
>>> instance of the shared BRAM blocks in dir_x0 and dir_x1, and you will
>>> notice in the screenshot that the error appears because of a disconnection
>>> between munge_in and convert_din1. Should those blocks really be
>>> disconnected? Do you know why they came disconnected in 

[casper] [Tut 4] Understanding "Power" Output From the Roach

2017-04-26 Thread Alec Josaitis
Dear Casperites,

I am trying to readout the cross correlation  and auto correlation powers
of signals input into the Roach, when it is programmed as a correlator,
such as in the fourth tutorial
. In
my setup, I am only using inputs from one of the ADCs, and so inputs "C"
and "D" are unused; I use "A" and "B" only, and these can respectively be
interpreted as a signal and reference beam of a holography setup.

My goal is to measure correlation as some value proportional to the square
of electric fields, and I want to make sure I'm doing this correctly with
the Roach. For example, for cross correlation, my goal is to measure , where Ei is the electric field of the "i'th" input signal.

Using the cross power calculation script

,
4 complex values (8 data points total, 4 real and 4 imaginary) are read
from the roach, such as: 'dir_x0_%s_real' and 'dir_x0_%s_imag'.

Two of these complex values go into an array called 'interleave_a', and the
other two go into an array called 'interleave_b'. The value 'cross power'
is then reported as 'numpy.abs(interleave_a)', but I do not understand
this, because, first, I thought the output of that 'abs' function is going
to have two elements in this case, or, second, that the cross power would
only be the multiplication of two values, not 4.

Would someone please be willing to explain the output of the roach, the
'interleave' arrays, and how precisely I can calculate ? Thank you
all in advance for any help you are willing to provide!

Sincerely,
Alec

-- 
You received this message because you are subscribed to the Google Groups 
"casper@lists.berkeley.edu" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to casper+unsubscr...@lists.berkeley.edu.
To post to this group, send email to casper@lists.berkeley.edu.