Hi Alec (ccing list for posterity), I don't know if there's a .fpg for tutorial 4 for ROACH 2 but I would assume one must be around somewhere.
The error message you're seeing is a bit misleading: 'fpga' is not defined because of an error in setting it up, so the exit_fail function is being overly optimistic and trying to clean up the fpga before exiting. >From ipython try running the lines of poco_init_master.py to see where it's failing. It looks like it might be having some issue connecting to your board. Glenn On Mon, Nov 7, 2016 at 7:02 PM, Alec Josaitis <[email protected]> wrote: > Dear Glenn, > > Regarding your .fpg solutions: I just realized that the .fpg listed in this > directory > <https://github.com/casper-astro/tutorials_devel/tree/tutorials_update_2016/tut4> > is programmed for a Roach, not Roach2! Is there a pre-compiled .fpg > available for the roach2? The master branch of tutorial 4 is intended to > run a .bof file, but when I try to run, using the proper .py script, I > receive the following error: > > Connecting to server 192.168.4.20 on port 7147... FAILURE DETECTED. Log > entries: > None > Traceback (most recent call last): > File "poco_init_master.py", line 142, in <module> > exit_fail() > File "poco_init_master.py", line 21, in exit_fail > fpga.stop() > NameError: global name 'fpga' is not defined > > > I believe my katcp library is more-up-to-date than this script wants it to > be, because my library works with .fpg files, rather than .bof. Is there an > easy resolution to this which doesn't involve devolving my katcp library? > > Best, > Alec > > On Mon, Nov 7, 2016 at 6:39 PM, Alec Josaitis <[email protected]> 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 <[email protected]> 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_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 <[email protected]> >>> 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 <[email protected]> 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 >>>>> >>>>> >>>>> >>>>> >>> >> >

