Readout Card firmware

From MCEWiki
Revision as of 14:28, 4 May 2011 by Bburger (talk | contribs) (Revision 5.0.c (not recommended))
  • Synthesis Reminders (for firmware developers)
    • quartus.ini is not needed anymore (Fixed as of Q7, Altera SR10783580 2010-10-24)
    • Remember that readout_card/fsfb_clac/source/rtl/ram_40x64.vhd must be initialized with the ram_40x64.hex file in the same directory.

Revision 5.1.2

  • Filename:
    • rc_stratix3_v05010002_18jan2011.sof (for Rev. E cards)
    • rc_stratix3_v05010002_18jan2011.jic (for Rev. E cards)
    • rc_v05010002_03feb2011.sof (for Rev. B cards)
    • rc_v05010002_03feb2011.pof (for Rev. B cards)
  • Features:
    • based on 5.1.1 with k1 and k2 (filter params) limited to k1<16 and k2<32 in order to resolve the timing when compiling for smaller Stratix FPGA on RC Rev. B.
  • Bug fix:
    • the 2-rows-off filtered data readout introduced with configurable filter in rev. 5.1.0 and 5.1.1 is fixed now.
  • Bugs:
    • none so far.
  • FPGA Resource Usage and Timing Report (readout_card.fit.rpt and readout_card.tan.rpt): TO BE UPDATED LATER

Revision 5.1.1 (not recommended)

  • Filename:
    • rc_v05010001_01dec2010.sof (for Rev. B cards)
  • Features:
    • based on 5.1.0, but k1 and k2 (filter params) are now limited to k1<16 and k2<32 in order to resolve the timing failures of compiling 5.1.0 for smaller Stratix FPGA on RC Rev. B.
  • Bugs:
    • filter mode data is off by 2 rows.

Revision 5.1.0 (not recommended)

  • Filename:
    • rc_stratix3_v05010000_01nov2010.sof (for Rev. E cards)
    • rc_v05010000_01nov2010.sof (for Rev. B cards) has timing failures do not use!!!
  • Features:
    • added configurable filter parameters specified by fltr_coeff, default is the fcutoff/fsampl=122Hz/15kHz. see Digital 4-pole Butterworth Low-pass filter .
    • fltr_type is set to 255 to indicate configurable filter parameters.
    • see MCE command description
    • development notes:
      • It is built on Quartus10.1.
      • tcl files had to be updated as cmp syntax is not supported in Q10 anymore.
      • Rev. E cards now can be identified by reading back pcb_rev as part of card_type, therefore both stratix I and III sof/pof/jic are generated from the same source.
  • Bugs:
    • rc_v05010000_01nov2010.sof has timing failures that were overlooked, do not use this firmware for Rev.B cards.
    • filter mode data is off by 2 rows.
  • FPGA Resource Usage and Timing Report (readout_card.fit.rpt and readout_card.tan.rpt): logic usage is upto 85% from 66% in 5.0.d/e/f

Revision 5.0.f

  • Filename:
    • rc_v0500000f_22oct2010.sof (for Rev. B cards)
    • rc_stratix3_v0500000f_22oct2010.sof (for Rev. E cards)
  • Features:
    • Bugfix: integral clamp should work now. only positive integral_clamp values are valid!
  • Details:: SQ1FB is applied 18 clock cycles after start of a row visit (SQ1_Bias being applied) regardless of flux-jump being enabled or not. In pre-5.0.b firmware SQ1FB was being applied after 7 clock cycles when flux-jump was disabled and after 18 clock cycles when flux-jump was enabled.
    • available for both Rev. E and Rev. B cards, the upper byte of card_type parameter now reports the pcb revision.
    • development note: It is built on Quartus10.1.
  • Bugs:
    • none yet!
  • FPGA Resource Usage and Timing Report (readout_card.fit.rpt and readout_card.tan.rpt): no change compared to 5.0.a/b/c/d

Revision 5.0.e (not recommended)

  • Filename:
    • rc_v0500000e_06oct2010.sof
  • Details:
    • an unsuccessful attempt to fix integral_clamp, but changed the functionality so that it clamps at the value, but it doesn't hold the clamp. i.e., if the calculated sq1fb becomes less than the specified clamp value, the sq1fb is not clamped anymore. This is not a desired functionality!

Revision 5.0.d

  • Filename:
    • rc_v0500000d_04aug2010.sof
  • Features:
    • Bugfix: To fix the bug associated with negative flux-jumps, reverted to signed multiplier and hence, incremented the width of the flux-quanta multiplier input by 1.
  • Details:: SQ1FB is applied 18 clock cycles after start of a row visit (SQ1_Bias being applied) regardless of flux-jump being enabled or not. In pre-5.0.b firmware SQ1FB was being applied after 7 clock cycles when flux-jump was disabled and after 18 clock cycles when flux-jump was enabled.
  • Bugs:
    • integral_clamping is broken. To test the clamping, a servo-locked ramp was initiated on the sq1fb and then flux-jumping was turned on and observed by attaching a scope to the SQ1FB output. With integral_clamp=80000000, flux_quanta=8000, gaini=1, flux-jump enabled, we see [scope snapshot] used slow_fb_ramp.py script for testing.
  • FPGA Resource Usage and Timing Report (readout_card.fit.rpt and readout_card.tan.rpt): no change compared to 5.0.a/b/c

Revision 5.0.c (not recommended)

  • Filename:
    • rc_v0500000c_16jun2010.sof
  • Features:
    • Based on rev. 5.0.b
    • Re-introduced flux-jump counter clamping to maintain continuity in behavior from past versions of firmware in the field.
    • Important: SQ1FB is applied 18 clock cycles after start of a row visit (SQ1_Bias being applied) regardless of flux-jump being enabled or not. In pre-5.0.b firmware SQ1FB was being applied after 7 clock cycles when flux-jump was disabled and after 18 clock cycles when flux-jump was enabled.
  • Details:
  • Bugs:
    • flux-jump is broken. flux-jumping block misbehaves at the first jump in the negative range.
; Total logic elements     ; 26,800 / 41,250 ( 65 % )                      ;
; Total pins               ; 358 / 616 ( 58 % )                            ;
; Total virtual pins       ; 0                                             ;
; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;
; DSP block 9-bit elements ; 76 / 112 ( 68 % )                             ;
; Total PLLs               ; 1 / 6 ( 17 % )                                ;
; Total DLLs               ; 0 / 2 ( 0 % )                                 ;

Revision 5.0.b (not recommended)

  • Filename:
    • rc_v0500000b_03jun2010.sof
  • Features:
    • Based on rev. 5.0.a
    • A bug that caused jumps in first-stage feedback, and detected as spikes in the raw data of pixels that were in servo_mode=0,1,2 was fixed. The jumps in FSFB were due to flux-jumping being enabled on live pixes with non-zero flx_quanta, and being disabled on the fly on dead pixels with flx_quanta=0. Flux-jumping is now disabled on a column-by-column basis if a column is in servo_mode = 0,1,2.
    • Ineffective clamping was removed from the flux-jumping block (as per 5.0.9), as it is now replaced by the clamping that was perfected in rev. 5.0.10
    • A sticky bit that only affected servo_mode=0,1,2 was also removed from the flux-jumping block.
    • flx_lp_init commands now also clear the flux-jumping block as well.
    • The 11-clock-cycle delay (in applying SQ1_FB) that in previous firmware only occurred when flux-jumping was enabled, now (in this version) is in effect all the time. Due to the bug-fix above, flux-jumping can be disabled on a column-by-column basis by setting servo_mode=0,1,2 when en_fb_jump=1. Before the change, this meant that constant values could be applied with or without the 11-cycle delay if en_fb_jump=1 or 0. To make the delay consistent, it is now always 11 cycles. As background, the flux-jumping block is pipelined, meaning that it does calculations for all 8 channels serially. The serialization is because of DSP-block limitations in the Readout Card FPGA that prevent us from doing all 8 channels in parallel. The reason that it takes 11 cycles to complete the flux-jumping calculations is because the values are computed for the eight channels in three ALU stages: 8 + 3 = 11 cycles. Adding 11 cycles to the 7 cycles of latency from other stages in the system results in: 11 + 7 = 18 cycles of latency from the start of a row dwell period before the first-stage feedback is applied. In rc_v5.0.c, I enforce the 18-cycle delay even when flux-jumping is not enabled to maintain uniformity across all eight channels, because flux-jumping is enabled/disabled on a per-channel basis. In other words, if I hadn't enforced the 18-cycle delay, some channels could have their feedback applied after 7 cycles, while others could have it applied after 18 cycles. I wasn't a fan of this non-uniformity. I realize that 18 cycles is a long time. In fact, so is 7. In the last few months, we have been discussing how to reduce these times to 1 cycle, because every experiment out there wants to multiplex as fast as possible, and the 7/18-delay is a rate limiting step.
    • The flux-jumping code was re-arranged in the flux-jumping block to reflect the flow of data through the pipeline and make it easier to understand.
  • Details:
  • Bugs:
    • flux-jump does not work when jumping to negative values.

Revision 5.0.a

  • Filename:
    • rc_v0500000a_12mar2010.sof
  • Features:
    • Based on the merger of rev. 5.0.8 and 5.0.9.
    • integral_clamp command is added where a clamp value is set for the integral term and once the integral term hits that value, the integral-term is clamped to that value and p-term and d-term are clamped to zero. When integral_term=0 then no clamping is in effect, similar to previous releases of firmware.
    • The low pass filter has 20-bit input and f_3dB/f_samp = 122Hz/15kHz .
    • The flux-jump clamping that was removed in 5.0.9 is included once again here, as we decided this is safer for now.
  • Details:
    • "lock_dat_left" parameter that was removed in 5.0.9 is now implemented as "lock_dat_lsb"
  • Bugs:
    • flx_lp_init does not reinitialize the flux-jump block
  • Synthesis Notes:
    • The quartus.ini file was present in the synth directory during synthesis
    • tag name: rc_v0500000a_12mar2009! years were mixed up!
  • FPGA Resource Usage (readout_card.fit.rpt):
  • FPGA Timing Analysis (readout_card.tan.rpt):

Revision 5.0.9 (buggy)

  • Filename:
    • rc_v05000009_13nov2009.sof
  • Features:
    • Based on rev. 5.0.4
    • Removes a sticky bit in pid calculation result storage -- in fsfb_processor.
    • Adds a command to clamp the growth of the I-term to prevent wrapping and track down the source of Caltech's FSFB jumps.
    • Removed the unused lock_dat_left parameter. The ability to shift left was moved to the fsfb_corr block some time ago.
    • Fixed a sign extension bug acting on the flux quanta, which limited the value to 8191. Changed the extension from signed to unsigned.
    • Removed ineffective clamping in the flux-jump calculation block.
    • IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.
  • Details:
  • Bugs:
    • integral_clamp read/write command does not work.
  • Synthesis Notes:
    • The quartus.ini file was present in the synth directory during synthesis
  • FPGA Resource Usage (readout_card.fit.rpt):
; Total logic elements     ; 27,960 / 41,250 ( 68 % )                      ;
; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;
  • FPGA Timing Analysis (readout_card.tan.rpt):
; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.825 ns  ;
; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.878 ns  ;
; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 14.397 ns ;

Revision 5.0.8 (UBC only)

  • Filename:
    • rc_v05000008_09oct2009.sof
  • Features:
    • Based on rev. 5.0.4
    • type 1 low-pass filter: f3dB=122Hz for fsample=15kHz
    • Filter-input-width changed from 18b to 20b with no sticky bits!
    • removed sticky bits in internal arithmetic of the filter.

Revision 5.0.7 (type-2 filter)

  • Filename:
    • rc_v05000007_09oct2009.sof
  • Features:
    • Based on rev. 5.0.4
    • type-2 low-pass-filter: f3dB=75Hz for fsample=30000.
    • Filter-input-width changed from 18b to 20b with no sticky bits!
    • inter-biquad-gain-scaling for the filter is 2^14
    • filter results are scaled down by 2^3 in the output of the filter.
    • removed sticky bits in internal arithmetics
    • _correction_ disabled in fsfb_proc_pidz
  • Details:
    • quartus.ini file was not present in synth directory.
  • Bugs:
    • none to report
  • FPGA Resource Usage (readout_card.fit.rpt):
  • FPGA Timing Analysis (readout_card.tan.rpt):

Revision 5.0.6 (UBC only)

  • Filename:
    • rc_stratix3_v05000006_15sep2009.sof
  • Features:
    • Only Valid for Rev. C/D Cards
    • Based on rev. 5.0.3
    • tcl file updated for Rev. D and aligned with top-level and qsf (project file).
    • flux loop commented, just to try sampling the ADC.
    • compiled with Q9.1

Revision 5.0.5 (UBC only)

  • Filename:
    • rc_v05000005_04sep2009.sof
  • Features:
    • Based on rev. 5.0.2
    • changed the low-pass-filter to f(3db)=75Hz for f(sample)=30000.
  • Details:
    • quartus.ini file was not present in synth directory.
  • Bugs:
    • negative inputs to the filter cause filter to have a non-flat pass-band region. may have to do with sign-handling...
  • FPGA Resource Usage (readout_card.fit.rpt):
  • FPGA Timing Analysis (readout_card.tan.rpt):

Revision 5.0.4

  • Filename:
    • rc_v05000004_28aug2009.sof
  • Features:
    • Based on rev. 5.0.2
    • BUG Fix: handles 14-bit flux quanta (changed the multiplier to unsigned)
    • BUG Fix: changed standard logic vector extension from signed to unsigned in flux-jumping slave.
    • IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.
  • Details:
  • Bugs:
    • None so far.
  • Synthesis Notes:
    • The quartus.ini file was present in the synth directory during synthesis
  • FPGA Resource Usage (readout_card.fit.rpt):
; Total logic elements     ; 26,170 / 41,250 ( 63 % )                      ;
; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;
  • FPGA Timing Analysis (readout_card.tan.rpt):
; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.541 ns  ;
; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.612 ns  ;
; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 15.398 ns ;

Revision 5.0.3

  • Filename:
    • rc_stratix3_v05000003_21aug2009.sof
  • Features:
    • ONLY valid REV C/D RC Cards
    • Based on rev. 5.0.2
    • flux loop commented, just to try sampling the ADC.
    • updated tcl file, but still need to rely on project file as well as qsf file.
    • changed default level of adc_sclk to '1'
    • dac_clr_n was changed from an output to an input.
    • added 'locked' interface to rc_pll_stratix_iii
    • renamed the adc_pll clock signals to more explanitory names
    • added the FPGA_DEVICE_FAMILY generic to the dispatch interace for synthesis of the dc_fifo in lvds_rx
    • uncommented DDR interface to force the syntesizer to use correct left and right PLLs (in conjunction with ADC and DDR PLLs)
    • added test signals to test_status to see clocks on the scope.

Revision 5.0.2 (buggy)

  • Filename:
    • rc_v05000002_test00_tagged.sof
  • Features:
    • Based on rev. 5.0.1
    • Fixed a bug in wbs_frame_data that stored data incorrectly if reporting 1 or 2 pixels only.
    • IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.
  • Details:
  • Bugs:
    • None so far.
  • Synthesis Notes:
    • The quartus.ini file was present in the synth directory during synthesis.
  • FPGA Resource Usage (readout_card.fit.rpt):
; Total logic elements     ; 26,186 / 41,250 ( 63 % )                      ;
; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;
  • FPGA Timing Analysis (readout_card.tan.rpt):
; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.755 ns  ;
; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.979 ns  ;
; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.067 ns ;

Revision 5.0.1 (buggy) (Filter + Raw + Rectangle, 2 LVDS)

  • Filename:
    • rc_v05000001_26may2009.sof
  • Features:
    • Combines features in rev. 5.0.0 (2 LVDS Lines) and rev. 4.0.e (Filtered + Raw), with the NEW rectangle mode.
    • IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.
  • Bugs:
    • Has a bug in wbs_frame_data that stored data incorrectly if reporting 1 or 2 pixels only.
  • Synthesis Notes:
    • The quartus.ini file was present in the synth directory during synthesis.
  • FPGA Resource Usage (readout_card.fit.rpt):
; Total logic elements     ; 26,565 / 41,250 ( 64 % )                 ;
; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )           ;
  • FPGA Timing Analysis (readout_card.tan.rpt):
; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.656 ns  ;
; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.861 ns  ;
; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 14.167 ns ;

Revision 5.0.0 (Filter Only, 2 LVDS)

  • Filename:
    • rc_v05000000_22dec2008.sof (tagged as sys_v05000000_22dec2008)
  • Features:
    • IMPORTANT: Must be used in conjunction with firmware v05000000+ of all other cards!!!
    • Adds the ability to read out one column of data continuously from readout cards
    • Adds data mode 11, which is an engineering mode. Data points are 32-bits, and bits [9..3]=row_index, [2..0]=column_index. This mode is useful for determining which pixels one is reading out in the array, in column mode for example.
  • Bugs:
    • None so far.
  • Synthesis Notes:
    • The quartus.ini file was not present in the synth directory during synthesis.
  • FPGA Resource Usage (readout_card.fit.rpt):
; Total logic elements     ; 26,607 / 41,250 ( 65 % )                 ;
; Total memory bits        ; 406,016 / 3,423,744 ( 12 % )             ;
  • FPGA Timing Analysis (readout_card.tan.rpt):
; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.558 ns  ;
; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.892 ns  ;
; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.987 ns ;

Revision 4.0.f (Filter + Raw, 1 LVDS)

  • Filename:
    • rc_v0400000f_12feb2010.sof
  • Features:
    • Based on 4.0.e and in parallel with 5.0.9 (equivalent version, clamping is not included)
    • Incorporates fixes that were done to flux-jumping between 5.0.2 - 5.0.4 - 5.0.9. Namely:
      • Changes a multiplier from signed to unsigned (in fsfb_corr_multplier.vhd).
      • Changes sign extension from signed to unsigned (in flux_quanta_ram_admin.vhd).
  • Details:
  • Bugs:
    • None reported yet.
  • Synthesis Notes:
    • The quartus.ini file was present in the synth directory during synthesis.
  • FPGA Resource Usage (readout_card.fit.rpt):
; Total logic elements     ; 26,773 / 41,250 ( 65 % )                      ;
; Total memory bits        ; 1,321,984 / 3,423,744 ( 39 % )                ;
  • FPGA Timing Analysis (readout_card.tan.rpt):
; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.539 ns  ;
; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.118 ns  ;
; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.318 ns ;

Revision 4.0.e (Filter + Raw, 1 LVDS)

  • Filename:
    • rc_v0400000e_27apr2009.sof
  • Features:
    • Based on 4.0.d
    • Combines both raw- and filtered-data modes.
    • fpga_temp, card_temp, card_id commands are disabled.
    • Tested by Matt Hasselfield.
  • Details:
  • Bugs:
    • fpga_temp, card_temp, card_id commands are disabled.
  • Synthesis Notes:
    • The quartus.ini file was present in the synth directory during synthesis.
  • FPGA Resource Usage (readout_card.fit.rpt):
; Total logic elements     ; 27,048 / 41,250 ( 66 % )                 ;
; Total memory bits        ; 1,321,984 / 3,423,744 ( 39 % )           ;
  • FPGA Timing Analysis (readout_card.tan.rpt):
; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.675 ns  ;
; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.907 ns  ;
; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.728 ns ;

Revision 4.0.d (Raw Only, 1 LVDS)

  • Filename: rc_v0400000d_20090417.sof
  • Features:
    • Based on v4.0.c, but has the filter removed, and implements a single 65536-index RAM block for storing 50 MHz raw-data samples.
    • The firmware takes a new command called readout_col_index which specifies which column to capture raw data from.
    • Other than readout_col_index, the firmware functions the same as previous raw-data firmware, including then need to issue a capture_raw command.
    • For more information on raw-data, see: http://e-mode.phas.ubc.ca/mcewiki/index.php/Raw-mode_readout
    • This firmware also integrates some of the improvements that were implemented in 4.4.0, like the removal of the tga_o signal from an FSM in dispatch_wishbone.vhd.
  • Details:
    • Differences between 4.0.c and 4.0.d
U system/test/source/tb/tb_cc_rcs_bcs_ac.vhd
U all_cards/dispatch/source/rtl/dispatch_wishbone.vhd
U library/sys_param/source/rtl/wishbone_pack.vhd
U readout_card/adc_sample_coadd/source/rtl/adc_sample_coadd.vhd
U readout_card/adc_sample_coadd/source/rtl/adc_sample_coadd_pack.vhd
U readout_card/flux_loop/source/rtl/flux_loop.vhd
U readout_card/flux_loop/source/rtl/flux_loop_pack.vhd
U readout_card/flux_loop_ctrl/source/rtl/flux_loop_ctrl.vhd
U readout_card/flux_loop_ctrl/source/rtl/flux_loop_ctrl_pack.vhd
U readout_card/flux_loop_ctrl/source/tb/tb1_flux_loop_ctrl.vhd
U readout_card/flux_loop_ctrl/source/tb/tb2_flux_loop_ctrl.vhd
U readout_card/fsfb_calc/source/rtl/fsfb_fltr_regs.vhd
U readout_card/fsfb_corr/source/rtl/fsfb_corr.vhd
U readout_card/readout_card/source/rtl/readout_card.vhd
U readout_card/readout_card/source/rtl/readout_card_pack.vhd
U readout_card/wbs_frame_data/source/rtl/wbs_frame_data.vhd
U readout_card/wbs_frame_data/source/rtl/wbs_frame_data_pack.vhd
  • Bugs:
    • None so far.
    • fpga_temp, card_temp, card_id commands are not supported.
  • Synthesis Notes:
    • The quartus.ini file was present in the synth directory during synthesis.
  • FPGA Resource Usage (readout_card.fit.rpt):
; Total logic elements     ; 24,554 / 41,250 ( 60 % )                 ;
; Total memory bits        ; 1,262,592 / 3,423,744 ( 37 % )           ;
  • FPGA Timing Analysis (readout_card.tan.rpt):
; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.991 ns  ;
; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.864 ns  ;
; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.052 ns ;

Revision 4.4.1

  • Filename: rc_v04040001_21nov2008
  • Features:
    • Fixes a bug that froze up the firmware if any of the following commands were issued: CARD_ID_ADDR, CARD_TEMP_ADDR, FPGA_TEMP_ADDR in 4.4.0 only.
  • Details:
    • The bug fix include adding more logic to the wishbone ack path (readout_card.vhd), which subsequently decreased the minimum clock setup time to 1.588ns. The new logic will catch errors that the old logic wouldn't have, and is now consistent with the firmware on all the other cards. However, if timing becomes an issue, the logic may have to revert back to that which was in version 4.0.c.
  • Bugs:
    • None so far.
  • Synthesis Notes:
    • The quartus.ini file was not present in the synth directory during synthesis.
  • FPGA Resource Usage (readout_card.fit.rpt):
; Total logic elements     ; 27,241 / 41,250 ( 66 % )                      ;
; Total memory bits        ; 405,504 / 3,423,744 ( 12 % )                  ;
  • FPGA Timing Analysis (readout_card.tan.rpt):
; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.588 ns  ;
; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.585 ns  ;
; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.057 ns ;

Revision 4.4.0 (buggy)

  • Filename: rc_v04040000_02oct2008
  • Features:
    • Reinstated the data modes in wbs_frame_data.vhd that were removed in 4.0.c. This firmware has the following modes: 0, 1, 2, 4, 5, 7, 10. The modes that are not present are: 3 (raw data), 6 (replaced by data_mode = 7), 8 (replaced by data_mode = 10), 9 (replaced by data_mode = 10). For more information on data modes, see Data mode.
    • Re-integrated the id_thermo and fpga_thermo block in the readout_card.vhd top level that was removed in 4.0.c.
    • Removed the sticky bit in fsfb_corr.vhd, which was enabled when flux-jumping was turned on. Because the feedback is signed, the sticky bit would usually reflect the value of the 14th bit, except in situations when the number of flux quanta to jump was greater than 1 (i.e. cosmic rays, IV-curves, etc). Flux jumps are made at a maximum rate of one per frame period, so that if the First-Stage Feedback increased past the 13th bit, it would not be reflected in the feedback applied. Now it is.
  • Details:
    • Simplified the FSM logic in wbs_frame_data.vhd that determines when to transition from IDLE to WSS1. This was done to lower the number of gates in that path, and ease the timing.
    • Removed the z_dat_i port in fsfb_processor.vhd and fsfb_calc_pack.vhd to the fsfb_proc_pidz block, in an effort to make it clearer within that block that the z-term is always = 0.
    • Removed the z-term sign extension in fsfb_proc_pidz.vhd, and the [d-term + z-term] adder to free up DSP resources since the z-term is always = 0.
    • Adjusted the indentation in fsfb_io_controller.vhd to make the file more readable.
    • Moved the tga_o signal out of the dispatch_wishbone.vhd FSM, and made it a continuous assignment. This signal had one of the highest fan-out counts in the RTL design, and actually was impossible to route in Stratix III chips in its previous configuration because of the number of gates on the fan-out. As a consequence of making it a continuous assignment, the Stratix III fitter was able to succeed, and the Stratix I timing characteristics were greatly improved. This is the most significant change in this revision. This change single-handedly increased the minimum slack from 1.282 ns in v0400000c to 2.372 ns (or 56.7 MHz max) in this revision.
  • Bugs:
    • The following commands lock up the Readout Card firmware: CARD_ID_ADDR, CARD_TEMP_ADDR, FPGA_TEMP_ADDR.
    • fb_const0 commands to channel 0 do not work. The value is stored in the register, but not applied to the DAC. Thus, read-back returns the correct value, but the DAC does not
  • Synthesis Notes:
    • The quartus.ini file was not present in the synth directory during synthesis.
  • FPGA Resource Usage (readout_card.fit.rpt):
; Total logic elements     ; 27,099 / 41,250 ( 66 % )                      ;
; Total memory bits        ; 406,016 / 3,423,744 ( 12 % )                  ;
  • FPGA Timing Analysis (readout_card.tan.rpt):
Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.372 ns  ;
Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.052 ns  ;
Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.066 ns ;

Revision 4.0.c

  • Filename: rc_v0400000c_15aug2008.sof
  • Features:
    • Only has data modes 0, 1, 4, and 10.
    • Fixed the bug that exists in 4.0.b, 4.0.a, and 4.0.9 that prevented the fb_const value from being applied to channel zero (wbs_fb_data.vhd).
  • Details:
    • Changed a counter in the dispatch block to ease timing constraints in synthesis (dispatch_wishbone.vhd)
    • Updated the tagged versions of dispatch.vhd , dispatch_cmd_receive.vhd, and dispatch_reply_transmit.vhd to the version that is used by all the other cards.
    • Removed the fpga_termo (command: fpga_temp) and id_thermo (commands: card_temp, card_id) to ease timing constraints in synthesis (readout_card.vhd)
    • Updated the tagged version of fpga_termo.vhd to include the new 'stale bit' feature
    • Updated the tagged version of frame_timing_core.vhd to include the new 'err_o' interface
  • Bugs:
    • None reported yet
  • Synthesis Notes:
    • The quartus.ini file was not present in the synth directory during synthesis.
  • FPGA Resource Usage:
Total logic elements : 25,058 / 41,250 ( 61 % )
Total memory bits : 400,896 / 3,423,744 ( 12 % )
  • Timing Analysis (readout_card.tan.rpt):
Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.282 ns  ;
Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.736 ns  ;
Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.665 ns ;

Revision 4.0.b (buggy)

Note: This revision is on a watch list, after the bug detected 15 July 2008. See the bug section for more details.

  • Filename : rc_v0400000b_04aug2008.sof
  • Features
    • data_mode 10 is added to provide more filtfb bits (compared to data mode 9) for planet observations. filtered_dat(27 downto 3) & flux_cnt_dat(6 downto 0)
  • Bugs
    • An unexplained bug that appeared in 4.0.a and may still be present in 4.0.b is a problem with the readout of channels being clipped out of data reporting. Bug 1 Notes
  • Synthesis note
    • Quartus.ini removed.

Revision 4.0.a (buggy)

Note: This revision is on a watch list, after the bug detected 15 July 2008. See the bug section for more details.

  • Filename : rc_v0400000a_07jul2008.sof
  • Bug Fix
    • mce_status and adc_offset/flx_quanta commands do not fail after power up.
  • Synthesis note
    • Quartus.ini removed.
  • Bugs
    • Seems to clip out channel 0 from data reporting.

Revision 4.0.9 (buggy)

  • Filename : rc_v04000009_26jun2008.sof
  • Features
    • sa_bias and offset DACs only refreshed when new values are written. (in previous versions, DACs were refreshed every frame)
  • Bugs
    • fb_const0 commands to channel 0 do not work. The value is stored in the register, but not applied to the DAC. Thus, read-back returns the correct value, but the DAC does not.
    • reading flx_quanta and adc_offset right after power up hangs the reply datapath to CC. resetmce clears this error as temporary solution. the problem is caused by first read ack of the wishbone slave.

Revision 4.0.8

  • Filename : rc_v04000008_26jun2008.sof
  • Features
    • The gaini, gainp, gaind resolution increased to 12-bit, i.e. -2048 to 2047 (formerly 10-bit).
  • Bug fix
    • the bug associated with gainpid read before mce_reset is fixed.
  • Synthesis note
    • Quartus.ini removed.

Revision 4.3.7

  • Filename : rc_v04030007_26may2008_raw.sof
  • Features
    • 14-bit raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.
    • In order to extend the raw-mode to 14-bit, an assumption is made that the raw buffer is not written to while being read. Therefore, make sure there is at least 2*row_len*num_rows*20ns between issuing captr_raw command and reading back the raw data.
    • In order to save RAM for raw mode, two memory-intensive features are disabled:
      • low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)
      • PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.

Revision 4.2.7

  • Filename : rc_v04020007_24may2008_raw.sof
  • Features
    • raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.
    • In order to save RAM for raw mode, two memory-intensive features are disabled:
      • low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)
      • PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.
  • Bug fix
    • the bug associated with reading from raw-buffer is fixed.

Revision 4.1.7

  • Filename : rc_v04010007_25apr2008_raw.sof
  • Features
    • raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.
    • In order to save RAM for raw mode, two memory-intensive features are disabled:
      • low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)
      • PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.
  • Bugs
    • after each readout frame, raw-buffer readout counter falls behind by 3 and this causes skipping 3 50MHz samples in the data stream and column-data being messed up in subsequent frames. Data can be rearranged by post processing.

Revision 4.0.6 (buggy)

  • Filename : rc_v04000006_15feb2008.sof or .pof
  • Features
    • bugfix: unreliable reset due to unsafe and incomplete state machines is fixed.
    • bugfix: flux_jump sign problem fixed, so far proved in const_mode, to be tested in servo_mode with cold setup.
    • servo_mode=2 or ramp previously only went from 0 to ramp_amp, but now goes from -8192 to -8192+ramp_amp
    • new commands are added: scratch and card_type. Scratch takes 8 values and can be used by software to detect reset.
    • slot_id and fw_rev are now integrated as part of all_cards.vhd
    • lvds_tx_b=0, This will allow Clock Card to use the secondary backplane lvds line and check whether RC is plugged in.
    • filter_coeff in misc_banks_admin commented as it is not implemented and causes timing problems.
  • Bugs
    • reading gainp/gaini/gaind right after power up hangs the reply datapath to CC. resetmce clears this error as temporary solution. the problem is caused by first read ack of pid_ram_admin.
    • slot_id is only set after a resetmce is issued. (using the latest all_cards in the next revision will fix this)
    • has spurious spikes on channel 7 data, which max out the integral, and cause the detectors to come unlocked. This firmware officially meets timing requirements, but the bug could be due to marginal timing on the longest data paths, i.e. ~0.1 ns in some cases.

Revision 4.0.5

  • Filename : rc_v04000005_01nov2007.sof or .pof
  • Features
    • data mode 9 (mixed filt + flux jump) with windowing readjusted compared to data mode 8
  • Bugs
    • unreliable resetmce. Sometimes, firmware waked up non-responsive on lvds lines.
    • In data mode 5 and 9, flux-jump counter is not reported properly due to a sign error. However, flux jumping works fine.

Revision 3.0.19

  • Filename : rc_v03000019_16feb2007_raw.sof (no pof as one is not likely to run with this as regular firmware)
  • Features
    • data mode 3 is enabled.
    • filter is disabled as a compromise to fit the raw-mode buffer.
  • Bugs
    • unreliable resetmce. Sometimes, firmware waked up non-responsive on lvds lines.

Old Firmware Revisions

  • 4.0.4: rc_v04000004_11oct2007.sof data mode 8 added (mixed filt + flux jump)
  • 4.0.3: rc_v04000003_19sep2007.sof data mode 7 bit split readjusted to 10b error being bit 4 to 14
  • 4.0.2: rc_v04000002_11sep2007.sof pid resolution increased to 10b, data mode 7 added
  • 4.0.1: rc_v04000001_06sep2007.sof
  • 4.0.0: rc_v04000000_29aug2007.sof supports readout_row_index * bugs

To-Do List

  • the starting point for the servo is currently zero and it would be nice to have it programmable.

RC Synthesis Notes

  1. The following note applies when using Quartus versions earlier than Q7: Quartus.ini file had to exist in synth directory up to revision 4.0.a due to a bug that started in Quartus 6.1 and would synthesize away arbitrary parts of readout card. We contacted Altera at the time and they provided us the ini file.
  2. Timing: There is no "lock region" defined for readout card. Timing on readout card is tight and since version 3 or so any new feature would initially fail timing till some synthesis options were tweaked. One path that remains to be consistently marginal is from addr_gen counter (i.e. tga_o counter) in dispatch_wishbone.vhd to wishbone slaves particularly misc_banks_admin.vhd. Modules that are rewritten to address timing concerns are fsfb_corr, all_cards, misc_banks_admin, and finally instantiating an lpm counter instead of a counter from components library. Surprisingly, the lpm counter reduced 87 failures to 37, although looking at the technology map viewer, it seemed that they were both synthesized the same.
  3. Compile time: This was at some point 4.5 hours, after going to dual core PC, this was reduced to 35 minutes. After extending pid gains to 12b and fixing offset/sa_bias update code, the compile time increased to 1.5hr again with utilization up to ~70%.
  4. wbs_fb_storage, ram_8x64, pid_ram had to be regenerated using latest (Q7.2) MegaWizard to get rid of the bug associated with failure to read after power up until a reset was issued.
  5. During simulations, the initialization of RAM block with .hex files needs to be disabled. This is done by commenting out the following lines from the MegaWizard generated Megafunction files (remember to un-comment them before synthesizing the code):
lpm_file => "C:/scuba2_repository/cards/readout_card/fsfb_calc/source/rtl/ram_40x64.hex", and
lpm_file    : STRING;
  1. Starting Q10.0 use TimeQuest timing analyzer as oppose to the classic one. The classic one is being phased out by Altera. In order to use TimeQuest, you need to have an sdc file present in your project directory.

MCE Main Page