<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://e-mode.phas.ubc.ca/mcewiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Bburger</id>
	<title>MCEWiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://e-mode.phas.ubc.ca/mcewiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Bburger"/>
	<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php/Special:Contributions/Bburger"/>
	<updated>2026-05-27T17:46:46Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.16</generator>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Clock_Card_firmware&amp;diff=4406</id>
		<title>Clock Card firmware</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Clock_Card_firmware&amp;diff=4406"/>
		<updated>2011-07-12T18:58:25Z</updated>

		<summary type="html">&lt;p&gt;Bburger: /* Revision 5.0.8 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Recommended Firmware Revisions [http://e-mode.phas.ubc.ca/mcewiki/index.php/Compatible_Versions_(CC,RC,BC,AC) here]&lt;br /&gt;
&lt;br /&gt;
* Clock Card firmware revisions may implement different data packet header formats.  All of the different formats are documented [http://www.phas.ubc.ca/%7Emce/mcedocs/Software/SC2_ELE_S580_526_mce_file_format.pdf here].&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.8 (Ethernet in progress) ==&lt;br /&gt;
* '''Filename:'''  cc_v05000008_12jul2011.sof&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** This tag is a place holder for the final version of Clock Cards with Ethernet (CCwE).  This tag currently references unfinished code in CVS.  The Quartus project file in this tag is designed for the Altera Stratix I Development Board.&lt;br /&gt;
** Header Version 6&lt;br /&gt;
** Based on 5.0.7&lt;br /&gt;
** Compatible with MCE Jam Player -- SVN revision 16 (~/jp_25/mce_jam/trunk)&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** config_app command is broken, it works in 5.0.3, but not in this version. to be investigated.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (clk_card.fit.rpt):&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (clk_card.tan.rpt):&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.7 ==&lt;br /&gt;
* '''Filename:'''  cc_v05000007_14may2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Header Version 6&lt;br /&gt;
** Based on 5.0.6&lt;br /&gt;
** Compatible with MCE Jam Player -- SVN revision 16 (~/jp_25/mce_jam/trunk)&lt;br /&gt;
** Simulation compatible with firmware v5.0.0 for the other cards.&lt;br /&gt;
** Fixed a bug that caused a Clock Card with version 5.x.x firmware installed to return stale data for cards that had version 4.x.x. firmware installed on them.&lt;br /&gt;
** Fixed a bug that caused a Clock Card to return stale data if a card was not present, or not configured.  Now the Clock Card returns 0x00000000.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** config_app command is broken, it works in 5.0.3, but not in this version. to be investigated.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (clk_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 18,745 / 32,470 ( 58 % )                      ;&lt;br /&gt;
 ; Total pins               ; 243 / 598 ( 41 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 957,952 / 3,317,184 ( 29 % )                  ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 10 / 96 ( 10 % )                              ;&lt;br /&gt;
 ; Total PLLs               ; 2 / 6 ( 33 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (clk_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk1' ; 0.279 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk0' ; 0.437 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk2' ; 3.224 ns  ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.6 (buggy) ==&lt;br /&gt;
* '''Filename:'''  cc_v05000006_21apr2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Header Version 6&lt;br /&gt;
** Based on 5.0.5&lt;br /&gt;
** Fixed a bug that prevented the Clock Card from loading firmware from its Factory Configuration Device when sw1:p1 is set to open (to enable remote configuration).&lt;br /&gt;
** This version of firmware works in conjunction with modified Jam Player code that was recently committed to SVN tag: '''~/jp_25/mce_jam/trunk : revision 16.'''&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** To learn how to use remote configuration:  [[Remote Firmware Update]].&lt;br /&gt;
** For .jam file conversions, see:  [[MCE Programming File Conversions]].&lt;br /&gt;
** Removed crc_error functionality for now.  It will get added back in when it is working.  It was found to conflict with the Remote Configuration functionality by preventing the Clock Card from configuring from its Factory Configuration Device.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** Has a bug that causes the Clock Card with version 5.x.x firmware installed to return stale data for cards that have version 4.x.x. firmware installed on them.&lt;br /&gt;
** Has a bug that causes the Clock Card to return stale data if a card is not present, or not configured.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (clk_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 18,652 / 32,470 ( 57 % )                      ;&lt;br /&gt;
 ; Total pins               ; 243 / 598 ( 41 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 957,952 / 3,317,184 ( 29 % )                  ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 10 / 96 ( 10 % )                              ;&lt;br /&gt;
 ; Total PLLs               ; 2 / 6 ( 33 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (clk_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk0' ; 0.590 ns &lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk1' ; 1.683 ns  &lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk2' ; 3.277 ns&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.5 (buggy) ==&lt;br /&gt;
* '''Filename:'''  cc_v05000005_05mar2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Header Version 6&lt;br /&gt;
** Based on 5.0.4&lt;br /&gt;
** Implemented unpacking logic for TMS and TDI signals, and inferring logic for TCK.  This is the solution to the JTAG packing problem.&lt;br /&gt;
** This version of firmware works in conjunction with modified Jam Player code that was recently committed to SVN tag: '''~/jp_25/mce_jam/trunk : revision 8.'''&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** Added the following commands: TMS_TDI, TDO, TDO_SAMPLE_DLY, TCK_HALF_PERIOD&lt;br /&gt;
** This firmware solves the TMS and TDI packing problem such that a &amp;quot;wb cc tms_tdi&amp;quot; command contains the following:&lt;br /&gt;
*** Word 0: total number of valid bits contained in words 1-n&lt;br /&gt;
*** Word 1-n: (tms,tdi) pairs starting from word 1 (bits 1,0), word 1 (bits 3,2), etc.&lt;br /&gt;
** The TDO packing is done differently: the tdo bits are captured by a shift register, and shifted from LSB to MSB, up to a maximum of 16 TDO bits per 32-bit fibre word.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** Does not configure from its Factory Configuration Device upon power-up&lt;br /&gt;
** (non-critical) when a card does not return a valid reply, the clock card does not send an error reply back to the PC. Instead, it fills the data with whatever it had in its buffer from previous command and sends it to mas.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (clk_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 18,699 / 32,470 ( 58 % )                      ;&lt;br /&gt;
 ; Total pins               ; 261 / 598 ( 44 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 957,952 / 3,317,184 ( 29 % )                  ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 10 / 96 ( 10 % )                              ;&lt;br /&gt;
 ; Total PLLs               ; 2 / 6 ( 33 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (clk_card.tan.rpt):&lt;br /&gt;
** Note that the clock slack on clk0 has diminished significantly over the past few revisions.  However, on this version, it increased again to a reasonable level.&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk1' ; 1.164 ns  ; &lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk0' ; 1.276 ns  ; &lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk2' ; 3.299 ns  ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.4 (buggy) ==&lt;br /&gt;
* '''Filename:'''  cc_v05000004_26feb2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Header Version 6&lt;br /&gt;
** Based on 5.0.3&lt;br /&gt;
** Added JTAG control registers that emulated a parallel port to allow Jam Player software to write to the MCE from a MAS PC and configure devices via JTAG.&lt;br /&gt;
*** JTAG0 -- Output data&lt;br /&gt;
*** JTAG1 -- Input data&lt;br /&gt;
*** JTAG2 -- JTAG Chain control   &lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** This version of firmware is compatible with ported JAM Player software that has been temporarily committed to CVS under \\mce\cards\clk_card\config_fpga\source\unix_code.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** Does not configure from its Factory Configuration Device upon power-up&lt;br /&gt;
** (non-critical) when a card does not return a valid reply, the clock card does not send an error reply back to the PC. Instead, it fills the data with whatever it had in its buffer from previous command and sends it to mas.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (clk_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 17,827 / 32,470 ( 55 % )                      ;&lt;br /&gt;
 ; Total pins               ; 261 / 598 ( 44 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 949,760 / 3,317,184 ( 29 % )                  ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 10 / 96 ( 10 % )                              ;&lt;br /&gt;
 ; Total PLLs               ; 2 / 6 ( 33 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
 ; M512s                    ; 66 / 295 ( 22 % )          &lt;br /&gt;
 ; M4Ks                     ; 171 / 171 ( 100 % )        &lt;br /&gt;
 ; M-RAMs                   ; 3 / 4 ( 75 % )              &lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (clk_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk0' ; 0.771 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk1' ; 1.576 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk2' ; 2.859 ns  ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.3 (tested) ==&lt;br /&gt;
* '''Filename:'''  cc_v05000003_13jan2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
** ---&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Header Version 6&lt;br /&gt;
** Based on 5.0.2&lt;br /&gt;
** Added a Stratix I generic parameter for synthesis-time library selection.&lt;br /&gt;
** Made a top-level modification that makes the interface compatible with the LM95235, while maintaining backwards compatibility.&lt;br /&gt;
** Added the following commands for applying maximum-length sequences to MCE outputs:  AWG_SEQUENCE_LEN, AWG_DATA, AWG_ADDR.  See [[ Maximum Length Sequence Commands | Arbitrary Waveform Generator ]].&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** [[ Arbitrary Waveform Generator ]] (i.e. Maximum Length Sequences for Complex Impedance Measurements)&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** (non-critical) when a card does not return a valid reply, the clock card does not send an error reply back to the PC. Instead, it fills the data with whatever it had in its buffer from previous command and sends it to mas.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (clk_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 18,095 / 32,470 ( 56 % )                      ;&lt;br /&gt;
 ; Total pins               ; 255 / 598 ( 43 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 949,760 / 3,317,184 ( 29 % )                  ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 10 / 96 ( 10 % )                              ;&lt;br /&gt;
 ; Total PLLs               ; 2 / 6 ( 33 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (clk_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk0' ; 1.547 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk2' ; 1.985 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk1' ; 2.067 ns  ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.2 ==&lt;br /&gt;
* '''Filename:'''  cc_v05000002_test00_tagged.sof&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
** ---&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Header Version 6&lt;br /&gt;
** Based off of 5.0.1 and in parallel with 4.0.c (equivalent version)&lt;br /&gt;
** The Sync Box PLL was re-instated to the top level and routed to dv_rx.  It was mistakenly removed after v4.0.9, which means that the sync box sequence number decoding has not worked since then!  When collecting data while triggering off the Sync Box DV, the Clock Card would also sporadically trigger in between data frames.&lt;br /&gt;
** Fixed a bug in ret_dat_wbs that did not handle wb num_rows_reported and wb num_cols_reported commands correctly.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** (non-critical) when a card does not return a valid reply, the clock card does not send an error reply back to the PC. Instead, it fills the data with whatever it had in its buffer from previous command and sends it to mas.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (clk_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 17,598 / 32,470 ( 54 % )                      ;&lt;br /&gt;
 ; Total pins               ; 254 / 598 ( 42 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 818,688 / 3,317,184 ( 25 % )                  ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 10 / 96 ( 10 % )                              ;&lt;br /&gt;
 ; Total PLLs               ; 2 / 6 ( 33 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (clk_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk0' ; 1.965 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk1' ; 2.041 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk2' ; 3.548 ns  ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.1 (buggy) ==&lt;br /&gt;
* '''Filename:'''  cc_v05000001_12may2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
** ---&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Based on 5.0.0 and in parallel with 4.0.b (equivalent version)&lt;br /&gt;
** Header Version 6&lt;br /&gt;
** STOP commands are meant to work in this revision.  The successful execution of STOP commands through the system depends also on the PCI card firmware, and PCI driver.  Modifications have been made to these, and their version numbers have been bumped to...&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** [[ The STOP Command ]]&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** There may be a problem with decoding sync numbers from the sync box.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (clk_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 18,286 / 32,470 ( 56 % )                 ;&lt;br /&gt;
 ; Total pins               ; 259 / 598 ( 43 % )                       ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                        ;&lt;br /&gt;
 ; Total memory bits        ; 1,537,536 / 3,317,184 ( 46 % )           ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 10 / 96 ( 10 % )                         ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                           ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                            ;&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (clk_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk0' ; 1.995 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk2' ; 3.585 ns  ;&lt;br /&gt;
 ; Clock Setup: 'altera_internal_jtag~TCKUTAP'                                                  ; 5.644 ns  ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.0 (buggy) ==&lt;br /&gt;
* '''Filename:'''  cc_v05000000_22dec2008.sof (tagged as sys_v05000000_22dec2008)&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
** ---&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Header Version 6&lt;br /&gt;
** IMPORTANT:  Must be used in conjunction with firmware v05000000 of all other cards!!!&lt;br /&gt;
** This version is based on 4.0.a.  That is, it includes all of the features that were under development in 4.0.a, even though 4.0.a was not released for telescope use.&lt;br /&gt;
** Added the ability to read out a single column of data continuously from one Readout Card&lt;br /&gt;
** New commands include:  readout_col_index, readout_priority, num_cols_reported&lt;br /&gt;
** To allow enough data bandwidth, the spare LVDS line from each card to the Clock Card is now used&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** There may be a problem with decoding sync numbers from the sync box.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (clk_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,607 / 41,250 ( 65 % )                 ;&lt;br /&gt;
 ; Total pins               ; 358 / 616 ( 58 % )                       ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                        ;&lt;br /&gt;
 ; Total memory bits        ; 406,016 / 3,423,744 ( 12 % )             ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 76 / 112 ( 68 % )                        ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                           ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                            ;&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (clk_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.558 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.892 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.987 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.c ==&lt;br /&gt;
* '''Filename:'''  cc_v0400000c_24aug2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
** ---&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Header Version 6&lt;br /&gt;
** Based on v4.0.b and in parallel with 5.0.2 (equivalent version)&lt;br /&gt;
** The Sync Box PLL was re-instated to the top level and routed to dv_rx. It was mistakenly removed after v4.0.9, which means that the sync box sequence number decoding has not worked since then! When collecting data while triggering off the Sync Box DV, the Clock Card would also sporadically trigger in between data frames.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** clk_card.vhd:  re-instantiated the manchester PLL, and routed the manch_clk to dv_rx.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None yet.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (clk_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 14,965 / 32,470 ( 46 % )                      ;&lt;br /&gt;
 ; Total pins               ; 254 / 598 ( 42 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 812,544 / 3,317,184 ( 24 % )                  ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 10 / 96 ( 10 % )                              ;&lt;br /&gt;
 ; Total PLLs               ; 2 / 6 ( 33 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (clk_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk0' ; 1.646 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk1' ; 2.167 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk2' ; 2.919 ns  ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.b (buggy) ==&lt;br /&gt;
* '''Filename:'''  cc_v0400000b_03jun2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
** ---&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Header Version 6&lt;br /&gt;
** Based on v4.0.a and in parallel with 5.0.1 (equivalent version, but without the dual-LVDS feature).&lt;br /&gt;
** STOP commands are meant to work in this revision.  The successful execution of STOP commands through the system depends also on the PCI card firmware, and PCI driver.  Modifications have been made to these, and their version numbers have been bumped to...&lt;br /&gt;
** This firmware is a hybrid version that implements a single LVDS line, but has STOP and On-The-Fly capabilities built in.  The purpose of this firmware is to give SCUBA-2 these features without forcing them to upgrade the firmware on all their other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** [[VHDL changes from v4.0.a and v4.0.b]]&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** There may be a problem with decoding sync numbers from the sync box.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (clk_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 15,023 / 32,470 ( 46 % )                 ;&lt;br /&gt;
 ; Total pins               ; 254 / 598 ( 42 % )                       ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                        ;&lt;br /&gt;
 ; Total memory bits        ; 812,544 / 3,317,184 ( 24 % )             ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 10 / 96 ( 10 % )                         ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                           ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                            ;&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (clk_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk1' ; 1.328 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk0' ; 1.442 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk2' ; 3.383 ns  ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.a (UBC only) ==&lt;br /&gt;
* '''Filename:'''  cc_v0400000a_16oct2008&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
** Make sure that the errno word, and the cards to report word in the data frame header agree with cards_to_report&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Header Version 6&lt;br /&gt;
** Based on 4.0.9&lt;br /&gt;
** Added stop_dly, rcs_to_report_data, and cards_to_report commands&lt;br /&gt;
** Added support for commands to the MCE during data acquisition&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** '''clk_card.vhd:'''  incremented the firmware version number, and added cards_to_report interface signals; added support for the stop_dly, rcs_to_report_data, and cards_to_report commands; Removed the Manchester PLL because the only way to ensure that packets are received without trouble is for the main PLL to be locked on the Manchester clock.  The Manchester PLL was a failed attempted around this.&lt;br /&gt;
** '''clock_card_pack.vhd:'''  added support for the stop_dly, rcs_to_report_data, and cards_to_report commands&lt;br /&gt;
** '''issue_reply.vhd:'''  added support for the stop_dly, rcs_to_report_data, and cards_to_report commands&lt;br /&gt;
** '''cmd_translator.vhd:'''  split up command registers so that it can handle WB/RB/RS commands while acquiring data based on a GO command.&lt;br /&gt;
** '''issue_reply_pack.vhd:'''  added indexing constants.&lt;br /&gt;
** '''reply_queue.vhd:'''  modified the logic for calculating the reply data size, in response to the addition of the rcs_to_report_data, and cards_to_report commands&lt;br /&gt;
** '''reply_queue_sequencer.vhd:'''  modified the logic for reading the data from the reply queues; modified the logic for determining when to stop readout from a card queue to ease timing constraints.  Changed to logic for multiplexing the data buses from the reply queues to combinatorial logic to ease timing constraints.&lt;br /&gt;
** '''reply_translator.vhd:''' added a stop_delay counter for delaying the replies to 'stop ret_dat' commands; added the QUICK_REPLY and QUICK_REPLY_PAUSE states to pause the return of replies to stop commands; added extra handling to the LD_STATUS state to avoid mixing stop replies, and replies to data or simple commands; added stop reply pause logic to DONE state&lt;br /&gt;
** '''ret_dat_wbs.vhd:'''  added the stop_delay_o, rcs_to_report_data, and cards_to_report_o interfaces; implemented a custom register from cards_to_report and stop_delay; removed the register for ret_dat_card_addr which was a special case of cards_to_report.&lt;br /&gt;
** '''ret_dat_wbs_pack:''' added the constant DEFAULT_CARDS_TO_REPORT&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** Reading back rcs_to_report_data returns zero (fixed)&lt;br /&gt;
** Can't issue simple commands during data taking&lt;br /&gt;
** Can't read from RC4 (fixed)&lt;br /&gt;
** There may be a problem with decoding sync numbers from the sync box.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (clk_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 14,542 / 32,470 ( 45 % )                      ;&lt;br /&gt;
 ; Total pins               ; 254 / 598 ( 42 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 812,544 / 3,317,184 ( 24 % )                  ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 8 / 96 ( 8 % )                                ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (clk_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:t|_clk0' ; 1.712 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:t|_clk1' ; 2.632 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:t|_clk2' ; 3.884 ns  ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.9 ==&lt;br /&gt;
* '''Filename:'''  cc_v04000009&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Header Version 6&lt;br /&gt;
** Integrated a bug fix for the sram_ctrl block&lt;br /&gt;
** Integrated new all_cards block of code which was causing a synthesis warning in ModelSim&lt;br /&gt;
** Two new commands added: card_type, scratch.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None to report so far&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (clk_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 14,144 / 32,470 ( 44 % )                 ;&lt;br /&gt;
 ; Total pins               ; 254 / 598 ( 42 % )                       ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                        ;&lt;br /&gt;
 ; Total memory bits        ; 812,544 / 3,317,184 ( 24 % )             ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 8 / 96 ( 8 % )                           ;&lt;br /&gt;
 ; Total PLLs               ; 2 / 6 ( 33 % )                           ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                            ;&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (clk_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk1' ; 0.294 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk0' ; 2.091 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk2' ; 2.711 ns  ;&lt;br /&gt;
&lt;br /&gt;
= Firmware Links =&lt;br /&gt;
* [http://www.phas.ubc.ca/~mce/mcedocs/firmware/cc_fpga_programming_file_catalogue.pdf  Clock Card Firmware Catalog]&lt;br /&gt;
* [http://www.phas.ubc.ca/~mce/mcedocs/firmware/ Firmware Downloads]&lt;br /&gt;
&lt;br /&gt;
= Wiki Links =&lt;br /&gt;
* [http://e-mode.phas.ubc.ca/mcewiki/index.php/MCE_firmware  MCE Firmware Page]&lt;br /&gt;
* [http://e-mode.phas.ubc.ca/mcewiki/index.php/Main_Page  MCE Main Page]&lt;/div&gt;</summary>
		<author><name>Bburger</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Clock_Card_firmware&amp;diff=4405</id>
		<title>Clock Card firmware</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Clock_Card_firmware&amp;diff=4405"/>
		<updated>2011-07-12T18:56:24Z</updated>

		<summary type="html">&lt;p&gt;Bburger: /* Revision 5.0.8 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Recommended Firmware Revisions [http://e-mode.phas.ubc.ca/mcewiki/index.php/Compatible_Versions_(CC,RC,BC,AC) here]&lt;br /&gt;
&lt;br /&gt;
* Clock Card firmware revisions may implement different data packet header formats.  All of the different formats are documented [http://www.phas.ubc.ca/%7Emce/mcedocs/Software/SC2_ELE_S580_526_mce_file_format.pdf here].&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.8 ==&lt;br /&gt;
* '''Filename:'''  cc_v05000008_12jul2011.sof&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** This tag is a place holder for the final version of Clock Cards with Ethernet (CCwE).  This tag currently references unfinished code in CVS.  The Quartus project file in this tag is designed for the Altera Stratix I Development Board.&lt;br /&gt;
** Header Version 6&lt;br /&gt;
** Based on 5.0.7&lt;br /&gt;
** Compatible with MCE Jam Player -- SVN revision 16 (~/jp_25/mce_jam/trunk)&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** config_app command is broken, it works in 5.0.3, but not in this version. to be investigated.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (clk_card.fit.rpt):&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (clk_card.tan.rpt):&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.7 ==&lt;br /&gt;
* '''Filename:'''  cc_v05000007_14may2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Header Version 6&lt;br /&gt;
** Based on 5.0.6&lt;br /&gt;
** Compatible with MCE Jam Player -- SVN revision 16 (~/jp_25/mce_jam/trunk)&lt;br /&gt;
** Simulation compatible with firmware v5.0.0 for the other cards.&lt;br /&gt;
** Fixed a bug that caused a Clock Card with version 5.x.x firmware installed to return stale data for cards that had version 4.x.x. firmware installed on them.&lt;br /&gt;
** Fixed a bug that caused a Clock Card to return stale data if a card was not present, or not configured.  Now the Clock Card returns 0x00000000.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** config_app command is broken, it works in 5.0.3, but not in this version. to be investigated.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (clk_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 18,745 / 32,470 ( 58 % )                      ;&lt;br /&gt;
 ; Total pins               ; 243 / 598 ( 41 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 957,952 / 3,317,184 ( 29 % )                  ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 10 / 96 ( 10 % )                              ;&lt;br /&gt;
 ; Total PLLs               ; 2 / 6 ( 33 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (clk_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk1' ; 0.279 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk0' ; 0.437 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk2' ; 3.224 ns  ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.6 (buggy) ==&lt;br /&gt;
* '''Filename:'''  cc_v05000006_21apr2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Header Version 6&lt;br /&gt;
** Based on 5.0.5&lt;br /&gt;
** Fixed a bug that prevented the Clock Card from loading firmware from its Factory Configuration Device when sw1:p1 is set to open (to enable remote configuration).&lt;br /&gt;
** This version of firmware works in conjunction with modified Jam Player code that was recently committed to SVN tag: '''~/jp_25/mce_jam/trunk : revision 16.'''&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** To learn how to use remote configuration:  [[Remote Firmware Update]].&lt;br /&gt;
** For .jam file conversions, see:  [[MCE Programming File Conversions]].&lt;br /&gt;
** Removed crc_error functionality for now.  It will get added back in when it is working.  It was found to conflict with the Remote Configuration functionality by preventing the Clock Card from configuring from its Factory Configuration Device.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** Has a bug that causes the Clock Card with version 5.x.x firmware installed to return stale data for cards that have version 4.x.x. firmware installed on them.&lt;br /&gt;
** Has a bug that causes the Clock Card to return stale data if a card is not present, or not configured.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (clk_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 18,652 / 32,470 ( 57 % )                      ;&lt;br /&gt;
 ; Total pins               ; 243 / 598 ( 41 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 957,952 / 3,317,184 ( 29 % )                  ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 10 / 96 ( 10 % )                              ;&lt;br /&gt;
 ; Total PLLs               ; 2 / 6 ( 33 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (clk_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk0' ; 0.590 ns &lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk1' ; 1.683 ns  &lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk2' ; 3.277 ns&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.5 (buggy) ==&lt;br /&gt;
* '''Filename:'''  cc_v05000005_05mar2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Header Version 6&lt;br /&gt;
** Based on 5.0.4&lt;br /&gt;
** Implemented unpacking logic for TMS and TDI signals, and inferring logic for TCK.  This is the solution to the JTAG packing problem.&lt;br /&gt;
** This version of firmware works in conjunction with modified Jam Player code that was recently committed to SVN tag: '''~/jp_25/mce_jam/trunk : revision 8.'''&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** Added the following commands: TMS_TDI, TDO, TDO_SAMPLE_DLY, TCK_HALF_PERIOD&lt;br /&gt;
** This firmware solves the TMS and TDI packing problem such that a &amp;quot;wb cc tms_tdi&amp;quot; command contains the following:&lt;br /&gt;
*** Word 0: total number of valid bits contained in words 1-n&lt;br /&gt;
*** Word 1-n: (tms,tdi) pairs starting from word 1 (bits 1,0), word 1 (bits 3,2), etc.&lt;br /&gt;
** The TDO packing is done differently: the tdo bits are captured by a shift register, and shifted from LSB to MSB, up to a maximum of 16 TDO bits per 32-bit fibre word.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** Does not configure from its Factory Configuration Device upon power-up&lt;br /&gt;
** (non-critical) when a card does not return a valid reply, the clock card does not send an error reply back to the PC. Instead, it fills the data with whatever it had in its buffer from previous command and sends it to mas.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (clk_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 18,699 / 32,470 ( 58 % )                      ;&lt;br /&gt;
 ; Total pins               ; 261 / 598 ( 44 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 957,952 / 3,317,184 ( 29 % )                  ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 10 / 96 ( 10 % )                              ;&lt;br /&gt;
 ; Total PLLs               ; 2 / 6 ( 33 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (clk_card.tan.rpt):&lt;br /&gt;
** Note that the clock slack on clk0 has diminished significantly over the past few revisions.  However, on this version, it increased again to a reasonable level.&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk1' ; 1.164 ns  ; &lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk0' ; 1.276 ns  ; &lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk2' ; 3.299 ns  ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.4 (buggy) ==&lt;br /&gt;
* '''Filename:'''  cc_v05000004_26feb2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Header Version 6&lt;br /&gt;
** Based on 5.0.3&lt;br /&gt;
** Added JTAG control registers that emulated a parallel port to allow Jam Player software to write to the MCE from a MAS PC and configure devices via JTAG.&lt;br /&gt;
*** JTAG0 -- Output data&lt;br /&gt;
*** JTAG1 -- Input data&lt;br /&gt;
*** JTAG2 -- JTAG Chain control   &lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** This version of firmware is compatible with ported JAM Player software that has been temporarily committed to CVS under \\mce\cards\clk_card\config_fpga\source\unix_code.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** Does not configure from its Factory Configuration Device upon power-up&lt;br /&gt;
** (non-critical) when a card does not return a valid reply, the clock card does not send an error reply back to the PC. Instead, it fills the data with whatever it had in its buffer from previous command and sends it to mas.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (clk_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 17,827 / 32,470 ( 55 % )                      ;&lt;br /&gt;
 ; Total pins               ; 261 / 598 ( 44 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 949,760 / 3,317,184 ( 29 % )                  ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 10 / 96 ( 10 % )                              ;&lt;br /&gt;
 ; Total PLLs               ; 2 / 6 ( 33 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
 ; M512s                    ; 66 / 295 ( 22 % )          &lt;br /&gt;
 ; M4Ks                     ; 171 / 171 ( 100 % )        &lt;br /&gt;
 ; M-RAMs                   ; 3 / 4 ( 75 % )              &lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (clk_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk0' ; 0.771 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk1' ; 1.576 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk2' ; 2.859 ns  ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.3 (tested) ==&lt;br /&gt;
* '''Filename:'''  cc_v05000003_13jan2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
** ---&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Header Version 6&lt;br /&gt;
** Based on 5.0.2&lt;br /&gt;
** Added a Stratix I generic parameter for synthesis-time library selection.&lt;br /&gt;
** Made a top-level modification that makes the interface compatible with the LM95235, while maintaining backwards compatibility.&lt;br /&gt;
** Added the following commands for applying maximum-length sequences to MCE outputs:  AWG_SEQUENCE_LEN, AWG_DATA, AWG_ADDR.  See [[ Maximum Length Sequence Commands | Arbitrary Waveform Generator ]].&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** [[ Arbitrary Waveform Generator ]] (i.e. Maximum Length Sequences for Complex Impedance Measurements)&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** (non-critical) when a card does not return a valid reply, the clock card does not send an error reply back to the PC. Instead, it fills the data with whatever it had in its buffer from previous command and sends it to mas.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (clk_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 18,095 / 32,470 ( 56 % )                      ;&lt;br /&gt;
 ; Total pins               ; 255 / 598 ( 43 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 949,760 / 3,317,184 ( 29 % )                  ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 10 / 96 ( 10 % )                              ;&lt;br /&gt;
 ; Total PLLs               ; 2 / 6 ( 33 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (clk_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk0' ; 1.547 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk2' ; 1.985 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk1' ; 2.067 ns  ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.2 ==&lt;br /&gt;
* '''Filename:'''  cc_v05000002_test00_tagged.sof&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
** ---&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Header Version 6&lt;br /&gt;
** Based off of 5.0.1 and in parallel with 4.0.c (equivalent version)&lt;br /&gt;
** The Sync Box PLL was re-instated to the top level and routed to dv_rx.  It was mistakenly removed after v4.0.9, which means that the sync box sequence number decoding has not worked since then!  When collecting data while triggering off the Sync Box DV, the Clock Card would also sporadically trigger in between data frames.&lt;br /&gt;
** Fixed a bug in ret_dat_wbs that did not handle wb num_rows_reported and wb num_cols_reported commands correctly.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** (non-critical) when a card does not return a valid reply, the clock card does not send an error reply back to the PC. Instead, it fills the data with whatever it had in its buffer from previous command and sends it to mas.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (clk_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 17,598 / 32,470 ( 54 % )                      ;&lt;br /&gt;
 ; Total pins               ; 254 / 598 ( 42 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 818,688 / 3,317,184 ( 25 % )                  ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 10 / 96 ( 10 % )                              ;&lt;br /&gt;
 ; Total PLLs               ; 2 / 6 ( 33 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (clk_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk0' ; 1.965 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk1' ; 2.041 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk2' ; 3.548 ns  ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.1 (buggy) ==&lt;br /&gt;
* '''Filename:'''  cc_v05000001_12may2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
** ---&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Based on 5.0.0 and in parallel with 4.0.b (equivalent version)&lt;br /&gt;
** Header Version 6&lt;br /&gt;
** STOP commands are meant to work in this revision.  The successful execution of STOP commands through the system depends also on the PCI card firmware, and PCI driver.  Modifications have been made to these, and their version numbers have been bumped to...&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** [[ The STOP Command ]]&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** There may be a problem with decoding sync numbers from the sync box.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (clk_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 18,286 / 32,470 ( 56 % )                 ;&lt;br /&gt;
 ; Total pins               ; 259 / 598 ( 43 % )                       ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                        ;&lt;br /&gt;
 ; Total memory bits        ; 1,537,536 / 3,317,184 ( 46 % )           ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 10 / 96 ( 10 % )                         ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                           ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                            ;&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (clk_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk0' ; 1.995 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk2' ; 3.585 ns  ;&lt;br /&gt;
 ; Clock Setup: 'altera_internal_jtag~TCKUTAP'                                                  ; 5.644 ns  ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.0 (buggy) ==&lt;br /&gt;
* '''Filename:'''  cc_v05000000_22dec2008.sof (tagged as sys_v05000000_22dec2008)&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
** ---&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Header Version 6&lt;br /&gt;
** IMPORTANT:  Must be used in conjunction with firmware v05000000 of all other cards!!!&lt;br /&gt;
** This version is based on 4.0.a.  That is, it includes all of the features that were under development in 4.0.a, even though 4.0.a was not released for telescope use.&lt;br /&gt;
** Added the ability to read out a single column of data continuously from one Readout Card&lt;br /&gt;
** New commands include:  readout_col_index, readout_priority, num_cols_reported&lt;br /&gt;
** To allow enough data bandwidth, the spare LVDS line from each card to the Clock Card is now used&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** There may be a problem with decoding sync numbers from the sync box.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (clk_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,607 / 41,250 ( 65 % )                 ;&lt;br /&gt;
 ; Total pins               ; 358 / 616 ( 58 % )                       ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                        ;&lt;br /&gt;
 ; Total memory bits        ; 406,016 / 3,423,744 ( 12 % )             ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 76 / 112 ( 68 % )                        ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                           ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                            ;&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (clk_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.558 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.892 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.987 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.c ==&lt;br /&gt;
* '''Filename:'''  cc_v0400000c_24aug2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
** ---&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Header Version 6&lt;br /&gt;
** Based on v4.0.b and in parallel with 5.0.2 (equivalent version)&lt;br /&gt;
** The Sync Box PLL was re-instated to the top level and routed to dv_rx. It was mistakenly removed after v4.0.9, which means that the sync box sequence number decoding has not worked since then! When collecting data while triggering off the Sync Box DV, the Clock Card would also sporadically trigger in between data frames.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** clk_card.vhd:  re-instantiated the manchester PLL, and routed the manch_clk to dv_rx.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None yet.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (clk_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 14,965 / 32,470 ( 46 % )                      ;&lt;br /&gt;
 ; Total pins               ; 254 / 598 ( 42 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 812,544 / 3,317,184 ( 24 % )                  ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 10 / 96 ( 10 % )                              ;&lt;br /&gt;
 ; Total PLLs               ; 2 / 6 ( 33 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (clk_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk0' ; 1.646 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk1' ; 2.167 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk2' ; 2.919 ns  ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.b (buggy) ==&lt;br /&gt;
* '''Filename:'''  cc_v0400000b_03jun2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
** ---&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Header Version 6&lt;br /&gt;
** Based on v4.0.a and in parallel with 5.0.1 (equivalent version, but without the dual-LVDS feature).&lt;br /&gt;
** STOP commands are meant to work in this revision.  The successful execution of STOP commands through the system depends also on the PCI card firmware, and PCI driver.  Modifications have been made to these, and their version numbers have been bumped to...&lt;br /&gt;
** This firmware is a hybrid version that implements a single LVDS line, but has STOP and On-The-Fly capabilities built in.  The purpose of this firmware is to give SCUBA-2 these features without forcing them to upgrade the firmware on all their other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** [[VHDL changes from v4.0.a and v4.0.b]]&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** There may be a problem with decoding sync numbers from the sync box.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (clk_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 15,023 / 32,470 ( 46 % )                 ;&lt;br /&gt;
 ; Total pins               ; 254 / 598 ( 42 % )                       ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                        ;&lt;br /&gt;
 ; Total memory bits        ; 812,544 / 3,317,184 ( 24 % )             ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 10 / 96 ( 10 % )                         ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                           ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                            ;&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (clk_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk1' ; 1.328 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk0' ; 1.442 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk2' ; 3.383 ns  ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.a (UBC only) ==&lt;br /&gt;
* '''Filename:'''  cc_v0400000a_16oct2008&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
** Make sure that the errno word, and the cards to report word in the data frame header agree with cards_to_report&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Header Version 6&lt;br /&gt;
** Based on 4.0.9&lt;br /&gt;
** Added stop_dly, rcs_to_report_data, and cards_to_report commands&lt;br /&gt;
** Added support for commands to the MCE during data acquisition&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** '''clk_card.vhd:'''  incremented the firmware version number, and added cards_to_report interface signals; added support for the stop_dly, rcs_to_report_data, and cards_to_report commands; Removed the Manchester PLL because the only way to ensure that packets are received without trouble is for the main PLL to be locked on the Manchester clock.  The Manchester PLL was a failed attempted around this.&lt;br /&gt;
** '''clock_card_pack.vhd:'''  added support for the stop_dly, rcs_to_report_data, and cards_to_report commands&lt;br /&gt;
** '''issue_reply.vhd:'''  added support for the stop_dly, rcs_to_report_data, and cards_to_report commands&lt;br /&gt;
** '''cmd_translator.vhd:'''  split up command registers so that it can handle WB/RB/RS commands while acquiring data based on a GO command.&lt;br /&gt;
** '''issue_reply_pack.vhd:'''  added indexing constants.&lt;br /&gt;
** '''reply_queue.vhd:'''  modified the logic for calculating the reply data size, in response to the addition of the rcs_to_report_data, and cards_to_report commands&lt;br /&gt;
** '''reply_queue_sequencer.vhd:'''  modified the logic for reading the data from the reply queues; modified the logic for determining when to stop readout from a card queue to ease timing constraints.  Changed to logic for multiplexing the data buses from the reply queues to combinatorial logic to ease timing constraints.&lt;br /&gt;
** '''reply_translator.vhd:''' added a stop_delay counter for delaying the replies to 'stop ret_dat' commands; added the QUICK_REPLY and QUICK_REPLY_PAUSE states to pause the return of replies to stop commands; added extra handling to the LD_STATUS state to avoid mixing stop replies, and replies to data or simple commands; added stop reply pause logic to DONE state&lt;br /&gt;
** '''ret_dat_wbs.vhd:'''  added the stop_delay_o, rcs_to_report_data, and cards_to_report_o interfaces; implemented a custom register from cards_to_report and stop_delay; removed the register for ret_dat_card_addr which was a special case of cards_to_report.&lt;br /&gt;
** '''ret_dat_wbs_pack:''' added the constant DEFAULT_CARDS_TO_REPORT&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** Reading back rcs_to_report_data returns zero (fixed)&lt;br /&gt;
** Can't issue simple commands during data taking&lt;br /&gt;
** Can't read from RC4 (fixed)&lt;br /&gt;
** There may be a problem with decoding sync numbers from the sync box.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (clk_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 14,542 / 32,470 ( 45 % )                      ;&lt;br /&gt;
 ; Total pins               ; 254 / 598 ( 42 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 812,544 / 3,317,184 ( 24 % )                  ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 8 / 96 ( 8 % )                                ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (clk_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:t|_clk0' ; 1.712 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:t|_clk1' ; 2.632 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:t|_clk2' ; 3.884 ns  ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.9 ==&lt;br /&gt;
* '''Filename:'''  cc_v04000009&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Header Version 6&lt;br /&gt;
** Integrated a bug fix for the sram_ctrl block&lt;br /&gt;
** Integrated new all_cards block of code which was causing a synthesis warning in ModelSim&lt;br /&gt;
** Two new commands added: card_type, scratch.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None to report so far&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (clk_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 14,144 / 32,470 ( 44 % )                 ;&lt;br /&gt;
 ; Total pins               ; 254 / 598 ( 42 % )                       ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                        ;&lt;br /&gt;
 ; Total memory bits        ; 812,544 / 3,317,184 ( 24 % )             ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 8 / 96 ( 8 % )                           ;&lt;br /&gt;
 ; Total PLLs               ; 2 / 6 ( 33 % )                           ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                            ;&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (clk_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk1' ; 0.294 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk0' ; 2.091 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk2' ; 2.711 ns  ;&lt;br /&gt;
&lt;br /&gt;
= Firmware Links =&lt;br /&gt;
* [http://www.phas.ubc.ca/~mce/mcedocs/firmware/cc_fpga_programming_file_catalogue.pdf  Clock Card Firmware Catalog]&lt;br /&gt;
* [http://www.phas.ubc.ca/~mce/mcedocs/firmware/ Firmware Downloads]&lt;br /&gt;
&lt;br /&gt;
= Wiki Links =&lt;br /&gt;
* [http://e-mode.phas.ubc.ca/mcewiki/index.php/MCE_firmware  MCE Firmware Page]&lt;br /&gt;
* [http://e-mode.phas.ubc.ca/mcewiki/index.php/Main_Page  MCE Main Page]&lt;/div&gt;</summary>
		<author><name>Bburger</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Clock_Card_firmware&amp;diff=4404</id>
		<title>Clock Card firmware</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Clock_Card_firmware&amp;diff=4404"/>
		<updated>2011-07-12T18:53:25Z</updated>

		<summary type="html">&lt;p&gt;Bburger: /* Revision 5.0.8 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Recommended Firmware Revisions [http://e-mode.phas.ubc.ca/mcewiki/index.php/Compatible_Versions_(CC,RC,BC,AC) here]&lt;br /&gt;
&lt;br /&gt;
* Clock Card firmware revisions may implement different data packet header formats.  All of the different formats are documented [http://www.phas.ubc.ca/%7Emce/mcedocs/Software/SC2_ELE_S580_526_mce_file_format.pdf here].&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.8 ==&lt;br /&gt;
* '''Filename:'''  cc_v05000008_12jul2011.sof&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** This tag is a place holder for the final version of Clock Cards with Ethernet (CCwE).  This tag currently references unfinished code in CVS.&lt;br /&gt;
** Header Version 6&lt;br /&gt;
** Based on 5.0.7&lt;br /&gt;
** Compatible with MCE Jam Player -- SVN revision 16 (~/jp_25/mce_jam/trunk)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** config_app command is broken, it works in 5.0.3, but not in this version. to be investigated.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (clk_card.fit.rpt):&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (clk_card.tan.rpt):&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.7 ==&lt;br /&gt;
* '''Filename:'''  cc_v05000007_14may2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Header Version 6&lt;br /&gt;
** Based on 5.0.6&lt;br /&gt;
** Compatible with MCE Jam Player -- SVN revision 16 (~/jp_25/mce_jam/trunk)&lt;br /&gt;
** Simulation compatible with firmware v5.0.0 for the other cards.&lt;br /&gt;
** Fixed a bug that caused a Clock Card with version 5.x.x firmware installed to return stale data for cards that had version 4.x.x. firmware installed on them.&lt;br /&gt;
** Fixed a bug that caused a Clock Card to return stale data if a card was not present, or not configured.  Now the Clock Card returns 0x00000000.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** config_app command is broken, it works in 5.0.3, but not in this version. to be investigated.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (clk_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 18,745 / 32,470 ( 58 % )                      ;&lt;br /&gt;
 ; Total pins               ; 243 / 598 ( 41 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 957,952 / 3,317,184 ( 29 % )                  ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 10 / 96 ( 10 % )                              ;&lt;br /&gt;
 ; Total PLLs               ; 2 / 6 ( 33 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (clk_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk1' ; 0.279 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk0' ; 0.437 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk2' ; 3.224 ns  ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.6 (buggy) ==&lt;br /&gt;
* '''Filename:'''  cc_v05000006_21apr2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Header Version 6&lt;br /&gt;
** Based on 5.0.5&lt;br /&gt;
** Fixed a bug that prevented the Clock Card from loading firmware from its Factory Configuration Device when sw1:p1 is set to open (to enable remote configuration).&lt;br /&gt;
** This version of firmware works in conjunction with modified Jam Player code that was recently committed to SVN tag: '''~/jp_25/mce_jam/trunk : revision 16.'''&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** To learn how to use remote configuration:  [[Remote Firmware Update]].&lt;br /&gt;
** For .jam file conversions, see:  [[MCE Programming File Conversions]].&lt;br /&gt;
** Removed crc_error functionality for now.  It will get added back in when it is working.  It was found to conflict with the Remote Configuration functionality by preventing the Clock Card from configuring from its Factory Configuration Device.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** Has a bug that causes the Clock Card with version 5.x.x firmware installed to return stale data for cards that have version 4.x.x. firmware installed on them.&lt;br /&gt;
** Has a bug that causes the Clock Card to return stale data if a card is not present, or not configured.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (clk_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 18,652 / 32,470 ( 57 % )                      ;&lt;br /&gt;
 ; Total pins               ; 243 / 598 ( 41 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 957,952 / 3,317,184 ( 29 % )                  ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 10 / 96 ( 10 % )                              ;&lt;br /&gt;
 ; Total PLLs               ; 2 / 6 ( 33 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (clk_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk0' ; 0.590 ns &lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk1' ; 1.683 ns  &lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk2' ; 3.277 ns&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.5 (buggy) ==&lt;br /&gt;
* '''Filename:'''  cc_v05000005_05mar2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Header Version 6&lt;br /&gt;
** Based on 5.0.4&lt;br /&gt;
** Implemented unpacking logic for TMS and TDI signals, and inferring logic for TCK.  This is the solution to the JTAG packing problem.&lt;br /&gt;
** This version of firmware works in conjunction with modified Jam Player code that was recently committed to SVN tag: '''~/jp_25/mce_jam/trunk : revision 8.'''&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** Added the following commands: TMS_TDI, TDO, TDO_SAMPLE_DLY, TCK_HALF_PERIOD&lt;br /&gt;
** This firmware solves the TMS and TDI packing problem such that a &amp;quot;wb cc tms_tdi&amp;quot; command contains the following:&lt;br /&gt;
*** Word 0: total number of valid bits contained in words 1-n&lt;br /&gt;
*** Word 1-n: (tms,tdi) pairs starting from word 1 (bits 1,0), word 1 (bits 3,2), etc.&lt;br /&gt;
** The TDO packing is done differently: the tdo bits are captured by a shift register, and shifted from LSB to MSB, up to a maximum of 16 TDO bits per 32-bit fibre word.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** Does not configure from its Factory Configuration Device upon power-up&lt;br /&gt;
** (non-critical) when a card does not return a valid reply, the clock card does not send an error reply back to the PC. Instead, it fills the data with whatever it had in its buffer from previous command and sends it to mas.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (clk_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 18,699 / 32,470 ( 58 % )                      ;&lt;br /&gt;
 ; Total pins               ; 261 / 598 ( 44 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 957,952 / 3,317,184 ( 29 % )                  ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 10 / 96 ( 10 % )                              ;&lt;br /&gt;
 ; Total PLLs               ; 2 / 6 ( 33 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (clk_card.tan.rpt):&lt;br /&gt;
** Note that the clock slack on clk0 has diminished significantly over the past few revisions.  However, on this version, it increased again to a reasonable level.&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk1' ; 1.164 ns  ; &lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk0' ; 1.276 ns  ; &lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk2' ; 3.299 ns  ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.4 (buggy) ==&lt;br /&gt;
* '''Filename:'''  cc_v05000004_26feb2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Header Version 6&lt;br /&gt;
** Based on 5.0.3&lt;br /&gt;
** Added JTAG control registers that emulated a parallel port to allow Jam Player software to write to the MCE from a MAS PC and configure devices via JTAG.&lt;br /&gt;
*** JTAG0 -- Output data&lt;br /&gt;
*** JTAG1 -- Input data&lt;br /&gt;
*** JTAG2 -- JTAG Chain control   &lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** This version of firmware is compatible with ported JAM Player software that has been temporarily committed to CVS under \\mce\cards\clk_card\config_fpga\source\unix_code.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** Does not configure from its Factory Configuration Device upon power-up&lt;br /&gt;
** (non-critical) when a card does not return a valid reply, the clock card does not send an error reply back to the PC. Instead, it fills the data with whatever it had in its buffer from previous command and sends it to mas.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (clk_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 17,827 / 32,470 ( 55 % )                      ;&lt;br /&gt;
 ; Total pins               ; 261 / 598 ( 44 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 949,760 / 3,317,184 ( 29 % )                  ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 10 / 96 ( 10 % )                              ;&lt;br /&gt;
 ; Total PLLs               ; 2 / 6 ( 33 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
 ; M512s                    ; 66 / 295 ( 22 % )          &lt;br /&gt;
 ; M4Ks                     ; 171 / 171 ( 100 % )        &lt;br /&gt;
 ; M-RAMs                   ; 3 / 4 ( 75 % )              &lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (clk_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk0' ; 0.771 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk1' ; 1.576 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk2' ; 2.859 ns  ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.3 (tested) ==&lt;br /&gt;
* '''Filename:'''  cc_v05000003_13jan2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
** ---&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Header Version 6&lt;br /&gt;
** Based on 5.0.2&lt;br /&gt;
** Added a Stratix I generic parameter for synthesis-time library selection.&lt;br /&gt;
** Made a top-level modification that makes the interface compatible with the LM95235, while maintaining backwards compatibility.&lt;br /&gt;
** Added the following commands for applying maximum-length sequences to MCE outputs:  AWG_SEQUENCE_LEN, AWG_DATA, AWG_ADDR.  See [[ Maximum Length Sequence Commands | Arbitrary Waveform Generator ]].&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** [[ Arbitrary Waveform Generator ]] (i.e. Maximum Length Sequences for Complex Impedance Measurements)&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** (non-critical) when a card does not return a valid reply, the clock card does not send an error reply back to the PC. Instead, it fills the data with whatever it had in its buffer from previous command and sends it to mas.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (clk_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 18,095 / 32,470 ( 56 % )                      ;&lt;br /&gt;
 ; Total pins               ; 255 / 598 ( 43 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 949,760 / 3,317,184 ( 29 % )                  ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 10 / 96 ( 10 % )                              ;&lt;br /&gt;
 ; Total PLLs               ; 2 / 6 ( 33 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (clk_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk0' ; 1.547 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk2' ; 1.985 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk1' ; 2.067 ns  ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.2 ==&lt;br /&gt;
* '''Filename:'''  cc_v05000002_test00_tagged.sof&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
** ---&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Header Version 6&lt;br /&gt;
** Based off of 5.0.1 and in parallel with 4.0.c (equivalent version)&lt;br /&gt;
** The Sync Box PLL was re-instated to the top level and routed to dv_rx.  It was mistakenly removed after v4.0.9, which means that the sync box sequence number decoding has not worked since then!  When collecting data while triggering off the Sync Box DV, the Clock Card would also sporadically trigger in between data frames.&lt;br /&gt;
** Fixed a bug in ret_dat_wbs that did not handle wb num_rows_reported and wb num_cols_reported commands correctly.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** (non-critical) when a card does not return a valid reply, the clock card does not send an error reply back to the PC. Instead, it fills the data with whatever it had in its buffer from previous command and sends it to mas.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (clk_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 17,598 / 32,470 ( 54 % )                      ;&lt;br /&gt;
 ; Total pins               ; 254 / 598 ( 42 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 818,688 / 3,317,184 ( 25 % )                  ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 10 / 96 ( 10 % )                              ;&lt;br /&gt;
 ; Total PLLs               ; 2 / 6 ( 33 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (clk_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk0' ; 1.965 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk1' ; 2.041 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk2' ; 3.548 ns  ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.1 (buggy) ==&lt;br /&gt;
* '''Filename:'''  cc_v05000001_12may2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
** ---&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Based on 5.0.0 and in parallel with 4.0.b (equivalent version)&lt;br /&gt;
** Header Version 6&lt;br /&gt;
** STOP commands are meant to work in this revision.  The successful execution of STOP commands through the system depends also on the PCI card firmware, and PCI driver.  Modifications have been made to these, and their version numbers have been bumped to...&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** [[ The STOP Command ]]&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** There may be a problem with decoding sync numbers from the sync box.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (clk_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 18,286 / 32,470 ( 56 % )                 ;&lt;br /&gt;
 ; Total pins               ; 259 / 598 ( 43 % )                       ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                        ;&lt;br /&gt;
 ; Total memory bits        ; 1,537,536 / 3,317,184 ( 46 % )           ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 10 / 96 ( 10 % )                         ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                           ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                            ;&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (clk_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk0' ; 1.995 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk2' ; 3.585 ns  ;&lt;br /&gt;
 ; Clock Setup: 'altera_internal_jtag~TCKUTAP'                                                  ; 5.644 ns  ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.0 (buggy) ==&lt;br /&gt;
* '''Filename:'''  cc_v05000000_22dec2008.sof (tagged as sys_v05000000_22dec2008)&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
** ---&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Header Version 6&lt;br /&gt;
** IMPORTANT:  Must be used in conjunction with firmware v05000000 of all other cards!!!&lt;br /&gt;
** This version is based on 4.0.a.  That is, it includes all of the features that were under development in 4.0.a, even though 4.0.a was not released for telescope use.&lt;br /&gt;
** Added the ability to read out a single column of data continuously from one Readout Card&lt;br /&gt;
** New commands include:  readout_col_index, readout_priority, num_cols_reported&lt;br /&gt;
** To allow enough data bandwidth, the spare LVDS line from each card to the Clock Card is now used&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** There may be a problem with decoding sync numbers from the sync box.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (clk_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,607 / 41,250 ( 65 % )                 ;&lt;br /&gt;
 ; Total pins               ; 358 / 616 ( 58 % )                       ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                        ;&lt;br /&gt;
 ; Total memory bits        ; 406,016 / 3,423,744 ( 12 % )             ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 76 / 112 ( 68 % )                        ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                           ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                            ;&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (clk_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.558 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.892 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.987 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.c ==&lt;br /&gt;
* '''Filename:'''  cc_v0400000c_24aug2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
** ---&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Header Version 6&lt;br /&gt;
** Based on v4.0.b and in parallel with 5.0.2 (equivalent version)&lt;br /&gt;
** The Sync Box PLL was re-instated to the top level and routed to dv_rx. It was mistakenly removed after v4.0.9, which means that the sync box sequence number decoding has not worked since then! When collecting data while triggering off the Sync Box DV, the Clock Card would also sporadically trigger in between data frames.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** clk_card.vhd:  re-instantiated the manchester PLL, and routed the manch_clk to dv_rx.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None yet.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (clk_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 14,965 / 32,470 ( 46 % )                      ;&lt;br /&gt;
 ; Total pins               ; 254 / 598 ( 42 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 812,544 / 3,317,184 ( 24 % )                  ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 10 / 96 ( 10 % )                              ;&lt;br /&gt;
 ; Total PLLs               ; 2 / 6 ( 33 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (clk_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk0' ; 1.646 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk1' ; 2.167 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk2' ; 2.919 ns  ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.b (buggy) ==&lt;br /&gt;
* '''Filename:'''  cc_v0400000b_03jun2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
** ---&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Header Version 6&lt;br /&gt;
** Based on v4.0.a and in parallel with 5.0.1 (equivalent version, but without the dual-LVDS feature).&lt;br /&gt;
** STOP commands are meant to work in this revision.  The successful execution of STOP commands through the system depends also on the PCI card firmware, and PCI driver.  Modifications have been made to these, and their version numbers have been bumped to...&lt;br /&gt;
** This firmware is a hybrid version that implements a single LVDS line, but has STOP and On-The-Fly capabilities built in.  The purpose of this firmware is to give SCUBA-2 these features without forcing them to upgrade the firmware on all their other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** [[VHDL changes from v4.0.a and v4.0.b]]&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** There may be a problem with decoding sync numbers from the sync box.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (clk_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 15,023 / 32,470 ( 46 % )                 ;&lt;br /&gt;
 ; Total pins               ; 254 / 598 ( 42 % )                       ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                        ;&lt;br /&gt;
 ; Total memory bits        ; 812,544 / 3,317,184 ( 24 % )             ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 10 / 96 ( 10 % )                         ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                           ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                            ;&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (clk_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk1' ; 1.328 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk0' ; 1.442 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk2' ; 3.383 ns  ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.a (UBC only) ==&lt;br /&gt;
* '''Filename:'''  cc_v0400000a_16oct2008&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
** Make sure that the errno word, and the cards to report word in the data frame header agree with cards_to_report&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Header Version 6&lt;br /&gt;
** Based on 4.0.9&lt;br /&gt;
** Added stop_dly, rcs_to_report_data, and cards_to_report commands&lt;br /&gt;
** Added support for commands to the MCE during data acquisition&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** '''clk_card.vhd:'''  incremented the firmware version number, and added cards_to_report interface signals; added support for the stop_dly, rcs_to_report_data, and cards_to_report commands; Removed the Manchester PLL because the only way to ensure that packets are received without trouble is for the main PLL to be locked on the Manchester clock.  The Manchester PLL was a failed attempted around this.&lt;br /&gt;
** '''clock_card_pack.vhd:'''  added support for the stop_dly, rcs_to_report_data, and cards_to_report commands&lt;br /&gt;
** '''issue_reply.vhd:'''  added support for the stop_dly, rcs_to_report_data, and cards_to_report commands&lt;br /&gt;
** '''cmd_translator.vhd:'''  split up command registers so that it can handle WB/RB/RS commands while acquiring data based on a GO command.&lt;br /&gt;
** '''issue_reply_pack.vhd:'''  added indexing constants.&lt;br /&gt;
** '''reply_queue.vhd:'''  modified the logic for calculating the reply data size, in response to the addition of the rcs_to_report_data, and cards_to_report commands&lt;br /&gt;
** '''reply_queue_sequencer.vhd:'''  modified the logic for reading the data from the reply queues; modified the logic for determining when to stop readout from a card queue to ease timing constraints.  Changed to logic for multiplexing the data buses from the reply queues to combinatorial logic to ease timing constraints.&lt;br /&gt;
** '''reply_translator.vhd:''' added a stop_delay counter for delaying the replies to 'stop ret_dat' commands; added the QUICK_REPLY and QUICK_REPLY_PAUSE states to pause the return of replies to stop commands; added extra handling to the LD_STATUS state to avoid mixing stop replies, and replies to data or simple commands; added stop reply pause logic to DONE state&lt;br /&gt;
** '''ret_dat_wbs.vhd:'''  added the stop_delay_o, rcs_to_report_data, and cards_to_report_o interfaces; implemented a custom register from cards_to_report and stop_delay; removed the register for ret_dat_card_addr which was a special case of cards_to_report.&lt;br /&gt;
** '''ret_dat_wbs_pack:''' added the constant DEFAULT_CARDS_TO_REPORT&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** Reading back rcs_to_report_data returns zero (fixed)&lt;br /&gt;
** Can't issue simple commands during data taking&lt;br /&gt;
** Can't read from RC4 (fixed)&lt;br /&gt;
** There may be a problem with decoding sync numbers from the sync box.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (clk_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 14,542 / 32,470 ( 45 % )                      ;&lt;br /&gt;
 ; Total pins               ; 254 / 598 ( 42 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 812,544 / 3,317,184 ( 24 % )                  ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 8 / 96 ( 8 % )                                ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (clk_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:t|_clk0' ; 1.712 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:t|_clk1' ; 2.632 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:t|_clk2' ; 3.884 ns  ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.9 ==&lt;br /&gt;
* '''Filename:'''  cc_v04000009&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Header Version 6&lt;br /&gt;
** Integrated a bug fix for the sram_ctrl block&lt;br /&gt;
** Integrated new all_cards block of code which was causing a synthesis warning in ModelSim&lt;br /&gt;
** Two new commands added: card_type, scratch.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None to report so far&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (clk_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 14,144 / 32,470 ( 44 % )                 ;&lt;br /&gt;
 ; Total pins               ; 254 / 598 ( 42 % )                       ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                        ;&lt;br /&gt;
 ; Total memory bits        ; 812,544 / 3,317,184 ( 24 % )             ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 8 / 96 ( 8 % )                           ;&lt;br /&gt;
 ; Total PLLs               ; 2 / 6 ( 33 % )                           ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                            ;&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (clk_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk1' ; 0.294 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk0' ; 2.091 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk2' ; 2.711 ns  ;&lt;br /&gt;
&lt;br /&gt;
= Firmware Links =&lt;br /&gt;
* [http://www.phas.ubc.ca/~mce/mcedocs/firmware/cc_fpga_programming_file_catalogue.pdf  Clock Card Firmware Catalog]&lt;br /&gt;
* [http://www.phas.ubc.ca/~mce/mcedocs/firmware/ Firmware Downloads]&lt;br /&gt;
&lt;br /&gt;
= Wiki Links =&lt;br /&gt;
* [http://e-mode.phas.ubc.ca/mcewiki/index.php/MCE_firmware  MCE Firmware Page]&lt;br /&gt;
* [http://e-mode.phas.ubc.ca/mcewiki/index.php/Main_Page  MCE Main Page]&lt;/div&gt;</summary>
		<author><name>Bburger</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Clock_Card_firmware&amp;diff=4403</id>
		<title>Clock Card firmware</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Clock_Card_firmware&amp;diff=4403"/>
		<updated>2011-07-12T18:52:39Z</updated>

		<summary type="html">&lt;p&gt;Bburger: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Recommended Firmware Revisions [http://e-mode.phas.ubc.ca/mcewiki/index.php/Compatible_Versions_(CC,RC,BC,AC) here]&lt;br /&gt;
&lt;br /&gt;
* Clock Card firmware revisions may implement different data packet header formats.  All of the different formats are documented [http://www.phas.ubc.ca/%7Emce/mcedocs/Software/SC2_ELE_S580_526_mce_file_format.pdf here].&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.8 ==&lt;br /&gt;
* '''Filename:'''  cc_v05000008_12jul2011.sof&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** This tag is a place holder for the final version of Ethernet Clock Cards.  This tag currently references unfinished code in CVS.&lt;br /&gt;
** Header Version 6&lt;br /&gt;
** Based on 5.0.7&lt;br /&gt;
** Compatible with MCE Jam Player -- SVN revision 16 (~/jp_25/mce_jam/trunk)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** config_app command is broken, it works in 5.0.3, but not in this version. to be investigated.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (clk_card.fit.rpt):&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (clk_card.tan.rpt):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.7 ==&lt;br /&gt;
* '''Filename:'''  cc_v05000007_14may2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Header Version 6&lt;br /&gt;
** Based on 5.0.6&lt;br /&gt;
** Compatible with MCE Jam Player -- SVN revision 16 (~/jp_25/mce_jam/trunk)&lt;br /&gt;
** Simulation compatible with firmware v5.0.0 for the other cards.&lt;br /&gt;
** Fixed a bug that caused a Clock Card with version 5.x.x firmware installed to return stale data for cards that had version 4.x.x. firmware installed on them.&lt;br /&gt;
** Fixed a bug that caused a Clock Card to return stale data if a card was not present, or not configured.  Now the Clock Card returns 0x00000000.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** config_app command is broken, it works in 5.0.3, but not in this version. to be investigated.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (clk_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 18,745 / 32,470 ( 58 % )                      ;&lt;br /&gt;
 ; Total pins               ; 243 / 598 ( 41 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 957,952 / 3,317,184 ( 29 % )                  ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 10 / 96 ( 10 % )                              ;&lt;br /&gt;
 ; Total PLLs               ; 2 / 6 ( 33 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (clk_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk1' ; 0.279 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk0' ; 0.437 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk2' ; 3.224 ns  ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.6 (buggy) ==&lt;br /&gt;
* '''Filename:'''  cc_v05000006_21apr2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Header Version 6&lt;br /&gt;
** Based on 5.0.5&lt;br /&gt;
** Fixed a bug that prevented the Clock Card from loading firmware from its Factory Configuration Device when sw1:p1 is set to open (to enable remote configuration).&lt;br /&gt;
** This version of firmware works in conjunction with modified Jam Player code that was recently committed to SVN tag: '''~/jp_25/mce_jam/trunk : revision 16.'''&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** To learn how to use remote configuration:  [[Remote Firmware Update]].&lt;br /&gt;
** For .jam file conversions, see:  [[MCE Programming File Conversions]].&lt;br /&gt;
** Removed crc_error functionality for now.  It will get added back in when it is working.  It was found to conflict with the Remote Configuration functionality by preventing the Clock Card from configuring from its Factory Configuration Device.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** Has a bug that causes the Clock Card with version 5.x.x firmware installed to return stale data for cards that have version 4.x.x. firmware installed on them.&lt;br /&gt;
** Has a bug that causes the Clock Card to return stale data if a card is not present, or not configured.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (clk_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 18,652 / 32,470 ( 57 % )                      ;&lt;br /&gt;
 ; Total pins               ; 243 / 598 ( 41 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 957,952 / 3,317,184 ( 29 % )                  ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 10 / 96 ( 10 % )                              ;&lt;br /&gt;
 ; Total PLLs               ; 2 / 6 ( 33 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (clk_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk0' ; 0.590 ns &lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk1' ; 1.683 ns  &lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk2' ; 3.277 ns&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.5 (buggy) ==&lt;br /&gt;
* '''Filename:'''  cc_v05000005_05mar2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Header Version 6&lt;br /&gt;
** Based on 5.0.4&lt;br /&gt;
** Implemented unpacking logic for TMS and TDI signals, and inferring logic for TCK.  This is the solution to the JTAG packing problem.&lt;br /&gt;
** This version of firmware works in conjunction with modified Jam Player code that was recently committed to SVN tag: '''~/jp_25/mce_jam/trunk : revision 8.'''&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** Added the following commands: TMS_TDI, TDO, TDO_SAMPLE_DLY, TCK_HALF_PERIOD&lt;br /&gt;
** This firmware solves the TMS and TDI packing problem such that a &amp;quot;wb cc tms_tdi&amp;quot; command contains the following:&lt;br /&gt;
*** Word 0: total number of valid bits contained in words 1-n&lt;br /&gt;
*** Word 1-n: (tms,tdi) pairs starting from word 1 (bits 1,0), word 1 (bits 3,2), etc.&lt;br /&gt;
** The TDO packing is done differently: the tdo bits are captured by a shift register, and shifted from LSB to MSB, up to a maximum of 16 TDO bits per 32-bit fibre word.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** Does not configure from its Factory Configuration Device upon power-up&lt;br /&gt;
** (non-critical) when a card does not return a valid reply, the clock card does not send an error reply back to the PC. Instead, it fills the data with whatever it had in its buffer from previous command and sends it to mas.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (clk_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 18,699 / 32,470 ( 58 % )                      ;&lt;br /&gt;
 ; Total pins               ; 261 / 598 ( 44 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 957,952 / 3,317,184 ( 29 % )                  ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 10 / 96 ( 10 % )                              ;&lt;br /&gt;
 ; Total PLLs               ; 2 / 6 ( 33 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (clk_card.tan.rpt):&lt;br /&gt;
** Note that the clock slack on clk0 has diminished significantly over the past few revisions.  However, on this version, it increased again to a reasonable level.&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk1' ; 1.164 ns  ; &lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk0' ; 1.276 ns  ; &lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk2' ; 3.299 ns  ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.4 (buggy) ==&lt;br /&gt;
* '''Filename:'''  cc_v05000004_26feb2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Header Version 6&lt;br /&gt;
** Based on 5.0.3&lt;br /&gt;
** Added JTAG control registers that emulated a parallel port to allow Jam Player software to write to the MCE from a MAS PC and configure devices via JTAG.&lt;br /&gt;
*** JTAG0 -- Output data&lt;br /&gt;
*** JTAG1 -- Input data&lt;br /&gt;
*** JTAG2 -- JTAG Chain control   &lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** This version of firmware is compatible with ported JAM Player software that has been temporarily committed to CVS under \\mce\cards\clk_card\config_fpga\source\unix_code.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** Does not configure from its Factory Configuration Device upon power-up&lt;br /&gt;
** (non-critical) when a card does not return a valid reply, the clock card does not send an error reply back to the PC. Instead, it fills the data with whatever it had in its buffer from previous command and sends it to mas.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (clk_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 17,827 / 32,470 ( 55 % )                      ;&lt;br /&gt;
 ; Total pins               ; 261 / 598 ( 44 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 949,760 / 3,317,184 ( 29 % )                  ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 10 / 96 ( 10 % )                              ;&lt;br /&gt;
 ; Total PLLs               ; 2 / 6 ( 33 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
 ; M512s                    ; 66 / 295 ( 22 % )          &lt;br /&gt;
 ; M4Ks                     ; 171 / 171 ( 100 % )        &lt;br /&gt;
 ; M-RAMs                   ; 3 / 4 ( 75 % )              &lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (clk_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk0' ; 0.771 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk1' ; 1.576 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk2' ; 2.859 ns  ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.3 (tested) ==&lt;br /&gt;
* '''Filename:'''  cc_v05000003_13jan2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
** ---&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Header Version 6&lt;br /&gt;
** Based on 5.0.2&lt;br /&gt;
** Added a Stratix I generic parameter for synthesis-time library selection.&lt;br /&gt;
** Made a top-level modification that makes the interface compatible with the LM95235, while maintaining backwards compatibility.&lt;br /&gt;
** Added the following commands for applying maximum-length sequences to MCE outputs:  AWG_SEQUENCE_LEN, AWG_DATA, AWG_ADDR.  See [[ Maximum Length Sequence Commands | Arbitrary Waveform Generator ]].&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** [[ Arbitrary Waveform Generator ]] (i.e. Maximum Length Sequences for Complex Impedance Measurements)&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** (non-critical) when a card does not return a valid reply, the clock card does not send an error reply back to the PC. Instead, it fills the data with whatever it had in its buffer from previous command and sends it to mas.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (clk_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 18,095 / 32,470 ( 56 % )                      ;&lt;br /&gt;
 ; Total pins               ; 255 / 598 ( 43 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 949,760 / 3,317,184 ( 29 % )                  ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 10 / 96 ( 10 % )                              ;&lt;br /&gt;
 ; Total PLLs               ; 2 / 6 ( 33 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (clk_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk0' ; 1.547 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk2' ; 1.985 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk1' ; 2.067 ns  ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.2 ==&lt;br /&gt;
* '''Filename:'''  cc_v05000002_test00_tagged.sof&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
** ---&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Header Version 6&lt;br /&gt;
** Based off of 5.0.1 and in parallel with 4.0.c (equivalent version)&lt;br /&gt;
** The Sync Box PLL was re-instated to the top level and routed to dv_rx.  It was mistakenly removed after v4.0.9, which means that the sync box sequence number decoding has not worked since then!  When collecting data while triggering off the Sync Box DV, the Clock Card would also sporadically trigger in between data frames.&lt;br /&gt;
** Fixed a bug in ret_dat_wbs that did not handle wb num_rows_reported and wb num_cols_reported commands correctly.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** (non-critical) when a card does not return a valid reply, the clock card does not send an error reply back to the PC. Instead, it fills the data with whatever it had in its buffer from previous command and sends it to mas.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (clk_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 17,598 / 32,470 ( 54 % )                      ;&lt;br /&gt;
 ; Total pins               ; 254 / 598 ( 42 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 818,688 / 3,317,184 ( 25 % )                  ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 10 / 96 ( 10 % )                              ;&lt;br /&gt;
 ; Total PLLs               ; 2 / 6 ( 33 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (clk_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk0' ; 1.965 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk1' ; 2.041 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk2' ; 3.548 ns  ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.1 (buggy) ==&lt;br /&gt;
* '''Filename:'''  cc_v05000001_12may2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
** ---&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Based on 5.0.0 and in parallel with 4.0.b (equivalent version)&lt;br /&gt;
** Header Version 6&lt;br /&gt;
** STOP commands are meant to work in this revision.  The successful execution of STOP commands through the system depends also on the PCI card firmware, and PCI driver.  Modifications have been made to these, and their version numbers have been bumped to...&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** [[ The STOP Command ]]&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** There may be a problem with decoding sync numbers from the sync box.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (clk_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 18,286 / 32,470 ( 56 % )                 ;&lt;br /&gt;
 ; Total pins               ; 259 / 598 ( 43 % )                       ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                        ;&lt;br /&gt;
 ; Total memory bits        ; 1,537,536 / 3,317,184 ( 46 % )           ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 10 / 96 ( 10 % )                         ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                           ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                            ;&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (clk_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk0' ; 1.995 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk2' ; 3.585 ns  ;&lt;br /&gt;
 ; Clock Setup: 'altera_internal_jtag~TCKUTAP'                                                  ; 5.644 ns  ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.0 (buggy) ==&lt;br /&gt;
* '''Filename:'''  cc_v05000000_22dec2008.sof (tagged as sys_v05000000_22dec2008)&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
** ---&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Header Version 6&lt;br /&gt;
** IMPORTANT:  Must be used in conjunction with firmware v05000000 of all other cards!!!&lt;br /&gt;
** This version is based on 4.0.a.  That is, it includes all of the features that were under development in 4.0.a, even though 4.0.a was not released for telescope use.&lt;br /&gt;
** Added the ability to read out a single column of data continuously from one Readout Card&lt;br /&gt;
** New commands include:  readout_col_index, readout_priority, num_cols_reported&lt;br /&gt;
** To allow enough data bandwidth, the spare LVDS line from each card to the Clock Card is now used&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** There may be a problem with decoding sync numbers from the sync box.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (clk_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,607 / 41,250 ( 65 % )                 ;&lt;br /&gt;
 ; Total pins               ; 358 / 616 ( 58 % )                       ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                        ;&lt;br /&gt;
 ; Total memory bits        ; 406,016 / 3,423,744 ( 12 % )             ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 76 / 112 ( 68 % )                        ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                           ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                            ;&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (clk_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.558 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.892 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.987 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.c ==&lt;br /&gt;
* '''Filename:'''  cc_v0400000c_24aug2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
** ---&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Header Version 6&lt;br /&gt;
** Based on v4.0.b and in parallel with 5.0.2 (equivalent version)&lt;br /&gt;
** The Sync Box PLL was re-instated to the top level and routed to dv_rx. It was mistakenly removed after v4.0.9, which means that the sync box sequence number decoding has not worked since then! When collecting data while triggering off the Sync Box DV, the Clock Card would also sporadically trigger in between data frames.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** clk_card.vhd:  re-instantiated the manchester PLL, and routed the manch_clk to dv_rx.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None yet.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (clk_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 14,965 / 32,470 ( 46 % )                      ;&lt;br /&gt;
 ; Total pins               ; 254 / 598 ( 42 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 812,544 / 3,317,184 ( 24 % )                  ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 10 / 96 ( 10 % )                              ;&lt;br /&gt;
 ; Total PLLs               ; 2 / 6 ( 33 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (clk_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk0' ; 1.646 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk1' ; 2.167 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk2' ; 2.919 ns  ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.b (buggy) ==&lt;br /&gt;
* '''Filename:'''  cc_v0400000b_03jun2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
** ---&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Header Version 6&lt;br /&gt;
** Based on v4.0.a and in parallel with 5.0.1 (equivalent version, but without the dual-LVDS feature).&lt;br /&gt;
** STOP commands are meant to work in this revision.  The successful execution of STOP commands through the system depends also on the PCI card firmware, and PCI driver.  Modifications have been made to these, and their version numbers have been bumped to...&lt;br /&gt;
** This firmware is a hybrid version that implements a single LVDS line, but has STOP and On-The-Fly capabilities built in.  The purpose of this firmware is to give SCUBA-2 these features without forcing them to upgrade the firmware on all their other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** [[VHDL changes from v4.0.a and v4.0.b]]&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** There may be a problem with decoding sync numbers from the sync box.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (clk_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 15,023 / 32,470 ( 46 % )                 ;&lt;br /&gt;
 ; Total pins               ; 254 / 598 ( 42 % )                       ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                        ;&lt;br /&gt;
 ; Total memory bits        ; 812,544 / 3,317,184 ( 24 % )             ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 10 / 96 ( 10 % )                         ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                           ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                            ;&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (clk_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk1' ; 1.328 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk0' ; 1.442 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk2' ; 3.383 ns  ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.a (UBC only) ==&lt;br /&gt;
* '''Filename:'''  cc_v0400000a_16oct2008&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
** Make sure that the errno word, and the cards to report word in the data frame header agree with cards_to_report&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Header Version 6&lt;br /&gt;
** Based on 4.0.9&lt;br /&gt;
** Added stop_dly, rcs_to_report_data, and cards_to_report commands&lt;br /&gt;
** Added support for commands to the MCE during data acquisition&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** '''clk_card.vhd:'''  incremented the firmware version number, and added cards_to_report interface signals; added support for the stop_dly, rcs_to_report_data, and cards_to_report commands; Removed the Manchester PLL because the only way to ensure that packets are received without trouble is for the main PLL to be locked on the Manchester clock.  The Manchester PLL was a failed attempted around this.&lt;br /&gt;
** '''clock_card_pack.vhd:'''  added support for the stop_dly, rcs_to_report_data, and cards_to_report commands&lt;br /&gt;
** '''issue_reply.vhd:'''  added support for the stop_dly, rcs_to_report_data, and cards_to_report commands&lt;br /&gt;
** '''cmd_translator.vhd:'''  split up command registers so that it can handle WB/RB/RS commands while acquiring data based on a GO command.&lt;br /&gt;
** '''issue_reply_pack.vhd:'''  added indexing constants.&lt;br /&gt;
** '''reply_queue.vhd:'''  modified the logic for calculating the reply data size, in response to the addition of the rcs_to_report_data, and cards_to_report commands&lt;br /&gt;
** '''reply_queue_sequencer.vhd:'''  modified the logic for reading the data from the reply queues; modified the logic for determining when to stop readout from a card queue to ease timing constraints.  Changed to logic for multiplexing the data buses from the reply queues to combinatorial logic to ease timing constraints.&lt;br /&gt;
** '''reply_translator.vhd:''' added a stop_delay counter for delaying the replies to 'stop ret_dat' commands; added the QUICK_REPLY and QUICK_REPLY_PAUSE states to pause the return of replies to stop commands; added extra handling to the LD_STATUS state to avoid mixing stop replies, and replies to data or simple commands; added stop reply pause logic to DONE state&lt;br /&gt;
** '''ret_dat_wbs.vhd:'''  added the stop_delay_o, rcs_to_report_data, and cards_to_report_o interfaces; implemented a custom register from cards_to_report and stop_delay; removed the register for ret_dat_card_addr which was a special case of cards_to_report.&lt;br /&gt;
** '''ret_dat_wbs_pack:''' added the constant DEFAULT_CARDS_TO_REPORT&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** Reading back rcs_to_report_data returns zero (fixed)&lt;br /&gt;
** Can't issue simple commands during data taking&lt;br /&gt;
** Can't read from RC4 (fixed)&lt;br /&gt;
** There may be a problem with decoding sync numbers from the sync box.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (clk_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 14,542 / 32,470 ( 45 % )                      ;&lt;br /&gt;
 ; Total pins               ; 254 / 598 ( 42 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 812,544 / 3,317,184 ( 24 % )                  ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 8 / 96 ( 8 % )                                ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (clk_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:t|_clk0' ; 1.712 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:t|_clk1' ; 2.632 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:t|_clk2' ; 3.884 ns  ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.9 ==&lt;br /&gt;
* '''Filename:'''  cc_v04000009&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Header Version 6&lt;br /&gt;
** Integrated a bug fix for the sram_ctrl block&lt;br /&gt;
** Integrated new all_cards block of code which was causing a synthesis warning in ModelSim&lt;br /&gt;
** Two new commands added: card_type, scratch.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None to report so far&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (clk_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 14,144 / 32,470 ( 44 % )                 ;&lt;br /&gt;
 ; Total pins               ; 254 / 598 ( 42 % )                       ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                        ;&lt;br /&gt;
 ; Total memory bits        ; 812,544 / 3,317,184 ( 24 % )             ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 8 / 96 ( 8 % )                           ;&lt;br /&gt;
 ; Total PLLs               ; 2 / 6 ( 33 % )                           ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                            ;&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (clk_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk1' ; 0.294 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk0' ; 2.091 ns  ;&lt;br /&gt;
 ; Clock Setup: 'clk_switchover:clk_switchover_slave|cc_pll:pll0|altpll:altpll_component|_clk2' ; 2.711 ns  ;&lt;br /&gt;
&lt;br /&gt;
= Firmware Links =&lt;br /&gt;
* [http://www.phas.ubc.ca/~mce/mcedocs/firmware/cc_fpga_programming_file_catalogue.pdf  Clock Card Firmware Catalog]&lt;br /&gt;
* [http://www.phas.ubc.ca/~mce/mcedocs/firmware/ Firmware Downloads]&lt;br /&gt;
&lt;br /&gt;
= Wiki Links =&lt;br /&gt;
* [http://e-mode.phas.ubc.ca/mcewiki/index.php/MCE_firmware  MCE Firmware Page]&lt;br /&gt;
* [http://e-mode.phas.ubc.ca/mcewiki/index.php/Main_Page  MCE Main Page]&lt;/div&gt;</summary>
		<author><name>Bburger</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Quartus_II_Installation&amp;diff=4372</id>
		<title>Quartus II Installation</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Quartus_II_Installation&amp;diff=4372"/>
		<updated>2011-05-20T18:28:50Z</updated>

		<summary type="html">&lt;p&gt;Bburger: /* Quartus II for Windows (For Synthesizing MCE Firmware) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Quartus II Programmer for Windows (For Programming the MCE) =&lt;br /&gt;
* If you are planning to use Altera-supplied hardware (e.g. USB-Blaster) to upgrade the MCE firmware, you need to install &amp;quot;'''Quartus Programmer'''&amp;quot; on either a Windows or Linux PC.&lt;br /&gt;
* See the OS requirements here: http://www.altera.com/download/os-support/oss-index.html &amp;lt;br&amp;gt;&lt;br /&gt;
* Download Quartus here: https://www.altera.com/download/programming/quartus2/pq2-index.jsp&lt;br /&gt;
* Note that the installer needs direct access to Quartus website. In case you are behind a firewall, you may need to setup a proxy server.&lt;br /&gt;
* The installation is straight forward. After installation is complete, plug in the USB-Blaster and the driver is typically found under altera/10.0/quartus/driver.&lt;br /&gt;
&lt;br /&gt;
= Quartus II for Windows (For Synthesizing MCE Firmware) =&lt;br /&gt;
* In a web browser, browse to ftp://ftp.altera.com/outgoing/release/, or https://www.altera.com/download/dnl-index.jsp&lt;br /&gt;
* Filenames to look for are of the form &amp;quot;91sp1_quartus_free.exe&amp;quot; if you don't have a license, or &amp;quot;91sp1_quartus_windows.exe&amp;quot; if you have a license.&lt;br /&gt;
* Download the appropriate file.&lt;br /&gt;
* Double click on 'XX_quartus_windows.exe' and follow the extraction and installation instructions.&lt;br /&gt;
&lt;br /&gt;
= Quartus II for Linux =&lt;br /&gt;
As usual, only RedHat and Seuse are officially supported and you are on your own if you install it on any other Linux distribution. &lt;br /&gt;
&lt;br /&gt;
== Troubleshooting Ubuntu Installation ==&lt;br /&gt;
Quartus 10.0 installed fine on Ubuntu and no tweaking was needed. &lt;br /&gt;
&lt;br /&gt;
However, when installing Quartus 9.1 the installer couldn't find a few commands that typically exist on Fedora systems, notably ''arch'' and ''rpm''. You can create a fake version of these and copy them under /usr/bin. &lt;br /&gt;
* Create a script called ''arch'' that contains: &lt;br /&gt;
 uname -m&lt;br /&gt;
* Create a script called ''rpm'' that contains: &lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 OUT=/home/mce/rpm_cmd.txt&lt;br /&gt;
 date &amp;gt;&amp;gt; $OUT&lt;br /&gt;
 echo $@ &amp;gt;&amp;gt; $OUT&lt;br /&gt;
Make sure the permissions are set to executable. &lt;br /&gt;
&lt;br /&gt;
More tips here: http://fpga4u.epfl.ch/wiki/Install_Quartus_II#On_Linux &lt;br /&gt;
&lt;br /&gt;
== Launching Quartus ==&lt;br /&gt;
After installation is complete, add the Quartus path to $PATH (probably in .bashrc), e.g.:&lt;br /&gt;
 PATH=$PATH:/opt/usr/local/lib/altera/10.0/quartus/bin&lt;br /&gt;
 export PATH&lt;br /&gt;
&lt;br /&gt;
== License Manager ==&lt;br /&gt;
If you have only installed '''Quartus Programmer or Quartus II web edition''', the following section '''does NOT''' apply to you. However, if you have installed the &amp;quot;Quartus Subscription Edition&amp;quot;, then continue reading.&lt;br /&gt;
&lt;br /&gt;
You need to have a license file from Altera. The license file needs to be modified as follows. Change the top few lines from:&lt;br /&gt;
 SERVER &amp;lt;hostname&amp;gt; 001e90151053 &amp;lt;port number&amp;gt;&lt;br /&gt;
 VENDOR alterad &amp;lt;path to daemon executable&amp;gt;&lt;br /&gt;
 VENDOR mgcld &amp;lt;path to daemon executable&amp;gt;&lt;br /&gt;
 USE_SERVER&lt;br /&gt;
to&lt;br /&gt;
 SERVER mce-ubc-2 001e90151053 1700&lt;br /&gt;
 DAEMON alterad /opt/altera91/quartus/linux64/alterad&lt;br /&gt;
 DAEMON mgcld /opt/altera91/modelsim_ase/linux/mgls/lib/mgcld&lt;br /&gt;
 USE_SERVER&lt;br /&gt;
&lt;br /&gt;
Copy the license file in /opt/licenses/quartus_001e90151053.dat &lt;br /&gt;
&lt;br /&gt;
The license manager can be invoked by:&lt;br /&gt;
 sudo /opt/altera10.0sp1/quartus/linux/lmgrd -c /opt/licenses/quartus_001e90151053.dat&lt;br /&gt;
&lt;br /&gt;
You can add this line (without the sudo) into /etc/rc.local to get it to start whenever the computer boots.&lt;br /&gt;
&lt;br /&gt;
When this works, it should spit out messages like this:&lt;br /&gt;
 8:38:25 (lmgrd) Started alterad (internet tcp_port 52255 pid 28888)&lt;br /&gt;
 8:38:25 (lmgrd) Started mgcld (internet tcp_port 54712 pid 28889)&lt;br /&gt;
 8:38:25 (alterad) FLEXlm version 9.50&lt;br /&gt;
 8:38:25 (alterad) lmgrd version 11.4, alterad version 9.5&lt;br /&gt;
 &lt;br /&gt;
 8:38:25 (mgcld) FLEXnet Licensing version v10.8.5.0 build 31891 i86_r6&lt;br /&gt;
 8:38:25 (mgcld) lmgrd version 11.4, mgcld version 10.8&lt;br /&gt;
 &lt;br /&gt;
 8:38:25 (mgcld) Server started on mce-ubc-2 for:	alteramtivsim	&lt;br /&gt;
 8:38:25 (mgcld) &lt;br /&gt;
 8:38:25 (mgcld) Licenses are case sensitive for mgcld&lt;br /&gt;
 8:38:25 (mgcld) &lt;br /&gt;
 8:38:25 (mgcld) EXTERNAL FILTERS are OFF&lt;br /&gt;
 8:38:25 (lmgrd) mgcld using TCP-port 54712&lt;br /&gt;
 8:38:25 (alterad) Server started on mce-ubc-2 for:	maxplus2	&lt;br /&gt;
 8:38:25 (alterad) quartus		6AF7_0012	6AF7_0014	&lt;br /&gt;
 8:38:25 (alterad) 6AF7_0055	6AF7_00A7	6AF7_00A8	&lt;br /&gt;
 8:38:25 (alterad) 6AF7_00A4	6AF7_0034	6AF7_00AC	&lt;br /&gt;
 8:38:25 (alterad) 6AF7_00AD	6AF7_00BE	6AF7_00BF	&lt;br /&gt;
 8:38:25 (alterad) 6AF7_00C2	maxplus2verilog maxplus2vhdl	&lt;br /&gt;
 8:38:25 (alterad) altera_mainwin_lnx altera_mainwin	6AF8_00A2	&lt;br /&gt;
 8:38:25 (alterad) 6AF7_00A2&lt;/div&gt;</summary>
		<author><name>Bburger</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Quartus_II_Installation&amp;diff=4371</id>
		<title>Quartus II Installation</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Quartus_II_Installation&amp;diff=4371"/>
		<updated>2011-05-20T18:28:37Z</updated>

		<summary type="html">&lt;p&gt;Bburger: /* Quartus II for Windows (For Synthesizing MCE Firmware) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Quartus II Programmer for Windows (For Programming the MCE) =&lt;br /&gt;
* If you are planning to use Altera-supplied hardware (e.g. USB-Blaster) to upgrade the MCE firmware, you need to install &amp;quot;'''Quartus Programmer'''&amp;quot; on either a Windows or Linux PC.&lt;br /&gt;
* See the OS requirements here: http://www.altera.com/download/os-support/oss-index.html &amp;lt;br&amp;gt;&lt;br /&gt;
* Download Quartus here: https://www.altera.com/download/programming/quartus2/pq2-index.jsp&lt;br /&gt;
* Note that the installer needs direct access to Quartus website. In case you are behind a firewall, you may need to setup a proxy server.&lt;br /&gt;
* The installation is straight forward. After installation is complete, plug in the USB-Blaster and the driver is typically found under altera/10.0/quartus/driver.&lt;br /&gt;
&lt;br /&gt;
= Quartus II for Windows (For Synthesizing MCE Firmware) =&lt;br /&gt;
* In a web browser, browse to ftp://ftp.altera.com/outgoing/release/&lt;br /&gt;
* Or: https://www.altera.com/download/dnl-index.jsp&lt;br /&gt;
* Filenames to look for are of the form &amp;quot;91sp1_quartus_free.exe&amp;quot; if you don't have a license, or &amp;quot;91sp1_quartus_windows.exe&amp;quot; if you have a license.&lt;br /&gt;
* Download the appropriate file.&lt;br /&gt;
* Double click on 'XX_quartus_windows.exe' and follow the extraction and installation instructions.&lt;br /&gt;
&lt;br /&gt;
= Quartus II for Linux =&lt;br /&gt;
As usual, only RedHat and Seuse are officially supported and you are on your own if you install it on any other Linux distribution. &lt;br /&gt;
&lt;br /&gt;
== Troubleshooting Ubuntu Installation ==&lt;br /&gt;
Quartus 10.0 installed fine on Ubuntu and no tweaking was needed. &lt;br /&gt;
&lt;br /&gt;
However, when installing Quartus 9.1 the installer couldn't find a few commands that typically exist on Fedora systems, notably ''arch'' and ''rpm''. You can create a fake version of these and copy them under /usr/bin. &lt;br /&gt;
* Create a script called ''arch'' that contains: &lt;br /&gt;
 uname -m&lt;br /&gt;
* Create a script called ''rpm'' that contains: &lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 OUT=/home/mce/rpm_cmd.txt&lt;br /&gt;
 date &amp;gt;&amp;gt; $OUT&lt;br /&gt;
 echo $@ &amp;gt;&amp;gt; $OUT&lt;br /&gt;
Make sure the permissions are set to executable. &lt;br /&gt;
&lt;br /&gt;
More tips here: http://fpga4u.epfl.ch/wiki/Install_Quartus_II#On_Linux &lt;br /&gt;
&lt;br /&gt;
== Launching Quartus ==&lt;br /&gt;
After installation is complete, add the Quartus path to $PATH (probably in .bashrc), e.g.:&lt;br /&gt;
 PATH=$PATH:/opt/usr/local/lib/altera/10.0/quartus/bin&lt;br /&gt;
 export PATH&lt;br /&gt;
&lt;br /&gt;
== License Manager ==&lt;br /&gt;
If you have only installed '''Quartus Programmer or Quartus II web edition''', the following section '''does NOT''' apply to you. However, if you have installed the &amp;quot;Quartus Subscription Edition&amp;quot;, then continue reading.&lt;br /&gt;
&lt;br /&gt;
You need to have a license file from Altera. The license file needs to be modified as follows. Change the top few lines from:&lt;br /&gt;
 SERVER &amp;lt;hostname&amp;gt; 001e90151053 &amp;lt;port number&amp;gt;&lt;br /&gt;
 VENDOR alterad &amp;lt;path to daemon executable&amp;gt;&lt;br /&gt;
 VENDOR mgcld &amp;lt;path to daemon executable&amp;gt;&lt;br /&gt;
 USE_SERVER&lt;br /&gt;
to&lt;br /&gt;
 SERVER mce-ubc-2 001e90151053 1700&lt;br /&gt;
 DAEMON alterad /opt/altera91/quartus/linux64/alterad&lt;br /&gt;
 DAEMON mgcld /opt/altera91/modelsim_ase/linux/mgls/lib/mgcld&lt;br /&gt;
 USE_SERVER&lt;br /&gt;
&lt;br /&gt;
Copy the license file in /opt/licenses/quartus_001e90151053.dat &lt;br /&gt;
&lt;br /&gt;
The license manager can be invoked by:&lt;br /&gt;
 sudo /opt/altera10.0sp1/quartus/linux/lmgrd -c /opt/licenses/quartus_001e90151053.dat&lt;br /&gt;
&lt;br /&gt;
You can add this line (without the sudo) into /etc/rc.local to get it to start whenever the computer boots.&lt;br /&gt;
&lt;br /&gt;
When this works, it should spit out messages like this:&lt;br /&gt;
 8:38:25 (lmgrd) Started alterad (internet tcp_port 52255 pid 28888)&lt;br /&gt;
 8:38:25 (lmgrd) Started mgcld (internet tcp_port 54712 pid 28889)&lt;br /&gt;
 8:38:25 (alterad) FLEXlm version 9.50&lt;br /&gt;
 8:38:25 (alterad) lmgrd version 11.4, alterad version 9.5&lt;br /&gt;
 &lt;br /&gt;
 8:38:25 (mgcld) FLEXnet Licensing version v10.8.5.0 build 31891 i86_r6&lt;br /&gt;
 8:38:25 (mgcld) lmgrd version 11.4, mgcld version 10.8&lt;br /&gt;
 &lt;br /&gt;
 8:38:25 (mgcld) Server started on mce-ubc-2 for:	alteramtivsim	&lt;br /&gt;
 8:38:25 (mgcld) &lt;br /&gt;
 8:38:25 (mgcld) Licenses are case sensitive for mgcld&lt;br /&gt;
 8:38:25 (mgcld) &lt;br /&gt;
 8:38:25 (mgcld) EXTERNAL FILTERS are OFF&lt;br /&gt;
 8:38:25 (lmgrd) mgcld using TCP-port 54712&lt;br /&gt;
 8:38:25 (alterad) Server started on mce-ubc-2 for:	maxplus2	&lt;br /&gt;
 8:38:25 (alterad) quartus		6AF7_0012	6AF7_0014	&lt;br /&gt;
 8:38:25 (alterad) 6AF7_0055	6AF7_00A7	6AF7_00A8	&lt;br /&gt;
 8:38:25 (alterad) 6AF7_00A4	6AF7_0034	6AF7_00AC	&lt;br /&gt;
 8:38:25 (alterad) 6AF7_00AD	6AF7_00BE	6AF7_00BF	&lt;br /&gt;
 8:38:25 (alterad) 6AF7_00C2	maxplus2verilog maxplus2vhdl	&lt;br /&gt;
 8:38:25 (alterad) altera_mainwin_lnx altera_mainwin	6AF8_00A2	&lt;br /&gt;
 8:38:25 (alterad) 6AF7_00A2&lt;/div&gt;</summary>
		<author><name>Bburger</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Bias_Card_firmware&amp;diff=4369</id>
		<title>Bias Card firmware</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Bias_Card_firmware&amp;diff=4369"/>
		<updated>2011-05-12T21:51:02Z</updated>

		<summary type="html">&lt;p&gt;Bburger: /* Revision 5.0.5 (recommended) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Recommended Firmware Revisions [http://e-mode.phas.ubc.ca/mcewiki/index.php/Compatible_Versions_(CC,RC,BC,AC) here]&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.6 (under test) ==&lt;br /&gt;
* '''Filename:'''  bc_v05000006_11may2011.sof&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Changes the timing of loading the FB_COLxx values from 32 clock cycles before the start of a new frame, to the start of a new frame.  This firmware was generated to find the reason for the downturns in raw data at the end of rows, as seen by Jeffrey Flilippini: &lt;br /&gt;
** See details here:  http://spiderwiki.princeton.edu/spider/AnalysisLogbook/TestCryostat/20110427_muxing/index.html&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None yet reported&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (bias_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 6,278 / 10,570 ( 59 % )                       ;&lt;br /&gt;
 ; Total pins               ; 209 / 427 ( 49 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 133,120 / 920,448 ( 14 % )                    ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 8 / 48 ( 17 % )                               ;&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (bias_card.tan.rpt):&lt;br /&gt;
 ; Fast Model Clock Setup: 'bc_pll:pll0|altpll:altpll_component|_clk0' ; 6.930 ns  &lt;br /&gt;
 ; Fast Model Clock Setup: 'bc_pll:pll0|altpll:altpll_component|_clk1' ; 6.980 ns  &lt;br /&gt;
 ; Fast Model Clock Setup: 'bc_pll:pll0|altpll:altpll_component|_clk3' ; 16.383 ns&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.5 (recommended) ==&lt;br /&gt;
; Filename&lt;br /&gt;
: bc_v05000005_20jul2010.sof &lt;br /&gt;
; Features&lt;br /&gt;
: based on 5.0.4, but updated for Rev. F/D hardware pinout.&lt;br /&gt;
: card_type parameter now includes the pcb-revision information as well as the card_type. card_type is specified as 0x01 as the lower byte (same as before). Reading back card_type parameter returns: 0x0F01 in Rev. D cards, and 0x0601 in Rev. F cards. (Previously, reading back card_type parameter only returned 0x01).                   &lt;br /&gt;
&lt;br /&gt;
; Details&lt;br /&gt;
: When using tes_bias lines, make sure the count is 12 for bias parameter in mce.cfg file.&lt;br /&gt;
: When installed on Rev. D file, tes_mapping has to have offset =11 in mce.cfg.&lt;br /&gt;
 &lt;br /&gt;
; To do&lt;br /&gt;
:none&lt;br /&gt;
; Bugs&lt;br /&gt;
: none&lt;br /&gt;
; FPGA Resource Usage&lt;br /&gt;
 : Total logic elements     ; 60%&lt;br /&gt;
 : M512s                    ; 49%&lt;br /&gt;
 : M4Ks                     ; 100%&lt;br /&gt;
 : M-RAMs                   ; 100%&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.4 (lab use) ==&lt;br /&gt;
; Filename&lt;br /&gt;
: bc_v05000004_20may2010.sof &lt;br /&gt;
; Features&lt;br /&gt;
: build based on 5.0.3 for Rev. E cards&lt;br /&gt;
: Biases are refreshed 1 clock cycles after the start of a new row, regardless of whether they are running in multiplex mode or not and whether it is a regular bias line or low-noise bias line.&lt;br /&gt;
; Details&lt;br /&gt;
: '''NOTE''' If this firmware is loaded on a Rev. D card, it's harmless. The only functionality loss is that the '''bias''' command will not work as unfortunately DAC CS and CLK pins are swapped for the bias DAC between the two revisions of the card.&lt;br /&gt;
; To do&lt;br /&gt;
:none&lt;br /&gt;
; Bugs&lt;br /&gt;
: none&lt;br /&gt;
; FPGA Resource Usage&lt;br /&gt;
: Total logic elements     ; 60%&lt;br /&gt;
: M512s                    ; 49%&lt;br /&gt;
: M4Ks                     ; 100%&lt;br /&gt;
: M-RAMs                   ; 100%&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.3 (lab use) ==&lt;br /&gt;
; Filename&lt;br /&gt;
: bc_v05000003_12may2010.sof &lt;br /&gt;
; Features&lt;br /&gt;
: build based on 5.0.2 for Rev. E cards&lt;br /&gt;
: added '''fb_col0 to fb_col31''' and '''enbl_mux''' commands to accommodate row-based sq2fb switching. When enbl_mux is asserted for a column, then the DAC is refreshed on every row visit with the value specified by fb_col command.&lt;br /&gt;
; Details&lt;br /&gt;
: The original Bias Card design has a buffer after the DAC that is too slow followed by kHz range RC filters, so in order to enable the multiplexing feature, one has to make sure that the BC hardware is modified as per ECO-xxx (to be added here).&lt;br /&gt;
: card_type returns 5 (indicating a Rev. E)&lt;br /&gt;
: If this firmware is loaded on a Rev. D card, it's harmless. The only functionality loss is that the bias command will not work as unfortunately DAC CS and CLK pins are swapped for the bias DAC between the two revisions of the card.&lt;br /&gt;
: combinational loops present in previous versions are removed now&lt;br /&gt;
: There is 9+16*2=41 clock cycle (820ns) delay for the bias to be applied after the start of a new row. This combined with another 400ns delay due to inherent DAC delay is about 60 clock-cycle delay. &lt;br /&gt;
; To do&lt;br /&gt;
: The excessive 41 clock cycle delay to apply a new bias has to be reduced. It is conceivable to preload the DACs and reduce this delay to 1 to 2 clock cycles.&lt;br /&gt;
; Bugs&lt;br /&gt;
: none&lt;br /&gt;
; FPGA Resource Usage&lt;br /&gt;
: Total logic elements     ; 6,140 / 10,570 ( 58 % )                       ;&lt;br /&gt;
: Total memory bits        ; 133,120 / 920,448 ( 14 % )                    ;&lt;br /&gt;
: M512s                    ; 48 / 94 ( 51 % )                              ;&lt;br /&gt;
: M4Ks                     ; 60 / 60 ( 100 % )                             ;&lt;br /&gt;
: M-RAMs                   ; 0 / 1 ( 0 % )                                 ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.2 (lab use) ==&lt;br /&gt;
; Filename&lt;br /&gt;
: bc_v05000002_xxjan2010.sof &lt;br /&gt;
; Features&lt;br /&gt;
: build based on 5.0.1 for Rev. E cards&lt;br /&gt;
: Independent control for ln_bias lines 0 to 11&lt;br /&gt;
; Details&lt;br /&gt;
: If this firmware is loaded on a Rev. D card, it's harmless. The only functionality loss is that the bias command will not work as unfortunately DAC CS and CLK pins are swapped for the bias DAC between the two revisions of the card.&lt;br /&gt;
; To do &lt;br /&gt;
: fix combinational loops on read-ram register&lt;br /&gt;
&lt;br /&gt;
; Bugs&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.1 (lab use) ==&lt;br /&gt;
; Filename&lt;br /&gt;
: bc_v05000001_19jan2010.sof &lt;br /&gt;
; Features&lt;br /&gt;
: supports the new low-noise bias lines (total of 12) introduced in Bias Card Rev. E&lt;br /&gt;
: card_type parameter is set to 5 (bias-card Rev. E)&lt;br /&gt;
: All DACs are loaded at once as oppose to previous revisions that loaded them one after next.&lt;br /&gt;
: DAC clock is now 25MHz and generated by PLL, previous firmware had 12.5MHz clock generated by dividing down.&lt;br /&gt;
; Details&lt;br /&gt;
: If this firmware is loaded on a Rev. D card, it's harmless. The only functionality loss is that the bias command will not work as unfortunately DAC CS and CLK pins are swapped for the bias DAC between the two revisions of the card.&lt;br /&gt;
; To do &lt;br /&gt;
: All ln_bias lines are controlled at once and this should be modified to independent control.&lt;br /&gt;
; Bugs&lt;br /&gt;
ln_bias_0 doesn't work, because the data line for ln_bias_0 is not connected in firmware.&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.0 ==&lt;br /&gt;
* '''Filename:'''  bc_v05000000_22dec2008.sof (tagged as sys_v05000000_22dec2008)&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** IMPORTANT:  Must be used in conjunction with firmware v05000000 of all other cards!!!&lt;br /&gt;
** To allow enough data bandwidth, the spare LVDS line from each card to the Clock Card is now used&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None yet reported&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (bias_card.fit.rpt):&lt;br /&gt;
 ; Fitter Status            ; Successful - Wed Jan 14 11:19:37 2009    ;&lt;br /&gt;
 ; Quartus II Version       ; 8.1 Build 163 10/28/2008 SJ Full Version ;&lt;br /&gt;
 ; Device                   ; EP1S10F780C5                             ;&lt;br /&gt;
 ; Total logic elements     ; 3,356 / 10,570 ( 32 % )                  ;&lt;br /&gt;
 ; Total pins               ; 187 / 427 ( 44 % )                       ;&lt;br /&gt;
 ; Total memory bits        ; 70,144 / 920,448 ( 8 % )                 ;&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (bias_card.tan.rpt):&lt;br /&gt;
 ; Fast Model Clock Setup: 'bc_pll:pll0|altpll:altpll_component|_clk1' ; 7.060 ns  ;&lt;br /&gt;
 ; Fast Model Clock Setup: 'bc_pll:pll0|altpll:altpll_component|_clk0' ; 7.125 ns  ;&lt;br /&gt;
 ; Fast Model Clock Hold: 'bc_pll:pll0|altpll:altpll_component|_clk0'  ; 0.383 ns  ;&lt;br /&gt;
 ; Fast Model Clock Hold: 'bc_pll:pll0|altpll:altpll_component|_clk1'  ; 0.384 ns  ;&lt;br /&gt;
 ; Fast Model Recovery: 'bc_pll:pll0|altpll:altpll_component|_clk0'    ; 16.037 ns ;&lt;br /&gt;
 ; Fast Model Removal: 'bc_pll:pll0|altpll:altpll_component|_clk0'     ; 0.575 ns  ;&lt;br /&gt;
 ; Total number of failed paths                                        ;           ;&lt;br /&gt;
&lt;br /&gt;
== Revision 1.4.2 ==&lt;br /&gt;
* bc_v01040002_15jul2008.sof&lt;br /&gt;
Features:&lt;br /&gt;
* Added the tga_i signal to the sensitivity list for the bc_dac_ctrl FSM&lt;br /&gt;
* potential bug may have been introduced with resetting the DAC counter due to inadvertently using the wrong bc_dac_ctrl_core.vhd version.&lt;br /&gt;
&lt;br /&gt;
== Revision 1.4.1 ==&lt;br /&gt;
* bc_v01040001_25jan2008.sof&lt;br /&gt;
&lt;br /&gt;
Features:&lt;br /&gt;
* Added card_type and scratch commands&lt;br /&gt;
* Integrated fw_rev and slot_id as part of all_cards&lt;br /&gt;
* Added provisions for safe state machines to fix the reset problem.&lt;br /&gt;
* Added lvds_tx = 0 so clock-card can check whether the card is plugged in using this spare lvds line.&lt;br /&gt;
Bugs:  None so far&lt;br /&gt;
&lt;br /&gt;
= Firmware Links =&lt;br /&gt;
* [http://www.phas.ubc.ca/~mce/mcedocs/firmware/ Firmware .sof &amp;amp; .pof Downloads]&lt;br /&gt;
* [http://www.phas.ubc.ca/~mce/mcedocs/firmware/bc_fpga_programming_file_catalogue.pdf  Bias Card Firmware Catalog]&lt;br /&gt;
&lt;br /&gt;
= Wiki Links =&lt;br /&gt;
* [http://e-mode.phas.ubc.ca/mcewiki/index.php/MCE_firmware  MCE Firmware Page]&lt;br /&gt;
* [http://e-mode.phas.ubc.ca/mcewiki/index.php/Main_Page  MCE Main Page]&lt;/div&gt;</summary>
		<author><name>Bburger</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Bias_Card_firmware&amp;diff=4366</id>
		<title>Bias Card firmware</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Bias_Card_firmware&amp;diff=4366"/>
		<updated>2011-05-12T19:17:23Z</updated>

		<summary type="html">&lt;p&gt;Bburger: /* Revision 5.0.6 (under test) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Recommended Firmware Revisions [http://e-mode.phas.ubc.ca/mcewiki/index.php/Compatible_Versions_(CC,RC,BC,AC) here]&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.6 (under test) ==&lt;br /&gt;
* '''Filename:'''  bc_v05000006_11may2011.sof&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Changes the timing of loading the FB_COLxx values from 32 clock cycles before the start of a new frame, to the start of a new frame.  This firmware was generated to find the reason for the downturns in raw data at the end of rows, as seen by Jeffrey Flilippini: &lt;br /&gt;
** See details here:  http://spiderwiki.princeton.edu/spider/AnalysisLogbook/TestCryostat/20110427_muxing/index.html&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None yet reported&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (bias_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 6,278 / 10,570 ( 59 % )                       ;&lt;br /&gt;
 ; Total pins               ; 209 / 427 ( 49 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 133,120 / 920,448 ( 14 % )                    ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 8 / 48 ( 17 % )                               ;&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (bias_card.tan.rpt):&lt;br /&gt;
 ; Fast Model Clock Setup: 'bc_pll:pll0|altpll:altpll_component|_clk0' ; 6.930 ns  &lt;br /&gt;
 ; Fast Model Clock Setup: 'bc_pll:pll0|altpll:altpll_component|_clk1' ; 6.980 ns  &lt;br /&gt;
 ; Fast Model Clock Setup: 'bc_pll:pll0|altpll:altpll_component|_clk3' ; 16.383 ns&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.5 (recommended) ==&lt;br /&gt;
; Filename&lt;br /&gt;
: bc_v05000005_20jul2010.sof &lt;br /&gt;
; Features&lt;br /&gt;
: based on 5.0.4, but updated for Rev. F/D hardware pinout.&lt;br /&gt;
: card_type parameter now includes the pcb-revision information as well as the card_type. card_type is specified as 0x01 as the lower byte (same as before). Reading back card_type parameter returns: 0x0F01 in Rev. D cards, and 0x0601 in Rev. F cards. (Previously, reading back card_type parameter only returned 0x01).                   &lt;br /&gt;
&lt;br /&gt;
; Details&lt;br /&gt;
: When using tes_bias lines, make sure the count is 12 for bias parameter in mce.cfg file.&lt;br /&gt;
: When installed on Rev. D file, tes_mapping has to have offset =11 in mce.cfg.&lt;br /&gt;
 &lt;br /&gt;
; To do&lt;br /&gt;
:none&lt;br /&gt;
; Bugs&lt;br /&gt;
: none&lt;br /&gt;
; FPGA Resource Usage&lt;br /&gt;
: Total logic elements     ; 60%&lt;br /&gt;
: M512s                    ; 49%&lt;br /&gt;
: M4Ks                     ; 100%&lt;br /&gt;
: M-RAMs                   ; 100%&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.4 (lab use) ==&lt;br /&gt;
; Filename&lt;br /&gt;
: bc_v05000004_20may2010.sof &lt;br /&gt;
; Features&lt;br /&gt;
: build based on 5.0.3 for Rev. E cards&lt;br /&gt;
: Biases are refreshed 1 clock cycles after the start of a new row, regardless of whether they are running in multiplex mode or not and whether it is a regular bias line or low-noise bias line.&lt;br /&gt;
; Details&lt;br /&gt;
: '''NOTE''' If this firmware is loaded on a Rev. D card, it's harmless. The only functionality loss is that the '''bias''' command will not work as unfortunately DAC CS and CLK pins are swapped for the bias DAC between the two revisions of the card.&lt;br /&gt;
; To do&lt;br /&gt;
:none&lt;br /&gt;
; Bugs&lt;br /&gt;
: none&lt;br /&gt;
; FPGA Resource Usage&lt;br /&gt;
: Total logic elements     ; 60%&lt;br /&gt;
: M512s                    ; 49%&lt;br /&gt;
: M4Ks                     ; 100%&lt;br /&gt;
: M-RAMs                   ; 100%&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.3 (lab use) ==&lt;br /&gt;
; Filename&lt;br /&gt;
: bc_v05000003_12may2010.sof &lt;br /&gt;
; Features&lt;br /&gt;
: build based on 5.0.2 for Rev. E cards&lt;br /&gt;
: added '''fb_col0 to fb_col31''' and '''enbl_mux''' commands to accommodate row-based sq2fb switching. When enbl_mux is asserted for a column, then the DAC is refreshed on every row visit with the value specified by fb_col command.&lt;br /&gt;
; Details&lt;br /&gt;
: The original Bias Card design has a buffer after the DAC that is too slow followed by kHz range RC filters, so in order to enable the multiplexing feature, one has to make sure that the BC hardware is modified as per ECO-xxx (to be added here).&lt;br /&gt;
: card_type returns 5 (indicating a Rev. E)&lt;br /&gt;
: If this firmware is loaded on a Rev. D card, it's harmless. The only functionality loss is that the bias command will not work as unfortunately DAC CS and CLK pins are swapped for the bias DAC between the two revisions of the card.&lt;br /&gt;
: combinational loops present in previous versions are removed now&lt;br /&gt;
: There is 9+16*2=41 clock cycle (820ns) delay for the bias to be applied after the start of a new row. This combined with another 400ns delay due to inherent DAC delay is about 60 clock-cycle delay. &lt;br /&gt;
; To do&lt;br /&gt;
: The excessive 41 clock cycle delay to apply a new bias has to be reduced. It is conceivable to preload the DACs and reduce this delay to 1 to 2 clock cycles.&lt;br /&gt;
; Bugs&lt;br /&gt;
: none&lt;br /&gt;
; FPGA Resource Usage&lt;br /&gt;
: Total logic elements     ; 6,140 / 10,570 ( 58 % )                       ;&lt;br /&gt;
: Total memory bits        ; 133,120 / 920,448 ( 14 % )                    ;&lt;br /&gt;
: M512s                    ; 48 / 94 ( 51 % )                              ;&lt;br /&gt;
: M4Ks                     ; 60 / 60 ( 100 % )                             ;&lt;br /&gt;
: M-RAMs                   ; 0 / 1 ( 0 % )                                 ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.2 (lab use) ==&lt;br /&gt;
; Filename&lt;br /&gt;
: bc_v05000002_xxjan2010.sof &lt;br /&gt;
; Features&lt;br /&gt;
: build based on 5.0.1 for Rev. E cards&lt;br /&gt;
: Independent control for ln_bias lines 0 to 11&lt;br /&gt;
; Details&lt;br /&gt;
: If this firmware is loaded on a Rev. D card, it's harmless. The only functionality loss is that the bias command will not work as unfortunately DAC CS and CLK pins are swapped for the bias DAC between the two revisions of the card.&lt;br /&gt;
; To do &lt;br /&gt;
: fix combinational loops on read-ram register&lt;br /&gt;
&lt;br /&gt;
; Bugs&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.1 (lab use) ==&lt;br /&gt;
; Filename&lt;br /&gt;
: bc_v05000001_19jan2010.sof &lt;br /&gt;
; Features&lt;br /&gt;
: supports the new low-noise bias lines (total of 12) introduced in Bias Card Rev. E&lt;br /&gt;
: card_type parameter is set to 5 (bias-card Rev. E)&lt;br /&gt;
: All DACs are loaded at once as oppose to previous revisions that loaded them one after next.&lt;br /&gt;
: DAC clock is now 25MHz and generated by PLL, previous firmware had 12.5MHz clock generated by dividing down.&lt;br /&gt;
; Details&lt;br /&gt;
: If this firmware is loaded on a Rev. D card, it's harmless. The only functionality loss is that the bias command will not work as unfortunately DAC CS and CLK pins are swapped for the bias DAC between the two revisions of the card.&lt;br /&gt;
; To do &lt;br /&gt;
: All ln_bias lines are controlled at once and this should be modified to independent control.&lt;br /&gt;
; Bugs&lt;br /&gt;
ln_bias_0 doesn't work, because the data line for ln_bias_0 is not connected in firmware.&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.0 ==&lt;br /&gt;
* '''Filename:'''  bc_v05000000_22dec2008.sof (tagged as sys_v05000000_22dec2008)&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** IMPORTANT:  Must be used in conjunction with firmware v05000000 of all other cards!!!&lt;br /&gt;
** To allow enough data bandwidth, the spare LVDS line from each card to the Clock Card is now used&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None yet reported&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (bias_card.fit.rpt):&lt;br /&gt;
 ; Fitter Status            ; Successful - Wed Jan 14 11:19:37 2009    ;&lt;br /&gt;
 ; Quartus II Version       ; 8.1 Build 163 10/28/2008 SJ Full Version ;&lt;br /&gt;
 ; Device                   ; EP1S10F780C5                             ;&lt;br /&gt;
 ; Total logic elements     ; 3,356 / 10,570 ( 32 % )                  ;&lt;br /&gt;
 ; Total pins               ; 187 / 427 ( 44 % )                       ;&lt;br /&gt;
 ; Total memory bits        ; 70,144 / 920,448 ( 8 % )                 ;&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (bias_card.tan.rpt):&lt;br /&gt;
 ; Fast Model Clock Setup: 'bc_pll:pll0|altpll:altpll_component|_clk1' ; 7.060 ns  ;&lt;br /&gt;
 ; Fast Model Clock Setup: 'bc_pll:pll0|altpll:altpll_component|_clk0' ; 7.125 ns  ;&lt;br /&gt;
 ; Fast Model Clock Hold: 'bc_pll:pll0|altpll:altpll_component|_clk0'  ; 0.383 ns  ;&lt;br /&gt;
 ; Fast Model Clock Hold: 'bc_pll:pll0|altpll:altpll_component|_clk1'  ; 0.384 ns  ;&lt;br /&gt;
 ; Fast Model Recovery: 'bc_pll:pll0|altpll:altpll_component|_clk0'    ; 16.037 ns ;&lt;br /&gt;
 ; Fast Model Removal: 'bc_pll:pll0|altpll:altpll_component|_clk0'     ; 0.575 ns  ;&lt;br /&gt;
 ; Total number of failed paths                                        ;           ;&lt;br /&gt;
&lt;br /&gt;
== Revision 1.4.2 ==&lt;br /&gt;
* bc_v01040002_15jul2008.sof&lt;br /&gt;
Features:&lt;br /&gt;
* Added the tga_i signal to the sensitivity list for the bc_dac_ctrl FSM&lt;br /&gt;
* potential bug may have been introduced with resetting the DAC counter due to inadvertently using the wrong bc_dac_ctrl_core.vhd version.&lt;br /&gt;
&lt;br /&gt;
== Revision 1.4.1 ==&lt;br /&gt;
* bc_v01040001_25jan2008.sof&lt;br /&gt;
&lt;br /&gt;
Features:&lt;br /&gt;
* Added card_type and scratch commands&lt;br /&gt;
* Integrated fw_rev and slot_id as part of all_cards&lt;br /&gt;
* Added provisions for safe state machines to fix the reset problem.&lt;br /&gt;
* Added lvds_tx = 0 so clock-card can check whether the card is plugged in using this spare lvds line.&lt;br /&gt;
Bugs:  None so far&lt;br /&gt;
&lt;br /&gt;
= Firmware Links =&lt;br /&gt;
* [http://www.phas.ubc.ca/~mce/mcedocs/firmware/ Firmware .sof &amp;amp; .pof Downloads]&lt;br /&gt;
* [http://www.phas.ubc.ca/~mce/mcedocs/firmware/bc_fpga_programming_file_catalogue.pdf  Bias Card Firmware Catalog]&lt;br /&gt;
&lt;br /&gt;
= Wiki Links =&lt;br /&gt;
* [http://e-mode.phas.ubc.ca/mcewiki/index.php/MCE_firmware  MCE Firmware Page]&lt;br /&gt;
* [http://e-mode.phas.ubc.ca/mcewiki/index.php/Main_Page  MCE Main Page]&lt;/div&gt;</summary>
		<author><name>Bburger</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Bias_Card_firmware&amp;diff=4365</id>
		<title>Bias Card firmware</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Bias_Card_firmware&amp;diff=4365"/>
		<updated>2011-05-12T19:12:03Z</updated>

		<summary type="html">&lt;p&gt;Bburger: /* Revision 5.0.6 (under test) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Recommended Firmware Revisions [http://e-mode.phas.ubc.ca/mcewiki/index.php/Compatible_Versions_(CC,RC,BC,AC) here]&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.6 (under test) ==&lt;br /&gt;
* '''Filename:'''  bc_v05000006_11may2011.sof&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Changes the timing of loading the FB_COLxx values from 32 clock cycles before the start of a new frame, to the start of a new frame.  This firmware was generated to find the reason for the downturns in raw data at the end of rows, as seen by Jeffrey Flilippini: &lt;br /&gt;
** See details here:  http://spiderwiki.princeton.edu/spider/AnalysisLogbook/TestCryostat/20110427_muxing/index.html&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None yet reported&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (bias_card.fit.rpt):&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (bias_card.tan.rpt):&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.5 (recommended) ==&lt;br /&gt;
; Filename&lt;br /&gt;
: bc_v05000005_20jul2010.sof &lt;br /&gt;
; Features&lt;br /&gt;
: based on 5.0.4, but updated for Rev. F/D hardware pinout.&lt;br /&gt;
: card_type parameter now includes the pcb-revision information as well as the card_type. card_type is specified as 0x01 as the lower byte (same as before). Reading back card_type parameter returns: 0x0F01 in Rev. D cards, and 0x0601 in Rev. F cards. (Previously, reading back card_type parameter only returned 0x01).                   &lt;br /&gt;
&lt;br /&gt;
; Details&lt;br /&gt;
: When using tes_bias lines, make sure the count is 12 for bias parameter in mce.cfg file.&lt;br /&gt;
: When installed on Rev. D file, tes_mapping has to have offset =11 in mce.cfg.&lt;br /&gt;
 &lt;br /&gt;
; To do&lt;br /&gt;
:none&lt;br /&gt;
; Bugs&lt;br /&gt;
: none&lt;br /&gt;
; FPGA Resource Usage&lt;br /&gt;
: Total logic elements     ; 60%&lt;br /&gt;
: M512s                    ; 49%&lt;br /&gt;
: M4Ks                     ; 100%&lt;br /&gt;
: M-RAMs                   ; 100%&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.4 (lab use) ==&lt;br /&gt;
; Filename&lt;br /&gt;
: bc_v05000004_20may2010.sof &lt;br /&gt;
; Features&lt;br /&gt;
: build based on 5.0.3 for Rev. E cards&lt;br /&gt;
: Biases are refreshed 1 clock cycles after the start of a new row, regardless of whether they are running in multiplex mode or not and whether it is a regular bias line or low-noise bias line.&lt;br /&gt;
; Details&lt;br /&gt;
: '''NOTE''' If this firmware is loaded on a Rev. D card, it's harmless. The only functionality loss is that the '''bias''' command will not work as unfortunately DAC CS and CLK pins are swapped for the bias DAC between the two revisions of the card.&lt;br /&gt;
; To do&lt;br /&gt;
:none&lt;br /&gt;
; Bugs&lt;br /&gt;
: none&lt;br /&gt;
; FPGA Resource Usage&lt;br /&gt;
: Total logic elements     ; 60%&lt;br /&gt;
: M512s                    ; 49%&lt;br /&gt;
: M4Ks                     ; 100%&lt;br /&gt;
: M-RAMs                   ; 100%&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.3 (lab use) ==&lt;br /&gt;
; Filename&lt;br /&gt;
: bc_v05000003_12may2010.sof &lt;br /&gt;
; Features&lt;br /&gt;
: build based on 5.0.2 for Rev. E cards&lt;br /&gt;
: added '''fb_col0 to fb_col31''' and '''enbl_mux''' commands to accommodate row-based sq2fb switching. When enbl_mux is asserted for a column, then the DAC is refreshed on every row visit with the value specified by fb_col command.&lt;br /&gt;
; Details&lt;br /&gt;
: The original Bias Card design has a buffer after the DAC that is too slow followed by kHz range RC filters, so in order to enable the multiplexing feature, one has to make sure that the BC hardware is modified as per ECO-xxx (to be added here).&lt;br /&gt;
: card_type returns 5 (indicating a Rev. E)&lt;br /&gt;
: If this firmware is loaded on a Rev. D card, it's harmless. The only functionality loss is that the bias command will not work as unfortunately DAC CS and CLK pins are swapped for the bias DAC between the two revisions of the card.&lt;br /&gt;
: combinational loops present in previous versions are removed now&lt;br /&gt;
: There is 9+16*2=41 clock cycle (820ns) delay for the bias to be applied after the start of a new row. This combined with another 400ns delay due to inherent DAC delay is about 60 clock-cycle delay. &lt;br /&gt;
; To do&lt;br /&gt;
: The excessive 41 clock cycle delay to apply a new bias has to be reduced. It is conceivable to preload the DACs and reduce this delay to 1 to 2 clock cycles.&lt;br /&gt;
; Bugs&lt;br /&gt;
: none&lt;br /&gt;
; FPGA Resource Usage&lt;br /&gt;
: Total logic elements     ; 6,140 / 10,570 ( 58 % )                       ;&lt;br /&gt;
: Total memory bits        ; 133,120 / 920,448 ( 14 % )                    ;&lt;br /&gt;
: M512s                    ; 48 / 94 ( 51 % )                              ;&lt;br /&gt;
: M4Ks                     ; 60 / 60 ( 100 % )                             ;&lt;br /&gt;
: M-RAMs                   ; 0 / 1 ( 0 % )                                 ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.2 (lab use) ==&lt;br /&gt;
; Filename&lt;br /&gt;
: bc_v05000002_xxjan2010.sof &lt;br /&gt;
; Features&lt;br /&gt;
: build based on 5.0.1 for Rev. E cards&lt;br /&gt;
: Independent control for ln_bias lines 0 to 11&lt;br /&gt;
; Details&lt;br /&gt;
: If this firmware is loaded on a Rev. D card, it's harmless. The only functionality loss is that the bias command will not work as unfortunately DAC CS and CLK pins are swapped for the bias DAC between the two revisions of the card.&lt;br /&gt;
; To do &lt;br /&gt;
: fix combinational loops on read-ram register&lt;br /&gt;
&lt;br /&gt;
; Bugs&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.1 (lab use) ==&lt;br /&gt;
; Filename&lt;br /&gt;
: bc_v05000001_19jan2010.sof &lt;br /&gt;
; Features&lt;br /&gt;
: supports the new low-noise bias lines (total of 12) introduced in Bias Card Rev. E&lt;br /&gt;
: card_type parameter is set to 5 (bias-card Rev. E)&lt;br /&gt;
: All DACs are loaded at once as oppose to previous revisions that loaded them one after next.&lt;br /&gt;
: DAC clock is now 25MHz and generated by PLL, previous firmware had 12.5MHz clock generated by dividing down.&lt;br /&gt;
; Details&lt;br /&gt;
: If this firmware is loaded on a Rev. D card, it's harmless. The only functionality loss is that the bias command will not work as unfortunately DAC CS and CLK pins are swapped for the bias DAC between the two revisions of the card.&lt;br /&gt;
; To do &lt;br /&gt;
: All ln_bias lines are controlled at once and this should be modified to independent control.&lt;br /&gt;
; Bugs&lt;br /&gt;
ln_bias_0 doesn't work, because the data line for ln_bias_0 is not connected in firmware.&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.0 ==&lt;br /&gt;
* '''Filename:'''  bc_v05000000_22dec2008.sof (tagged as sys_v05000000_22dec2008)&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** IMPORTANT:  Must be used in conjunction with firmware v05000000 of all other cards!!!&lt;br /&gt;
** To allow enough data bandwidth, the spare LVDS line from each card to the Clock Card is now used&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None yet reported&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (bias_card.fit.rpt):&lt;br /&gt;
 ; Fitter Status            ; Successful - Wed Jan 14 11:19:37 2009    ;&lt;br /&gt;
 ; Quartus II Version       ; 8.1 Build 163 10/28/2008 SJ Full Version ;&lt;br /&gt;
 ; Device                   ; EP1S10F780C5                             ;&lt;br /&gt;
 ; Total logic elements     ; 3,356 / 10,570 ( 32 % )                  ;&lt;br /&gt;
 ; Total pins               ; 187 / 427 ( 44 % )                       ;&lt;br /&gt;
 ; Total memory bits        ; 70,144 / 920,448 ( 8 % )                 ;&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (bias_card.tan.rpt):&lt;br /&gt;
 ; Fast Model Clock Setup: 'bc_pll:pll0|altpll:altpll_component|_clk1' ; 7.060 ns  ;&lt;br /&gt;
 ; Fast Model Clock Setup: 'bc_pll:pll0|altpll:altpll_component|_clk0' ; 7.125 ns  ;&lt;br /&gt;
 ; Fast Model Clock Hold: 'bc_pll:pll0|altpll:altpll_component|_clk0'  ; 0.383 ns  ;&lt;br /&gt;
 ; Fast Model Clock Hold: 'bc_pll:pll0|altpll:altpll_component|_clk1'  ; 0.384 ns  ;&lt;br /&gt;
 ; Fast Model Recovery: 'bc_pll:pll0|altpll:altpll_component|_clk0'    ; 16.037 ns ;&lt;br /&gt;
 ; Fast Model Removal: 'bc_pll:pll0|altpll:altpll_component|_clk0'     ; 0.575 ns  ;&lt;br /&gt;
 ; Total number of failed paths                                        ;           ;&lt;br /&gt;
&lt;br /&gt;
== Revision 1.4.2 ==&lt;br /&gt;
* bc_v01040002_15jul2008.sof&lt;br /&gt;
Features:&lt;br /&gt;
* Added the tga_i signal to the sensitivity list for the bc_dac_ctrl FSM&lt;br /&gt;
* potential bug may have been introduced with resetting the DAC counter due to inadvertently using the wrong bc_dac_ctrl_core.vhd version.&lt;br /&gt;
&lt;br /&gt;
== Revision 1.4.1 ==&lt;br /&gt;
* bc_v01040001_25jan2008.sof&lt;br /&gt;
&lt;br /&gt;
Features:&lt;br /&gt;
* Added card_type and scratch commands&lt;br /&gt;
* Integrated fw_rev and slot_id as part of all_cards&lt;br /&gt;
* Added provisions for safe state machines to fix the reset problem.&lt;br /&gt;
* Added lvds_tx = 0 so clock-card can check whether the card is plugged in using this spare lvds line.&lt;br /&gt;
Bugs:  None so far&lt;br /&gt;
&lt;br /&gt;
= Firmware Links =&lt;br /&gt;
* [http://www.phas.ubc.ca/~mce/mcedocs/firmware/ Firmware .sof &amp;amp; .pof Downloads]&lt;br /&gt;
* [http://www.phas.ubc.ca/~mce/mcedocs/firmware/bc_fpga_programming_file_catalogue.pdf  Bias Card Firmware Catalog]&lt;br /&gt;
&lt;br /&gt;
= Wiki Links =&lt;br /&gt;
* [http://e-mode.phas.ubc.ca/mcewiki/index.php/MCE_firmware  MCE Firmware Page]&lt;br /&gt;
* [http://e-mode.phas.ubc.ca/mcewiki/index.php/Main_Page  MCE Main Page]&lt;/div&gt;</summary>
		<author><name>Bburger</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Bias_Card_firmware&amp;diff=4364</id>
		<title>Bias Card firmware</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Bias_Card_firmware&amp;diff=4364"/>
		<updated>2011-05-12T18:28:32Z</updated>

		<summary type="html">&lt;p&gt;Bburger: /* Revision 5.0.6 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Recommended Firmware Revisions [http://e-mode.phas.ubc.ca/mcewiki/index.php/Compatible_Versions_(CC,RC,BC,AC) here]&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.6 (under test) ==&lt;br /&gt;
* '''Filename:'''  bc_v05000006_11may2011.sof&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Changes the timing of loading the FB_COLxx values from 32 clock cycles before the start of a new frame, to at the beginning of a new frame.  This firmware was generated to find the reason for the downturn in raw data at the end of rows, as seen by Jeffrey Flilippini: &lt;br /&gt;
** See details here:  http://spiderwiki.princeton.edu/spider/AnalysisLogbook/TestCryostat/20110427_muxing/index.html&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None yet reported&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (bias_card.fit.rpt):&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (bias_card.tan.rpt):&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.5 (recommended) ==&lt;br /&gt;
; Filename&lt;br /&gt;
: bc_v05000005_20jul2010.sof &lt;br /&gt;
; Features&lt;br /&gt;
: based on 5.0.4, but updated for Rev. F/D hardware pinout.&lt;br /&gt;
: card_type parameter now includes the pcb-revision information as well as the card_type. card_type is specified as 0x01 as the lower byte (same as before). Reading back card_type parameter returns: 0x0F01 in Rev. D cards, and 0x0601 in Rev. F cards. (Previously, reading back card_type parameter only returned 0x01).                   &lt;br /&gt;
&lt;br /&gt;
; Details&lt;br /&gt;
: When using tes_bias lines, make sure the count is 12 for bias parameter in mce.cfg file.&lt;br /&gt;
: When installed on Rev. D file, tes_mapping has to have offset =11 in mce.cfg.&lt;br /&gt;
 &lt;br /&gt;
; To do&lt;br /&gt;
:none&lt;br /&gt;
; Bugs&lt;br /&gt;
: none&lt;br /&gt;
; FPGA Resource Usage&lt;br /&gt;
: Total logic elements     ; 60%&lt;br /&gt;
: M512s                    ; 49%&lt;br /&gt;
: M4Ks                     ; 100%&lt;br /&gt;
: M-RAMs                   ; 100%&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.4 (lab use) ==&lt;br /&gt;
; Filename&lt;br /&gt;
: bc_v05000004_20may2010.sof &lt;br /&gt;
; Features&lt;br /&gt;
: build based on 5.0.3 for Rev. E cards&lt;br /&gt;
: Biases are refreshed 1 clock cycles after the start of a new row, regardless of whether they are running in multiplex mode or not and whether it is a regular bias line or low-noise bias line.&lt;br /&gt;
; Details&lt;br /&gt;
: '''NOTE''' If this firmware is loaded on a Rev. D card, it's harmless. The only functionality loss is that the '''bias''' command will not work as unfortunately DAC CS and CLK pins are swapped for the bias DAC between the two revisions of the card.&lt;br /&gt;
; To do&lt;br /&gt;
:none&lt;br /&gt;
; Bugs&lt;br /&gt;
: none&lt;br /&gt;
; FPGA Resource Usage&lt;br /&gt;
: Total logic elements     ; 60%&lt;br /&gt;
: M512s                    ; 49%&lt;br /&gt;
: M4Ks                     ; 100%&lt;br /&gt;
: M-RAMs                   ; 100%&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.3 (lab use) ==&lt;br /&gt;
; Filename&lt;br /&gt;
: bc_v05000003_12may2010.sof &lt;br /&gt;
; Features&lt;br /&gt;
: build based on 5.0.2 for Rev. E cards&lt;br /&gt;
: added '''fb_col0 to fb_col31''' and '''enbl_mux''' commands to accommodate row-based sq2fb switching. When enbl_mux is asserted for a column, then the DAC is refreshed on every row visit with the value specified by fb_col command.&lt;br /&gt;
; Details&lt;br /&gt;
: The original Bias Card design has a buffer after the DAC that is too slow followed by kHz range RC filters, so in order to enable the multiplexing feature, one has to make sure that the BC hardware is modified as per ECO-xxx (to be added here).&lt;br /&gt;
: card_type returns 5 (indicating a Rev. E)&lt;br /&gt;
: If this firmware is loaded on a Rev. D card, it's harmless. The only functionality loss is that the bias command will not work as unfortunately DAC CS and CLK pins are swapped for the bias DAC between the two revisions of the card.&lt;br /&gt;
: combinational loops present in previous versions are removed now&lt;br /&gt;
: There is 9+16*2=41 clock cycle (820ns) delay for the bias to be applied after the start of a new row. This combined with another 400ns delay due to inherent DAC delay is about 60 clock-cycle delay. &lt;br /&gt;
; To do&lt;br /&gt;
: The excessive 41 clock cycle delay to apply a new bias has to be reduced. It is conceivable to preload the DACs and reduce this delay to 1 to 2 clock cycles.&lt;br /&gt;
; Bugs&lt;br /&gt;
: none&lt;br /&gt;
; FPGA Resource Usage&lt;br /&gt;
: Total logic elements     ; 6,140 / 10,570 ( 58 % )                       ;&lt;br /&gt;
: Total memory bits        ; 133,120 / 920,448 ( 14 % )                    ;&lt;br /&gt;
: M512s                    ; 48 / 94 ( 51 % )                              ;&lt;br /&gt;
: M4Ks                     ; 60 / 60 ( 100 % )                             ;&lt;br /&gt;
: M-RAMs                   ; 0 / 1 ( 0 % )                                 ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.2 (lab use) ==&lt;br /&gt;
; Filename&lt;br /&gt;
: bc_v05000002_xxjan2010.sof &lt;br /&gt;
; Features&lt;br /&gt;
: build based on 5.0.1 for Rev. E cards&lt;br /&gt;
: Independent control for ln_bias lines 0 to 11&lt;br /&gt;
; Details&lt;br /&gt;
: If this firmware is loaded on a Rev. D card, it's harmless. The only functionality loss is that the bias command will not work as unfortunately DAC CS and CLK pins are swapped for the bias DAC between the two revisions of the card.&lt;br /&gt;
; To do &lt;br /&gt;
: fix combinational loops on read-ram register&lt;br /&gt;
&lt;br /&gt;
; Bugs&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.1 (lab use) ==&lt;br /&gt;
; Filename&lt;br /&gt;
: bc_v05000001_19jan2010.sof &lt;br /&gt;
; Features&lt;br /&gt;
: supports the new low-noise bias lines (total of 12) introduced in Bias Card Rev. E&lt;br /&gt;
: card_type parameter is set to 5 (bias-card Rev. E)&lt;br /&gt;
: All DACs are loaded at once as oppose to previous revisions that loaded them one after next.&lt;br /&gt;
: DAC clock is now 25MHz and generated by PLL, previous firmware had 12.5MHz clock generated by dividing down.&lt;br /&gt;
; Details&lt;br /&gt;
: If this firmware is loaded on a Rev. D card, it's harmless. The only functionality loss is that the bias command will not work as unfortunately DAC CS and CLK pins are swapped for the bias DAC between the two revisions of the card.&lt;br /&gt;
; To do &lt;br /&gt;
: All ln_bias lines are controlled at once and this should be modified to independent control.&lt;br /&gt;
; Bugs&lt;br /&gt;
ln_bias_0 doesn't work, because the data line for ln_bias_0 is not connected in firmware.&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.0 ==&lt;br /&gt;
* '''Filename:'''  bc_v05000000_22dec2008.sof (tagged as sys_v05000000_22dec2008)&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** IMPORTANT:  Must be used in conjunction with firmware v05000000 of all other cards!!!&lt;br /&gt;
** To allow enough data bandwidth, the spare LVDS line from each card to the Clock Card is now used&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None yet reported&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (bias_card.fit.rpt):&lt;br /&gt;
 ; Fitter Status            ; Successful - Wed Jan 14 11:19:37 2009    ;&lt;br /&gt;
 ; Quartus II Version       ; 8.1 Build 163 10/28/2008 SJ Full Version ;&lt;br /&gt;
 ; Device                   ; EP1S10F780C5                             ;&lt;br /&gt;
 ; Total logic elements     ; 3,356 / 10,570 ( 32 % )                  ;&lt;br /&gt;
 ; Total pins               ; 187 / 427 ( 44 % )                       ;&lt;br /&gt;
 ; Total memory bits        ; 70,144 / 920,448 ( 8 % )                 ;&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (bias_card.tan.rpt):&lt;br /&gt;
 ; Fast Model Clock Setup: 'bc_pll:pll0|altpll:altpll_component|_clk1' ; 7.060 ns  ;&lt;br /&gt;
 ; Fast Model Clock Setup: 'bc_pll:pll0|altpll:altpll_component|_clk0' ; 7.125 ns  ;&lt;br /&gt;
 ; Fast Model Clock Hold: 'bc_pll:pll0|altpll:altpll_component|_clk0'  ; 0.383 ns  ;&lt;br /&gt;
 ; Fast Model Clock Hold: 'bc_pll:pll0|altpll:altpll_component|_clk1'  ; 0.384 ns  ;&lt;br /&gt;
 ; Fast Model Recovery: 'bc_pll:pll0|altpll:altpll_component|_clk0'    ; 16.037 ns ;&lt;br /&gt;
 ; Fast Model Removal: 'bc_pll:pll0|altpll:altpll_component|_clk0'     ; 0.575 ns  ;&lt;br /&gt;
 ; Total number of failed paths                                        ;           ;&lt;br /&gt;
&lt;br /&gt;
== Revision 1.4.2 ==&lt;br /&gt;
* bc_v01040002_15jul2008.sof&lt;br /&gt;
Features:&lt;br /&gt;
* Added the tga_i signal to the sensitivity list for the bc_dac_ctrl FSM&lt;br /&gt;
* potential bug may have been introduced with resetting the DAC counter due to inadvertently using the wrong bc_dac_ctrl_core.vhd version.&lt;br /&gt;
&lt;br /&gt;
== Revision 1.4.1 ==&lt;br /&gt;
* bc_v01040001_25jan2008.sof&lt;br /&gt;
&lt;br /&gt;
Features:&lt;br /&gt;
* Added card_type and scratch commands&lt;br /&gt;
* Integrated fw_rev and slot_id as part of all_cards&lt;br /&gt;
* Added provisions for safe state machines to fix the reset problem.&lt;br /&gt;
* Added lvds_tx = 0 so clock-card can check whether the card is plugged in using this spare lvds line.&lt;br /&gt;
Bugs:  None so far&lt;br /&gt;
&lt;br /&gt;
= Firmware Links =&lt;br /&gt;
* [http://www.phas.ubc.ca/~mce/mcedocs/firmware/ Firmware .sof &amp;amp; .pof Downloads]&lt;br /&gt;
* [http://www.phas.ubc.ca/~mce/mcedocs/firmware/bc_fpga_programming_file_catalogue.pdf  Bias Card Firmware Catalog]&lt;br /&gt;
&lt;br /&gt;
= Wiki Links =&lt;br /&gt;
* [http://e-mode.phas.ubc.ca/mcewiki/index.php/MCE_firmware  MCE Firmware Page]&lt;br /&gt;
* [http://e-mode.phas.ubc.ca/mcewiki/index.php/Main_Page  MCE Main Page]&lt;/div&gt;</summary>
		<author><name>Bburger</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Bias_Card_firmware&amp;diff=4363</id>
		<title>Bias Card firmware</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Bias_Card_firmware&amp;diff=4363"/>
		<updated>2011-05-12T18:28:12Z</updated>

		<summary type="html">&lt;p&gt;Bburger: /* Revision 5.0.6 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Recommended Firmware Revisions [http://e-mode.phas.ubc.ca/mcewiki/index.php/Compatible_Versions_(CC,RC,BC,AC) here]&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.6 ==&lt;br /&gt;
* '''Filename:'''  bc_v05000006_11may2011.sof&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Changes the timing of loading the FB_COLxx values from 32 clock cycles before the start of a new frame, to at the beginning of a new frame.  This firmware was generated to find the reason for the downturn in raw data at the end of rows, as seen by Jeffrey Flilippini: &lt;br /&gt;
** See details here:  http://spiderwiki.princeton.edu/spider/AnalysisLogbook/TestCryostat/20110427_muxing/index.html&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None yet reported&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (bias_card.fit.rpt):&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (bias_card.tan.rpt):&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.5 (recommended) ==&lt;br /&gt;
; Filename&lt;br /&gt;
: bc_v05000005_20jul2010.sof &lt;br /&gt;
; Features&lt;br /&gt;
: based on 5.0.4, but updated for Rev. F/D hardware pinout.&lt;br /&gt;
: card_type parameter now includes the pcb-revision information as well as the card_type. card_type is specified as 0x01 as the lower byte (same as before). Reading back card_type parameter returns: 0x0F01 in Rev. D cards, and 0x0601 in Rev. F cards. (Previously, reading back card_type parameter only returned 0x01).                   &lt;br /&gt;
&lt;br /&gt;
; Details&lt;br /&gt;
: When using tes_bias lines, make sure the count is 12 for bias parameter in mce.cfg file.&lt;br /&gt;
: When installed on Rev. D file, tes_mapping has to have offset =11 in mce.cfg.&lt;br /&gt;
 &lt;br /&gt;
; To do&lt;br /&gt;
:none&lt;br /&gt;
; Bugs&lt;br /&gt;
: none&lt;br /&gt;
; FPGA Resource Usage&lt;br /&gt;
: Total logic elements     ; 60%&lt;br /&gt;
: M512s                    ; 49%&lt;br /&gt;
: M4Ks                     ; 100%&lt;br /&gt;
: M-RAMs                   ; 100%&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.4 (lab use) ==&lt;br /&gt;
; Filename&lt;br /&gt;
: bc_v05000004_20may2010.sof &lt;br /&gt;
; Features&lt;br /&gt;
: build based on 5.0.3 for Rev. E cards&lt;br /&gt;
: Biases are refreshed 1 clock cycles after the start of a new row, regardless of whether they are running in multiplex mode or not and whether it is a regular bias line or low-noise bias line.&lt;br /&gt;
; Details&lt;br /&gt;
: '''NOTE''' If this firmware is loaded on a Rev. D card, it's harmless. The only functionality loss is that the '''bias''' command will not work as unfortunately DAC CS and CLK pins are swapped for the bias DAC between the two revisions of the card.&lt;br /&gt;
; To do&lt;br /&gt;
:none&lt;br /&gt;
; Bugs&lt;br /&gt;
: none&lt;br /&gt;
; FPGA Resource Usage&lt;br /&gt;
: Total logic elements     ; 60%&lt;br /&gt;
: M512s                    ; 49%&lt;br /&gt;
: M4Ks                     ; 100%&lt;br /&gt;
: M-RAMs                   ; 100%&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.3 (lab use) ==&lt;br /&gt;
; Filename&lt;br /&gt;
: bc_v05000003_12may2010.sof &lt;br /&gt;
; Features&lt;br /&gt;
: build based on 5.0.2 for Rev. E cards&lt;br /&gt;
: added '''fb_col0 to fb_col31''' and '''enbl_mux''' commands to accommodate row-based sq2fb switching. When enbl_mux is asserted for a column, then the DAC is refreshed on every row visit with the value specified by fb_col command.&lt;br /&gt;
; Details&lt;br /&gt;
: The original Bias Card design has a buffer after the DAC that is too slow followed by kHz range RC filters, so in order to enable the multiplexing feature, one has to make sure that the BC hardware is modified as per ECO-xxx (to be added here).&lt;br /&gt;
: card_type returns 5 (indicating a Rev. E)&lt;br /&gt;
: If this firmware is loaded on a Rev. D card, it's harmless. The only functionality loss is that the bias command will not work as unfortunately DAC CS and CLK pins are swapped for the bias DAC between the two revisions of the card.&lt;br /&gt;
: combinational loops present in previous versions are removed now&lt;br /&gt;
: There is 9+16*2=41 clock cycle (820ns) delay for the bias to be applied after the start of a new row. This combined with another 400ns delay due to inherent DAC delay is about 60 clock-cycle delay. &lt;br /&gt;
; To do&lt;br /&gt;
: The excessive 41 clock cycle delay to apply a new bias has to be reduced. It is conceivable to preload the DACs and reduce this delay to 1 to 2 clock cycles.&lt;br /&gt;
; Bugs&lt;br /&gt;
: none&lt;br /&gt;
; FPGA Resource Usage&lt;br /&gt;
: Total logic elements     ; 6,140 / 10,570 ( 58 % )                       ;&lt;br /&gt;
: Total memory bits        ; 133,120 / 920,448 ( 14 % )                    ;&lt;br /&gt;
: M512s                    ; 48 / 94 ( 51 % )                              ;&lt;br /&gt;
: M4Ks                     ; 60 / 60 ( 100 % )                             ;&lt;br /&gt;
: M-RAMs                   ; 0 / 1 ( 0 % )                                 ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.2 (lab use) ==&lt;br /&gt;
; Filename&lt;br /&gt;
: bc_v05000002_xxjan2010.sof &lt;br /&gt;
; Features&lt;br /&gt;
: build based on 5.0.1 for Rev. E cards&lt;br /&gt;
: Independent control for ln_bias lines 0 to 11&lt;br /&gt;
; Details&lt;br /&gt;
: If this firmware is loaded on a Rev. D card, it's harmless. The only functionality loss is that the bias command will not work as unfortunately DAC CS and CLK pins are swapped for the bias DAC between the two revisions of the card.&lt;br /&gt;
; To do &lt;br /&gt;
: fix combinational loops on read-ram register&lt;br /&gt;
&lt;br /&gt;
; Bugs&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.1 (lab use) ==&lt;br /&gt;
; Filename&lt;br /&gt;
: bc_v05000001_19jan2010.sof &lt;br /&gt;
; Features&lt;br /&gt;
: supports the new low-noise bias lines (total of 12) introduced in Bias Card Rev. E&lt;br /&gt;
: card_type parameter is set to 5 (bias-card Rev. E)&lt;br /&gt;
: All DACs are loaded at once as oppose to previous revisions that loaded them one after next.&lt;br /&gt;
: DAC clock is now 25MHz and generated by PLL, previous firmware had 12.5MHz clock generated by dividing down.&lt;br /&gt;
; Details&lt;br /&gt;
: If this firmware is loaded on a Rev. D card, it's harmless. The only functionality loss is that the bias command will not work as unfortunately DAC CS and CLK pins are swapped for the bias DAC between the two revisions of the card.&lt;br /&gt;
; To do &lt;br /&gt;
: All ln_bias lines are controlled at once and this should be modified to independent control.&lt;br /&gt;
; Bugs&lt;br /&gt;
ln_bias_0 doesn't work, because the data line for ln_bias_0 is not connected in firmware.&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.0 ==&lt;br /&gt;
* '''Filename:'''  bc_v05000000_22dec2008.sof (tagged as sys_v05000000_22dec2008)&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** IMPORTANT:  Must be used in conjunction with firmware v05000000 of all other cards!!!&lt;br /&gt;
** To allow enough data bandwidth, the spare LVDS line from each card to the Clock Card is now used&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None yet reported&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (bias_card.fit.rpt):&lt;br /&gt;
 ; Fitter Status            ; Successful - Wed Jan 14 11:19:37 2009    ;&lt;br /&gt;
 ; Quartus II Version       ; 8.1 Build 163 10/28/2008 SJ Full Version ;&lt;br /&gt;
 ; Device                   ; EP1S10F780C5                             ;&lt;br /&gt;
 ; Total logic elements     ; 3,356 / 10,570 ( 32 % )                  ;&lt;br /&gt;
 ; Total pins               ; 187 / 427 ( 44 % )                       ;&lt;br /&gt;
 ; Total memory bits        ; 70,144 / 920,448 ( 8 % )                 ;&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (bias_card.tan.rpt):&lt;br /&gt;
 ; Fast Model Clock Setup: 'bc_pll:pll0|altpll:altpll_component|_clk1' ; 7.060 ns  ;&lt;br /&gt;
 ; Fast Model Clock Setup: 'bc_pll:pll0|altpll:altpll_component|_clk0' ; 7.125 ns  ;&lt;br /&gt;
 ; Fast Model Clock Hold: 'bc_pll:pll0|altpll:altpll_component|_clk0'  ; 0.383 ns  ;&lt;br /&gt;
 ; Fast Model Clock Hold: 'bc_pll:pll0|altpll:altpll_component|_clk1'  ; 0.384 ns  ;&lt;br /&gt;
 ; Fast Model Recovery: 'bc_pll:pll0|altpll:altpll_component|_clk0'    ; 16.037 ns ;&lt;br /&gt;
 ; Fast Model Removal: 'bc_pll:pll0|altpll:altpll_component|_clk0'     ; 0.575 ns  ;&lt;br /&gt;
 ; Total number of failed paths                                        ;           ;&lt;br /&gt;
&lt;br /&gt;
== Revision 1.4.2 ==&lt;br /&gt;
* bc_v01040002_15jul2008.sof&lt;br /&gt;
Features:&lt;br /&gt;
* Added the tga_i signal to the sensitivity list for the bc_dac_ctrl FSM&lt;br /&gt;
* potential bug may have been introduced with resetting the DAC counter due to inadvertently using the wrong bc_dac_ctrl_core.vhd version.&lt;br /&gt;
&lt;br /&gt;
== Revision 1.4.1 ==&lt;br /&gt;
* bc_v01040001_25jan2008.sof&lt;br /&gt;
&lt;br /&gt;
Features:&lt;br /&gt;
* Added card_type and scratch commands&lt;br /&gt;
* Integrated fw_rev and slot_id as part of all_cards&lt;br /&gt;
* Added provisions for safe state machines to fix the reset problem.&lt;br /&gt;
* Added lvds_tx = 0 so clock-card can check whether the card is plugged in using this spare lvds line.&lt;br /&gt;
Bugs:  None so far&lt;br /&gt;
&lt;br /&gt;
= Firmware Links =&lt;br /&gt;
* [http://www.phas.ubc.ca/~mce/mcedocs/firmware/ Firmware .sof &amp;amp; .pof Downloads]&lt;br /&gt;
* [http://www.phas.ubc.ca/~mce/mcedocs/firmware/bc_fpga_programming_file_catalogue.pdf  Bias Card Firmware Catalog]&lt;br /&gt;
&lt;br /&gt;
= Wiki Links =&lt;br /&gt;
* [http://e-mode.phas.ubc.ca/mcewiki/index.php/MCE_firmware  MCE Firmware Page]&lt;br /&gt;
* [http://e-mode.phas.ubc.ca/mcewiki/index.php/Main_Page  MCE Main Page]&lt;/div&gt;</summary>
		<author><name>Bburger</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Bias_Card_firmware&amp;diff=4362</id>
		<title>Bias Card firmware</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Bias_Card_firmware&amp;diff=4362"/>
		<updated>2011-05-12T18:27:50Z</updated>

		<summary type="html">&lt;p&gt;Bburger: /* Revision 5.0.0 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Recommended Firmware Revisions [http://e-mode.phas.ubc.ca/mcewiki/index.php/Compatible_Versions_(CC,RC,BC,AC) here]&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.6 ==&lt;br /&gt;
* '''Filename:'''  bc_v05000006_11may2011.sof&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Changes the timing of loading the FB_COLxx values from 32 clock cycles before the start of a new frame, to at the beginning of a new frame.  This firmware was generated to find the reason for the downturn in raw data at the end of rows, as seen by Jeffrey Flilippini: http://spiderwiki.princeton.edu/spider/AnalysisLogbook/TestCryostat/20110427_muxing/index.html&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None yet reported&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (bias_card.fit.rpt):&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (bias_card.tan.rpt):&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.5 (recommended) ==&lt;br /&gt;
; Filename&lt;br /&gt;
: bc_v05000005_20jul2010.sof &lt;br /&gt;
; Features&lt;br /&gt;
: based on 5.0.4, but updated for Rev. F/D hardware pinout.&lt;br /&gt;
: card_type parameter now includes the pcb-revision information as well as the card_type. card_type is specified as 0x01 as the lower byte (same as before). Reading back card_type parameter returns: 0x0F01 in Rev. D cards, and 0x0601 in Rev. F cards. (Previously, reading back card_type parameter only returned 0x01).                   &lt;br /&gt;
&lt;br /&gt;
; Details&lt;br /&gt;
: When using tes_bias lines, make sure the count is 12 for bias parameter in mce.cfg file.&lt;br /&gt;
: When installed on Rev. D file, tes_mapping has to have offset =11 in mce.cfg.&lt;br /&gt;
 &lt;br /&gt;
; To do&lt;br /&gt;
:none&lt;br /&gt;
; Bugs&lt;br /&gt;
: none&lt;br /&gt;
; FPGA Resource Usage&lt;br /&gt;
: Total logic elements     ; 60%&lt;br /&gt;
: M512s                    ; 49%&lt;br /&gt;
: M4Ks                     ; 100%&lt;br /&gt;
: M-RAMs                   ; 100%&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.4 (lab use) ==&lt;br /&gt;
; Filename&lt;br /&gt;
: bc_v05000004_20may2010.sof &lt;br /&gt;
; Features&lt;br /&gt;
: build based on 5.0.3 for Rev. E cards&lt;br /&gt;
: Biases are refreshed 1 clock cycles after the start of a new row, regardless of whether they are running in multiplex mode or not and whether it is a regular bias line or low-noise bias line.&lt;br /&gt;
; Details&lt;br /&gt;
: '''NOTE''' If this firmware is loaded on a Rev. D card, it's harmless. The only functionality loss is that the '''bias''' command will not work as unfortunately DAC CS and CLK pins are swapped for the bias DAC between the two revisions of the card.&lt;br /&gt;
; To do&lt;br /&gt;
:none&lt;br /&gt;
; Bugs&lt;br /&gt;
: none&lt;br /&gt;
; FPGA Resource Usage&lt;br /&gt;
: Total logic elements     ; 60%&lt;br /&gt;
: M512s                    ; 49%&lt;br /&gt;
: M4Ks                     ; 100%&lt;br /&gt;
: M-RAMs                   ; 100%&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.3 (lab use) ==&lt;br /&gt;
; Filename&lt;br /&gt;
: bc_v05000003_12may2010.sof &lt;br /&gt;
; Features&lt;br /&gt;
: build based on 5.0.2 for Rev. E cards&lt;br /&gt;
: added '''fb_col0 to fb_col31''' and '''enbl_mux''' commands to accommodate row-based sq2fb switching. When enbl_mux is asserted for a column, then the DAC is refreshed on every row visit with the value specified by fb_col command.&lt;br /&gt;
; Details&lt;br /&gt;
: The original Bias Card design has a buffer after the DAC that is too slow followed by kHz range RC filters, so in order to enable the multiplexing feature, one has to make sure that the BC hardware is modified as per ECO-xxx (to be added here).&lt;br /&gt;
: card_type returns 5 (indicating a Rev. E)&lt;br /&gt;
: If this firmware is loaded on a Rev. D card, it's harmless. The only functionality loss is that the bias command will not work as unfortunately DAC CS and CLK pins are swapped for the bias DAC between the two revisions of the card.&lt;br /&gt;
: combinational loops present in previous versions are removed now&lt;br /&gt;
: There is 9+16*2=41 clock cycle (820ns) delay for the bias to be applied after the start of a new row. This combined with another 400ns delay due to inherent DAC delay is about 60 clock-cycle delay. &lt;br /&gt;
; To do&lt;br /&gt;
: The excessive 41 clock cycle delay to apply a new bias has to be reduced. It is conceivable to preload the DACs and reduce this delay to 1 to 2 clock cycles.&lt;br /&gt;
; Bugs&lt;br /&gt;
: none&lt;br /&gt;
; FPGA Resource Usage&lt;br /&gt;
: Total logic elements     ; 6,140 / 10,570 ( 58 % )                       ;&lt;br /&gt;
: Total memory bits        ; 133,120 / 920,448 ( 14 % )                    ;&lt;br /&gt;
: M512s                    ; 48 / 94 ( 51 % )                              ;&lt;br /&gt;
: M4Ks                     ; 60 / 60 ( 100 % )                             ;&lt;br /&gt;
: M-RAMs                   ; 0 / 1 ( 0 % )                                 ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.2 (lab use) ==&lt;br /&gt;
; Filename&lt;br /&gt;
: bc_v05000002_xxjan2010.sof &lt;br /&gt;
; Features&lt;br /&gt;
: build based on 5.0.1 for Rev. E cards&lt;br /&gt;
: Independent control for ln_bias lines 0 to 11&lt;br /&gt;
; Details&lt;br /&gt;
: If this firmware is loaded on a Rev. D card, it's harmless. The only functionality loss is that the bias command will not work as unfortunately DAC CS and CLK pins are swapped for the bias DAC between the two revisions of the card.&lt;br /&gt;
; To do &lt;br /&gt;
: fix combinational loops on read-ram register&lt;br /&gt;
&lt;br /&gt;
; Bugs&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.1 (lab use) ==&lt;br /&gt;
; Filename&lt;br /&gt;
: bc_v05000001_19jan2010.sof &lt;br /&gt;
; Features&lt;br /&gt;
: supports the new low-noise bias lines (total of 12) introduced in Bias Card Rev. E&lt;br /&gt;
: card_type parameter is set to 5 (bias-card Rev. E)&lt;br /&gt;
: All DACs are loaded at once as oppose to previous revisions that loaded them one after next.&lt;br /&gt;
: DAC clock is now 25MHz and generated by PLL, previous firmware had 12.5MHz clock generated by dividing down.&lt;br /&gt;
; Details&lt;br /&gt;
: If this firmware is loaded on a Rev. D card, it's harmless. The only functionality loss is that the bias command will not work as unfortunately DAC CS and CLK pins are swapped for the bias DAC between the two revisions of the card.&lt;br /&gt;
; To do &lt;br /&gt;
: All ln_bias lines are controlled at once and this should be modified to independent control.&lt;br /&gt;
; Bugs&lt;br /&gt;
ln_bias_0 doesn't work, because the data line for ln_bias_0 is not connected in firmware.&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.0 ==&lt;br /&gt;
* '''Filename:'''  bc_v05000000_22dec2008.sof (tagged as sys_v05000000_22dec2008)&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** IMPORTANT:  Must be used in conjunction with firmware v05000000 of all other cards!!!&lt;br /&gt;
** To allow enough data bandwidth, the spare LVDS line from each card to the Clock Card is now used&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None yet reported&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (bias_card.fit.rpt):&lt;br /&gt;
 ; Fitter Status            ; Successful - Wed Jan 14 11:19:37 2009    ;&lt;br /&gt;
 ; Quartus II Version       ; 8.1 Build 163 10/28/2008 SJ Full Version ;&lt;br /&gt;
 ; Device                   ; EP1S10F780C5                             ;&lt;br /&gt;
 ; Total logic elements     ; 3,356 / 10,570 ( 32 % )                  ;&lt;br /&gt;
 ; Total pins               ; 187 / 427 ( 44 % )                       ;&lt;br /&gt;
 ; Total memory bits        ; 70,144 / 920,448 ( 8 % )                 ;&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (bias_card.tan.rpt):&lt;br /&gt;
 ; Fast Model Clock Setup: 'bc_pll:pll0|altpll:altpll_component|_clk1' ; 7.060 ns  ;&lt;br /&gt;
 ; Fast Model Clock Setup: 'bc_pll:pll0|altpll:altpll_component|_clk0' ; 7.125 ns  ;&lt;br /&gt;
 ; Fast Model Clock Hold: 'bc_pll:pll0|altpll:altpll_component|_clk0'  ; 0.383 ns  ;&lt;br /&gt;
 ; Fast Model Clock Hold: 'bc_pll:pll0|altpll:altpll_component|_clk1'  ; 0.384 ns  ;&lt;br /&gt;
 ; Fast Model Recovery: 'bc_pll:pll0|altpll:altpll_component|_clk0'    ; 16.037 ns ;&lt;br /&gt;
 ; Fast Model Removal: 'bc_pll:pll0|altpll:altpll_component|_clk0'     ; 0.575 ns  ;&lt;br /&gt;
 ; Total number of failed paths                                        ;           ;&lt;br /&gt;
&lt;br /&gt;
== Revision 1.4.2 ==&lt;br /&gt;
* bc_v01040002_15jul2008.sof&lt;br /&gt;
Features:&lt;br /&gt;
* Added the tga_i signal to the sensitivity list for the bc_dac_ctrl FSM&lt;br /&gt;
* potential bug may have been introduced with resetting the DAC counter due to inadvertently using the wrong bc_dac_ctrl_core.vhd version.&lt;br /&gt;
&lt;br /&gt;
== Revision 1.4.1 ==&lt;br /&gt;
* bc_v01040001_25jan2008.sof&lt;br /&gt;
&lt;br /&gt;
Features:&lt;br /&gt;
* Added card_type and scratch commands&lt;br /&gt;
* Integrated fw_rev and slot_id as part of all_cards&lt;br /&gt;
* Added provisions for safe state machines to fix the reset problem.&lt;br /&gt;
* Added lvds_tx = 0 so clock-card can check whether the card is plugged in using this spare lvds line.&lt;br /&gt;
Bugs:  None so far&lt;br /&gt;
&lt;br /&gt;
= Firmware Links =&lt;br /&gt;
* [http://www.phas.ubc.ca/~mce/mcedocs/firmware/ Firmware .sof &amp;amp; .pof Downloads]&lt;br /&gt;
* [http://www.phas.ubc.ca/~mce/mcedocs/firmware/bc_fpga_programming_file_catalogue.pdf  Bias Card Firmware Catalog]&lt;br /&gt;
&lt;br /&gt;
= Wiki Links =&lt;br /&gt;
* [http://e-mode.phas.ubc.ca/mcewiki/index.php/MCE_firmware  MCE Firmware Page]&lt;br /&gt;
* [http://e-mode.phas.ubc.ca/mcewiki/index.php/Main_Page  MCE Main Page]&lt;/div&gt;</summary>
		<author><name>Bburger</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Bias_Card_firmware&amp;diff=4361</id>
		<title>Bias Card firmware</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Bias_Card_firmware&amp;diff=4361"/>
		<updated>2011-05-12T18:25:34Z</updated>

		<summary type="html">&lt;p&gt;Bburger: /* Revision 5.0.5 (recommended) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Recommended Firmware Revisions [http://e-mode.phas.ubc.ca/mcewiki/index.php/Compatible_Versions_(CC,RC,BC,AC) here]&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.0 ==&lt;br /&gt;
* '''Filename:'''  bc_v05000006_11may2011.sof&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None yet reported&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (bias_card.fit.rpt):&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (bias_card.tan.rpt):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.5 (recommended) ==&lt;br /&gt;
; Filename&lt;br /&gt;
: bc_v05000005_20jul2010.sof &lt;br /&gt;
; Features&lt;br /&gt;
: based on 5.0.4, but updated for Rev. F/D hardware pinout.&lt;br /&gt;
: card_type parameter now includes the pcb-revision information as well as the card_type. card_type is specified as 0x01 as the lower byte (same as before). Reading back card_type parameter returns: 0x0F01 in Rev. D cards, and 0x0601 in Rev. F cards. (Previously, reading back card_type parameter only returned 0x01).                   &lt;br /&gt;
&lt;br /&gt;
; Details&lt;br /&gt;
: When using tes_bias lines, make sure the count is 12 for bias parameter in mce.cfg file.&lt;br /&gt;
: When installed on Rev. D file, tes_mapping has to have offset =11 in mce.cfg.&lt;br /&gt;
 &lt;br /&gt;
; To do&lt;br /&gt;
:none&lt;br /&gt;
; Bugs&lt;br /&gt;
: none&lt;br /&gt;
; FPGA Resource Usage&lt;br /&gt;
: Total logic elements     ; 60%&lt;br /&gt;
: M512s                    ; 49%&lt;br /&gt;
: M4Ks                     ; 100%&lt;br /&gt;
: M-RAMs                   ; 100%&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.4 (lab use) ==&lt;br /&gt;
; Filename&lt;br /&gt;
: bc_v05000004_20may2010.sof &lt;br /&gt;
; Features&lt;br /&gt;
: build based on 5.0.3 for Rev. E cards&lt;br /&gt;
: Biases are refreshed 1 clock cycles after the start of a new row, regardless of whether they are running in multiplex mode or not and whether it is a regular bias line or low-noise bias line.&lt;br /&gt;
; Details&lt;br /&gt;
: '''NOTE''' If this firmware is loaded on a Rev. D card, it's harmless. The only functionality loss is that the '''bias''' command will not work as unfortunately DAC CS and CLK pins are swapped for the bias DAC between the two revisions of the card.&lt;br /&gt;
; To do&lt;br /&gt;
:none&lt;br /&gt;
; Bugs&lt;br /&gt;
: none&lt;br /&gt;
; FPGA Resource Usage&lt;br /&gt;
: Total logic elements     ; 60%&lt;br /&gt;
: M512s                    ; 49%&lt;br /&gt;
: M4Ks                     ; 100%&lt;br /&gt;
: M-RAMs                   ; 100%&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.3 (lab use) ==&lt;br /&gt;
; Filename&lt;br /&gt;
: bc_v05000003_12may2010.sof &lt;br /&gt;
; Features&lt;br /&gt;
: build based on 5.0.2 for Rev. E cards&lt;br /&gt;
: added '''fb_col0 to fb_col31''' and '''enbl_mux''' commands to accommodate row-based sq2fb switching. When enbl_mux is asserted for a column, then the DAC is refreshed on every row visit with the value specified by fb_col command.&lt;br /&gt;
; Details&lt;br /&gt;
: The original Bias Card design has a buffer after the DAC that is too slow followed by kHz range RC filters, so in order to enable the multiplexing feature, one has to make sure that the BC hardware is modified as per ECO-xxx (to be added here).&lt;br /&gt;
: card_type returns 5 (indicating a Rev. E)&lt;br /&gt;
: If this firmware is loaded on a Rev. D card, it's harmless. The only functionality loss is that the bias command will not work as unfortunately DAC CS and CLK pins are swapped for the bias DAC between the two revisions of the card.&lt;br /&gt;
: combinational loops present in previous versions are removed now&lt;br /&gt;
: There is 9+16*2=41 clock cycle (820ns) delay for the bias to be applied after the start of a new row. This combined with another 400ns delay due to inherent DAC delay is about 60 clock-cycle delay. &lt;br /&gt;
; To do&lt;br /&gt;
: The excessive 41 clock cycle delay to apply a new bias has to be reduced. It is conceivable to preload the DACs and reduce this delay to 1 to 2 clock cycles.&lt;br /&gt;
; Bugs&lt;br /&gt;
: none&lt;br /&gt;
; FPGA Resource Usage&lt;br /&gt;
: Total logic elements     ; 6,140 / 10,570 ( 58 % )                       ;&lt;br /&gt;
: Total memory bits        ; 133,120 / 920,448 ( 14 % )                    ;&lt;br /&gt;
: M512s                    ; 48 / 94 ( 51 % )                              ;&lt;br /&gt;
: M4Ks                     ; 60 / 60 ( 100 % )                             ;&lt;br /&gt;
: M-RAMs                   ; 0 / 1 ( 0 % )                                 ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.2 (lab use) ==&lt;br /&gt;
; Filename&lt;br /&gt;
: bc_v05000002_xxjan2010.sof &lt;br /&gt;
; Features&lt;br /&gt;
: build based on 5.0.1 for Rev. E cards&lt;br /&gt;
: Independent control for ln_bias lines 0 to 11&lt;br /&gt;
; Details&lt;br /&gt;
: If this firmware is loaded on a Rev. D card, it's harmless. The only functionality loss is that the bias command will not work as unfortunately DAC CS and CLK pins are swapped for the bias DAC between the two revisions of the card.&lt;br /&gt;
; To do &lt;br /&gt;
: fix combinational loops on read-ram register&lt;br /&gt;
&lt;br /&gt;
; Bugs&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.1 (lab use) ==&lt;br /&gt;
; Filename&lt;br /&gt;
: bc_v05000001_19jan2010.sof &lt;br /&gt;
; Features&lt;br /&gt;
: supports the new low-noise bias lines (total of 12) introduced in Bias Card Rev. E&lt;br /&gt;
: card_type parameter is set to 5 (bias-card Rev. E)&lt;br /&gt;
: All DACs are loaded at once as oppose to previous revisions that loaded them one after next.&lt;br /&gt;
: DAC clock is now 25MHz and generated by PLL, previous firmware had 12.5MHz clock generated by dividing down.&lt;br /&gt;
; Details&lt;br /&gt;
: If this firmware is loaded on a Rev. D card, it's harmless. The only functionality loss is that the bias command will not work as unfortunately DAC CS and CLK pins are swapped for the bias DAC between the two revisions of the card.&lt;br /&gt;
; To do &lt;br /&gt;
: All ln_bias lines are controlled at once and this should be modified to independent control.&lt;br /&gt;
; Bugs&lt;br /&gt;
ln_bias_0 doesn't work, because the data line for ln_bias_0 is not connected in firmware.&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.0 ==&lt;br /&gt;
* '''Filename:'''  bc_v05000000_22dec2008.sof (tagged as sys_v05000000_22dec2008)&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** IMPORTANT:  Must be used in conjunction with firmware v05000000 of all other cards!!!&lt;br /&gt;
** To allow enough data bandwidth, the spare LVDS line from each card to the Clock Card is now used&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None yet reported&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (bias_card.fit.rpt):&lt;br /&gt;
 ; Fitter Status            ; Successful - Wed Jan 14 11:19:37 2009    ;&lt;br /&gt;
 ; Quartus II Version       ; 8.1 Build 163 10/28/2008 SJ Full Version ;&lt;br /&gt;
 ; Device                   ; EP1S10F780C5                             ;&lt;br /&gt;
 ; Total logic elements     ; 3,356 / 10,570 ( 32 % )                  ;&lt;br /&gt;
 ; Total pins               ; 187 / 427 ( 44 % )                       ;&lt;br /&gt;
 ; Total memory bits        ; 70,144 / 920,448 ( 8 % )                 ;&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (bias_card.tan.rpt):&lt;br /&gt;
 ; Fast Model Clock Setup: 'bc_pll:pll0|altpll:altpll_component|_clk1' ; 7.060 ns  ;&lt;br /&gt;
 ; Fast Model Clock Setup: 'bc_pll:pll0|altpll:altpll_component|_clk0' ; 7.125 ns  ;&lt;br /&gt;
 ; Fast Model Clock Hold: 'bc_pll:pll0|altpll:altpll_component|_clk0'  ; 0.383 ns  ;&lt;br /&gt;
 ; Fast Model Clock Hold: 'bc_pll:pll0|altpll:altpll_component|_clk1'  ; 0.384 ns  ;&lt;br /&gt;
 ; Fast Model Recovery: 'bc_pll:pll0|altpll:altpll_component|_clk0'    ; 16.037 ns ;&lt;br /&gt;
 ; Fast Model Removal: 'bc_pll:pll0|altpll:altpll_component|_clk0'     ; 0.575 ns  ;&lt;br /&gt;
 ; Total number of failed paths                                        ;           ;&lt;br /&gt;
&lt;br /&gt;
== Revision 1.4.2 ==&lt;br /&gt;
* bc_v01040002_15jul2008.sof&lt;br /&gt;
Features:&lt;br /&gt;
* Added the tga_i signal to the sensitivity list for the bc_dac_ctrl FSM&lt;br /&gt;
* potential bug may have been introduced with resetting the DAC counter due to inadvertently using the wrong bc_dac_ctrl_core.vhd version.&lt;br /&gt;
&lt;br /&gt;
== Revision 1.4.1 ==&lt;br /&gt;
* bc_v01040001_25jan2008.sof&lt;br /&gt;
&lt;br /&gt;
Features:&lt;br /&gt;
* Added card_type and scratch commands&lt;br /&gt;
* Integrated fw_rev and slot_id as part of all_cards&lt;br /&gt;
* Added provisions for safe state machines to fix the reset problem.&lt;br /&gt;
* Added lvds_tx = 0 so clock-card can check whether the card is plugged in using this spare lvds line.&lt;br /&gt;
Bugs:  None so far&lt;br /&gt;
&lt;br /&gt;
= Firmware Links =&lt;br /&gt;
* [http://www.phas.ubc.ca/~mce/mcedocs/firmware/ Firmware .sof &amp;amp; .pof Downloads]&lt;br /&gt;
* [http://www.phas.ubc.ca/~mce/mcedocs/firmware/bc_fpga_programming_file_catalogue.pdf  Bias Card Firmware Catalog]&lt;br /&gt;
&lt;br /&gt;
= Wiki Links =&lt;br /&gt;
* [http://e-mode.phas.ubc.ca/mcewiki/index.php/MCE_firmware  MCE Firmware Page]&lt;br /&gt;
* [http://e-mode.phas.ubc.ca/mcewiki/index.php/Main_Page  MCE Main Page]&lt;/div&gt;</summary>
		<author><name>Bburger</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Quartus_II_Installation&amp;diff=4359</id>
		<title>Quartus II Installation</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Quartus_II_Installation&amp;diff=4359"/>
		<updated>2011-05-09T20:30:27Z</updated>

		<summary type="html">&lt;p&gt;Bburger: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Quartus II Programmer for Windows (For Programming the MCE) =&lt;br /&gt;
* If you are planning to use Altera-supplied hardware (e.g. USB-Blaster) to upgrade the MCE firmware, you need to install &amp;quot;'''Quartus Programmer'''&amp;quot; on either a Windows or Linux PC.&lt;br /&gt;
* See the OS requirements here: http://www.altera.com/download/os-support/oss-index.html &amp;lt;br&amp;gt;&lt;br /&gt;
* Download Quartus here: https://www.altera.com/download/programming/quartus2/pq2-index.jsp&lt;br /&gt;
* Note that the installer needs direct access to Quartus website. In case you are behind a firewall, you may need to setup a proxy server.&lt;br /&gt;
* The installation is straight forward. After installation is complete, plug in the USB-Blaster and the driver is typically found under altera/10.0/quartus/driver.&lt;br /&gt;
&lt;br /&gt;
= Quartus II for Windows (For Synthesizing MCE Firmware) =&lt;br /&gt;
* In a web browser, browse to ftp://ftp.altera.com/outgoing/release/&lt;br /&gt;
* Filenames to look for are of the form &amp;quot;91sp1_quartus_free.exe&amp;quot; if you don't have a license, or &amp;quot;91sp1_quartus_windows.exe&amp;quot; if you have a license.&lt;br /&gt;
* Download the appropriate file.&lt;br /&gt;
* Double click on 'XX_quartus_windows.exe' and follow the extraction and installation instructions.&lt;br /&gt;
&lt;br /&gt;
= Quartus II for Linux =&lt;br /&gt;
As usual, only RedHat and Seuse are officially supported and you are on your own if you install it on any other Linux distribution. &lt;br /&gt;
&lt;br /&gt;
== Troubleshooting Ubuntu Installation ==&lt;br /&gt;
Quartus 10.0 installed fine on Ubuntu and no tweaking was needed. &lt;br /&gt;
&lt;br /&gt;
However, when installing Quartus 9.1 the installer couldn't find a few commands that typically exist on Fedora systems, notably ''arch'' and ''rpm''. You can create a fake version of these and copy them under /usr/bin. &lt;br /&gt;
* Create a script called ''arch'' that contains: &lt;br /&gt;
 uname -m&lt;br /&gt;
* Create a script called ''rpm'' that contains: &lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 OUT=/home/mce/rpm_cmd.txt&lt;br /&gt;
 date &amp;gt;&amp;gt; $OUT&lt;br /&gt;
 echo $@ &amp;gt;&amp;gt; $OUT&lt;br /&gt;
Make sure the permissions are set to executable. &lt;br /&gt;
&lt;br /&gt;
More tips here: http://fpga4u.epfl.ch/wiki/Install_Quartus_II#On_Linux &lt;br /&gt;
&lt;br /&gt;
== Launching Quartus ==&lt;br /&gt;
After installation is complete, add the Quartus path to $PATH (probably in .bashrc), e.g.:&lt;br /&gt;
 PATH=$PATH:/opt/usr/local/lib/altera/10.0/quartus/bin&lt;br /&gt;
 export PATH&lt;br /&gt;
&lt;br /&gt;
== License Manager ==&lt;br /&gt;
If you have only installed '''Quartus Programmer or Quartus II web edition''', the following section '''does NOT''' apply to you. However, if you have installed the &amp;quot;Quartus Subscription Edition&amp;quot;, then continue reading.&lt;br /&gt;
&lt;br /&gt;
You need to have a license file from Altera. The license file needs to be modified as follows. Change the top few lines from:&lt;br /&gt;
 SERVER &amp;lt;hostname&amp;gt; 001e90151053 &amp;lt;port number&amp;gt;&lt;br /&gt;
 VENDOR alterad &amp;lt;path to daemon executable&amp;gt;&lt;br /&gt;
 VENDOR mgcld &amp;lt;path to daemon executable&amp;gt;&lt;br /&gt;
 USE_SERVER&lt;br /&gt;
to&lt;br /&gt;
 SERVER mce-ubc-2 001e90151053 1700&lt;br /&gt;
 DAEMON alterad /opt/altera91/quartus/linux64/alterad&lt;br /&gt;
 DAEMON mgcld /opt/altera91/modelsim_ase/linux/mgls/lib/mgcld&lt;br /&gt;
 USE_SERVER&lt;br /&gt;
&lt;br /&gt;
Copy the license file in /opt/licenses/quartus_001e90151053.dat &lt;br /&gt;
&lt;br /&gt;
The license manager can be invoked by:&lt;br /&gt;
 sudo /opt/altera10.0sp1/quartus/linux/lmgrd -c /opt/licenses/quartus_001e90151053.dat&lt;br /&gt;
&lt;br /&gt;
You can add this line (without the sudo) into /etc/rc.local to get it to start whenever the computer boots.&lt;br /&gt;
&lt;br /&gt;
When this works, it should spit out messages like this:&lt;br /&gt;
 8:38:25 (lmgrd) Started alterad (internet tcp_port 52255 pid 28888)&lt;br /&gt;
 8:38:25 (lmgrd) Started mgcld (internet tcp_port 54712 pid 28889)&lt;br /&gt;
 8:38:25 (alterad) FLEXlm version 9.50&lt;br /&gt;
 8:38:25 (alterad) lmgrd version 11.4, alterad version 9.5&lt;br /&gt;
 &lt;br /&gt;
 8:38:25 (mgcld) FLEXnet Licensing version v10.8.5.0 build 31891 i86_r6&lt;br /&gt;
 8:38:25 (mgcld) lmgrd version 11.4, mgcld version 10.8&lt;br /&gt;
 &lt;br /&gt;
 8:38:25 (mgcld) Server started on mce-ubc-2 for:	alteramtivsim	&lt;br /&gt;
 8:38:25 (mgcld) &lt;br /&gt;
 8:38:25 (mgcld) Licenses are case sensitive for mgcld&lt;br /&gt;
 8:38:25 (mgcld) &lt;br /&gt;
 8:38:25 (mgcld) EXTERNAL FILTERS are OFF&lt;br /&gt;
 8:38:25 (lmgrd) mgcld using TCP-port 54712&lt;br /&gt;
 8:38:25 (alterad) Server started on mce-ubc-2 for:	maxplus2	&lt;br /&gt;
 8:38:25 (alterad) quartus		6AF7_0012	6AF7_0014	&lt;br /&gt;
 8:38:25 (alterad) 6AF7_0055	6AF7_00A7	6AF7_00A8	&lt;br /&gt;
 8:38:25 (alterad) 6AF7_00A4	6AF7_0034	6AF7_00AC	&lt;br /&gt;
 8:38:25 (alterad) 6AF7_00AD	6AF7_00BE	6AF7_00BF	&lt;br /&gt;
 8:38:25 (alterad) 6AF7_00C2	maxplus2verilog maxplus2vhdl	&lt;br /&gt;
 8:38:25 (alterad) altera_mainwin_lnx altera_mainwin	6AF8_00A2	&lt;br /&gt;
 8:38:25 (alterad) 6AF7_00A2&lt;/div&gt;</summary>
		<author><name>Bburger</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Quartus_II_Installation&amp;diff=4358</id>
		<title>Quartus II Installation</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Quartus_II_Installation&amp;diff=4358"/>
		<updated>2011-05-09T19:50:15Z</updated>

		<summary type="html">&lt;p&gt;Bburger: /* Quartus II for Windows (For Synthesizing MCE Firmware) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Quartus II Programmer for Windows (For Loading MCE Firmware) =&lt;br /&gt;
* If you are planning to use Altera-supplied hardware (e.g. USB-Blaster) to upgrade the MCE firmware, you need to install &amp;quot;'''Quartus Programmer'''&amp;quot; on either a Windows or Linux PC.&lt;br /&gt;
* See the OS requirements here: http://www.altera.com/download/os-support/oss-index.html &amp;lt;br&amp;gt;&lt;br /&gt;
* Download Quartus here: https://www.altera.com/download/programming/quartus2/pq2-index.jsp&lt;br /&gt;
* Note that the installer needs direct access to Quartus website. In case you are behind a firewall, you may need to setup a proxy server.&lt;br /&gt;
* The installation is straight forward. After installation is complete, plug in the USB-Blaster and the driver is typically found under altera/10.0/quartus/driver.&lt;br /&gt;
&lt;br /&gt;
= Quartus II for Windows (For Synthesizing MCE Firmware) =&lt;br /&gt;
* In a web browser, browse to ftp://ftp.altera.com/outgoing/release/&lt;br /&gt;
* Filenames to look for are of the form &amp;quot;91sp1_quartus_free.exe&amp;quot; if you don't have a license, or &amp;quot;91sp1_quartus_windows.exe&amp;quot; if you have a license.&lt;br /&gt;
* Download the appropriate file.&lt;br /&gt;
* Double click on 'XX_quartus_windows.exe' and follow the extraction and installation instructions.&lt;br /&gt;
&lt;br /&gt;
= Quartus II for Linux =&lt;br /&gt;
As usual, only RedHat and Seuse are officially supported and you are on your own if you install it on any other Linux distribution. &lt;br /&gt;
&lt;br /&gt;
== Troubleshooting Ubuntu Installation ==&lt;br /&gt;
Quartus 10.0 installed fine on Ubuntu and no tweaking was needed. &lt;br /&gt;
&lt;br /&gt;
However, when installing Quartus 9.1 the installer couldn't find a few commands that typically exist on Fedora systems, notably ''arch'' and ''rpm''. You can create a fake version of these and copy them under /usr/bin. &lt;br /&gt;
* Create a script called ''arch'' that contains: &lt;br /&gt;
 uname -m&lt;br /&gt;
* Create a script called ''rpm'' that contains: &lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 OUT=/home/mce/rpm_cmd.txt&lt;br /&gt;
 date &amp;gt;&amp;gt; $OUT&lt;br /&gt;
 echo $@ &amp;gt;&amp;gt; $OUT&lt;br /&gt;
Make sure the permissions are set to executable. &lt;br /&gt;
&lt;br /&gt;
More tips here: http://fpga4u.epfl.ch/wiki/Install_Quartus_II#On_Linux &lt;br /&gt;
&lt;br /&gt;
== Launching Quartus ==&lt;br /&gt;
After installation is complete, add the Quartus path to $PATH (probably in .bashrc), e.g.:&lt;br /&gt;
 PATH=$PATH:/opt/usr/local/lib/altera/10.0/quartus/bin&lt;br /&gt;
 export PATH&lt;br /&gt;
&lt;br /&gt;
== License Manager ==&lt;br /&gt;
If you have only installed '''Quartus Programmer or Quartus II web edition''', the following section '''does NOT''' apply to you. However, if you have installed the &amp;quot;Quartus Subscription Edition&amp;quot;, then continue reading.&lt;br /&gt;
&lt;br /&gt;
You need to have a license file from Altera. The license file needs to be modified as follows. Change the top few lines from:&lt;br /&gt;
 SERVER &amp;lt;hostname&amp;gt; 001e90151053 &amp;lt;port number&amp;gt;&lt;br /&gt;
 VENDOR alterad &amp;lt;path to daemon executable&amp;gt;&lt;br /&gt;
 VENDOR mgcld &amp;lt;path to daemon executable&amp;gt;&lt;br /&gt;
 USE_SERVER&lt;br /&gt;
to&lt;br /&gt;
 SERVER mce-ubc-2 001e90151053 1700&lt;br /&gt;
 DAEMON alterad /opt/altera91/quartus/linux64/alterad&lt;br /&gt;
 DAEMON mgcld /opt/altera91/modelsim_ase/linux/mgls/lib/mgcld&lt;br /&gt;
 USE_SERVER&lt;br /&gt;
&lt;br /&gt;
Copy the license file in /opt/licenses/quartus_001e90151053.dat &lt;br /&gt;
&lt;br /&gt;
The license manager can be invoked by:&lt;br /&gt;
 sudo /opt/altera10.0sp1/quartus/linux/lmgrd -c /opt/licenses/quartus_001e90151053.dat&lt;br /&gt;
&lt;br /&gt;
You can add this line (without the sudo) into /etc/rc.local to get it to start whenever the computer boots.&lt;br /&gt;
&lt;br /&gt;
When this works, it should spit out messages like this:&lt;br /&gt;
 8:38:25 (lmgrd) Started alterad (internet tcp_port 52255 pid 28888)&lt;br /&gt;
 8:38:25 (lmgrd) Started mgcld (internet tcp_port 54712 pid 28889)&lt;br /&gt;
 8:38:25 (alterad) FLEXlm version 9.50&lt;br /&gt;
 8:38:25 (alterad) lmgrd version 11.4, alterad version 9.5&lt;br /&gt;
 &lt;br /&gt;
 8:38:25 (mgcld) FLEXnet Licensing version v10.8.5.0 build 31891 i86_r6&lt;br /&gt;
 8:38:25 (mgcld) lmgrd version 11.4, mgcld version 10.8&lt;br /&gt;
 &lt;br /&gt;
 8:38:25 (mgcld) Server started on mce-ubc-2 for:	alteramtivsim	&lt;br /&gt;
 8:38:25 (mgcld) &lt;br /&gt;
 8:38:25 (mgcld) Licenses are case sensitive for mgcld&lt;br /&gt;
 8:38:25 (mgcld) &lt;br /&gt;
 8:38:25 (mgcld) EXTERNAL FILTERS are OFF&lt;br /&gt;
 8:38:25 (lmgrd) mgcld using TCP-port 54712&lt;br /&gt;
 8:38:25 (alterad) Server started on mce-ubc-2 for:	maxplus2	&lt;br /&gt;
 8:38:25 (alterad) quartus		6AF7_0012	6AF7_0014	&lt;br /&gt;
 8:38:25 (alterad) 6AF7_0055	6AF7_00A7	6AF7_00A8	&lt;br /&gt;
 8:38:25 (alterad) 6AF7_00A4	6AF7_0034	6AF7_00AC	&lt;br /&gt;
 8:38:25 (alterad) 6AF7_00AD	6AF7_00BE	6AF7_00BF	&lt;br /&gt;
 8:38:25 (alterad) 6AF7_00C2	maxplus2verilog maxplus2vhdl	&lt;br /&gt;
 8:38:25 (alterad) altera_mainwin_lnx altera_mainwin	6AF8_00A2	&lt;br /&gt;
 8:38:25 (alterad) 6AF7_00A2&lt;/div&gt;</summary>
		<author><name>Bburger</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Quartus_II_Installation&amp;diff=4357</id>
		<title>Quartus II Installation</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Quartus_II_Installation&amp;diff=4357"/>
		<updated>2011-05-09T19:49:09Z</updated>

		<summary type="html">&lt;p&gt;Bburger: /* Quartus II for Windows */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Quartus II Programmer for Windows (For Loading MCE Firmware) =&lt;br /&gt;
* If you are planning to use Altera-supplied hardware (e.g. USB-Blaster) to upgrade the MCE firmware, you need to install &amp;quot;'''Quartus Programmer'''&amp;quot; on either a Windows or Linux PC.&lt;br /&gt;
* See the OS requirements here: http://www.altera.com/download/os-support/oss-index.html &amp;lt;br&amp;gt;&lt;br /&gt;
* Download Quartus here: https://www.altera.com/download/programming/quartus2/pq2-index.jsp&lt;br /&gt;
* Note that the installer needs direct access to Quartus website. In case you are behind a firewall, you may need to setup a proxy server.&lt;br /&gt;
* The installation is straight forward. After installation is complete, plug in the USB-Blaster and the driver is typically found under altera/10.0/quartus/driver.&lt;br /&gt;
&lt;br /&gt;
= Quartus II for Windows (For Synthesizing MCE Firmware) =&lt;br /&gt;
* In a web browser, browse to ftp://ftp.altera.com/outgoing/release/&lt;br /&gt;
* Filenames to look for are of the form &amp;quot;91sp1_quartus_free.exe&amp;quot; if you don't have a license, or &amp;quot;91sp1_quartus_windows.exe&amp;quot; if you have a license.&lt;br /&gt;
* Double click on 'XX_quartus_windows.exe' and follow the extraction and installation instructions.&lt;br /&gt;
&lt;br /&gt;
= Quartus II for Linux =&lt;br /&gt;
As usual, only RedHat and Seuse are officially supported and you are on your own if you install it on any other Linux distribution. &lt;br /&gt;
&lt;br /&gt;
== Troubleshooting Ubuntu Installation ==&lt;br /&gt;
Quartus 10.0 installed fine on Ubuntu and no tweaking was needed. &lt;br /&gt;
&lt;br /&gt;
However, when installing Quartus 9.1 the installer couldn't find a few commands that typically exist on Fedora systems, notably ''arch'' and ''rpm''. You can create a fake version of these and copy them under /usr/bin. &lt;br /&gt;
* Create a script called ''arch'' that contains: &lt;br /&gt;
 uname -m&lt;br /&gt;
* Create a script called ''rpm'' that contains: &lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 OUT=/home/mce/rpm_cmd.txt&lt;br /&gt;
 date &amp;gt;&amp;gt; $OUT&lt;br /&gt;
 echo $@ &amp;gt;&amp;gt; $OUT&lt;br /&gt;
Make sure the permissions are set to executable. &lt;br /&gt;
&lt;br /&gt;
More tips here: http://fpga4u.epfl.ch/wiki/Install_Quartus_II#On_Linux &lt;br /&gt;
&lt;br /&gt;
== Launching Quartus ==&lt;br /&gt;
After installation is complete, add the Quartus path to $PATH (probably in .bashrc), e.g.:&lt;br /&gt;
 PATH=$PATH:/opt/usr/local/lib/altera/10.0/quartus/bin&lt;br /&gt;
 export PATH&lt;br /&gt;
&lt;br /&gt;
== License Manager ==&lt;br /&gt;
If you have only installed '''Quartus Programmer or Quartus II web edition''', the following section '''does NOT''' apply to you. However, if you have installed the &amp;quot;Quartus Subscription Edition&amp;quot;, then continue reading.&lt;br /&gt;
&lt;br /&gt;
You need to have a license file from Altera. The license file needs to be modified as follows. Change the top few lines from:&lt;br /&gt;
 SERVER &amp;lt;hostname&amp;gt; 001e90151053 &amp;lt;port number&amp;gt;&lt;br /&gt;
 VENDOR alterad &amp;lt;path to daemon executable&amp;gt;&lt;br /&gt;
 VENDOR mgcld &amp;lt;path to daemon executable&amp;gt;&lt;br /&gt;
 USE_SERVER&lt;br /&gt;
to&lt;br /&gt;
 SERVER mce-ubc-2 001e90151053 1700&lt;br /&gt;
 DAEMON alterad /opt/altera91/quartus/linux64/alterad&lt;br /&gt;
 DAEMON mgcld /opt/altera91/modelsim_ase/linux/mgls/lib/mgcld&lt;br /&gt;
 USE_SERVER&lt;br /&gt;
&lt;br /&gt;
Copy the license file in /opt/licenses/quartus_001e90151053.dat &lt;br /&gt;
&lt;br /&gt;
The license manager can be invoked by:&lt;br /&gt;
 sudo /opt/altera10.0sp1/quartus/linux/lmgrd -c /opt/licenses/quartus_001e90151053.dat&lt;br /&gt;
&lt;br /&gt;
You can add this line (without the sudo) into /etc/rc.local to get it to start whenever the computer boots.&lt;br /&gt;
&lt;br /&gt;
When this works, it should spit out messages like this:&lt;br /&gt;
 8:38:25 (lmgrd) Started alterad (internet tcp_port 52255 pid 28888)&lt;br /&gt;
 8:38:25 (lmgrd) Started mgcld (internet tcp_port 54712 pid 28889)&lt;br /&gt;
 8:38:25 (alterad) FLEXlm version 9.50&lt;br /&gt;
 8:38:25 (alterad) lmgrd version 11.4, alterad version 9.5&lt;br /&gt;
 &lt;br /&gt;
 8:38:25 (mgcld) FLEXnet Licensing version v10.8.5.0 build 31891 i86_r6&lt;br /&gt;
 8:38:25 (mgcld) lmgrd version 11.4, mgcld version 10.8&lt;br /&gt;
 &lt;br /&gt;
 8:38:25 (mgcld) Server started on mce-ubc-2 for:	alteramtivsim	&lt;br /&gt;
 8:38:25 (mgcld) &lt;br /&gt;
 8:38:25 (mgcld) Licenses are case sensitive for mgcld&lt;br /&gt;
 8:38:25 (mgcld) &lt;br /&gt;
 8:38:25 (mgcld) EXTERNAL FILTERS are OFF&lt;br /&gt;
 8:38:25 (lmgrd) mgcld using TCP-port 54712&lt;br /&gt;
 8:38:25 (alterad) Server started on mce-ubc-2 for:	maxplus2	&lt;br /&gt;
 8:38:25 (alterad) quartus		6AF7_0012	6AF7_0014	&lt;br /&gt;
 8:38:25 (alterad) 6AF7_0055	6AF7_00A7	6AF7_00A8	&lt;br /&gt;
 8:38:25 (alterad) 6AF7_00A4	6AF7_0034	6AF7_00AC	&lt;br /&gt;
 8:38:25 (alterad) 6AF7_00AD	6AF7_00BE	6AF7_00BF	&lt;br /&gt;
 8:38:25 (alterad) 6AF7_00C2	maxplus2verilog maxplus2vhdl	&lt;br /&gt;
 8:38:25 (alterad) altera_mainwin_lnx altera_mainwin	6AF8_00A2	&lt;br /&gt;
 8:38:25 (alterad) 6AF7_00A2&lt;/div&gt;</summary>
		<author><name>Bburger</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Quartus_II_Installation&amp;diff=4356</id>
		<title>Quartus II Installation</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Quartus_II_Installation&amp;diff=4356"/>
		<updated>2011-05-09T19:48:52Z</updated>

		<summary type="html">&lt;p&gt;Bburger: /* Quartus II Programmer for Windows */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Quartus II Programmer for Windows (For Loading MCE Firmware) =&lt;br /&gt;
* If you are planning to use Altera-supplied hardware (e.g. USB-Blaster) to upgrade the MCE firmware, you need to install &amp;quot;'''Quartus Programmer'''&amp;quot; on either a Windows or Linux PC.&lt;br /&gt;
* See the OS requirements here: http://www.altera.com/download/os-support/oss-index.html &amp;lt;br&amp;gt;&lt;br /&gt;
* Download Quartus here: https://www.altera.com/download/programming/quartus2/pq2-index.jsp&lt;br /&gt;
* Note that the installer needs direct access to Quartus website. In case you are behind a firewall, you may need to setup a proxy server.&lt;br /&gt;
* The installation is straight forward. After installation is complete, plug in the USB-Blaster and the driver is typically found under altera/10.0/quartus/driver.&lt;br /&gt;
&lt;br /&gt;
= Quartus II for Windows =&lt;br /&gt;
* In a web browser, browse to ftp://ftp.altera.com/outgoing/release/&lt;br /&gt;
* Filenames to look for are of the form &amp;quot;91sp1_quartus_free.exe&amp;quot; if you don't have a license, or &amp;quot;91sp1_quartus_windows.exe&amp;quot; if you have a license.&lt;br /&gt;
* Double click on 'XX_quartus_windows.exe' and follow the extraction and installation instructions.&lt;br /&gt;
&lt;br /&gt;
= Quartus II for Linux =&lt;br /&gt;
As usual, only RedHat and Seuse are officially supported and you are on your own if you install it on any other Linux distribution. &lt;br /&gt;
&lt;br /&gt;
== Troubleshooting Ubuntu Installation ==&lt;br /&gt;
Quartus 10.0 installed fine on Ubuntu and no tweaking was needed. &lt;br /&gt;
&lt;br /&gt;
However, when installing Quartus 9.1 the installer couldn't find a few commands that typically exist on Fedora systems, notably ''arch'' and ''rpm''. You can create a fake version of these and copy them under /usr/bin. &lt;br /&gt;
* Create a script called ''arch'' that contains: &lt;br /&gt;
 uname -m&lt;br /&gt;
* Create a script called ''rpm'' that contains: &lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 OUT=/home/mce/rpm_cmd.txt&lt;br /&gt;
 date &amp;gt;&amp;gt; $OUT&lt;br /&gt;
 echo $@ &amp;gt;&amp;gt; $OUT&lt;br /&gt;
Make sure the permissions are set to executable. &lt;br /&gt;
&lt;br /&gt;
More tips here: http://fpga4u.epfl.ch/wiki/Install_Quartus_II#On_Linux &lt;br /&gt;
&lt;br /&gt;
== Launching Quartus ==&lt;br /&gt;
After installation is complete, add the Quartus path to $PATH (probably in .bashrc), e.g.:&lt;br /&gt;
 PATH=$PATH:/opt/usr/local/lib/altera/10.0/quartus/bin&lt;br /&gt;
 export PATH&lt;br /&gt;
&lt;br /&gt;
== License Manager ==&lt;br /&gt;
If you have only installed '''Quartus Programmer or Quartus II web edition''', the following section '''does NOT''' apply to you. However, if you have installed the &amp;quot;Quartus Subscription Edition&amp;quot;, then continue reading.&lt;br /&gt;
&lt;br /&gt;
You need to have a license file from Altera. The license file needs to be modified as follows. Change the top few lines from:&lt;br /&gt;
 SERVER &amp;lt;hostname&amp;gt; 001e90151053 &amp;lt;port number&amp;gt;&lt;br /&gt;
 VENDOR alterad &amp;lt;path to daemon executable&amp;gt;&lt;br /&gt;
 VENDOR mgcld &amp;lt;path to daemon executable&amp;gt;&lt;br /&gt;
 USE_SERVER&lt;br /&gt;
to&lt;br /&gt;
 SERVER mce-ubc-2 001e90151053 1700&lt;br /&gt;
 DAEMON alterad /opt/altera91/quartus/linux64/alterad&lt;br /&gt;
 DAEMON mgcld /opt/altera91/modelsim_ase/linux/mgls/lib/mgcld&lt;br /&gt;
 USE_SERVER&lt;br /&gt;
&lt;br /&gt;
Copy the license file in /opt/licenses/quartus_001e90151053.dat &lt;br /&gt;
&lt;br /&gt;
The license manager can be invoked by:&lt;br /&gt;
 sudo /opt/altera10.0sp1/quartus/linux/lmgrd -c /opt/licenses/quartus_001e90151053.dat&lt;br /&gt;
&lt;br /&gt;
You can add this line (without the sudo) into /etc/rc.local to get it to start whenever the computer boots.&lt;br /&gt;
&lt;br /&gt;
When this works, it should spit out messages like this:&lt;br /&gt;
 8:38:25 (lmgrd) Started alterad (internet tcp_port 52255 pid 28888)&lt;br /&gt;
 8:38:25 (lmgrd) Started mgcld (internet tcp_port 54712 pid 28889)&lt;br /&gt;
 8:38:25 (alterad) FLEXlm version 9.50&lt;br /&gt;
 8:38:25 (alterad) lmgrd version 11.4, alterad version 9.5&lt;br /&gt;
 &lt;br /&gt;
 8:38:25 (mgcld) FLEXnet Licensing version v10.8.5.0 build 31891 i86_r6&lt;br /&gt;
 8:38:25 (mgcld) lmgrd version 11.4, mgcld version 10.8&lt;br /&gt;
 &lt;br /&gt;
 8:38:25 (mgcld) Server started on mce-ubc-2 for:	alteramtivsim	&lt;br /&gt;
 8:38:25 (mgcld) &lt;br /&gt;
 8:38:25 (mgcld) Licenses are case sensitive for mgcld&lt;br /&gt;
 8:38:25 (mgcld) &lt;br /&gt;
 8:38:25 (mgcld) EXTERNAL FILTERS are OFF&lt;br /&gt;
 8:38:25 (lmgrd) mgcld using TCP-port 54712&lt;br /&gt;
 8:38:25 (alterad) Server started on mce-ubc-2 for:	maxplus2	&lt;br /&gt;
 8:38:25 (alterad) quartus		6AF7_0012	6AF7_0014	&lt;br /&gt;
 8:38:25 (alterad) 6AF7_0055	6AF7_00A7	6AF7_00A8	&lt;br /&gt;
 8:38:25 (alterad) 6AF7_00A4	6AF7_0034	6AF7_00AC	&lt;br /&gt;
 8:38:25 (alterad) 6AF7_00AD	6AF7_00BE	6AF7_00BF	&lt;br /&gt;
 8:38:25 (alterad) 6AF7_00C2	maxplus2verilog maxplus2vhdl	&lt;br /&gt;
 8:38:25 (alterad) altera_mainwin_lnx altera_mainwin	6AF8_00A2	&lt;br /&gt;
 8:38:25 (alterad) 6AF7_00A2&lt;/div&gt;</summary>
		<author><name>Bburger</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Quartus_II_Installation&amp;diff=4355</id>
		<title>Quartus II Installation</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Quartus_II_Installation&amp;diff=4355"/>
		<updated>2011-05-09T19:47:46Z</updated>

		<summary type="html">&lt;p&gt;Bburger: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Quartus II Programmer for Windows =&lt;br /&gt;
* If you are planning to use Altera-supplied hardware (e.g. USB-Blaster) to upgrade the MCE firmware, you need to install &amp;quot;'''Quartus Programmer'''&amp;quot; on either a Windows or Linux PC.&lt;br /&gt;
* See the OS requirements here: http://www.altera.com/download/os-support/oss-index.html &amp;lt;br&amp;gt;&lt;br /&gt;
* Download Quartus here: https://www.altera.com/download/programming/quartus2/pq2-index.jsp&lt;br /&gt;
* Note that the installer needs direct access to Quartus website. In case you are behind a firewall, you may need to setup a proxy server.&lt;br /&gt;
* The installation is straight forward. After installation is complete, plug in the USB-Blaster and the driver is typically found under altera/10.0/quartus/driver.&lt;br /&gt;
&lt;br /&gt;
= Quartus II for Windows =&lt;br /&gt;
* In a web browser, browse to ftp://ftp.altera.com/outgoing/release/&lt;br /&gt;
* Filenames to look for are of the form &amp;quot;91sp1_quartus_free.exe&amp;quot; if you don't have a license, or &amp;quot;91sp1_quartus_windows.exe&amp;quot; if you have a license.&lt;br /&gt;
* Double click on 'XX_quartus_windows.exe' and follow the extraction and installation instructions.&lt;br /&gt;
&lt;br /&gt;
= Quartus II for Linux =&lt;br /&gt;
As usual, only RedHat and Seuse are officially supported and you are on your own if you install it on any other Linux distribution. &lt;br /&gt;
&lt;br /&gt;
== Troubleshooting Ubuntu Installation ==&lt;br /&gt;
Quartus 10.0 installed fine on Ubuntu and no tweaking was needed. &lt;br /&gt;
&lt;br /&gt;
However, when installing Quartus 9.1 the installer couldn't find a few commands that typically exist on Fedora systems, notably ''arch'' and ''rpm''. You can create a fake version of these and copy them under /usr/bin. &lt;br /&gt;
* Create a script called ''arch'' that contains: &lt;br /&gt;
 uname -m&lt;br /&gt;
* Create a script called ''rpm'' that contains: &lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 OUT=/home/mce/rpm_cmd.txt&lt;br /&gt;
 date &amp;gt;&amp;gt; $OUT&lt;br /&gt;
 echo $@ &amp;gt;&amp;gt; $OUT&lt;br /&gt;
Make sure the permissions are set to executable. &lt;br /&gt;
&lt;br /&gt;
More tips here: http://fpga4u.epfl.ch/wiki/Install_Quartus_II#On_Linux &lt;br /&gt;
&lt;br /&gt;
== Launching Quartus ==&lt;br /&gt;
After installation is complete, add the Quartus path to $PATH (probably in .bashrc), e.g.:&lt;br /&gt;
 PATH=$PATH:/opt/usr/local/lib/altera/10.0/quartus/bin&lt;br /&gt;
 export PATH&lt;br /&gt;
&lt;br /&gt;
== License Manager ==&lt;br /&gt;
If you have only installed '''Quartus Programmer or Quartus II web edition''', the following section '''does NOT''' apply to you. However, if you have installed the &amp;quot;Quartus Subscription Edition&amp;quot;, then continue reading.&lt;br /&gt;
&lt;br /&gt;
You need to have a license file from Altera. The license file needs to be modified as follows. Change the top few lines from:&lt;br /&gt;
 SERVER &amp;lt;hostname&amp;gt; 001e90151053 &amp;lt;port number&amp;gt;&lt;br /&gt;
 VENDOR alterad &amp;lt;path to daemon executable&amp;gt;&lt;br /&gt;
 VENDOR mgcld &amp;lt;path to daemon executable&amp;gt;&lt;br /&gt;
 USE_SERVER&lt;br /&gt;
to&lt;br /&gt;
 SERVER mce-ubc-2 001e90151053 1700&lt;br /&gt;
 DAEMON alterad /opt/altera91/quartus/linux64/alterad&lt;br /&gt;
 DAEMON mgcld /opt/altera91/modelsim_ase/linux/mgls/lib/mgcld&lt;br /&gt;
 USE_SERVER&lt;br /&gt;
&lt;br /&gt;
Copy the license file in /opt/licenses/quartus_001e90151053.dat &lt;br /&gt;
&lt;br /&gt;
The license manager can be invoked by:&lt;br /&gt;
 sudo /opt/altera10.0sp1/quartus/linux/lmgrd -c /opt/licenses/quartus_001e90151053.dat&lt;br /&gt;
&lt;br /&gt;
You can add this line (without the sudo) into /etc/rc.local to get it to start whenever the computer boots.&lt;br /&gt;
&lt;br /&gt;
When this works, it should spit out messages like this:&lt;br /&gt;
 8:38:25 (lmgrd) Started alterad (internet tcp_port 52255 pid 28888)&lt;br /&gt;
 8:38:25 (lmgrd) Started mgcld (internet tcp_port 54712 pid 28889)&lt;br /&gt;
 8:38:25 (alterad) FLEXlm version 9.50&lt;br /&gt;
 8:38:25 (alterad) lmgrd version 11.4, alterad version 9.5&lt;br /&gt;
 &lt;br /&gt;
 8:38:25 (mgcld) FLEXnet Licensing version v10.8.5.0 build 31891 i86_r6&lt;br /&gt;
 8:38:25 (mgcld) lmgrd version 11.4, mgcld version 10.8&lt;br /&gt;
 &lt;br /&gt;
 8:38:25 (mgcld) Server started on mce-ubc-2 for:	alteramtivsim	&lt;br /&gt;
 8:38:25 (mgcld) &lt;br /&gt;
 8:38:25 (mgcld) Licenses are case sensitive for mgcld&lt;br /&gt;
 8:38:25 (mgcld) &lt;br /&gt;
 8:38:25 (mgcld) EXTERNAL FILTERS are OFF&lt;br /&gt;
 8:38:25 (lmgrd) mgcld using TCP-port 54712&lt;br /&gt;
 8:38:25 (alterad) Server started on mce-ubc-2 for:	maxplus2	&lt;br /&gt;
 8:38:25 (alterad) quartus		6AF7_0012	6AF7_0014	&lt;br /&gt;
 8:38:25 (alterad) 6AF7_0055	6AF7_00A7	6AF7_00A8	&lt;br /&gt;
 8:38:25 (alterad) 6AF7_00A4	6AF7_0034	6AF7_00AC	&lt;br /&gt;
 8:38:25 (alterad) 6AF7_00AD	6AF7_00BE	6AF7_00BF	&lt;br /&gt;
 8:38:25 (alterad) 6AF7_00C2	maxplus2verilog maxplus2vhdl	&lt;br /&gt;
 8:38:25 (alterad) altera_mainwin_lnx altera_mainwin	6AF8_00A2	&lt;br /&gt;
 8:38:25 (alterad) 6AF7_00A2&lt;/div&gt;</summary>
		<author><name>Bburger</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Quartus_II_Installation&amp;diff=4354</id>
		<title>Quartus II Installation</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Quartus_II_Installation&amp;diff=4354"/>
		<updated>2011-05-09T19:47:30Z</updated>

		<summary type="html">&lt;p&gt;Bburger: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Quartus II Programmer for Windows =&lt;br /&gt;
* If you are planning to use Altera-supplied hardware (e.g. USB-Blaster) to upgrade the MCE firmware, you need to install &amp;quot;'''Quartus Programmer'''&amp;quot; on either a Windows or Linux PC.&lt;br /&gt;
* See the OS requirements here: http://www.altera.com/download/os-support/oss-index.html &amp;lt;br&amp;gt;&lt;br /&gt;
Download Quartus here: https://www.altera.com/download/programming/quartus2/pq2-index.jsp&lt;br /&gt;
* Note that the installer needs direct access to Quartus website. In case you are behind a firewall, you may need to setup a proxy server.&lt;br /&gt;
* The installation is straight forward. After installation is complete, plug in the USB-Blaster and the driver is typically found under altera/10.0/quartus/driver.&lt;br /&gt;
&lt;br /&gt;
= Quartus II for Windows =&lt;br /&gt;
* In a web browser, browse to ftp://ftp.altera.com/outgoing/release/&lt;br /&gt;
* Filenames to look for are of the form &amp;quot;91sp1_quartus_free.exe&amp;quot; if you don't have a license, or &amp;quot;91sp1_quartus_windows.exe&amp;quot; if you have a license.&lt;br /&gt;
* Double click on 'XX_quartus_windows.exe' and follow the extraction and installation instructions.&lt;br /&gt;
&lt;br /&gt;
= Quartus II for Linux =&lt;br /&gt;
As usual, only RedHat and Seuse are officially supported and you are on your own if you install it on any other Linux distribution. &lt;br /&gt;
&lt;br /&gt;
== Troubleshooting Ubuntu Installation ==&lt;br /&gt;
Quartus 10.0 installed fine on Ubuntu and no tweaking was needed. &lt;br /&gt;
&lt;br /&gt;
However, when installing Quartus 9.1 the installer couldn't find a few commands that typically exist on Fedora systems, notably ''arch'' and ''rpm''. You can create a fake version of these and copy them under /usr/bin. &lt;br /&gt;
* Create a script called ''arch'' that contains: &lt;br /&gt;
 uname -m&lt;br /&gt;
* Create a script called ''rpm'' that contains: &lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 OUT=/home/mce/rpm_cmd.txt&lt;br /&gt;
 date &amp;gt;&amp;gt; $OUT&lt;br /&gt;
 echo $@ &amp;gt;&amp;gt; $OUT&lt;br /&gt;
Make sure the permissions are set to executable. &lt;br /&gt;
&lt;br /&gt;
More tips here: http://fpga4u.epfl.ch/wiki/Install_Quartus_II#On_Linux &lt;br /&gt;
&lt;br /&gt;
== Launching Quartus ==&lt;br /&gt;
After installation is complete, add the Quartus path to $PATH (probably in .bashrc), e.g.:&lt;br /&gt;
 PATH=$PATH:/opt/usr/local/lib/altera/10.0/quartus/bin&lt;br /&gt;
 export PATH&lt;br /&gt;
&lt;br /&gt;
== License Manager ==&lt;br /&gt;
If you have only installed '''Quartus Programmer or Quartus II web edition''', the following section '''does NOT''' apply to you. However, if you have installed the &amp;quot;Quartus Subscription Edition&amp;quot;, then continue reading.&lt;br /&gt;
&lt;br /&gt;
You need to have a license file from Altera. The license file needs to be modified as follows. Change the top few lines from:&lt;br /&gt;
 SERVER &amp;lt;hostname&amp;gt; 001e90151053 &amp;lt;port number&amp;gt;&lt;br /&gt;
 VENDOR alterad &amp;lt;path to daemon executable&amp;gt;&lt;br /&gt;
 VENDOR mgcld &amp;lt;path to daemon executable&amp;gt;&lt;br /&gt;
 USE_SERVER&lt;br /&gt;
to&lt;br /&gt;
 SERVER mce-ubc-2 001e90151053 1700&lt;br /&gt;
 DAEMON alterad /opt/altera91/quartus/linux64/alterad&lt;br /&gt;
 DAEMON mgcld /opt/altera91/modelsim_ase/linux/mgls/lib/mgcld&lt;br /&gt;
 USE_SERVER&lt;br /&gt;
&lt;br /&gt;
Copy the license file in /opt/licenses/quartus_001e90151053.dat &lt;br /&gt;
&lt;br /&gt;
The license manager can be invoked by:&lt;br /&gt;
 sudo /opt/altera10.0sp1/quartus/linux/lmgrd -c /opt/licenses/quartus_001e90151053.dat&lt;br /&gt;
&lt;br /&gt;
You can add this line (without the sudo) into /etc/rc.local to get it to start whenever the computer boots.&lt;br /&gt;
&lt;br /&gt;
When this works, it should spit out messages like this:&lt;br /&gt;
 8:38:25 (lmgrd) Started alterad (internet tcp_port 52255 pid 28888)&lt;br /&gt;
 8:38:25 (lmgrd) Started mgcld (internet tcp_port 54712 pid 28889)&lt;br /&gt;
 8:38:25 (alterad) FLEXlm version 9.50&lt;br /&gt;
 8:38:25 (alterad) lmgrd version 11.4, alterad version 9.5&lt;br /&gt;
 &lt;br /&gt;
 8:38:25 (mgcld) FLEXnet Licensing version v10.8.5.0 build 31891 i86_r6&lt;br /&gt;
 8:38:25 (mgcld) lmgrd version 11.4, mgcld version 10.8&lt;br /&gt;
 &lt;br /&gt;
 8:38:25 (mgcld) Server started on mce-ubc-2 for:	alteramtivsim	&lt;br /&gt;
 8:38:25 (mgcld) &lt;br /&gt;
 8:38:25 (mgcld) Licenses are case sensitive for mgcld&lt;br /&gt;
 8:38:25 (mgcld) &lt;br /&gt;
 8:38:25 (mgcld) EXTERNAL FILTERS are OFF&lt;br /&gt;
 8:38:25 (lmgrd) mgcld using TCP-port 54712&lt;br /&gt;
 8:38:25 (alterad) Server started on mce-ubc-2 for:	maxplus2	&lt;br /&gt;
 8:38:25 (alterad) quartus		6AF7_0012	6AF7_0014	&lt;br /&gt;
 8:38:25 (alterad) 6AF7_0055	6AF7_00A7	6AF7_00A8	&lt;br /&gt;
 8:38:25 (alterad) 6AF7_00A4	6AF7_0034	6AF7_00AC	&lt;br /&gt;
 8:38:25 (alterad) 6AF7_00AD	6AF7_00BE	6AF7_00BF	&lt;br /&gt;
 8:38:25 (alterad) 6AF7_00C2	maxplus2verilog maxplus2vhdl	&lt;br /&gt;
 8:38:25 (alterad) altera_mainwin_lnx altera_mainwin	6AF8_00A2	&lt;br /&gt;
 8:38:25 (alterad) 6AF7_00A2&lt;/div&gt;</summary>
		<author><name>Bburger</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Readout_Card_firmware&amp;diff=4353</id>
		<title>Readout Card firmware</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Readout_Card_firmware&amp;diff=4353"/>
		<updated>2011-05-04T22:04:41Z</updated>

		<summary type="html">&lt;p&gt;Bburger: /* Revision 5.0.c (not recommended) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Synthesis Reminders (for firmware developers)&lt;br /&gt;
** quartus.ini is not needed anymore (Fixed as of Q7, Altera SR10783580 2010-10-24)&lt;br /&gt;
** Remember that readout_card/fsfb_clac/source/rtl/ram_40x64.vhd must be initialized with the ram_40x64.hex file in the same directory.&lt;br /&gt;
= Revision 5.1.2 =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010002_18jan2011.sof (for Rev. E cards) &lt;br /&gt;
** rc_stratix3_v05010002_18jan2011.jic (for Rev. E cards) &lt;br /&gt;
** rc_v05010002_03feb2011.sof (for Rev. B cards) &lt;br /&gt;
** rc_v05010002_03feb2011.pof (for Rev. B cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.1 with k1 and k2 (filter params) limited to k1&amp;lt;16 and k2&amp;lt;32 in order to resolve the timing when compiling for smaller Stratix FPGA on RC Rev. B.&lt;br /&gt;
&lt;br /&gt;
* '''Bug fix:'''&lt;br /&gt;
** the 2-rows-off filtered data readout introduced with configurable filter in rev. 5.1.0 and 5.1.1 is fixed now.&lt;br /&gt;
 &lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** none so far.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt, rev. B)&lt;br /&gt;
 ; Total logic elements      ; 33,285 / 41,250 ( 81 % )                       ;&lt;br /&gt;
 ; Total pins                ; 358 / 616 ( 58 % )                             ;&lt;br /&gt;
 ; Total memory bits         ; 1,405,440 / 3,423,744 ( 41 % )                 ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt, rev. B)&lt;br /&gt;
 ; Fast Model Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 6.591 ns  &lt;br /&gt;
 ; Fast Model Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 7.206 ns  &lt;br /&gt;
 ; Fast Model Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 18.299 ns&lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.1 (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05010001_01dec2010.sof (for Rev. B cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.0, but k1 and k2 (filter params) are now limited to k1&amp;lt;16 and k2&amp;lt;32 in order to resolve the timing failures of compiling 5.1.0 for smaller Stratix FPGA on RC Rev. B.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** filter mode data is off by 2 rows. &lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.0 (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010000_01nov2010.sof  (for Rev. E cards)&lt;br /&gt;
** rc_v05010000_01nov2010.sof (for Rev. B cards) has timing failures '''do not use!!!'''&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** added configurable filter parameters specified by ''fltr_coeff'', default is the f&amp;lt;sub&amp;gt;cutoff&amp;lt;/sub&amp;gt;/f&amp;lt;sub&amp;gt;sampl&amp;lt;/sub&amp;gt;=122Hz/15kHz. see [[ Digital 4-pole Butterworth Low-pass filter ]]. &lt;br /&gt;
** ''fltr_type'' is set to 255 to indicate configurable filter parameters.&lt;br /&gt;
** see [http://www.phas.ubc.ca/~mce/mcedocs/software/SC2_ELE_S580_515_mce_command_description.pdf MCE command description]&lt;br /&gt;
* '''Details''' &lt;br /&gt;
** It is built on Quartus10.1. &lt;br /&gt;
** tcl files had to be updated as cmp syntax is not supported in Q10 anymore.&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** rc_v05010000_01nov2010.sof has timing failures that were overlooked, do not use this firmware for Rev.B cards. &lt;br /&gt;
** '''filter mode data is off by 2 rows.''' &lt;br /&gt;
&lt;br /&gt;
* '''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&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.f  =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000f_22oct2010.sof (for Rev. B cards)&lt;br /&gt;
** rc_stratix3_v0500000f_22oct2010.sof  (for Rev. E cards)&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
**  Bugfix: integral clamp should work now. only positive integral_clamp values are valid!&lt;br /&gt;
&lt;br /&gt;
* '''Details:''': &lt;br /&gt;
** 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.&lt;br /&gt;
** available for both Rev. E and Rev. B cards, the upper byte of card_type parameter now reports the pcb revision.&lt;br /&gt;
** development note: It is built on Quartus10.1. &lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
**none yet!&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt): &lt;br /&gt;
 ; Total logic elements      ; 27,377 / 41,250 ( 66 % )                           ;&lt;br /&gt;
 ; Total pins                ; 358 / 616 ( 58 % )                                 ;&lt;br /&gt;
 ; Total memory bits         ; 1,405,440 / 3,423,744 ( 41 % )                     ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.652 ns &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.385 ns &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.860 ns&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.e (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000e_06oct2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''  &lt;br /&gt;
** 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!&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.d (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000d_04aug2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
**  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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:''': &lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** '''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 [[http://e-mode.phas.ubc.ca/mcewiki/index.php/Image:Clamp_unstable.png scope snapshot]] used slow_fb_ramp.py script for testing.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage and Timing Report''' (readout_card.fit.rpt and readout_card.tan.rpt): no change compared to 5.0.a/b/c&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.c (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000c_16jun2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.b&lt;br /&gt;
** Re-introduced flux-jump counter clamping to maintain continuity in behavior from past versions of firmware in the field.&lt;br /&gt;
** '''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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** '''flux-jump is broken'''. flux-jumping block misbehaves at the first jump in the negative range.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt): [[rc_5.0.c_fit_rpt]]&lt;br /&gt;
 ; Total logic elements     ; 26,800 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total pins               ; 358 / 616 ( 58 % )                            ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): [[rc_5.0.c_tan_rpt]]&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.964 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.382 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 15.924 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.b (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000b_03jun2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.a&lt;br /&gt;
** 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.&lt;br /&gt;
** 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&lt;br /&gt;
** A sticky bit that only affected servo_mode=0,1,2 was also removed from the flux-jumping block.&lt;br /&gt;
** flx_lp_init commands now also clear the flux-jumping block as well.&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** flux-jump does not work when jumping to negative values.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt): [[rc_5.0.b_fit_rpt]]&lt;br /&gt;
 ; Total logic elements     ; 26,745 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total pins               ; 358 / 616 ( 58 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 76 / 112 ( 68 % )                             ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): [[rc_5.0.b_tan_rpt]]&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.459 ns  &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.895 ns  &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 15.956 ns&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.a (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000a_12mar2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on the merger of rev. 5.0.8 and 5.0.9.&lt;br /&gt;
** '''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.&lt;br /&gt;
** The low pass filter has 20-bit input and f_3dB/f_samp = 122Hz/15kHz .&lt;br /&gt;
** The flux-jump clamping that was removed in 5.0.9 is included once again here, as we decided this is safer for now.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** &amp;quot;lock_dat_left&amp;quot; parameter that was removed in 5.0.9 is now implemented as &amp;quot;lock_dat_lsb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** flx_lp_init does not reinitialize the flux-jump block&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
** tag name: rc_v0500000a_12mar2009! years were mixed up!&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.9 (buggy) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000009_13nov2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** Removes a sticky bit in pid calculation result storage -- in fsfb_processor.&lt;br /&gt;
** Adds a command to clamp the growth of the I-term to prevent wrapping and track down the source of Caltech's FSFB jumps.&lt;br /&gt;
** Removed the unused lock_dat_left parameter.  The ability to shift left was moved to the fsfb_corr block some time ago.&lt;br /&gt;
** Fixed a sign extension bug acting on the flux quanta, which limited the value to 8191.  Changed the extension from signed to unsigned.&lt;br /&gt;
** Removed ineffective clamping in the flux-jump calculation block.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** integral_clamp read/write command does not work. &lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,960 / 41,250 ( 68 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.825 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.878 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 14.397 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.8 (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000008_09oct2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** type 1 low-pass filter: f&amp;lt;sub&amp;gt;3dB&amp;lt;/sub&amp;gt;=122Hz for f&amp;lt;sub&amp;gt;sample&amp;lt;/sub&amp;gt;=15kHz&lt;br /&gt;
** Filter-input-width changed from 18b to 20b with no sticky bits!&lt;br /&gt;
** removed sticky bits in internal arithmetic of the filter.&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.7 (type-2 filter) =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000007_09oct2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** type-2 low-pass-filter: f&amp;lt;sub&amp;gt;3dB&amp;lt;/sub&amp;gt;=75Hz for f&amp;lt;sub&amp;gt;sample&amp;lt;/sub&amp;gt;=30000.&lt;br /&gt;
** Filter-input-width changed from 18b to 20b with no sticky bits!&lt;br /&gt;
** inter-biquad-gain-scaling for the filter is 2^14&lt;br /&gt;
** filter results are scaled down by 2^3 in the output of the filter.&lt;br /&gt;
** removed sticky bits in internal arithmetics&lt;br /&gt;
** _correction_ disabled in fsfb_proc_pidz&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** quartus.ini file was '''not''' present in synth directory.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** none to report&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
== Revision 5.0.6  (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05000006_15sep2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Only Valid for Rev. C/D Cards&lt;br /&gt;
** Based on rev. 5.0.3&lt;br /&gt;
** tcl file updated for Rev. D and aligned with top-level and qsf (project file). &lt;br /&gt;
** flux loop commented, just to try sampling the ADC. &lt;br /&gt;
** compiled with Q9.1&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.5 (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000005_04sep2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** changed the low-pass-filter to f(3db)=75Hz for f(sample)=30000.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** quartus.ini file was '''not''' present in synth directory.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** negative inputs to the filter cause filter to have a non-flat pass-band region. may have to do with sign-handling...&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.4 =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000004_28aug2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** BUG Fix: handles 14-bit flux quanta (changed the multiplier to unsigned)&lt;br /&gt;
** BUG Fix: changed standard logic vector extension from signed to unsigned in flux-jumping slave.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,170 / 41,250 ( 63 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.541 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.612 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 15.398 ns ;&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.3  =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05000003_21aug2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** ONLY valid REV C/D RC Cards&lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** flux loop commented, just to try sampling the ADC.&lt;br /&gt;
** updated tcl file, but still need to rely on project file as well as qsf file.&lt;br /&gt;
** changed default level of adc_sclk to '1'&lt;br /&gt;
** dac_clr_n was changed from an output to an input.&lt;br /&gt;
** added 'locked' interface to rc_pll_stratix_iii&lt;br /&gt;
** renamed the adc_pll clock signals to more explanitory names&lt;br /&gt;
** added the FPGA_DEVICE_FAMILY generic to the dispatch interace for synthesis of the dc_fifo in lvds_rx&lt;br /&gt;
** uncommented DDR interface to force the syntesizer to use correct left and right PLLs (in conjunction with ADC and DDR PLLs)&lt;br /&gt;
** added test signals to test_status to see clocks on the scope.&lt;br /&gt;
== Revision 5.0.2 (buggy) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000002_test00_tagged.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.1&lt;br /&gt;
** Fixed a bug in wbs_frame_data that stored data incorrectly if reporting 1 or 2 pixels only.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,186 / 41,250 ( 63 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.755 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.979 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.067 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.1 (buggy) (Filter + Raw + Rectangle, 2 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000001_26may2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Combines features in rev. 5.0.0 (2 LVDS Lines) and rev. 4.0.e (Filtered + Raw), with the NEW rectangle mode.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** [[CVS Diff Between sys_v05000000 and rc_v05000001]]&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** Has a bug in wbs_frame_data that stored data incorrectly if reporting 1 or 2 pixels only.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,565 / 41,250 ( 64 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.656 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.861 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 14.167 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.0 (Filter Only, 2 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000000_22dec2008.sof (tagged as sys_v05000000_22dec2008)&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware v05000000+ of all other cards!!!&lt;br /&gt;
** Adds the ability to read out one column of data continuously from readout cards&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** [[CVS Diff Between rc_v0400000c and sys_v05000000]]&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,607 / 41,250 ( 65 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 406,016 / 3,423,744 ( 12 % )             ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.558 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.892 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.987 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.f (Filter + Raw, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0400000f_12feb2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on 4.0.e and in parallel with 5.0.9 (equivalent version, clamping is not included)&lt;br /&gt;
** Incorporates fixes that were done to flux-jumping between 5.0.2 - 5.0.4 - 5.0.9.  Namely:&lt;br /&gt;
*** Changes a multiplier from signed to unsigned (in fsfb_corr_multplier.vhd).&lt;br /&gt;
*** Changes sign extension from signed to unsigned (in flux_quanta_ram_admin.vhd).&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None reported yet.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,773 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,321,984 / 3,423,744 ( 39 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.539 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.118 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.318 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.e (Filter + Raw, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0400000e_27apr2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on 4.0.d&lt;br /&gt;
** Combines both raw- and filtered-data modes.&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are disabled.&lt;br /&gt;
** Tested by Matt Hasselfield.  &lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are disabled.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,048 / 41,250 ( 66 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,321,984 / 3,423,744 ( 39 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.675 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.907 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.728 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.d (Raw Only, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  rc_v0400000d_20090417.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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.&lt;br /&gt;
** The firmware takes a new command called readout_col_index which specifies which column to capture raw data from.&lt;br /&gt;
** Other than readout_col_index, the firmware functions the same as previous raw-data firmware, including then need to issue a capture_raw command.&lt;br /&gt;
** For more information on raw-data, see:  http://e-mode.phas.ubc.ca/mcewiki/index.php/Raw-mode_readout&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** Differences between 4.0.c and 4.0.d&lt;br /&gt;
 U system/test/source/tb/tb_cc_rcs_bcs_ac.vhd&lt;br /&gt;
 U all_cards/dispatch/source/rtl/dispatch_wishbone.vhd&lt;br /&gt;
 U library/sys_param/source/rtl/wishbone_pack.vhd&lt;br /&gt;
 U readout_card/adc_sample_coadd/source/rtl/adc_sample_coadd.vhd&lt;br /&gt;
 U readout_card/adc_sample_coadd/source/rtl/adc_sample_coadd_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop/source/rtl/flux_loop.vhd&lt;br /&gt;
 U readout_card/flux_loop/source/rtl/flux_loop_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/rtl/flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/rtl/flux_loop_ctrl_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/tb/tb1_flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/tb/tb2_flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/fsfb_calc/source/rtl/fsfb_fltr_regs.vhd&lt;br /&gt;
 U readout_card/fsfb_corr/source/rtl/fsfb_corr.vhd&lt;br /&gt;
 U readout_card/readout_card/source/rtl/readout_card.vhd&lt;br /&gt;
 U readout_card/readout_card/source/rtl/readout_card_pack.vhd&lt;br /&gt;
 U readout_card/wbs_frame_data/source/rtl/wbs_frame_data.vhd&lt;br /&gt;
 U readout_card/wbs_frame_data/source/rtl/wbs_frame_data_pack.vhd&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are not supported.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 24,554 / 41,250 ( 60 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,262,592 / 3,423,744 ( 37 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.991 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.864 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.052 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.4.1 ==&lt;br /&gt;
* '''Filename:'''  rc_v04040001_21nov2008&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,241 / 41,250 ( 66 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 405,504 / 3,423,744 ( 12 % )                  ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.588 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.585 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.057 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.4.0 (buggy) ==&lt;br /&gt;
* '''Filename:'''  rc_v04040000_02oct2008&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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]].&lt;br /&gt;
** Re-integrated the id_thermo and fpga_thermo block in the readout_card.vhd top level that was removed in 4.0.c.&lt;br /&gt;
** 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.&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
** Adjusted the indentation in fsfb_io_controller.vhd to make the file more readable.&lt;br /&gt;
** 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.&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** The following commands lock up the Readout Card firmware:  CARD_ID_ADDR, CARD_TEMP_ADDR, FPGA_TEMP_ADDR.&lt;br /&gt;
** 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&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,099 / 41,250 ( 66 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 406,016 / 3,423,744 ( 12 % )                  ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.372 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.052 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.066 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.c ==&lt;br /&gt;
* '''Filename:'''  rc_v0400000c_15aug2008.sof&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Only has data modes 0, 1, 4, and 10.&lt;br /&gt;
** 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).&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** Changed a counter in the dispatch block to ease timing constraints in synthesis (dispatch_wishbone.vhd)&lt;br /&gt;
** 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.&lt;br /&gt;
** '''Removed''' the fpga_termo (command:  '''fpga_temp''') and id_thermo (commands: '''card_temp, card_id''') to ease timing constraints in synthesis (readout_card.vhd)&lt;br /&gt;
** Updated the tagged version of fpga_termo.vhd to include the new 'stale bit' feature&lt;br /&gt;
** Updated the tagged version of frame_timing_core.vhd to include the new 'err_o' interface&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None reported yet&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
* '''FPGA Resource Usage:'''&lt;br /&gt;
 Total logic elements : 25,058 / 41,250 ( 61 % )&lt;br /&gt;
 Total memory bits : 400,896 / 3,423,744 ( 12 % )&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.282 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.736 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.665 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.b (buggy) ==&lt;br /&gt;
Note: This revision is on a watch list, after the bug detected 15 July 2008.  See the bug section for more details.&lt;br /&gt;
* '''Filename''' : rc_v0400000b_04aug2008.sof&lt;br /&gt;
* '''Features'''&lt;br /&gt;
** data_mode 10 is added to provide more filtfb bits (compared to data mode 9) for planet observations. filtered_dat(27 downto 3) &amp;amp; flux_cnt_dat(6 downto 0)&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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]]&lt;br /&gt;
&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.a (buggy) ==&lt;br /&gt;
Note: This revision is on a watch list, after the bug detected 15 July 2008.  See the bug section for more details.&lt;br /&gt;
* '''Filename''' : rc_v0400000a_07jul2008.sof&lt;br /&gt;
* '''Bug Fix'''&lt;br /&gt;
** mce_status and adc_offset/flx_quanta commands do not fail after power up.&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** Seems to clip out channel 0 from data reporting.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.9 (buggy) ==&lt;br /&gt;
* '''Filename''' : rc_v04000009_26jun2008.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** sa_bias and offset DACs only refreshed when new values are written. (in previous versions, DACs were refreshed every frame)&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.8 ==&lt;br /&gt;
* '''Filename''' : rc_v04000008_26jun2008.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** The gaini, gainp, gaind resolution increased to 12-bit, i.e. -2048 to 2047 (formerly 10-bit).&lt;br /&gt;
&lt;br /&gt;
* '''Bug fix'''&lt;br /&gt;
** the bug associated with gainpid read before mce_reset is fixed.&lt;br /&gt;
&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.3.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04030007_26may2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** 14-bit raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** 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.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.2.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04020007_24may2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
* '''Bug fix'''&lt;br /&gt;
** the bug associated with reading from raw-buffer is fixed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.1.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04010007_25apr2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.6 (buggy) ==&lt;br /&gt;
* '''Filename''' : rc_v04000006_15feb2008.sof or .pof       &lt;br /&gt;
* '''Features''' &lt;br /&gt;
** '''bugfix''': unreliable reset due to unsafe and incomplete state machines is fixed.&lt;br /&gt;
** '''bugfix''': flux_jump sign problem fixed, so far proved in const_mode, to be tested in servo_mode with cold setup.&lt;br /&gt;
** servo_mode=2 or ramp previously only went from 0 to ramp_amp, but now goes from -8192 to -8192+ramp_amp&lt;br /&gt;
** new commands are added: ''scratch'' and ''card_type''. Scratch takes 8 values and can be used by software to detect reset.&lt;br /&gt;
** slot_id and fw_rev are now integrated as part of all_cards.vhd&lt;br /&gt;
** lvds_tx_b=0, This will allow Clock Card to use the secondary backplane lvds line and check whether RC is plugged in.&lt;br /&gt;
** filter_coeff in misc_banks_admin commented as it is not implemented and causes timing problems.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
** slot_id is only set after a resetmce is issued. (using the latest all_cards in the next revision will fix this)&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.5 ==&lt;br /&gt;
* '''Filename''' : rc_v04000005_01nov2007.sof or .pof       &lt;br /&gt;
* '''Features''' &lt;br /&gt;
** data mode 9 (mixed filt + flux jump) with windowing readjusted compared to data mode 8&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** unreliable resetmce. Sometimes, firmware waked up non-responsive on lvds lines.&lt;br /&gt;
** In data mode 5 and 9, flux-jump counter is not reported properly due to a sign error. However, flux jumping works fine.&lt;br /&gt;
&lt;br /&gt;
== Revision 3.0.19 ==&lt;br /&gt;
* '''Filename''' : rc_v03000019_16feb2007_raw.sof (no pof as one is not likely to run with this as regular firmware)&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** data mode 3 is enabled.&lt;br /&gt;
** filter is disabled as a compromise to fit the raw-mode buffer.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** unreliable resetmce. Sometimes, firmware waked up non-responsive on lvds lines.&lt;br /&gt;
&lt;br /&gt;
== Old Firmware Revisions ==&lt;br /&gt;
* '''4.0.4''':  rc_v04000004_11oct2007.sof  data mode 8 added (mixed filt + flux jump)&lt;br /&gt;
* '''4.0.3''':  rc_v04000003_19sep2007.sof  data mode 7 bit split readjusted to 10b error being bit 4 to 14&lt;br /&gt;
* '''4.0.2''':  rc_v04000002_11sep2007.sof  pid resolution increased to 10b, data mode 7 added&lt;br /&gt;
* '''4.0.1''':  rc_v04000001_06sep2007.sof  &lt;br /&gt;
* '''4.0.0''':  rc_v04000000_29aug2007.sof  supports readout_row_index * [[ bugs ]]&lt;br /&gt;
&lt;br /&gt;
= To-Do List =&lt;br /&gt;
* the starting point for the servo is currently zero and it would be nice to have it programmable.&lt;br /&gt;
&lt;br /&gt;
= RC Synthesis Notes =&lt;br /&gt;
# 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. &lt;br /&gt;
# Timing: There is no &amp;quot;lock region&amp;quot; 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.&lt;br /&gt;
# 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%.&lt;br /&gt;
# 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.&lt;br /&gt;
# 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):&lt;br /&gt;
 lpm_file =&amp;gt; &amp;quot;C:/scuba2_repository/cards/readout_card/fsfb_calc/source/rtl/ram_40x64.hex&amp;quot;, and&lt;br /&gt;
 lpm_file    : STRING;&lt;br /&gt;
#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. &lt;br /&gt;
----&lt;br /&gt;
[http://e-mode.phas.ubc.ca/mcewiki/index.php/Main_Page  MCE Main Page]&lt;/div&gt;</summary>
		<author><name>Bburger</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Readout_Card_firmware&amp;diff=4352</id>
		<title>Readout Card firmware</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Readout_Card_firmware&amp;diff=4352"/>
		<updated>2011-05-04T22:02:19Z</updated>

		<summary type="html">&lt;p&gt;Bburger: /* Revision 5.0.f */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Synthesis Reminders (for firmware developers)&lt;br /&gt;
** quartus.ini is not needed anymore (Fixed as of Q7, Altera SR10783580 2010-10-24)&lt;br /&gt;
** Remember that readout_card/fsfb_clac/source/rtl/ram_40x64.vhd must be initialized with the ram_40x64.hex file in the same directory.&lt;br /&gt;
= Revision 5.1.2 =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010002_18jan2011.sof (for Rev. E cards) &lt;br /&gt;
** rc_stratix3_v05010002_18jan2011.jic (for Rev. E cards) &lt;br /&gt;
** rc_v05010002_03feb2011.sof (for Rev. B cards) &lt;br /&gt;
** rc_v05010002_03feb2011.pof (for Rev. B cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.1 with k1 and k2 (filter params) limited to k1&amp;lt;16 and k2&amp;lt;32 in order to resolve the timing when compiling for smaller Stratix FPGA on RC Rev. B.&lt;br /&gt;
&lt;br /&gt;
* '''Bug fix:'''&lt;br /&gt;
** the 2-rows-off filtered data readout introduced with configurable filter in rev. 5.1.0 and 5.1.1 is fixed now.&lt;br /&gt;
 &lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** none so far.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt, rev. B)&lt;br /&gt;
 ; Total logic elements      ; 33,285 / 41,250 ( 81 % )                       ;&lt;br /&gt;
 ; Total pins                ; 358 / 616 ( 58 % )                             ;&lt;br /&gt;
 ; Total memory bits         ; 1,405,440 / 3,423,744 ( 41 % )                 ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt, rev. B)&lt;br /&gt;
 ; Fast Model Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 6.591 ns  &lt;br /&gt;
 ; Fast Model Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 7.206 ns  &lt;br /&gt;
 ; Fast Model Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 18.299 ns&lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.1 (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05010001_01dec2010.sof (for Rev. B cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.0, but k1 and k2 (filter params) are now limited to k1&amp;lt;16 and k2&amp;lt;32 in order to resolve the timing failures of compiling 5.1.0 for smaller Stratix FPGA on RC Rev. B.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** filter mode data is off by 2 rows. &lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.0 (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010000_01nov2010.sof  (for Rev. E cards)&lt;br /&gt;
** rc_v05010000_01nov2010.sof (for Rev. B cards) has timing failures '''do not use!!!'''&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** added configurable filter parameters specified by ''fltr_coeff'', default is the f&amp;lt;sub&amp;gt;cutoff&amp;lt;/sub&amp;gt;/f&amp;lt;sub&amp;gt;sampl&amp;lt;/sub&amp;gt;=122Hz/15kHz. see [[ Digital 4-pole Butterworth Low-pass filter ]]. &lt;br /&gt;
** ''fltr_type'' is set to 255 to indicate configurable filter parameters.&lt;br /&gt;
** see [http://www.phas.ubc.ca/~mce/mcedocs/software/SC2_ELE_S580_515_mce_command_description.pdf MCE command description]&lt;br /&gt;
* '''Details''' &lt;br /&gt;
** It is built on Quartus10.1. &lt;br /&gt;
** tcl files had to be updated as cmp syntax is not supported in Q10 anymore.&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** rc_v05010000_01nov2010.sof has timing failures that were overlooked, do not use this firmware for Rev.B cards. &lt;br /&gt;
** '''filter mode data is off by 2 rows.''' &lt;br /&gt;
&lt;br /&gt;
* '''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&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.f  =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000f_22oct2010.sof (for Rev. B cards)&lt;br /&gt;
** rc_stratix3_v0500000f_22oct2010.sof  (for Rev. E cards)&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
**  Bugfix: integral clamp should work now. only positive integral_clamp values are valid!&lt;br /&gt;
&lt;br /&gt;
* '''Details:''': &lt;br /&gt;
** 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.&lt;br /&gt;
** available for both Rev. E and Rev. B cards, the upper byte of card_type parameter now reports the pcb revision.&lt;br /&gt;
** development note: It is built on Quartus10.1. &lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
**none yet!&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt): &lt;br /&gt;
 ; Total logic elements      ; 27,377 / 41,250 ( 66 % )                           ;&lt;br /&gt;
 ; Total pins                ; 358 / 616 ( 58 % )                                 ;&lt;br /&gt;
 ; Total memory bits         ; 1,405,440 / 3,423,744 ( 41 % )                     ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.652 ns &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.385 ns &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.860 ns&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.e (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000e_06oct2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''  &lt;br /&gt;
** 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!&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.d (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000d_04aug2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
**  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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:''': &lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** '''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 [[http://e-mode.phas.ubc.ca/mcewiki/index.php/Image:Clamp_unstable.png scope snapshot]] used slow_fb_ramp.py script for testing.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage and Timing Report''' (readout_card.fit.rpt and readout_card.tan.rpt): no change compared to 5.0.a/b/c&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.c (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000c_16jun2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.b&lt;br /&gt;
** Re-introduced flux-jump counter clamping to maintain continuity in behavior from past versions of firmware in the field.&lt;br /&gt;
** '''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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** '''flux-jump is broken'''. flux-jumping block misbehaves at the first jump in the negative range.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt): [[rc_5.0.c_fit_rpt]]&lt;br /&gt;
 ; Total logic elements     ; 26,800 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total pins               ; 358 / 616 ( 58 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 76 / 112 ( 68 % )                             ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): [[rc_5.0.c_tan_rpt]]&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.964 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.382 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 15.924 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.b (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000b_03jun2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.a&lt;br /&gt;
** 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.&lt;br /&gt;
** 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&lt;br /&gt;
** A sticky bit that only affected servo_mode=0,1,2 was also removed from the flux-jumping block.&lt;br /&gt;
** flx_lp_init commands now also clear the flux-jumping block as well.&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** flux-jump does not work when jumping to negative values.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt): [[rc_5.0.b_fit_rpt]]&lt;br /&gt;
 ; Total logic elements     ; 26,745 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total pins               ; 358 / 616 ( 58 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 76 / 112 ( 68 % )                             ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): [[rc_5.0.b_tan_rpt]]&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.459 ns  &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.895 ns  &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 15.956 ns&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.a (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000a_12mar2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on the merger of rev. 5.0.8 and 5.0.9.&lt;br /&gt;
** '''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.&lt;br /&gt;
** The low pass filter has 20-bit input and f_3dB/f_samp = 122Hz/15kHz .&lt;br /&gt;
** The flux-jump clamping that was removed in 5.0.9 is included once again here, as we decided this is safer for now.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** &amp;quot;lock_dat_left&amp;quot; parameter that was removed in 5.0.9 is now implemented as &amp;quot;lock_dat_lsb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** flx_lp_init does not reinitialize the flux-jump block&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
** tag name: rc_v0500000a_12mar2009! years were mixed up!&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.9 (buggy) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000009_13nov2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** Removes a sticky bit in pid calculation result storage -- in fsfb_processor.&lt;br /&gt;
** Adds a command to clamp the growth of the I-term to prevent wrapping and track down the source of Caltech's FSFB jumps.&lt;br /&gt;
** Removed the unused lock_dat_left parameter.  The ability to shift left was moved to the fsfb_corr block some time ago.&lt;br /&gt;
** Fixed a sign extension bug acting on the flux quanta, which limited the value to 8191.  Changed the extension from signed to unsigned.&lt;br /&gt;
** Removed ineffective clamping in the flux-jump calculation block.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** integral_clamp read/write command does not work. &lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,960 / 41,250 ( 68 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.825 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.878 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 14.397 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.8 (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000008_09oct2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** type 1 low-pass filter: f&amp;lt;sub&amp;gt;3dB&amp;lt;/sub&amp;gt;=122Hz for f&amp;lt;sub&amp;gt;sample&amp;lt;/sub&amp;gt;=15kHz&lt;br /&gt;
** Filter-input-width changed from 18b to 20b with no sticky bits!&lt;br /&gt;
** removed sticky bits in internal arithmetic of the filter.&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.7 (type-2 filter) =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000007_09oct2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** type-2 low-pass-filter: f&amp;lt;sub&amp;gt;3dB&amp;lt;/sub&amp;gt;=75Hz for f&amp;lt;sub&amp;gt;sample&amp;lt;/sub&amp;gt;=30000.&lt;br /&gt;
** Filter-input-width changed from 18b to 20b with no sticky bits!&lt;br /&gt;
** inter-biquad-gain-scaling for the filter is 2^14&lt;br /&gt;
** filter results are scaled down by 2^3 in the output of the filter.&lt;br /&gt;
** removed sticky bits in internal arithmetics&lt;br /&gt;
** _correction_ disabled in fsfb_proc_pidz&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** quartus.ini file was '''not''' present in synth directory.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** none to report&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
== Revision 5.0.6  (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05000006_15sep2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Only Valid for Rev. C/D Cards&lt;br /&gt;
** Based on rev. 5.0.3&lt;br /&gt;
** tcl file updated for Rev. D and aligned with top-level and qsf (project file). &lt;br /&gt;
** flux loop commented, just to try sampling the ADC. &lt;br /&gt;
** compiled with Q9.1&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.5 (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000005_04sep2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** changed the low-pass-filter to f(3db)=75Hz for f(sample)=30000.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** quartus.ini file was '''not''' present in synth directory.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** negative inputs to the filter cause filter to have a non-flat pass-band region. may have to do with sign-handling...&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.4 =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000004_28aug2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** BUG Fix: handles 14-bit flux quanta (changed the multiplier to unsigned)&lt;br /&gt;
** BUG Fix: changed standard logic vector extension from signed to unsigned in flux-jumping slave.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,170 / 41,250 ( 63 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.541 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.612 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 15.398 ns ;&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.3  =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05000003_21aug2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** ONLY valid REV C/D RC Cards&lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** flux loop commented, just to try sampling the ADC.&lt;br /&gt;
** updated tcl file, but still need to rely on project file as well as qsf file.&lt;br /&gt;
** changed default level of adc_sclk to '1'&lt;br /&gt;
** dac_clr_n was changed from an output to an input.&lt;br /&gt;
** added 'locked' interface to rc_pll_stratix_iii&lt;br /&gt;
** renamed the adc_pll clock signals to more explanitory names&lt;br /&gt;
** added the FPGA_DEVICE_FAMILY generic to the dispatch interace for synthesis of the dc_fifo in lvds_rx&lt;br /&gt;
** uncommented DDR interface to force the syntesizer to use correct left and right PLLs (in conjunction with ADC and DDR PLLs)&lt;br /&gt;
** added test signals to test_status to see clocks on the scope.&lt;br /&gt;
== Revision 5.0.2 (buggy) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000002_test00_tagged.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.1&lt;br /&gt;
** Fixed a bug in wbs_frame_data that stored data incorrectly if reporting 1 or 2 pixels only.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,186 / 41,250 ( 63 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.755 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.979 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.067 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.1 (buggy) (Filter + Raw + Rectangle, 2 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000001_26may2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Combines features in rev. 5.0.0 (2 LVDS Lines) and rev. 4.0.e (Filtered + Raw), with the NEW rectangle mode.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** [[CVS Diff Between sys_v05000000 and rc_v05000001]]&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** Has a bug in wbs_frame_data that stored data incorrectly if reporting 1 or 2 pixels only.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,565 / 41,250 ( 64 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.656 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.861 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 14.167 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.0 (Filter Only, 2 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000000_22dec2008.sof (tagged as sys_v05000000_22dec2008)&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware v05000000+ of all other cards!!!&lt;br /&gt;
** Adds the ability to read out one column of data continuously from readout cards&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** [[CVS Diff Between rc_v0400000c and sys_v05000000]]&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,607 / 41,250 ( 65 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 406,016 / 3,423,744 ( 12 % )             ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.558 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.892 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.987 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.f (Filter + Raw, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0400000f_12feb2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on 4.0.e and in parallel with 5.0.9 (equivalent version, clamping is not included)&lt;br /&gt;
** Incorporates fixes that were done to flux-jumping between 5.0.2 - 5.0.4 - 5.0.9.  Namely:&lt;br /&gt;
*** Changes a multiplier from signed to unsigned (in fsfb_corr_multplier.vhd).&lt;br /&gt;
*** Changes sign extension from signed to unsigned (in flux_quanta_ram_admin.vhd).&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None reported yet.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,773 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,321,984 / 3,423,744 ( 39 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.539 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.118 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.318 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.e (Filter + Raw, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0400000e_27apr2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on 4.0.d&lt;br /&gt;
** Combines both raw- and filtered-data modes.&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are disabled.&lt;br /&gt;
** Tested by Matt Hasselfield.  &lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are disabled.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,048 / 41,250 ( 66 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,321,984 / 3,423,744 ( 39 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.675 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.907 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.728 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.d (Raw Only, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  rc_v0400000d_20090417.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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.&lt;br /&gt;
** The firmware takes a new command called readout_col_index which specifies which column to capture raw data from.&lt;br /&gt;
** Other than readout_col_index, the firmware functions the same as previous raw-data firmware, including then need to issue a capture_raw command.&lt;br /&gt;
** For more information on raw-data, see:  http://e-mode.phas.ubc.ca/mcewiki/index.php/Raw-mode_readout&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** Differences between 4.0.c and 4.0.d&lt;br /&gt;
 U system/test/source/tb/tb_cc_rcs_bcs_ac.vhd&lt;br /&gt;
 U all_cards/dispatch/source/rtl/dispatch_wishbone.vhd&lt;br /&gt;
 U library/sys_param/source/rtl/wishbone_pack.vhd&lt;br /&gt;
 U readout_card/adc_sample_coadd/source/rtl/adc_sample_coadd.vhd&lt;br /&gt;
 U readout_card/adc_sample_coadd/source/rtl/adc_sample_coadd_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop/source/rtl/flux_loop.vhd&lt;br /&gt;
 U readout_card/flux_loop/source/rtl/flux_loop_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/rtl/flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/rtl/flux_loop_ctrl_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/tb/tb1_flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/tb/tb2_flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/fsfb_calc/source/rtl/fsfb_fltr_regs.vhd&lt;br /&gt;
 U readout_card/fsfb_corr/source/rtl/fsfb_corr.vhd&lt;br /&gt;
 U readout_card/readout_card/source/rtl/readout_card.vhd&lt;br /&gt;
 U readout_card/readout_card/source/rtl/readout_card_pack.vhd&lt;br /&gt;
 U readout_card/wbs_frame_data/source/rtl/wbs_frame_data.vhd&lt;br /&gt;
 U readout_card/wbs_frame_data/source/rtl/wbs_frame_data_pack.vhd&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are not supported.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 24,554 / 41,250 ( 60 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,262,592 / 3,423,744 ( 37 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.991 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.864 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.052 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.4.1 ==&lt;br /&gt;
* '''Filename:'''  rc_v04040001_21nov2008&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,241 / 41,250 ( 66 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 405,504 / 3,423,744 ( 12 % )                  ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.588 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.585 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.057 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.4.0 (buggy) ==&lt;br /&gt;
* '''Filename:'''  rc_v04040000_02oct2008&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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]].&lt;br /&gt;
** Re-integrated the id_thermo and fpga_thermo block in the readout_card.vhd top level that was removed in 4.0.c.&lt;br /&gt;
** 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.&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
** Adjusted the indentation in fsfb_io_controller.vhd to make the file more readable.&lt;br /&gt;
** 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.&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** The following commands lock up the Readout Card firmware:  CARD_ID_ADDR, CARD_TEMP_ADDR, FPGA_TEMP_ADDR.&lt;br /&gt;
** 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&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,099 / 41,250 ( 66 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 406,016 / 3,423,744 ( 12 % )                  ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.372 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.052 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.066 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.c ==&lt;br /&gt;
* '''Filename:'''  rc_v0400000c_15aug2008.sof&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Only has data modes 0, 1, 4, and 10.&lt;br /&gt;
** 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).&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** Changed a counter in the dispatch block to ease timing constraints in synthesis (dispatch_wishbone.vhd)&lt;br /&gt;
** 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.&lt;br /&gt;
** '''Removed''' the fpga_termo (command:  '''fpga_temp''') and id_thermo (commands: '''card_temp, card_id''') to ease timing constraints in synthesis (readout_card.vhd)&lt;br /&gt;
** Updated the tagged version of fpga_termo.vhd to include the new 'stale bit' feature&lt;br /&gt;
** Updated the tagged version of frame_timing_core.vhd to include the new 'err_o' interface&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None reported yet&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
* '''FPGA Resource Usage:'''&lt;br /&gt;
 Total logic elements : 25,058 / 41,250 ( 61 % )&lt;br /&gt;
 Total memory bits : 400,896 / 3,423,744 ( 12 % )&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.282 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.736 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.665 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.b (buggy) ==&lt;br /&gt;
Note: This revision is on a watch list, after the bug detected 15 July 2008.  See the bug section for more details.&lt;br /&gt;
* '''Filename''' : rc_v0400000b_04aug2008.sof&lt;br /&gt;
* '''Features'''&lt;br /&gt;
** data_mode 10 is added to provide more filtfb bits (compared to data mode 9) for planet observations. filtered_dat(27 downto 3) &amp;amp; flux_cnt_dat(6 downto 0)&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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]]&lt;br /&gt;
&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.a (buggy) ==&lt;br /&gt;
Note: This revision is on a watch list, after the bug detected 15 July 2008.  See the bug section for more details.&lt;br /&gt;
* '''Filename''' : rc_v0400000a_07jul2008.sof&lt;br /&gt;
* '''Bug Fix'''&lt;br /&gt;
** mce_status and adc_offset/flx_quanta commands do not fail after power up.&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** Seems to clip out channel 0 from data reporting.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.9 (buggy) ==&lt;br /&gt;
* '''Filename''' : rc_v04000009_26jun2008.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** sa_bias and offset DACs only refreshed when new values are written. (in previous versions, DACs were refreshed every frame)&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.8 ==&lt;br /&gt;
* '''Filename''' : rc_v04000008_26jun2008.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** The gaini, gainp, gaind resolution increased to 12-bit, i.e. -2048 to 2047 (formerly 10-bit).&lt;br /&gt;
&lt;br /&gt;
* '''Bug fix'''&lt;br /&gt;
** the bug associated with gainpid read before mce_reset is fixed.&lt;br /&gt;
&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.3.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04030007_26may2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** 14-bit raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** 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.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.2.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04020007_24may2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
* '''Bug fix'''&lt;br /&gt;
** the bug associated with reading from raw-buffer is fixed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.1.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04010007_25apr2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.6 (buggy) ==&lt;br /&gt;
* '''Filename''' : rc_v04000006_15feb2008.sof or .pof       &lt;br /&gt;
* '''Features''' &lt;br /&gt;
** '''bugfix''': unreliable reset due to unsafe and incomplete state machines is fixed.&lt;br /&gt;
** '''bugfix''': flux_jump sign problem fixed, so far proved in const_mode, to be tested in servo_mode with cold setup.&lt;br /&gt;
** servo_mode=2 or ramp previously only went from 0 to ramp_amp, but now goes from -8192 to -8192+ramp_amp&lt;br /&gt;
** new commands are added: ''scratch'' and ''card_type''. Scratch takes 8 values and can be used by software to detect reset.&lt;br /&gt;
** slot_id and fw_rev are now integrated as part of all_cards.vhd&lt;br /&gt;
** lvds_tx_b=0, This will allow Clock Card to use the secondary backplane lvds line and check whether RC is plugged in.&lt;br /&gt;
** filter_coeff in misc_banks_admin commented as it is not implemented and causes timing problems.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
** slot_id is only set after a resetmce is issued. (using the latest all_cards in the next revision will fix this)&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.5 ==&lt;br /&gt;
* '''Filename''' : rc_v04000005_01nov2007.sof or .pof       &lt;br /&gt;
* '''Features''' &lt;br /&gt;
** data mode 9 (mixed filt + flux jump) with windowing readjusted compared to data mode 8&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** unreliable resetmce. Sometimes, firmware waked up non-responsive on lvds lines.&lt;br /&gt;
** In data mode 5 and 9, flux-jump counter is not reported properly due to a sign error. However, flux jumping works fine.&lt;br /&gt;
&lt;br /&gt;
== Revision 3.0.19 ==&lt;br /&gt;
* '''Filename''' : rc_v03000019_16feb2007_raw.sof (no pof as one is not likely to run with this as regular firmware)&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** data mode 3 is enabled.&lt;br /&gt;
** filter is disabled as a compromise to fit the raw-mode buffer.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** unreliable resetmce. Sometimes, firmware waked up non-responsive on lvds lines.&lt;br /&gt;
&lt;br /&gt;
== Old Firmware Revisions ==&lt;br /&gt;
* '''4.0.4''':  rc_v04000004_11oct2007.sof  data mode 8 added (mixed filt + flux jump)&lt;br /&gt;
* '''4.0.3''':  rc_v04000003_19sep2007.sof  data mode 7 bit split readjusted to 10b error being bit 4 to 14&lt;br /&gt;
* '''4.0.2''':  rc_v04000002_11sep2007.sof  pid resolution increased to 10b, data mode 7 added&lt;br /&gt;
* '''4.0.1''':  rc_v04000001_06sep2007.sof  &lt;br /&gt;
* '''4.0.0''':  rc_v04000000_29aug2007.sof  supports readout_row_index * [[ bugs ]]&lt;br /&gt;
&lt;br /&gt;
= To-Do List =&lt;br /&gt;
* the starting point for the servo is currently zero and it would be nice to have it programmable.&lt;br /&gt;
&lt;br /&gt;
= RC Synthesis Notes =&lt;br /&gt;
# 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. &lt;br /&gt;
# Timing: There is no &amp;quot;lock region&amp;quot; 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.&lt;br /&gt;
# 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%.&lt;br /&gt;
# 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.&lt;br /&gt;
# 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):&lt;br /&gt;
 lpm_file =&amp;gt; &amp;quot;C:/scuba2_repository/cards/readout_card/fsfb_calc/source/rtl/ram_40x64.hex&amp;quot;, and&lt;br /&gt;
 lpm_file    : STRING;&lt;br /&gt;
#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. &lt;br /&gt;
----&lt;br /&gt;
[http://e-mode.phas.ubc.ca/mcewiki/index.php/Main_Page  MCE Main Page]&lt;/div&gt;</summary>
		<author><name>Bburger</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Readout_Card_firmware&amp;diff=4351</id>
		<title>Readout Card firmware</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Readout_Card_firmware&amp;diff=4351"/>
		<updated>2011-05-04T22:01:27Z</updated>

		<summary type="html">&lt;p&gt;Bburger: /* Revision 5.0.f */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Synthesis Reminders (for firmware developers)&lt;br /&gt;
** quartus.ini is not needed anymore (Fixed as of Q7, Altera SR10783580 2010-10-24)&lt;br /&gt;
** Remember that readout_card/fsfb_clac/source/rtl/ram_40x64.vhd must be initialized with the ram_40x64.hex file in the same directory.&lt;br /&gt;
= Revision 5.1.2 =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010002_18jan2011.sof (for Rev. E cards) &lt;br /&gt;
** rc_stratix3_v05010002_18jan2011.jic (for Rev. E cards) &lt;br /&gt;
** rc_v05010002_03feb2011.sof (for Rev. B cards) &lt;br /&gt;
** rc_v05010002_03feb2011.pof (for Rev. B cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.1 with k1 and k2 (filter params) limited to k1&amp;lt;16 and k2&amp;lt;32 in order to resolve the timing when compiling for smaller Stratix FPGA on RC Rev. B.&lt;br /&gt;
&lt;br /&gt;
* '''Bug fix:'''&lt;br /&gt;
** the 2-rows-off filtered data readout introduced with configurable filter in rev. 5.1.0 and 5.1.1 is fixed now.&lt;br /&gt;
 &lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** none so far.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt, rev. B)&lt;br /&gt;
 ; Total logic elements      ; 33,285 / 41,250 ( 81 % )                       ;&lt;br /&gt;
 ; Total pins                ; 358 / 616 ( 58 % )                             ;&lt;br /&gt;
 ; Total memory bits         ; 1,405,440 / 3,423,744 ( 41 % )                 ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt, rev. B)&lt;br /&gt;
 ; Fast Model Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 6.591 ns  &lt;br /&gt;
 ; Fast Model Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 7.206 ns  &lt;br /&gt;
 ; Fast Model Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 18.299 ns&lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.1 (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05010001_01dec2010.sof (for Rev. B cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.0, but k1 and k2 (filter params) are now limited to k1&amp;lt;16 and k2&amp;lt;32 in order to resolve the timing failures of compiling 5.1.0 for smaller Stratix FPGA on RC Rev. B.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** filter mode data is off by 2 rows. &lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.0 (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010000_01nov2010.sof  (for Rev. E cards)&lt;br /&gt;
** rc_v05010000_01nov2010.sof (for Rev. B cards) has timing failures '''do not use!!!'''&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** added configurable filter parameters specified by ''fltr_coeff'', default is the f&amp;lt;sub&amp;gt;cutoff&amp;lt;/sub&amp;gt;/f&amp;lt;sub&amp;gt;sampl&amp;lt;/sub&amp;gt;=122Hz/15kHz. see [[ Digital 4-pole Butterworth Low-pass filter ]]. &lt;br /&gt;
** ''fltr_type'' is set to 255 to indicate configurable filter parameters.&lt;br /&gt;
** see [http://www.phas.ubc.ca/~mce/mcedocs/software/SC2_ELE_S580_515_mce_command_description.pdf MCE command description]&lt;br /&gt;
* '''Details''' &lt;br /&gt;
** It is built on Quartus10.1. &lt;br /&gt;
** tcl files had to be updated as cmp syntax is not supported in Q10 anymore.&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** rc_v05010000_01nov2010.sof has timing failures that were overlooked, do not use this firmware for Rev.B cards. &lt;br /&gt;
** '''filter mode data is off by 2 rows.''' &lt;br /&gt;
&lt;br /&gt;
* '''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&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.f  =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000f_22oct2010.sof (for Rev. B cards)&lt;br /&gt;
** rc_stratix3_v0500000f_22oct2010.sof  (for Rev. E cards)&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
**  Bugfix: integral clamp should work now. only positive integral_clamp values are valid!&lt;br /&gt;
&lt;br /&gt;
* '''Details:''': &lt;br /&gt;
** 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.&lt;br /&gt;
** available for both Rev. E and Rev. B cards, the upper byte of card_type parameter now reports the pcb revision.&lt;br /&gt;
** development note: It is built on Quartus10.1. &lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
**none yet!&lt;br /&gt;
&lt;br /&gt;
* '''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&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt): &lt;br /&gt;
 ; Total logic elements      ; 27,377 / 41,250 ( 66 % )                           ;&lt;br /&gt;
 ; Total pins                ; 358 / 616 ( 58 % )                                 ;&lt;br /&gt;
 ; Total memory bits         ; 1,405,440 / 3,423,744 ( 41 % )                     ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.652 ns &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.385 ns &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.860 ns&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.e (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000e_06oct2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''  &lt;br /&gt;
** 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!&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.d (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000d_04aug2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
**  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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:''': &lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** '''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 [[http://e-mode.phas.ubc.ca/mcewiki/index.php/Image:Clamp_unstable.png scope snapshot]] used slow_fb_ramp.py script for testing.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage and Timing Report''' (readout_card.fit.rpt and readout_card.tan.rpt): no change compared to 5.0.a/b/c&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.c (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000c_16jun2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.b&lt;br /&gt;
** Re-introduced flux-jump counter clamping to maintain continuity in behavior from past versions of firmware in the field.&lt;br /&gt;
** '''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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** '''flux-jump is broken'''. flux-jumping block misbehaves at the first jump in the negative range.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt): [[rc_5.0.c_fit_rpt]]&lt;br /&gt;
 ; Total logic elements     ; 26,800 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total pins               ; 358 / 616 ( 58 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 76 / 112 ( 68 % )                             ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): [[rc_5.0.c_tan_rpt]]&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.964 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.382 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 15.924 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.b (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000b_03jun2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.a&lt;br /&gt;
** 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.&lt;br /&gt;
** 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&lt;br /&gt;
** A sticky bit that only affected servo_mode=0,1,2 was also removed from the flux-jumping block.&lt;br /&gt;
** flx_lp_init commands now also clear the flux-jumping block as well.&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** flux-jump does not work when jumping to negative values.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt): [[rc_5.0.b_fit_rpt]]&lt;br /&gt;
 ; Total logic elements     ; 26,745 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total pins               ; 358 / 616 ( 58 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 76 / 112 ( 68 % )                             ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): [[rc_5.0.b_tan_rpt]]&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.459 ns  &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.895 ns  &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 15.956 ns&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.a (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000a_12mar2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on the merger of rev. 5.0.8 and 5.0.9.&lt;br /&gt;
** '''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.&lt;br /&gt;
** The low pass filter has 20-bit input and f_3dB/f_samp = 122Hz/15kHz .&lt;br /&gt;
** The flux-jump clamping that was removed in 5.0.9 is included once again here, as we decided this is safer for now.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** &amp;quot;lock_dat_left&amp;quot; parameter that was removed in 5.0.9 is now implemented as &amp;quot;lock_dat_lsb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** flx_lp_init does not reinitialize the flux-jump block&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
** tag name: rc_v0500000a_12mar2009! years were mixed up!&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.9 (buggy) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000009_13nov2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** Removes a sticky bit in pid calculation result storage -- in fsfb_processor.&lt;br /&gt;
** Adds a command to clamp the growth of the I-term to prevent wrapping and track down the source of Caltech's FSFB jumps.&lt;br /&gt;
** Removed the unused lock_dat_left parameter.  The ability to shift left was moved to the fsfb_corr block some time ago.&lt;br /&gt;
** Fixed a sign extension bug acting on the flux quanta, which limited the value to 8191.  Changed the extension from signed to unsigned.&lt;br /&gt;
** Removed ineffective clamping in the flux-jump calculation block.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** integral_clamp read/write command does not work. &lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,960 / 41,250 ( 68 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.825 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.878 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 14.397 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.8 (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000008_09oct2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** type 1 low-pass filter: f&amp;lt;sub&amp;gt;3dB&amp;lt;/sub&amp;gt;=122Hz for f&amp;lt;sub&amp;gt;sample&amp;lt;/sub&amp;gt;=15kHz&lt;br /&gt;
** Filter-input-width changed from 18b to 20b with no sticky bits!&lt;br /&gt;
** removed sticky bits in internal arithmetic of the filter.&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.7 (type-2 filter) =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000007_09oct2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** type-2 low-pass-filter: f&amp;lt;sub&amp;gt;3dB&amp;lt;/sub&amp;gt;=75Hz for f&amp;lt;sub&amp;gt;sample&amp;lt;/sub&amp;gt;=30000.&lt;br /&gt;
** Filter-input-width changed from 18b to 20b with no sticky bits!&lt;br /&gt;
** inter-biquad-gain-scaling for the filter is 2^14&lt;br /&gt;
** filter results are scaled down by 2^3 in the output of the filter.&lt;br /&gt;
** removed sticky bits in internal arithmetics&lt;br /&gt;
** _correction_ disabled in fsfb_proc_pidz&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** quartus.ini file was '''not''' present in synth directory.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** none to report&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
== Revision 5.0.6  (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05000006_15sep2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Only Valid for Rev. C/D Cards&lt;br /&gt;
** Based on rev. 5.0.3&lt;br /&gt;
** tcl file updated for Rev. D and aligned with top-level and qsf (project file). &lt;br /&gt;
** flux loop commented, just to try sampling the ADC. &lt;br /&gt;
** compiled with Q9.1&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.5 (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000005_04sep2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** changed the low-pass-filter to f(3db)=75Hz for f(sample)=30000.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** quartus.ini file was '''not''' present in synth directory.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** negative inputs to the filter cause filter to have a non-flat pass-band region. may have to do with sign-handling...&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.4 =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000004_28aug2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** BUG Fix: handles 14-bit flux quanta (changed the multiplier to unsigned)&lt;br /&gt;
** BUG Fix: changed standard logic vector extension from signed to unsigned in flux-jumping slave.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,170 / 41,250 ( 63 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.541 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.612 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 15.398 ns ;&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.3  =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05000003_21aug2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** ONLY valid REV C/D RC Cards&lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** flux loop commented, just to try sampling the ADC.&lt;br /&gt;
** updated tcl file, but still need to rely on project file as well as qsf file.&lt;br /&gt;
** changed default level of adc_sclk to '1'&lt;br /&gt;
** dac_clr_n was changed from an output to an input.&lt;br /&gt;
** added 'locked' interface to rc_pll_stratix_iii&lt;br /&gt;
** renamed the adc_pll clock signals to more explanitory names&lt;br /&gt;
** added the FPGA_DEVICE_FAMILY generic to the dispatch interace for synthesis of the dc_fifo in lvds_rx&lt;br /&gt;
** uncommented DDR interface to force the syntesizer to use correct left and right PLLs (in conjunction with ADC and DDR PLLs)&lt;br /&gt;
** added test signals to test_status to see clocks on the scope.&lt;br /&gt;
== Revision 5.0.2 (buggy) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000002_test00_tagged.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.1&lt;br /&gt;
** Fixed a bug in wbs_frame_data that stored data incorrectly if reporting 1 or 2 pixels only.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,186 / 41,250 ( 63 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.755 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.979 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.067 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.1 (buggy) (Filter + Raw + Rectangle, 2 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000001_26may2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Combines features in rev. 5.0.0 (2 LVDS Lines) and rev. 4.0.e (Filtered + Raw), with the NEW rectangle mode.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** [[CVS Diff Between sys_v05000000 and rc_v05000001]]&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** Has a bug in wbs_frame_data that stored data incorrectly if reporting 1 or 2 pixels only.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,565 / 41,250 ( 64 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.656 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.861 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 14.167 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.0 (Filter Only, 2 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000000_22dec2008.sof (tagged as sys_v05000000_22dec2008)&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware v05000000+ of all other cards!!!&lt;br /&gt;
** Adds the ability to read out one column of data continuously from readout cards&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** [[CVS Diff Between rc_v0400000c and sys_v05000000]]&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,607 / 41,250 ( 65 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 406,016 / 3,423,744 ( 12 % )             ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.558 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.892 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.987 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.f (Filter + Raw, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0400000f_12feb2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on 4.0.e and in parallel with 5.0.9 (equivalent version, clamping is not included)&lt;br /&gt;
** Incorporates fixes that were done to flux-jumping between 5.0.2 - 5.0.4 - 5.0.9.  Namely:&lt;br /&gt;
*** Changes a multiplier from signed to unsigned (in fsfb_corr_multplier.vhd).&lt;br /&gt;
*** Changes sign extension from signed to unsigned (in flux_quanta_ram_admin.vhd).&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None reported yet.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,773 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,321,984 / 3,423,744 ( 39 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.539 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.118 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.318 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.e (Filter + Raw, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0400000e_27apr2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on 4.0.d&lt;br /&gt;
** Combines both raw- and filtered-data modes.&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are disabled.&lt;br /&gt;
** Tested by Matt Hasselfield.  &lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are disabled.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,048 / 41,250 ( 66 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,321,984 / 3,423,744 ( 39 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.675 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.907 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.728 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.d (Raw Only, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  rc_v0400000d_20090417.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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.&lt;br /&gt;
** The firmware takes a new command called readout_col_index which specifies which column to capture raw data from.&lt;br /&gt;
** Other than readout_col_index, the firmware functions the same as previous raw-data firmware, including then need to issue a capture_raw command.&lt;br /&gt;
** For more information on raw-data, see:  http://e-mode.phas.ubc.ca/mcewiki/index.php/Raw-mode_readout&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** Differences between 4.0.c and 4.0.d&lt;br /&gt;
 U system/test/source/tb/tb_cc_rcs_bcs_ac.vhd&lt;br /&gt;
 U all_cards/dispatch/source/rtl/dispatch_wishbone.vhd&lt;br /&gt;
 U library/sys_param/source/rtl/wishbone_pack.vhd&lt;br /&gt;
 U readout_card/adc_sample_coadd/source/rtl/adc_sample_coadd.vhd&lt;br /&gt;
 U readout_card/adc_sample_coadd/source/rtl/adc_sample_coadd_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop/source/rtl/flux_loop.vhd&lt;br /&gt;
 U readout_card/flux_loop/source/rtl/flux_loop_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/rtl/flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/rtl/flux_loop_ctrl_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/tb/tb1_flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/tb/tb2_flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/fsfb_calc/source/rtl/fsfb_fltr_regs.vhd&lt;br /&gt;
 U readout_card/fsfb_corr/source/rtl/fsfb_corr.vhd&lt;br /&gt;
 U readout_card/readout_card/source/rtl/readout_card.vhd&lt;br /&gt;
 U readout_card/readout_card/source/rtl/readout_card_pack.vhd&lt;br /&gt;
 U readout_card/wbs_frame_data/source/rtl/wbs_frame_data.vhd&lt;br /&gt;
 U readout_card/wbs_frame_data/source/rtl/wbs_frame_data_pack.vhd&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are not supported.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 24,554 / 41,250 ( 60 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,262,592 / 3,423,744 ( 37 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.991 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.864 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.052 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.4.1 ==&lt;br /&gt;
* '''Filename:'''  rc_v04040001_21nov2008&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,241 / 41,250 ( 66 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 405,504 / 3,423,744 ( 12 % )                  ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.588 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.585 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.057 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.4.0 (buggy) ==&lt;br /&gt;
* '''Filename:'''  rc_v04040000_02oct2008&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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]].&lt;br /&gt;
** Re-integrated the id_thermo and fpga_thermo block in the readout_card.vhd top level that was removed in 4.0.c.&lt;br /&gt;
** 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.&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
** Adjusted the indentation in fsfb_io_controller.vhd to make the file more readable.&lt;br /&gt;
** 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.&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** The following commands lock up the Readout Card firmware:  CARD_ID_ADDR, CARD_TEMP_ADDR, FPGA_TEMP_ADDR.&lt;br /&gt;
** 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&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,099 / 41,250 ( 66 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 406,016 / 3,423,744 ( 12 % )                  ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.372 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.052 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.066 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.c ==&lt;br /&gt;
* '''Filename:'''  rc_v0400000c_15aug2008.sof&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Only has data modes 0, 1, 4, and 10.&lt;br /&gt;
** 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).&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** Changed a counter in the dispatch block to ease timing constraints in synthesis (dispatch_wishbone.vhd)&lt;br /&gt;
** 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.&lt;br /&gt;
** '''Removed''' the fpga_termo (command:  '''fpga_temp''') and id_thermo (commands: '''card_temp, card_id''') to ease timing constraints in synthesis (readout_card.vhd)&lt;br /&gt;
** Updated the tagged version of fpga_termo.vhd to include the new 'stale bit' feature&lt;br /&gt;
** Updated the tagged version of frame_timing_core.vhd to include the new 'err_o' interface&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None reported yet&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
* '''FPGA Resource Usage:'''&lt;br /&gt;
 Total logic elements : 25,058 / 41,250 ( 61 % )&lt;br /&gt;
 Total memory bits : 400,896 / 3,423,744 ( 12 % )&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.282 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.736 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.665 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.b (buggy) ==&lt;br /&gt;
Note: This revision is on a watch list, after the bug detected 15 July 2008.  See the bug section for more details.&lt;br /&gt;
* '''Filename''' : rc_v0400000b_04aug2008.sof&lt;br /&gt;
* '''Features'''&lt;br /&gt;
** data_mode 10 is added to provide more filtfb bits (compared to data mode 9) for planet observations. filtered_dat(27 downto 3) &amp;amp; flux_cnt_dat(6 downto 0)&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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]]&lt;br /&gt;
&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.a (buggy) ==&lt;br /&gt;
Note: This revision is on a watch list, after the bug detected 15 July 2008.  See the bug section for more details.&lt;br /&gt;
* '''Filename''' : rc_v0400000a_07jul2008.sof&lt;br /&gt;
* '''Bug Fix'''&lt;br /&gt;
** mce_status and adc_offset/flx_quanta commands do not fail after power up.&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** Seems to clip out channel 0 from data reporting.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.9 (buggy) ==&lt;br /&gt;
* '''Filename''' : rc_v04000009_26jun2008.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** sa_bias and offset DACs only refreshed when new values are written. (in previous versions, DACs were refreshed every frame)&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.8 ==&lt;br /&gt;
* '''Filename''' : rc_v04000008_26jun2008.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** The gaini, gainp, gaind resolution increased to 12-bit, i.e. -2048 to 2047 (formerly 10-bit).&lt;br /&gt;
&lt;br /&gt;
* '''Bug fix'''&lt;br /&gt;
** the bug associated with gainpid read before mce_reset is fixed.&lt;br /&gt;
&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.3.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04030007_26may2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** 14-bit raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** 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.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.2.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04020007_24may2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
* '''Bug fix'''&lt;br /&gt;
** the bug associated with reading from raw-buffer is fixed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.1.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04010007_25apr2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.6 (buggy) ==&lt;br /&gt;
* '''Filename''' : rc_v04000006_15feb2008.sof or .pof       &lt;br /&gt;
* '''Features''' &lt;br /&gt;
** '''bugfix''': unreliable reset due to unsafe and incomplete state machines is fixed.&lt;br /&gt;
** '''bugfix''': flux_jump sign problem fixed, so far proved in const_mode, to be tested in servo_mode with cold setup.&lt;br /&gt;
** servo_mode=2 or ramp previously only went from 0 to ramp_amp, but now goes from -8192 to -8192+ramp_amp&lt;br /&gt;
** new commands are added: ''scratch'' and ''card_type''. Scratch takes 8 values and can be used by software to detect reset.&lt;br /&gt;
** slot_id and fw_rev are now integrated as part of all_cards.vhd&lt;br /&gt;
** lvds_tx_b=0, This will allow Clock Card to use the secondary backplane lvds line and check whether RC is plugged in.&lt;br /&gt;
** filter_coeff in misc_banks_admin commented as it is not implemented and causes timing problems.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
** slot_id is only set after a resetmce is issued. (using the latest all_cards in the next revision will fix this)&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.5 ==&lt;br /&gt;
* '''Filename''' : rc_v04000005_01nov2007.sof or .pof       &lt;br /&gt;
* '''Features''' &lt;br /&gt;
** data mode 9 (mixed filt + flux jump) with windowing readjusted compared to data mode 8&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** unreliable resetmce. Sometimes, firmware waked up non-responsive on lvds lines.&lt;br /&gt;
** In data mode 5 and 9, flux-jump counter is not reported properly due to a sign error. However, flux jumping works fine.&lt;br /&gt;
&lt;br /&gt;
== Revision 3.0.19 ==&lt;br /&gt;
* '''Filename''' : rc_v03000019_16feb2007_raw.sof (no pof as one is not likely to run with this as regular firmware)&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** data mode 3 is enabled.&lt;br /&gt;
** filter is disabled as a compromise to fit the raw-mode buffer.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** unreliable resetmce. Sometimes, firmware waked up non-responsive on lvds lines.&lt;br /&gt;
&lt;br /&gt;
== Old Firmware Revisions ==&lt;br /&gt;
* '''4.0.4''':  rc_v04000004_11oct2007.sof  data mode 8 added (mixed filt + flux jump)&lt;br /&gt;
* '''4.0.3''':  rc_v04000003_19sep2007.sof  data mode 7 bit split readjusted to 10b error being bit 4 to 14&lt;br /&gt;
* '''4.0.2''':  rc_v04000002_11sep2007.sof  pid resolution increased to 10b, data mode 7 added&lt;br /&gt;
* '''4.0.1''':  rc_v04000001_06sep2007.sof  &lt;br /&gt;
* '''4.0.0''':  rc_v04000000_29aug2007.sof  supports readout_row_index * [[ bugs ]]&lt;br /&gt;
&lt;br /&gt;
= To-Do List =&lt;br /&gt;
* the starting point for the servo is currently zero and it would be nice to have it programmable.&lt;br /&gt;
&lt;br /&gt;
= RC Synthesis Notes =&lt;br /&gt;
# 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. &lt;br /&gt;
# Timing: There is no &amp;quot;lock region&amp;quot; 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.&lt;br /&gt;
# 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%.&lt;br /&gt;
# 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.&lt;br /&gt;
# 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):&lt;br /&gt;
 lpm_file =&amp;gt; &amp;quot;C:/scuba2_repository/cards/readout_card/fsfb_calc/source/rtl/ram_40x64.hex&amp;quot;, and&lt;br /&gt;
 lpm_file    : STRING;&lt;br /&gt;
#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. &lt;br /&gt;
----&lt;br /&gt;
[http://e-mode.phas.ubc.ca/mcewiki/index.php/Main_Page  MCE Main Page]&lt;/div&gt;</summary>
		<author><name>Bburger</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Readout_Card_firmware&amp;diff=4350</id>
		<title>Readout Card firmware</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Readout_Card_firmware&amp;diff=4350"/>
		<updated>2011-05-04T21:57:36Z</updated>

		<summary type="html">&lt;p&gt;Bburger: /* Revision 5.0.a */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Synthesis Reminders (for firmware developers)&lt;br /&gt;
** quartus.ini is not needed anymore (Fixed as of Q7, Altera SR10783580 2010-10-24)&lt;br /&gt;
** Remember that readout_card/fsfb_clac/source/rtl/ram_40x64.vhd must be initialized with the ram_40x64.hex file in the same directory.&lt;br /&gt;
= Revision 5.1.2 =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010002_18jan2011.sof (for Rev. E cards) &lt;br /&gt;
** rc_stratix3_v05010002_18jan2011.jic (for Rev. E cards) &lt;br /&gt;
** rc_v05010002_03feb2011.sof (for Rev. B cards) &lt;br /&gt;
** rc_v05010002_03feb2011.pof (for Rev. B cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.1 with k1 and k2 (filter params) limited to k1&amp;lt;16 and k2&amp;lt;32 in order to resolve the timing when compiling for smaller Stratix FPGA on RC Rev. B.&lt;br /&gt;
&lt;br /&gt;
* '''Bug fix:'''&lt;br /&gt;
** the 2-rows-off filtered data readout introduced with configurable filter in rev. 5.1.0 and 5.1.1 is fixed now.&lt;br /&gt;
 &lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** none so far.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt, rev. B)&lt;br /&gt;
 ; Total logic elements      ; 33,285 / 41,250 ( 81 % )                       ;&lt;br /&gt;
 ; Total pins                ; 358 / 616 ( 58 % )                             ;&lt;br /&gt;
 ; Total memory bits         ; 1,405,440 / 3,423,744 ( 41 % )                 ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt, rev. B)&lt;br /&gt;
 ; Fast Model Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 6.591 ns  &lt;br /&gt;
 ; Fast Model Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 7.206 ns  &lt;br /&gt;
 ; Fast Model Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 18.299 ns&lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.1 (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05010001_01dec2010.sof (for Rev. B cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.0, but k1 and k2 (filter params) are now limited to k1&amp;lt;16 and k2&amp;lt;32 in order to resolve the timing failures of compiling 5.1.0 for smaller Stratix FPGA on RC Rev. B.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** filter mode data is off by 2 rows. &lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.0 (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010000_01nov2010.sof  (for Rev. E cards)&lt;br /&gt;
** rc_v05010000_01nov2010.sof (for Rev. B cards) has timing failures '''do not use!!!'''&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** added configurable filter parameters specified by ''fltr_coeff'', default is the f&amp;lt;sub&amp;gt;cutoff&amp;lt;/sub&amp;gt;/f&amp;lt;sub&amp;gt;sampl&amp;lt;/sub&amp;gt;=122Hz/15kHz. see [[ Digital 4-pole Butterworth Low-pass filter ]]. &lt;br /&gt;
** ''fltr_type'' is set to 255 to indicate configurable filter parameters.&lt;br /&gt;
** see [http://www.phas.ubc.ca/~mce/mcedocs/software/SC2_ELE_S580_515_mce_command_description.pdf MCE command description]&lt;br /&gt;
* '''Details''' &lt;br /&gt;
** It is built on Quartus10.1. &lt;br /&gt;
** tcl files had to be updated as cmp syntax is not supported in Q10 anymore.&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** rc_v05010000_01nov2010.sof has timing failures that were overlooked, do not use this firmware for Rev.B cards. &lt;br /&gt;
** '''filter mode data is off by 2 rows.''' &lt;br /&gt;
&lt;br /&gt;
* '''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&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.f  =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000f_22oct2010.sof (for Rev. B cards)&lt;br /&gt;
** rc_stratix3_v0500000f_22oct2010.sof  (for Rev. E cards)&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
**  Bugfix: integral clamp should work now. only positive integral_clamp values are valid!&lt;br /&gt;
&lt;br /&gt;
* '''Details:''': &lt;br /&gt;
** 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.&lt;br /&gt;
** available for both Rev. E and Rev. B cards, the upper byte of card_type parameter now reports the pcb revision.&lt;br /&gt;
** development note: It is built on Quartus10.1. &lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
**none yet!&lt;br /&gt;
&lt;br /&gt;
* '''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&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.e (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000e_06oct2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''  &lt;br /&gt;
** 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!&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.d (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000d_04aug2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
**  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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:''': &lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** '''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 [[http://e-mode.phas.ubc.ca/mcewiki/index.php/Image:Clamp_unstable.png scope snapshot]] used slow_fb_ramp.py script for testing.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage and Timing Report''' (readout_card.fit.rpt and readout_card.tan.rpt): no change compared to 5.0.a/b/c&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.c (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000c_16jun2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.b&lt;br /&gt;
** Re-introduced flux-jump counter clamping to maintain continuity in behavior from past versions of firmware in the field.&lt;br /&gt;
** '''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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** '''flux-jump is broken'''. flux-jumping block misbehaves at the first jump in the negative range.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt): [[rc_5.0.c_fit_rpt]]&lt;br /&gt;
 ; Total logic elements     ; 26,800 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total pins               ; 358 / 616 ( 58 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 76 / 112 ( 68 % )                             ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): [[rc_5.0.c_tan_rpt]]&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.964 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.382 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 15.924 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.b (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000b_03jun2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.a&lt;br /&gt;
** 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.&lt;br /&gt;
** 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&lt;br /&gt;
** A sticky bit that only affected servo_mode=0,1,2 was also removed from the flux-jumping block.&lt;br /&gt;
** flx_lp_init commands now also clear the flux-jumping block as well.&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** flux-jump does not work when jumping to negative values.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt): [[rc_5.0.b_fit_rpt]]&lt;br /&gt;
 ; Total logic elements     ; 26,745 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total pins               ; 358 / 616 ( 58 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 76 / 112 ( 68 % )                             ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): [[rc_5.0.b_tan_rpt]]&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.459 ns  &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.895 ns  &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 15.956 ns&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.a (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000a_12mar2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on the merger of rev. 5.0.8 and 5.0.9.&lt;br /&gt;
** '''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.&lt;br /&gt;
** The low pass filter has 20-bit input and f_3dB/f_samp = 122Hz/15kHz .&lt;br /&gt;
** The flux-jump clamping that was removed in 5.0.9 is included once again here, as we decided this is safer for now.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** &amp;quot;lock_dat_left&amp;quot; parameter that was removed in 5.0.9 is now implemented as &amp;quot;lock_dat_lsb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** flx_lp_init does not reinitialize the flux-jump block&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
** tag name: rc_v0500000a_12mar2009! years were mixed up!&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.9 (buggy) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000009_13nov2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** Removes a sticky bit in pid calculation result storage -- in fsfb_processor.&lt;br /&gt;
** Adds a command to clamp the growth of the I-term to prevent wrapping and track down the source of Caltech's FSFB jumps.&lt;br /&gt;
** Removed the unused lock_dat_left parameter.  The ability to shift left was moved to the fsfb_corr block some time ago.&lt;br /&gt;
** Fixed a sign extension bug acting on the flux quanta, which limited the value to 8191.  Changed the extension from signed to unsigned.&lt;br /&gt;
** Removed ineffective clamping in the flux-jump calculation block.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** integral_clamp read/write command does not work. &lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,960 / 41,250 ( 68 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.825 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.878 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 14.397 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.8 (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000008_09oct2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** type 1 low-pass filter: f&amp;lt;sub&amp;gt;3dB&amp;lt;/sub&amp;gt;=122Hz for f&amp;lt;sub&amp;gt;sample&amp;lt;/sub&amp;gt;=15kHz&lt;br /&gt;
** Filter-input-width changed from 18b to 20b with no sticky bits!&lt;br /&gt;
** removed sticky bits in internal arithmetic of the filter.&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.7 (type-2 filter) =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000007_09oct2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** type-2 low-pass-filter: f&amp;lt;sub&amp;gt;3dB&amp;lt;/sub&amp;gt;=75Hz for f&amp;lt;sub&amp;gt;sample&amp;lt;/sub&amp;gt;=30000.&lt;br /&gt;
** Filter-input-width changed from 18b to 20b with no sticky bits!&lt;br /&gt;
** inter-biquad-gain-scaling for the filter is 2^14&lt;br /&gt;
** filter results are scaled down by 2^3 in the output of the filter.&lt;br /&gt;
** removed sticky bits in internal arithmetics&lt;br /&gt;
** _correction_ disabled in fsfb_proc_pidz&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** quartus.ini file was '''not''' present in synth directory.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** none to report&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
== Revision 5.0.6  (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05000006_15sep2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Only Valid for Rev. C/D Cards&lt;br /&gt;
** Based on rev. 5.0.3&lt;br /&gt;
** tcl file updated for Rev. D and aligned with top-level and qsf (project file). &lt;br /&gt;
** flux loop commented, just to try sampling the ADC. &lt;br /&gt;
** compiled with Q9.1&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.5 (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000005_04sep2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** changed the low-pass-filter to f(3db)=75Hz for f(sample)=30000.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** quartus.ini file was '''not''' present in synth directory.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** negative inputs to the filter cause filter to have a non-flat pass-band region. may have to do with sign-handling...&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.4 =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000004_28aug2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** BUG Fix: handles 14-bit flux quanta (changed the multiplier to unsigned)&lt;br /&gt;
** BUG Fix: changed standard logic vector extension from signed to unsigned in flux-jumping slave.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,170 / 41,250 ( 63 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.541 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.612 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 15.398 ns ;&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.3  =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05000003_21aug2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** ONLY valid REV C/D RC Cards&lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** flux loop commented, just to try sampling the ADC.&lt;br /&gt;
** updated tcl file, but still need to rely on project file as well as qsf file.&lt;br /&gt;
** changed default level of adc_sclk to '1'&lt;br /&gt;
** dac_clr_n was changed from an output to an input.&lt;br /&gt;
** added 'locked' interface to rc_pll_stratix_iii&lt;br /&gt;
** renamed the adc_pll clock signals to more explanitory names&lt;br /&gt;
** added the FPGA_DEVICE_FAMILY generic to the dispatch interace for synthesis of the dc_fifo in lvds_rx&lt;br /&gt;
** uncommented DDR interface to force the syntesizer to use correct left and right PLLs (in conjunction with ADC and DDR PLLs)&lt;br /&gt;
** added test signals to test_status to see clocks on the scope.&lt;br /&gt;
== Revision 5.0.2 (buggy) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000002_test00_tagged.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.1&lt;br /&gt;
** Fixed a bug in wbs_frame_data that stored data incorrectly if reporting 1 or 2 pixels only.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,186 / 41,250 ( 63 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.755 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.979 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.067 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.1 (buggy) (Filter + Raw + Rectangle, 2 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000001_26may2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Combines features in rev. 5.0.0 (2 LVDS Lines) and rev. 4.0.e (Filtered + Raw), with the NEW rectangle mode.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** [[CVS Diff Between sys_v05000000 and rc_v05000001]]&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** Has a bug in wbs_frame_data that stored data incorrectly if reporting 1 or 2 pixels only.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,565 / 41,250 ( 64 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.656 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.861 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 14.167 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.0 (Filter Only, 2 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000000_22dec2008.sof (tagged as sys_v05000000_22dec2008)&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware v05000000+ of all other cards!!!&lt;br /&gt;
** Adds the ability to read out one column of data continuously from readout cards&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** [[CVS Diff Between rc_v0400000c and sys_v05000000]]&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,607 / 41,250 ( 65 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 406,016 / 3,423,744 ( 12 % )             ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.558 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.892 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.987 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.f (Filter + Raw, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0400000f_12feb2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on 4.0.e and in parallel with 5.0.9 (equivalent version, clamping is not included)&lt;br /&gt;
** Incorporates fixes that were done to flux-jumping between 5.0.2 - 5.0.4 - 5.0.9.  Namely:&lt;br /&gt;
*** Changes a multiplier from signed to unsigned (in fsfb_corr_multplier.vhd).&lt;br /&gt;
*** Changes sign extension from signed to unsigned (in flux_quanta_ram_admin.vhd).&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None reported yet.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,773 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,321,984 / 3,423,744 ( 39 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.539 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.118 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.318 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.e (Filter + Raw, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0400000e_27apr2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on 4.0.d&lt;br /&gt;
** Combines both raw- and filtered-data modes.&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are disabled.&lt;br /&gt;
** Tested by Matt Hasselfield.  &lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are disabled.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,048 / 41,250 ( 66 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,321,984 / 3,423,744 ( 39 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.675 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.907 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.728 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.d (Raw Only, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  rc_v0400000d_20090417.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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.&lt;br /&gt;
** The firmware takes a new command called readout_col_index which specifies which column to capture raw data from.&lt;br /&gt;
** Other than readout_col_index, the firmware functions the same as previous raw-data firmware, including then need to issue a capture_raw command.&lt;br /&gt;
** For more information on raw-data, see:  http://e-mode.phas.ubc.ca/mcewiki/index.php/Raw-mode_readout&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** Differences between 4.0.c and 4.0.d&lt;br /&gt;
 U system/test/source/tb/tb_cc_rcs_bcs_ac.vhd&lt;br /&gt;
 U all_cards/dispatch/source/rtl/dispatch_wishbone.vhd&lt;br /&gt;
 U library/sys_param/source/rtl/wishbone_pack.vhd&lt;br /&gt;
 U readout_card/adc_sample_coadd/source/rtl/adc_sample_coadd.vhd&lt;br /&gt;
 U readout_card/adc_sample_coadd/source/rtl/adc_sample_coadd_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop/source/rtl/flux_loop.vhd&lt;br /&gt;
 U readout_card/flux_loop/source/rtl/flux_loop_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/rtl/flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/rtl/flux_loop_ctrl_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/tb/tb1_flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/tb/tb2_flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/fsfb_calc/source/rtl/fsfb_fltr_regs.vhd&lt;br /&gt;
 U readout_card/fsfb_corr/source/rtl/fsfb_corr.vhd&lt;br /&gt;
 U readout_card/readout_card/source/rtl/readout_card.vhd&lt;br /&gt;
 U readout_card/readout_card/source/rtl/readout_card_pack.vhd&lt;br /&gt;
 U readout_card/wbs_frame_data/source/rtl/wbs_frame_data.vhd&lt;br /&gt;
 U readout_card/wbs_frame_data/source/rtl/wbs_frame_data_pack.vhd&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are not supported.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 24,554 / 41,250 ( 60 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,262,592 / 3,423,744 ( 37 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.991 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.864 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.052 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.4.1 ==&lt;br /&gt;
* '''Filename:'''  rc_v04040001_21nov2008&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,241 / 41,250 ( 66 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 405,504 / 3,423,744 ( 12 % )                  ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.588 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.585 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.057 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.4.0 (buggy) ==&lt;br /&gt;
* '''Filename:'''  rc_v04040000_02oct2008&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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]].&lt;br /&gt;
** Re-integrated the id_thermo and fpga_thermo block in the readout_card.vhd top level that was removed in 4.0.c.&lt;br /&gt;
** 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.&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
** Adjusted the indentation in fsfb_io_controller.vhd to make the file more readable.&lt;br /&gt;
** 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.&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** The following commands lock up the Readout Card firmware:  CARD_ID_ADDR, CARD_TEMP_ADDR, FPGA_TEMP_ADDR.&lt;br /&gt;
** 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&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,099 / 41,250 ( 66 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 406,016 / 3,423,744 ( 12 % )                  ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.372 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.052 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.066 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.c ==&lt;br /&gt;
* '''Filename:'''  rc_v0400000c_15aug2008.sof&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Only has data modes 0, 1, 4, and 10.&lt;br /&gt;
** 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).&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** Changed a counter in the dispatch block to ease timing constraints in synthesis (dispatch_wishbone.vhd)&lt;br /&gt;
** 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.&lt;br /&gt;
** '''Removed''' the fpga_termo (command:  '''fpga_temp''') and id_thermo (commands: '''card_temp, card_id''') to ease timing constraints in synthesis (readout_card.vhd)&lt;br /&gt;
** Updated the tagged version of fpga_termo.vhd to include the new 'stale bit' feature&lt;br /&gt;
** Updated the tagged version of frame_timing_core.vhd to include the new 'err_o' interface&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None reported yet&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
* '''FPGA Resource Usage:'''&lt;br /&gt;
 Total logic elements : 25,058 / 41,250 ( 61 % )&lt;br /&gt;
 Total memory bits : 400,896 / 3,423,744 ( 12 % )&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.282 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.736 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.665 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.b (buggy) ==&lt;br /&gt;
Note: This revision is on a watch list, after the bug detected 15 July 2008.  See the bug section for more details.&lt;br /&gt;
* '''Filename''' : rc_v0400000b_04aug2008.sof&lt;br /&gt;
* '''Features'''&lt;br /&gt;
** data_mode 10 is added to provide more filtfb bits (compared to data mode 9) for planet observations. filtered_dat(27 downto 3) &amp;amp; flux_cnt_dat(6 downto 0)&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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]]&lt;br /&gt;
&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.a (buggy) ==&lt;br /&gt;
Note: This revision is on a watch list, after the bug detected 15 July 2008.  See the bug section for more details.&lt;br /&gt;
* '''Filename''' : rc_v0400000a_07jul2008.sof&lt;br /&gt;
* '''Bug Fix'''&lt;br /&gt;
** mce_status and adc_offset/flx_quanta commands do not fail after power up.&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** Seems to clip out channel 0 from data reporting.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.9 (buggy) ==&lt;br /&gt;
* '''Filename''' : rc_v04000009_26jun2008.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** sa_bias and offset DACs only refreshed when new values are written. (in previous versions, DACs were refreshed every frame)&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.8 ==&lt;br /&gt;
* '''Filename''' : rc_v04000008_26jun2008.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** The gaini, gainp, gaind resolution increased to 12-bit, i.e. -2048 to 2047 (formerly 10-bit).&lt;br /&gt;
&lt;br /&gt;
* '''Bug fix'''&lt;br /&gt;
** the bug associated with gainpid read before mce_reset is fixed.&lt;br /&gt;
&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.3.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04030007_26may2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** 14-bit raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** 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.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.2.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04020007_24may2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
* '''Bug fix'''&lt;br /&gt;
** the bug associated with reading from raw-buffer is fixed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.1.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04010007_25apr2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.6 (buggy) ==&lt;br /&gt;
* '''Filename''' : rc_v04000006_15feb2008.sof or .pof       &lt;br /&gt;
* '''Features''' &lt;br /&gt;
** '''bugfix''': unreliable reset due to unsafe and incomplete state machines is fixed.&lt;br /&gt;
** '''bugfix''': flux_jump sign problem fixed, so far proved in const_mode, to be tested in servo_mode with cold setup.&lt;br /&gt;
** servo_mode=2 or ramp previously only went from 0 to ramp_amp, but now goes from -8192 to -8192+ramp_amp&lt;br /&gt;
** new commands are added: ''scratch'' and ''card_type''. Scratch takes 8 values and can be used by software to detect reset.&lt;br /&gt;
** slot_id and fw_rev are now integrated as part of all_cards.vhd&lt;br /&gt;
** lvds_tx_b=0, This will allow Clock Card to use the secondary backplane lvds line and check whether RC is plugged in.&lt;br /&gt;
** filter_coeff in misc_banks_admin commented as it is not implemented and causes timing problems.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
** slot_id is only set after a resetmce is issued. (using the latest all_cards in the next revision will fix this)&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.5 ==&lt;br /&gt;
* '''Filename''' : rc_v04000005_01nov2007.sof or .pof       &lt;br /&gt;
* '''Features''' &lt;br /&gt;
** data mode 9 (mixed filt + flux jump) with windowing readjusted compared to data mode 8&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** unreliable resetmce. Sometimes, firmware waked up non-responsive on lvds lines.&lt;br /&gt;
** In data mode 5 and 9, flux-jump counter is not reported properly due to a sign error. However, flux jumping works fine.&lt;br /&gt;
&lt;br /&gt;
== Revision 3.0.19 ==&lt;br /&gt;
* '''Filename''' : rc_v03000019_16feb2007_raw.sof (no pof as one is not likely to run with this as regular firmware)&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** data mode 3 is enabled.&lt;br /&gt;
** filter is disabled as a compromise to fit the raw-mode buffer.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** unreliable resetmce. Sometimes, firmware waked up non-responsive on lvds lines.&lt;br /&gt;
&lt;br /&gt;
== Old Firmware Revisions ==&lt;br /&gt;
* '''4.0.4''':  rc_v04000004_11oct2007.sof  data mode 8 added (mixed filt + flux jump)&lt;br /&gt;
* '''4.0.3''':  rc_v04000003_19sep2007.sof  data mode 7 bit split readjusted to 10b error being bit 4 to 14&lt;br /&gt;
* '''4.0.2''':  rc_v04000002_11sep2007.sof  pid resolution increased to 10b, data mode 7 added&lt;br /&gt;
* '''4.0.1''':  rc_v04000001_06sep2007.sof  &lt;br /&gt;
* '''4.0.0''':  rc_v04000000_29aug2007.sof  supports readout_row_index * [[ bugs ]]&lt;br /&gt;
&lt;br /&gt;
= To-Do List =&lt;br /&gt;
* the starting point for the servo is currently zero and it would be nice to have it programmable.&lt;br /&gt;
&lt;br /&gt;
= RC Synthesis Notes =&lt;br /&gt;
# 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. &lt;br /&gt;
# Timing: There is no &amp;quot;lock region&amp;quot; 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.&lt;br /&gt;
# 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%.&lt;br /&gt;
# 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.&lt;br /&gt;
# 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):&lt;br /&gt;
 lpm_file =&amp;gt; &amp;quot;C:/scuba2_repository/cards/readout_card/fsfb_calc/source/rtl/ram_40x64.hex&amp;quot;, and&lt;br /&gt;
 lpm_file    : STRING;&lt;br /&gt;
#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. &lt;br /&gt;
----&lt;br /&gt;
[http://e-mode.phas.ubc.ca/mcewiki/index.php/Main_Page  MCE Main Page]&lt;/div&gt;</summary>
		<author><name>Bburger</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Readout_Card_firmware&amp;diff=4349</id>
		<title>Readout Card firmware</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Readout_Card_firmware&amp;diff=4349"/>
		<updated>2011-05-04T21:56:53Z</updated>

		<summary type="html">&lt;p&gt;Bburger: /* Revision 5.1.0 (not recommended) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Synthesis Reminders (for firmware developers)&lt;br /&gt;
** quartus.ini is not needed anymore (Fixed as of Q7, Altera SR10783580 2010-10-24)&lt;br /&gt;
** Remember that readout_card/fsfb_clac/source/rtl/ram_40x64.vhd must be initialized with the ram_40x64.hex file in the same directory.&lt;br /&gt;
= Revision 5.1.2 =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010002_18jan2011.sof (for Rev. E cards) &lt;br /&gt;
** rc_stratix3_v05010002_18jan2011.jic (for Rev. E cards) &lt;br /&gt;
** rc_v05010002_03feb2011.sof (for Rev. B cards) &lt;br /&gt;
** rc_v05010002_03feb2011.pof (for Rev. B cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.1 with k1 and k2 (filter params) limited to k1&amp;lt;16 and k2&amp;lt;32 in order to resolve the timing when compiling for smaller Stratix FPGA on RC Rev. B.&lt;br /&gt;
&lt;br /&gt;
* '''Bug fix:'''&lt;br /&gt;
** the 2-rows-off filtered data readout introduced with configurable filter in rev. 5.1.0 and 5.1.1 is fixed now.&lt;br /&gt;
 &lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** none so far.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt, rev. B)&lt;br /&gt;
 ; Total logic elements      ; 33,285 / 41,250 ( 81 % )                       ;&lt;br /&gt;
 ; Total pins                ; 358 / 616 ( 58 % )                             ;&lt;br /&gt;
 ; Total memory bits         ; 1,405,440 / 3,423,744 ( 41 % )                 ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt, rev. B)&lt;br /&gt;
 ; Fast Model Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 6.591 ns  &lt;br /&gt;
 ; Fast Model Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 7.206 ns  &lt;br /&gt;
 ; Fast Model Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 18.299 ns&lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.1 (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05010001_01dec2010.sof (for Rev. B cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.0, but k1 and k2 (filter params) are now limited to k1&amp;lt;16 and k2&amp;lt;32 in order to resolve the timing failures of compiling 5.1.0 for smaller Stratix FPGA on RC Rev. B.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** filter mode data is off by 2 rows. &lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.0 (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010000_01nov2010.sof  (for Rev. E cards)&lt;br /&gt;
** rc_v05010000_01nov2010.sof (for Rev. B cards) has timing failures '''do not use!!!'''&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** added configurable filter parameters specified by ''fltr_coeff'', default is the f&amp;lt;sub&amp;gt;cutoff&amp;lt;/sub&amp;gt;/f&amp;lt;sub&amp;gt;sampl&amp;lt;/sub&amp;gt;=122Hz/15kHz. see [[ Digital 4-pole Butterworth Low-pass filter ]]. &lt;br /&gt;
** ''fltr_type'' is set to 255 to indicate configurable filter parameters.&lt;br /&gt;
** see [http://www.phas.ubc.ca/~mce/mcedocs/software/SC2_ELE_S580_515_mce_command_description.pdf MCE command description]&lt;br /&gt;
* '''Details''' &lt;br /&gt;
** It is built on Quartus10.1. &lt;br /&gt;
** tcl files had to be updated as cmp syntax is not supported in Q10 anymore.&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** rc_v05010000_01nov2010.sof has timing failures that were overlooked, do not use this firmware for Rev.B cards. &lt;br /&gt;
** '''filter mode data is off by 2 rows.''' &lt;br /&gt;
&lt;br /&gt;
* '''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&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.f  =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000f_22oct2010.sof (for Rev. B cards)&lt;br /&gt;
** rc_stratix3_v0500000f_22oct2010.sof  (for Rev. E cards)&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
**  Bugfix: integral clamp should work now. only positive integral_clamp values are valid!&lt;br /&gt;
&lt;br /&gt;
* '''Details:''': &lt;br /&gt;
** 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.&lt;br /&gt;
** available for both Rev. E and Rev. B cards, the upper byte of card_type parameter now reports the pcb revision.&lt;br /&gt;
** development note: It is built on Quartus10.1. &lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
**none yet!&lt;br /&gt;
&lt;br /&gt;
* '''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&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.e (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000e_06oct2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''  &lt;br /&gt;
** 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!&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.d (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000d_04aug2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
**  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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:''': &lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** '''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 [[http://e-mode.phas.ubc.ca/mcewiki/index.php/Image:Clamp_unstable.png scope snapshot]] used slow_fb_ramp.py script for testing.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage and Timing Report''' (readout_card.fit.rpt and readout_card.tan.rpt): no change compared to 5.0.a/b/c&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.c (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000c_16jun2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.b&lt;br /&gt;
** Re-introduced flux-jump counter clamping to maintain continuity in behavior from past versions of firmware in the field.&lt;br /&gt;
** '''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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** '''flux-jump is broken'''. flux-jumping block misbehaves at the first jump in the negative range.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt): [[rc_5.0.c_fit_rpt]]&lt;br /&gt;
 ; Total logic elements     ; 26,800 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total pins               ; 358 / 616 ( 58 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 76 / 112 ( 68 % )                             ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): [[rc_5.0.c_tan_rpt]]&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.964 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.382 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 15.924 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.b (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000b_03jun2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.a&lt;br /&gt;
** 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.&lt;br /&gt;
** 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&lt;br /&gt;
** A sticky bit that only affected servo_mode=0,1,2 was also removed from the flux-jumping block.&lt;br /&gt;
** flx_lp_init commands now also clear the flux-jumping block as well.&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** flux-jump does not work when jumping to negative values.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt): [[rc_5.0.b_fit_rpt]]&lt;br /&gt;
 ; Total logic elements     ; 26,745 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total pins               ; 358 / 616 ( 58 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 76 / 112 ( 68 % )                             ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): [[rc_5.0.b_tan_rpt]]&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.459 ns  &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.895 ns  &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 15.956 ns&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.a =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000a_12mar2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on the merger of rev. 5.0.8 and 5.0.9.&lt;br /&gt;
** '''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.&lt;br /&gt;
** The low pass filter has 20-bit input and f_3dB/f_samp = 122Hz/15kHz .&lt;br /&gt;
** The flux-jump clamping that was removed in 5.0.9 is included once again here, as we decided this is safer for now.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** &amp;quot;lock_dat_left&amp;quot; parameter that was removed in 5.0.9 is now implemented as &amp;quot;lock_dat_lsb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** flx_lp_init does not reinitialize the flux-jump block&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
** tag name: rc_v0500000a_12mar2009! years were mixed up!&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.9 (buggy) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000009_13nov2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** Removes a sticky bit in pid calculation result storage -- in fsfb_processor.&lt;br /&gt;
** Adds a command to clamp the growth of the I-term to prevent wrapping and track down the source of Caltech's FSFB jumps.&lt;br /&gt;
** Removed the unused lock_dat_left parameter.  The ability to shift left was moved to the fsfb_corr block some time ago.&lt;br /&gt;
** Fixed a sign extension bug acting on the flux quanta, which limited the value to 8191.  Changed the extension from signed to unsigned.&lt;br /&gt;
** Removed ineffective clamping in the flux-jump calculation block.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** integral_clamp read/write command does not work. &lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,960 / 41,250 ( 68 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.825 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.878 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 14.397 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.8 (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000008_09oct2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** type 1 low-pass filter: f&amp;lt;sub&amp;gt;3dB&amp;lt;/sub&amp;gt;=122Hz for f&amp;lt;sub&amp;gt;sample&amp;lt;/sub&amp;gt;=15kHz&lt;br /&gt;
** Filter-input-width changed from 18b to 20b with no sticky bits!&lt;br /&gt;
** removed sticky bits in internal arithmetic of the filter.&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.7 (type-2 filter) =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000007_09oct2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** type-2 low-pass-filter: f&amp;lt;sub&amp;gt;3dB&amp;lt;/sub&amp;gt;=75Hz for f&amp;lt;sub&amp;gt;sample&amp;lt;/sub&amp;gt;=30000.&lt;br /&gt;
** Filter-input-width changed from 18b to 20b with no sticky bits!&lt;br /&gt;
** inter-biquad-gain-scaling for the filter is 2^14&lt;br /&gt;
** filter results are scaled down by 2^3 in the output of the filter.&lt;br /&gt;
** removed sticky bits in internal arithmetics&lt;br /&gt;
** _correction_ disabled in fsfb_proc_pidz&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** quartus.ini file was '''not''' present in synth directory.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** none to report&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
== Revision 5.0.6  (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05000006_15sep2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Only Valid for Rev. C/D Cards&lt;br /&gt;
** Based on rev. 5.0.3&lt;br /&gt;
** tcl file updated for Rev. D and aligned with top-level and qsf (project file). &lt;br /&gt;
** flux loop commented, just to try sampling the ADC. &lt;br /&gt;
** compiled with Q9.1&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.5 (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000005_04sep2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** changed the low-pass-filter to f(3db)=75Hz for f(sample)=30000.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** quartus.ini file was '''not''' present in synth directory.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** negative inputs to the filter cause filter to have a non-flat pass-band region. may have to do with sign-handling...&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.4 =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000004_28aug2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** BUG Fix: handles 14-bit flux quanta (changed the multiplier to unsigned)&lt;br /&gt;
** BUG Fix: changed standard logic vector extension from signed to unsigned in flux-jumping slave.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,170 / 41,250 ( 63 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.541 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.612 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 15.398 ns ;&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.3  =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05000003_21aug2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** ONLY valid REV C/D RC Cards&lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** flux loop commented, just to try sampling the ADC.&lt;br /&gt;
** updated tcl file, but still need to rely on project file as well as qsf file.&lt;br /&gt;
** changed default level of adc_sclk to '1'&lt;br /&gt;
** dac_clr_n was changed from an output to an input.&lt;br /&gt;
** added 'locked' interface to rc_pll_stratix_iii&lt;br /&gt;
** renamed the adc_pll clock signals to more explanitory names&lt;br /&gt;
** added the FPGA_DEVICE_FAMILY generic to the dispatch interace for synthesis of the dc_fifo in lvds_rx&lt;br /&gt;
** uncommented DDR interface to force the syntesizer to use correct left and right PLLs (in conjunction with ADC and DDR PLLs)&lt;br /&gt;
** added test signals to test_status to see clocks on the scope.&lt;br /&gt;
== Revision 5.0.2 (buggy) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000002_test00_tagged.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.1&lt;br /&gt;
** Fixed a bug in wbs_frame_data that stored data incorrectly if reporting 1 or 2 pixels only.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,186 / 41,250 ( 63 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.755 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.979 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.067 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.1 (buggy) (Filter + Raw + Rectangle, 2 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000001_26may2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Combines features in rev. 5.0.0 (2 LVDS Lines) and rev. 4.0.e (Filtered + Raw), with the NEW rectangle mode.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** [[CVS Diff Between sys_v05000000 and rc_v05000001]]&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** Has a bug in wbs_frame_data that stored data incorrectly if reporting 1 or 2 pixels only.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,565 / 41,250 ( 64 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.656 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.861 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 14.167 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.0 (Filter Only, 2 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000000_22dec2008.sof (tagged as sys_v05000000_22dec2008)&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware v05000000+ of all other cards!!!&lt;br /&gt;
** Adds the ability to read out one column of data continuously from readout cards&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** [[CVS Diff Between rc_v0400000c and sys_v05000000]]&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,607 / 41,250 ( 65 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 406,016 / 3,423,744 ( 12 % )             ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.558 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.892 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.987 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.f (Filter + Raw, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0400000f_12feb2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on 4.0.e and in parallel with 5.0.9 (equivalent version, clamping is not included)&lt;br /&gt;
** Incorporates fixes that were done to flux-jumping between 5.0.2 - 5.0.4 - 5.0.9.  Namely:&lt;br /&gt;
*** Changes a multiplier from signed to unsigned (in fsfb_corr_multplier.vhd).&lt;br /&gt;
*** Changes sign extension from signed to unsigned (in flux_quanta_ram_admin.vhd).&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None reported yet.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,773 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,321,984 / 3,423,744 ( 39 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.539 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.118 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.318 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.e (Filter + Raw, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0400000e_27apr2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on 4.0.d&lt;br /&gt;
** Combines both raw- and filtered-data modes.&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are disabled.&lt;br /&gt;
** Tested by Matt Hasselfield.  &lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are disabled.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,048 / 41,250 ( 66 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,321,984 / 3,423,744 ( 39 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.675 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.907 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.728 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.d (Raw Only, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  rc_v0400000d_20090417.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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.&lt;br /&gt;
** The firmware takes a new command called readout_col_index which specifies which column to capture raw data from.&lt;br /&gt;
** Other than readout_col_index, the firmware functions the same as previous raw-data firmware, including then need to issue a capture_raw command.&lt;br /&gt;
** For more information on raw-data, see:  http://e-mode.phas.ubc.ca/mcewiki/index.php/Raw-mode_readout&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** Differences between 4.0.c and 4.0.d&lt;br /&gt;
 U system/test/source/tb/tb_cc_rcs_bcs_ac.vhd&lt;br /&gt;
 U all_cards/dispatch/source/rtl/dispatch_wishbone.vhd&lt;br /&gt;
 U library/sys_param/source/rtl/wishbone_pack.vhd&lt;br /&gt;
 U readout_card/adc_sample_coadd/source/rtl/adc_sample_coadd.vhd&lt;br /&gt;
 U readout_card/adc_sample_coadd/source/rtl/adc_sample_coadd_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop/source/rtl/flux_loop.vhd&lt;br /&gt;
 U readout_card/flux_loop/source/rtl/flux_loop_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/rtl/flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/rtl/flux_loop_ctrl_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/tb/tb1_flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/tb/tb2_flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/fsfb_calc/source/rtl/fsfb_fltr_regs.vhd&lt;br /&gt;
 U readout_card/fsfb_corr/source/rtl/fsfb_corr.vhd&lt;br /&gt;
 U readout_card/readout_card/source/rtl/readout_card.vhd&lt;br /&gt;
 U readout_card/readout_card/source/rtl/readout_card_pack.vhd&lt;br /&gt;
 U readout_card/wbs_frame_data/source/rtl/wbs_frame_data.vhd&lt;br /&gt;
 U readout_card/wbs_frame_data/source/rtl/wbs_frame_data_pack.vhd&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are not supported.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 24,554 / 41,250 ( 60 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,262,592 / 3,423,744 ( 37 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.991 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.864 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.052 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.4.1 ==&lt;br /&gt;
* '''Filename:'''  rc_v04040001_21nov2008&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,241 / 41,250 ( 66 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 405,504 / 3,423,744 ( 12 % )                  ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.588 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.585 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.057 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.4.0 (buggy) ==&lt;br /&gt;
* '''Filename:'''  rc_v04040000_02oct2008&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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]].&lt;br /&gt;
** Re-integrated the id_thermo and fpga_thermo block in the readout_card.vhd top level that was removed in 4.0.c.&lt;br /&gt;
** 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.&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
** Adjusted the indentation in fsfb_io_controller.vhd to make the file more readable.&lt;br /&gt;
** 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.&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** The following commands lock up the Readout Card firmware:  CARD_ID_ADDR, CARD_TEMP_ADDR, FPGA_TEMP_ADDR.&lt;br /&gt;
** 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&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,099 / 41,250 ( 66 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 406,016 / 3,423,744 ( 12 % )                  ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.372 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.052 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.066 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.c ==&lt;br /&gt;
* '''Filename:'''  rc_v0400000c_15aug2008.sof&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Only has data modes 0, 1, 4, and 10.&lt;br /&gt;
** 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).&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** Changed a counter in the dispatch block to ease timing constraints in synthesis (dispatch_wishbone.vhd)&lt;br /&gt;
** 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.&lt;br /&gt;
** '''Removed''' the fpga_termo (command:  '''fpga_temp''') and id_thermo (commands: '''card_temp, card_id''') to ease timing constraints in synthesis (readout_card.vhd)&lt;br /&gt;
** Updated the tagged version of fpga_termo.vhd to include the new 'stale bit' feature&lt;br /&gt;
** Updated the tagged version of frame_timing_core.vhd to include the new 'err_o' interface&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None reported yet&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
* '''FPGA Resource Usage:'''&lt;br /&gt;
 Total logic elements : 25,058 / 41,250 ( 61 % )&lt;br /&gt;
 Total memory bits : 400,896 / 3,423,744 ( 12 % )&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.282 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.736 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.665 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.b (buggy) ==&lt;br /&gt;
Note: This revision is on a watch list, after the bug detected 15 July 2008.  See the bug section for more details.&lt;br /&gt;
* '''Filename''' : rc_v0400000b_04aug2008.sof&lt;br /&gt;
* '''Features'''&lt;br /&gt;
** data_mode 10 is added to provide more filtfb bits (compared to data mode 9) for planet observations. filtered_dat(27 downto 3) &amp;amp; flux_cnt_dat(6 downto 0)&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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]]&lt;br /&gt;
&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.a (buggy) ==&lt;br /&gt;
Note: This revision is on a watch list, after the bug detected 15 July 2008.  See the bug section for more details.&lt;br /&gt;
* '''Filename''' : rc_v0400000a_07jul2008.sof&lt;br /&gt;
* '''Bug Fix'''&lt;br /&gt;
** mce_status and adc_offset/flx_quanta commands do not fail after power up.&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** Seems to clip out channel 0 from data reporting.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.9 (buggy) ==&lt;br /&gt;
* '''Filename''' : rc_v04000009_26jun2008.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** sa_bias and offset DACs only refreshed when new values are written. (in previous versions, DACs were refreshed every frame)&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.8 ==&lt;br /&gt;
* '''Filename''' : rc_v04000008_26jun2008.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** The gaini, gainp, gaind resolution increased to 12-bit, i.e. -2048 to 2047 (formerly 10-bit).&lt;br /&gt;
&lt;br /&gt;
* '''Bug fix'''&lt;br /&gt;
** the bug associated with gainpid read before mce_reset is fixed.&lt;br /&gt;
&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.3.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04030007_26may2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** 14-bit raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** 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.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.2.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04020007_24may2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
* '''Bug fix'''&lt;br /&gt;
** the bug associated with reading from raw-buffer is fixed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.1.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04010007_25apr2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.6 (buggy) ==&lt;br /&gt;
* '''Filename''' : rc_v04000006_15feb2008.sof or .pof       &lt;br /&gt;
* '''Features''' &lt;br /&gt;
** '''bugfix''': unreliable reset due to unsafe and incomplete state machines is fixed.&lt;br /&gt;
** '''bugfix''': flux_jump sign problem fixed, so far proved in const_mode, to be tested in servo_mode with cold setup.&lt;br /&gt;
** servo_mode=2 or ramp previously only went from 0 to ramp_amp, but now goes from -8192 to -8192+ramp_amp&lt;br /&gt;
** new commands are added: ''scratch'' and ''card_type''. Scratch takes 8 values and can be used by software to detect reset.&lt;br /&gt;
** slot_id and fw_rev are now integrated as part of all_cards.vhd&lt;br /&gt;
** lvds_tx_b=0, This will allow Clock Card to use the secondary backplane lvds line and check whether RC is plugged in.&lt;br /&gt;
** filter_coeff in misc_banks_admin commented as it is not implemented and causes timing problems.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
** slot_id is only set after a resetmce is issued. (using the latest all_cards in the next revision will fix this)&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.5 ==&lt;br /&gt;
* '''Filename''' : rc_v04000005_01nov2007.sof or .pof       &lt;br /&gt;
* '''Features''' &lt;br /&gt;
** data mode 9 (mixed filt + flux jump) with windowing readjusted compared to data mode 8&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** unreliable resetmce. Sometimes, firmware waked up non-responsive on lvds lines.&lt;br /&gt;
** In data mode 5 and 9, flux-jump counter is not reported properly due to a sign error. However, flux jumping works fine.&lt;br /&gt;
&lt;br /&gt;
== Revision 3.0.19 ==&lt;br /&gt;
* '''Filename''' : rc_v03000019_16feb2007_raw.sof (no pof as one is not likely to run with this as regular firmware)&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** data mode 3 is enabled.&lt;br /&gt;
** filter is disabled as a compromise to fit the raw-mode buffer.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** unreliable resetmce. Sometimes, firmware waked up non-responsive on lvds lines.&lt;br /&gt;
&lt;br /&gt;
== Old Firmware Revisions ==&lt;br /&gt;
* '''4.0.4''':  rc_v04000004_11oct2007.sof  data mode 8 added (mixed filt + flux jump)&lt;br /&gt;
* '''4.0.3''':  rc_v04000003_19sep2007.sof  data mode 7 bit split readjusted to 10b error being bit 4 to 14&lt;br /&gt;
* '''4.0.2''':  rc_v04000002_11sep2007.sof  pid resolution increased to 10b, data mode 7 added&lt;br /&gt;
* '''4.0.1''':  rc_v04000001_06sep2007.sof  &lt;br /&gt;
* '''4.0.0''':  rc_v04000000_29aug2007.sof  supports readout_row_index * [[ bugs ]]&lt;br /&gt;
&lt;br /&gt;
= To-Do List =&lt;br /&gt;
* the starting point for the servo is currently zero and it would be nice to have it programmable.&lt;br /&gt;
&lt;br /&gt;
= RC Synthesis Notes =&lt;br /&gt;
# 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. &lt;br /&gt;
# Timing: There is no &amp;quot;lock region&amp;quot; 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.&lt;br /&gt;
# 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%.&lt;br /&gt;
# 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.&lt;br /&gt;
# 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):&lt;br /&gt;
 lpm_file =&amp;gt; &amp;quot;C:/scuba2_repository/cards/readout_card/fsfb_calc/source/rtl/ram_40x64.hex&amp;quot;, and&lt;br /&gt;
 lpm_file    : STRING;&lt;br /&gt;
#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. &lt;br /&gt;
----&lt;br /&gt;
[http://e-mode.phas.ubc.ca/mcewiki/index.php/Main_Page  MCE Main Page]&lt;/div&gt;</summary>
		<author><name>Bburger</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Readout_Card_firmware&amp;diff=4348</id>
		<title>Readout Card firmware</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Readout_Card_firmware&amp;diff=4348"/>
		<updated>2011-05-04T21:55:25Z</updated>

		<summary type="html">&lt;p&gt;Bburger: /* Revision 5.0.d (not recommended) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Synthesis Reminders (for firmware developers)&lt;br /&gt;
** quartus.ini is not needed anymore (Fixed as of Q7, Altera SR10783580 2010-10-24)&lt;br /&gt;
** Remember that readout_card/fsfb_clac/source/rtl/ram_40x64.vhd must be initialized with the ram_40x64.hex file in the same directory.&lt;br /&gt;
= Revision 5.1.2 =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010002_18jan2011.sof (for Rev. E cards) &lt;br /&gt;
** rc_stratix3_v05010002_18jan2011.jic (for Rev. E cards) &lt;br /&gt;
** rc_v05010002_03feb2011.sof (for Rev. B cards) &lt;br /&gt;
** rc_v05010002_03feb2011.pof (for Rev. B cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.1 with k1 and k2 (filter params) limited to k1&amp;lt;16 and k2&amp;lt;32 in order to resolve the timing when compiling for smaller Stratix FPGA on RC Rev. B.&lt;br /&gt;
&lt;br /&gt;
* '''Bug fix:'''&lt;br /&gt;
** the 2-rows-off filtered data readout introduced with configurable filter in rev. 5.1.0 and 5.1.1 is fixed now.&lt;br /&gt;
 &lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** none so far.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt, rev. B)&lt;br /&gt;
 ; Total logic elements      ; 33,285 / 41,250 ( 81 % )                       ;&lt;br /&gt;
 ; Total pins                ; 358 / 616 ( 58 % )                             ;&lt;br /&gt;
 ; Total memory bits         ; 1,405,440 / 3,423,744 ( 41 % )                 ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt, rev. B)&lt;br /&gt;
 ; Fast Model Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 6.591 ns  &lt;br /&gt;
 ; Fast Model Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 7.206 ns  &lt;br /&gt;
 ; Fast Model Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 18.299 ns&lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.1 (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05010001_01dec2010.sof (for Rev. B cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.0, but k1 and k2 (filter params) are now limited to k1&amp;lt;16 and k2&amp;lt;32 in order to resolve the timing failures of compiling 5.1.0 for smaller Stratix FPGA on RC Rev. B.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** filter mode data is off by 2 rows. &lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.0 (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010000_01nov2010.sof  (for Rev. E cards)&lt;br /&gt;
** rc_v05010000_01nov2010.sof (for Rev. B cards) has timing failures '''do not use!!!'''&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** added configurable filter parameters specified by ''fltr_coeff'', default is the f&amp;lt;sub&amp;gt;cutoff&amp;lt;/sub&amp;gt;/f&amp;lt;sub&amp;gt;sampl&amp;lt;/sub&amp;gt;=122Hz/15kHz. see [[ Digital 4-pole Butterworth Low-pass filter ]]. &lt;br /&gt;
** ''fltr_type'' is set to 255 to indicate configurable filter parameters.&lt;br /&gt;
** see [http://www.phas.ubc.ca/~mce/mcedocs/software/SC2_ELE_S580_515_mce_command_description.pdf MCE command description]&lt;br /&gt;
** development notes: &lt;br /&gt;
*** It is built on Quartus10.1. &lt;br /&gt;
*** tcl files had to be updated as cmp syntax is not supported in Q10 anymore.&lt;br /&gt;
*** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** rc_v05010000_01nov2010.sof has timing failures that were overlooked, do not use this firmware for Rev.B cards. &lt;br /&gt;
** '''filter mode data is off by 2 rows.''' &lt;br /&gt;
&lt;br /&gt;
* '''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&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.f  =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000f_22oct2010.sof (for Rev. B cards)&lt;br /&gt;
** rc_stratix3_v0500000f_22oct2010.sof  (for Rev. E cards)&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
**  Bugfix: integral clamp should work now. only positive integral_clamp values are valid!&lt;br /&gt;
&lt;br /&gt;
* '''Details:''': &lt;br /&gt;
** 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.&lt;br /&gt;
** available for both Rev. E and Rev. B cards, the upper byte of card_type parameter now reports the pcb revision.&lt;br /&gt;
** development note: It is built on Quartus10.1. &lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
**none yet!&lt;br /&gt;
&lt;br /&gt;
* '''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&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.e (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000e_06oct2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''  &lt;br /&gt;
** 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!&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.d (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000d_04aug2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
**  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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:''': &lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** '''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 [[http://e-mode.phas.ubc.ca/mcewiki/index.php/Image:Clamp_unstable.png scope snapshot]] used slow_fb_ramp.py script for testing.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage and Timing Report''' (readout_card.fit.rpt and readout_card.tan.rpt): no change compared to 5.0.a/b/c&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.c (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000c_16jun2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.b&lt;br /&gt;
** Re-introduced flux-jump counter clamping to maintain continuity in behavior from past versions of firmware in the field.&lt;br /&gt;
** '''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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** '''flux-jump is broken'''. flux-jumping block misbehaves at the first jump in the negative range.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt): [[rc_5.0.c_fit_rpt]]&lt;br /&gt;
 ; Total logic elements     ; 26,800 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total pins               ; 358 / 616 ( 58 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 76 / 112 ( 68 % )                             ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): [[rc_5.0.c_tan_rpt]]&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.964 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.382 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 15.924 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.b (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000b_03jun2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.a&lt;br /&gt;
** 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.&lt;br /&gt;
** 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&lt;br /&gt;
** A sticky bit that only affected servo_mode=0,1,2 was also removed from the flux-jumping block.&lt;br /&gt;
** flx_lp_init commands now also clear the flux-jumping block as well.&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** flux-jump does not work when jumping to negative values.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt): [[rc_5.0.b_fit_rpt]]&lt;br /&gt;
 ; Total logic elements     ; 26,745 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total pins               ; 358 / 616 ( 58 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 76 / 112 ( 68 % )                             ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): [[rc_5.0.b_tan_rpt]]&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.459 ns  &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.895 ns  &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 15.956 ns&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.a =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000a_12mar2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on the merger of rev. 5.0.8 and 5.0.9.&lt;br /&gt;
** '''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.&lt;br /&gt;
** The low pass filter has 20-bit input and f_3dB/f_samp = 122Hz/15kHz .&lt;br /&gt;
** The flux-jump clamping that was removed in 5.0.9 is included once again here, as we decided this is safer for now.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** &amp;quot;lock_dat_left&amp;quot; parameter that was removed in 5.0.9 is now implemented as &amp;quot;lock_dat_lsb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** flx_lp_init does not reinitialize the flux-jump block&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
** tag name: rc_v0500000a_12mar2009! years were mixed up!&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.9 (buggy) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000009_13nov2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** Removes a sticky bit in pid calculation result storage -- in fsfb_processor.&lt;br /&gt;
** Adds a command to clamp the growth of the I-term to prevent wrapping and track down the source of Caltech's FSFB jumps.&lt;br /&gt;
** Removed the unused lock_dat_left parameter.  The ability to shift left was moved to the fsfb_corr block some time ago.&lt;br /&gt;
** Fixed a sign extension bug acting on the flux quanta, which limited the value to 8191.  Changed the extension from signed to unsigned.&lt;br /&gt;
** Removed ineffective clamping in the flux-jump calculation block.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** integral_clamp read/write command does not work. &lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,960 / 41,250 ( 68 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.825 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.878 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 14.397 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.8 (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000008_09oct2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** type 1 low-pass filter: f&amp;lt;sub&amp;gt;3dB&amp;lt;/sub&amp;gt;=122Hz for f&amp;lt;sub&amp;gt;sample&amp;lt;/sub&amp;gt;=15kHz&lt;br /&gt;
** Filter-input-width changed from 18b to 20b with no sticky bits!&lt;br /&gt;
** removed sticky bits in internal arithmetic of the filter.&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.7 (type-2 filter) =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000007_09oct2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** type-2 low-pass-filter: f&amp;lt;sub&amp;gt;3dB&amp;lt;/sub&amp;gt;=75Hz for f&amp;lt;sub&amp;gt;sample&amp;lt;/sub&amp;gt;=30000.&lt;br /&gt;
** Filter-input-width changed from 18b to 20b with no sticky bits!&lt;br /&gt;
** inter-biquad-gain-scaling for the filter is 2^14&lt;br /&gt;
** filter results are scaled down by 2^3 in the output of the filter.&lt;br /&gt;
** removed sticky bits in internal arithmetics&lt;br /&gt;
** _correction_ disabled in fsfb_proc_pidz&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** quartus.ini file was '''not''' present in synth directory.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** none to report&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
== Revision 5.0.6  (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05000006_15sep2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Only Valid for Rev. C/D Cards&lt;br /&gt;
** Based on rev. 5.0.3&lt;br /&gt;
** tcl file updated for Rev. D and aligned with top-level and qsf (project file). &lt;br /&gt;
** flux loop commented, just to try sampling the ADC. &lt;br /&gt;
** compiled with Q9.1&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.5 (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000005_04sep2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** changed the low-pass-filter to f(3db)=75Hz for f(sample)=30000.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** quartus.ini file was '''not''' present in synth directory.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** negative inputs to the filter cause filter to have a non-flat pass-band region. may have to do with sign-handling...&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.4 =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000004_28aug2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** BUG Fix: handles 14-bit flux quanta (changed the multiplier to unsigned)&lt;br /&gt;
** BUG Fix: changed standard logic vector extension from signed to unsigned in flux-jumping slave.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,170 / 41,250 ( 63 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.541 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.612 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 15.398 ns ;&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.3  =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05000003_21aug2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** ONLY valid REV C/D RC Cards&lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** flux loop commented, just to try sampling the ADC.&lt;br /&gt;
** updated tcl file, but still need to rely on project file as well as qsf file.&lt;br /&gt;
** changed default level of adc_sclk to '1'&lt;br /&gt;
** dac_clr_n was changed from an output to an input.&lt;br /&gt;
** added 'locked' interface to rc_pll_stratix_iii&lt;br /&gt;
** renamed the adc_pll clock signals to more explanitory names&lt;br /&gt;
** added the FPGA_DEVICE_FAMILY generic to the dispatch interace for synthesis of the dc_fifo in lvds_rx&lt;br /&gt;
** uncommented DDR interface to force the syntesizer to use correct left and right PLLs (in conjunction with ADC and DDR PLLs)&lt;br /&gt;
** added test signals to test_status to see clocks on the scope.&lt;br /&gt;
== Revision 5.0.2 (buggy) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000002_test00_tagged.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.1&lt;br /&gt;
** Fixed a bug in wbs_frame_data that stored data incorrectly if reporting 1 or 2 pixels only.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,186 / 41,250 ( 63 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.755 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.979 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.067 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.1 (buggy) (Filter + Raw + Rectangle, 2 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000001_26may2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Combines features in rev. 5.0.0 (2 LVDS Lines) and rev. 4.0.e (Filtered + Raw), with the NEW rectangle mode.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** [[CVS Diff Between sys_v05000000 and rc_v05000001]]&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** Has a bug in wbs_frame_data that stored data incorrectly if reporting 1 or 2 pixels only.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,565 / 41,250 ( 64 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.656 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.861 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 14.167 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.0 (Filter Only, 2 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000000_22dec2008.sof (tagged as sys_v05000000_22dec2008)&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware v05000000+ of all other cards!!!&lt;br /&gt;
** Adds the ability to read out one column of data continuously from readout cards&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** [[CVS Diff Between rc_v0400000c and sys_v05000000]]&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,607 / 41,250 ( 65 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 406,016 / 3,423,744 ( 12 % )             ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.558 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.892 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.987 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.f (Filter + Raw, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0400000f_12feb2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on 4.0.e and in parallel with 5.0.9 (equivalent version, clamping is not included)&lt;br /&gt;
** Incorporates fixes that were done to flux-jumping between 5.0.2 - 5.0.4 - 5.0.9.  Namely:&lt;br /&gt;
*** Changes a multiplier from signed to unsigned (in fsfb_corr_multplier.vhd).&lt;br /&gt;
*** Changes sign extension from signed to unsigned (in flux_quanta_ram_admin.vhd).&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None reported yet.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,773 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,321,984 / 3,423,744 ( 39 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.539 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.118 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.318 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.e (Filter + Raw, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0400000e_27apr2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on 4.0.d&lt;br /&gt;
** Combines both raw- and filtered-data modes.&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are disabled.&lt;br /&gt;
** Tested by Matt Hasselfield.  &lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are disabled.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,048 / 41,250 ( 66 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,321,984 / 3,423,744 ( 39 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.675 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.907 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.728 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.d (Raw Only, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  rc_v0400000d_20090417.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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.&lt;br /&gt;
** The firmware takes a new command called readout_col_index which specifies which column to capture raw data from.&lt;br /&gt;
** Other than readout_col_index, the firmware functions the same as previous raw-data firmware, including then need to issue a capture_raw command.&lt;br /&gt;
** For more information on raw-data, see:  http://e-mode.phas.ubc.ca/mcewiki/index.php/Raw-mode_readout&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** Differences between 4.0.c and 4.0.d&lt;br /&gt;
 U system/test/source/tb/tb_cc_rcs_bcs_ac.vhd&lt;br /&gt;
 U all_cards/dispatch/source/rtl/dispatch_wishbone.vhd&lt;br /&gt;
 U library/sys_param/source/rtl/wishbone_pack.vhd&lt;br /&gt;
 U readout_card/adc_sample_coadd/source/rtl/adc_sample_coadd.vhd&lt;br /&gt;
 U readout_card/adc_sample_coadd/source/rtl/adc_sample_coadd_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop/source/rtl/flux_loop.vhd&lt;br /&gt;
 U readout_card/flux_loop/source/rtl/flux_loop_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/rtl/flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/rtl/flux_loop_ctrl_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/tb/tb1_flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/tb/tb2_flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/fsfb_calc/source/rtl/fsfb_fltr_regs.vhd&lt;br /&gt;
 U readout_card/fsfb_corr/source/rtl/fsfb_corr.vhd&lt;br /&gt;
 U readout_card/readout_card/source/rtl/readout_card.vhd&lt;br /&gt;
 U readout_card/readout_card/source/rtl/readout_card_pack.vhd&lt;br /&gt;
 U readout_card/wbs_frame_data/source/rtl/wbs_frame_data.vhd&lt;br /&gt;
 U readout_card/wbs_frame_data/source/rtl/wbs_frame_data_pack.vhd&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are not supported.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 24,554 / 41,250 ( 60 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,262,592 / 3,423,744 ( 37 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.991 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.864 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.052 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.4.1 ==&lt;br /&gt;
* '''Filename:'''  rc_v04040001_21nov2008&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,241 / 41,250 ( 66 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 405,504 / 3,423,744 ( 12 % )                  ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.588 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.585 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.057 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.4.0 (buggy) ==&lt;br /&gt;
* '''Filename:'''  rc_v04040000_02oct2008&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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]].&lt;br /&gt;
** Re-integrated the id_thermo and fpga_thermo block in the readout_card.vhd top level that was removed in 4.0.c.&lt;br /&gt;
** 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.&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
** Adjusted the indentation in fsfb_io_controller.vhd to make the file more readable.&lt;br /&gt;
** 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.&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** The following commands lock up the Readout Card firmware:  CARD_ID_ADDR, CARD_TEMP_ADDR, FPGA_TEMP_ADDR.&lt;br /&gt;
** 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&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,099 / 41,250 ( 66 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 406,016 / 3,423,744 ( 12 % )                  ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.372 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.052 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.066 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.c ==&lt;br /&gt;
* '''Filename:'''  rc_v0400000c_15aug2008.sof&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Only has data modes 0, 1, 4, and 10.&lt;br /&gt;
** 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).&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** Changed a counter in the dispatch block to ease timing constraints in synthesis (dispatch_wishbone.vhd)&lt;br /&gt;
** 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.&lt;br /&gt;
** '''Removed''' the fpga_termo (command:  '''fpga_temp''') and id_thermo (commands: '''card_temp, card_id''') to ease timing constraints in synthesis (readout_card.vhd)&lt;br /&gt;
** Updated the tagged version of fpga_termo.vhd to include the new 'stale bit' feature&lt;br /&gt;
** Updated the tagged version of frame_timing_core.vhd to include the new 'err_o' interface&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None reported yet&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
* '''FPGA Resource Usage:'''&lt;br /&gt;
 Total logic elements : 25,058 / 41,250 ( 61 % )&lt;br /&gt;
 Total memory bits : 400,896 / 3,423,744 ( 12 % )&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.282 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.736 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.665 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.b (buggy) ==&lt;br /&gt;
Note: This revision is on a watch list, after the bug detected 15 July 2008.  See the bug section for more details.&lt;br /&gt;
* '''Filename''' : rc_v0400000b_04aug2008.sof&lt;br /&gt;
* '''Features'''&lt;br /&gt;
** data_mode 10 is added to provide more filtfb bits (compared to data mode 9) for planet observations. filtered_dat(27 downto 3) &amp;amp; flux_cnt_dat(6 downto 0)&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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]]&lt;br /&gt;
&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.a (buggy) ==&lt;br /&gt;
Note: This revision is on a watch list, after the bug detected 15 July 2008.  See the bug section for more details.&lt;br /&gt;
* '''Filename''' : rc_v0400000a_07jul2008.sof&lt;br /&gt;
* '''Bug Fix'''&lt;br /&gt;
** mce_status and adc_offset/flx_quanta commands do not fail after power up.&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** Seems to clip out channel 0 from data reporting.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.9 (buggy) ==&lt;br /&gt;
* '''Filename''' : rc_v04000009_26jun2008.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** sa_bias and offset DACs only refreshed when new values are written. (in previous versions, DACs were refreshed every frame)&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.8 ==&lt;br /&gt;
* '''Filename''' : rc_v04000008_26jun2008.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** The gaini, gainp, gaind resolution increased to 12-bit, i.e. -2048 to 2047 (formerly 10-bit).&lt;br /&gt;
&lt;br /&gt;
* '''Bug fix'''&lt;br /&gt;
** the bug associated with gainpid read before mce_reset is fixed.&lt;br /&gt;
&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.3.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04030007_26may2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** 14-bit raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** 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.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.2.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04020007_24may2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
* '''Bug fix'''&lt;br /&gt;
** the bug associated with reading from raw-buffer is fixed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.1.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04010007_25apr2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.6 (buggy) ==&lt;br /&gt;
* '''Filename''' : rc_v04000006_15feb2008.sof or .pof       &lt;br /&gt;
* '''Features''' &lt;br /&gt;
** '''bugfix''': unreliable reset due to unsafe and incomplete state machines is fixed.&lt;br /&gt;
** '''bugfix''': flux_jump sign problem fixed, so far proved in const_mode, to be tested in servo_mode with cold setup.&lt;br /&gt;
** servo_mode=2 or ramp previously only went from 0 to ramp_amp, but now goes from -8192 to -8192+ramp_amp&lt;br /&gt;
** new commands are added: ''scratch'' and ''card_type''. Scratch takes 8 values and can be used by software to detect reset.&lt;br /&gt;
** slot_id and fw_rev are now integrated as part of all_cards.vhd&lt;br /&gt;
** lvds_tx_b=0, This will allow Clock Card to use the secondary backplane lvds line and check whether RC is plugged in.&lt;br /&gt;
** filter_coeff in misc_banks_admin commented as it is not implemented and causes timing problems.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
** slot_id is only set after a resetmce is issued. (using the latest all_cards in the next revision will fix this)&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.5 ==&lt;br /&gt;
* '''Filename''' : rc_v04000005_01nov2007.sof or .pof       &lt;br /&gt;
* '''Features''' &lt;br /&gt;
** data mode 9 (mixed filt + flux jump) with windowing readjusted compared to data mode 8&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** unreliable resetmce. Sometimes, firmware waked up non-responsive on lvds lines.&lt;br /&gt;
** In data mode 5 and 9, flux-jump counter is not reported properly due to a sign error. However, flux jumping works fine.&lt;br /&gt;
&lt;br /&gt;
== Revision 3.0.19 ==&lt;br /&gt;
* '''Filename''' : rc_v03000019_16feb2007_raw.sof (no pof as one is not likely to run with this as regular firmware)&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** data mode 3 is enabled.&lt;br /&gt;
** filter is disabled as a compromise to fit the raw-mode buffer.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** unreliable resetmce. Sometimes, firmware waked up non-responsive on lvds lines.&lt;br /&gt;
&lt;br /&gt;
== Old Firmware Revisions ==&lt;br /&gt;
* '''4.0.4''':  rc_v04000004_11oct2007.sof  data mode 8 added (mixed filt + flux jump)&lt;br /&gt;
* '''4.0.3''':  rc_v04000003_19sep2007.sof  data mode 7 bit split readjusted to 10b error being bit 4 to 14&lt;br /&gt;
* '''4.0.2''':  rc_v04000002_11sep2007.sof  pid resolution increased to 10b, data mode 7 added&lt;br /&gt;
* '''4.0.1''':  rc_v04000001_06sep2007.sof  &lt;br /&gt;
* '''4.0.0''':  rc_v04000000_29aug2007.sof  supports readout_row_index * [[ bugs ]]&lt;br /&gt;
&lt;br /&gt;
= To-Do List =&lt;br /&gt;
* the starting point for the servo is currently zero and it would be nice to have it programmable.&lt;br /&gt;
&lt;br /&gt;
= RC Synthesis Notes =&lt;br /&gt;
# 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. &lt;br /&gt;
# Timing: There is no &amp;quot;lock region&amp;quot; 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.&lt;br /&gt;
# 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%.&lt;br /&gt;
# 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.&lt;br /&gt;
# 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):&lt;br /&gt;
 lpm_file =&amp;gt; &amp;quot;C:/scuba2_repository/cards/readout_card/fsfb_calc/source/rtl/ram_40x64.hex&amp;quot;, and&lt;br /&gt;
 lpm_file    : STRING;&lt;br /&gt;
#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. &lt;br /&gt;
----&lt;br /&gt;
[http://e-mode.phas.ubc.ca/mcewiki/index.php/Main_Page  MCE Main Page]&lt;/div&gt;</summary>
		<author><name>Bburger</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Readout_Card_firmware&amp;diff=4347</id>
		<title>Readout Card firmware</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Readout_Card_firmware&amp;diff=4347"/>
		<updated>2011-05-04T21:53:55Z</updated>

		<summary type="html">&lt;p&gt;Bburger: /* Revision 5.1.2 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Synthesis Reminders (for firmware developers)&lt;br /&gt;
** quartus.ini is not needed anymore (Fixed as of Q7, Altera SR10783580 2010-10-24)&lt;br /&gt;
** Remember that readout_card/fsfb_clac/source/rtl/ram_40x64.vhd must be initialized with the ram_40x64.hex file in the same directory.&lt;br /&gt;
= Revision 5.1.2 =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010002_18jan2011.sof (for Rev. E cards) &lt;br /&gt;
** rc_stratix3_v05010002_18jan2011.jic (for Rev. E cards) &lt;br /&gt;
** rc_v05010002_03feb2011.sof (for Rev. B cards) &lt;br /&gt;
** rc_v05010002_03feb2011.pof (for Rev. B cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.1 with k1 and k2 (filter params) limited to k1&amp;lt;16 and k2&amp;lt;32 in order to resolve the timing when compiling for smaller Stratix FPGA on RC Rev. B.&lt;br /&gt;
&lt;br /&gt;
* '''Bug fix:'''&lt;br /&gt;
** the 2-rows-off filtered data readout introduced with configurable filter in rev. 5.1.0 and 5.1.1 is fixed now.&lt;br /&gt;
 &lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** none so far.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt, rev. B)&lt;br /&gt;
 ; Total logic elements      ; 33,285 / 41,250 ( 81 % )                       ;&lt;br /&gt;
 ; Total pins                ; 358 / 616 ( 58 % )                             ;&lt;br /&gt;
 ; Total memory bits         ; 1,405,440 / 3,423,744 ( 41 % )                 ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt, rev. B)&lt;br /&gt;
 ; Fast Model Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 6.591 ns  &lt;br /&gt;
 ; Fast Model Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 7.206 ns  &lt;br /&gt;
 ; Fast Model Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 18.299 ns&lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.1 (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05010001_01dec2010.sof (for Rev. B cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.0, but k1 and k2 (filter params) are now limited to k1&amp;lt;16 and k2&amp;lt;32 in order to resolve the timing failures of compiling 5.1.0 for smaller Stratix FPGA on RC Rev. B.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** filter mode data is off by 2 rows. &lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.0 (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010000_01nov2010.sof  (for Rev. E cards)&lt;br /&gt;
** rc_v05010000_01nov2010.sof (for Rev. B cards) has timing failures '''do not use!!!'''&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** added configurable filter parameters specified by ''fltr_coeff'', default is the f&amp;lt;sub&amp;gt;cutoff&amp;lt;/sub&amp;gt;/f&amp;lt;sub&amp;gt;sampl&amp;lt;/sub&amp;gt;=122Hz/15kHz. see [[ Digital 4-pole Butterworth Low-pass filter ]]. &lt;br /&gt;
** ''fltr_type'' is set to 255 to indicate configurable filter parameters.&lt;br /&gt;
** see [http://www.phas.ubc.ca/~mce/mcedocs/software/SC2_ELE_S580_515_mce_command_description.pdf MCE command description]&lt;br /&gt;
** development notes: &lt;br /&gt;
*** It is built on Quartus10.1. &lt;br /&gt;
*** tcl files had to be updated as cmp syntax is not supported in Q10 anymore.&lt;br /&gt;
*** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** rc_v05010000_01nov2010.sof has timing failures that were overlooked, do not use this firmware for Rev.B cards. &lt;br /&gt;
** '''filter mode data is off by 2 rows.''' &lt;br /&gt;
&lt;br /&gt;
* '''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&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.f  =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000f_22oct2010.sof (for Rev. B cards)&lt;br /&gt;
** rc_stratix3_v0500000f_22oct2010.sof  (for Rev. E cards)&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
**  Bugfix: integral clamp should work now. only positive integral_clamp values are valid!&lt;br /&gt;
&lt;br /&gt;
* '''Details:''': &lt;br /&gt;
** 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.&lt;br /&gt;
** available for both Rev. E and Rev. B cards, the upper byte of card_type parameter now reports the pcb revision.&lt;br /&gt;
** development note: It is built on Quartus10.1. &lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
**none yet!&lt;br /&gt;
&lt;br /&gt;
* '''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&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.e (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000e_06oct2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''  &lt;br /&gt;
** 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!&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.d (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000d_04aug2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
**  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.&lt;br /&gt;
&lt;br /&gt;
* '''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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** '''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 [[http://e-mode.phas.ubc.ca/mcewiki/index.php/Image:Clamp_unstable.png scope snapshot]] used slow_fb_ramp.py script for testing.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage and Timing Report''' (readout_card.fit.rpt and readout_card.tan.rpt): no change compared to 5.0.a/b/c&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.c (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000c_16jun2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.b&lt;br /&gt;
** Re-introduced flux-jump counter clamping to maintain continuity in behavior from past versions of firmware in the field.&lt;br /&gt;
** '''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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** '''flux-jump is broken'''. flux-jumping block misbehaves at the first jump in the negative range.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt): [[rc_5.0.c_fit_rpt]]&lt;br /&gt;
 ; Total logic elements     ; 26,800 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total pins               ; 358 / 616 ( 58 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 76 / 112 ( 68 % )                             ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): [[rc_5.0.c_tan_rpt]]&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.964 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.382 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 15.924 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.b (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000b_03jun2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.a&lt;br /&gt;
** 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.&lt;br /&gt;
** 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&lt;br /&gt;
** A sticky bit that only affected servo_mode=0,1,2 was also removed from the flux-jumping block.&lt;br /&gt;
** flx_lp_init commands now also clear the flux-jumping block as well.&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** flux-jump does not work when jumping to negative values.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt): [[rc_5.0.b_fit_rpt]]&lt;br /&gt;
 ; Total logic elements     ; 26,745 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total pins               ; 358 / 616 ( 58 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 76 / 112 ( 68 % )                             ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): [[rc_5.0.b_tan_rpt]]&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.459 ns  &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.895 ns  &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 15.956 ns&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.a =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000a_12mar2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on the merger of rev. 5.0.8 and 5.0.9.&lt;br /&gt;
** '''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.&lt;br /&gt;
** The low pass filter has 20-bit input and f_3dB/f_samp = 122Hz/15kHz .&lt;br /&gt;
** The flux-jump clamping that was removed in 5.0.9 is included once again here, as we decided this is safer for now.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** &amp;quot;lock_dat_left&amp;quot; parameter that was removed in 5.0.9 is now implemented as &amp;quot;lock_dat_lsb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** flx_lp_init does not reinitialize the flux-jump block&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
** tag name: rc_v0500000a_12mar2009! years were mixed up!&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.9 (buggy) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000009_13nov2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** Removes a sticky bit in pid calculation result storage -- in fsfb_processor.&lt;br /&gt;
** Adds a command to clamp the growth of the I-term to prevent wrapping and track down the source of Caltech's FSFB jumps.&lt;br /&gt;
** Removed the unused lock_dat_left parameter.  The ability to shift left was moved to the fsfb_corr block some time ago.&lt;br /&gt;
** Fixed a sign extension bug acting on the flux quanta, which limited the value to 8191.  Changed the extension from signed to unsigned.&lt;br /&gt;
** Removed ineffective clamping in the flux-jump calculation block.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** integral_clamp read/write command does not work. &lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,960 / 41,250 ( 68 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.825 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.878 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 14.397 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.8 (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000008_09oct2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** type 1 low-pass filter: f&amp;lt;sub&amp;gt;3dB&amp;lt;/sub&amp;gt;=122Hz for f&amp;lt;sub&amp;gt;sample&amp;lt;/sub&amp;gt;=15kHz&lt;br /&gt;
** Filter-input-width changed from 18b to 20b with no sticky bits!&lt;br /&gt;
** removed sticky bits in internal arithmetic of the filter.&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.7 (type-2 filter) =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000007_09oct2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** type-2 low-pass-filter: f&amp;lt;sub&amp;gt;3dB&amp;lt;/sub&amp;gt;=75Hz for f&amp;lt;sub&amp;gt;sample&amp;lt;/sub&amp;gt;=30000.&lt;br /&gt;
** Filter-input-width changed from 18b to 20b with no sticky bits!&lt;br /&gt;
** inter-biquad-gain-scaling for the filter is 2^14&lt;br /&gt;
** filter results are scaled down by 2^3 in the output of the filter.&lt;br /&gt;
** removed sticky bits in internal arithmetics&lt;br /&gt;
** _correction_ disabled in fsfb_proc_pidz&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** quartus.ini file was '''not''' present in synth directory.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** none to report&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
== Revision 5.0.6  (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05000006_15sep2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Only Valid for Rev. C/D Cards&lt;br /&gt;
** Based on rev. 5.0.3&lt;br /&gt;
** tcl file updated for Rev. D and aligned with top-level and qsf (project file). &lt;br /&gt;
** flux loop commented, just to try sampling the ADC. &lt;br /&gt;
** compiled with Q9.1&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.5 (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000005_04sep2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** changed the low-pass-filter to f(3db)=75Hz for f(sample)=30000.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** quartus.ini file was '''not''' present in synth directory.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** negative inputs to the filter cause filter to have a non-flat pass-band region. may have to do with sign-handling...&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.4 =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000004_28aug2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** BUG Fix: handles 14-bit flux quanta (changed the multiplier to unsigned)&lt;br /&gt;
** BUG Fix: changed standard logic vector extension from signed to unsigned in flux-jumping slave.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,170 / 41,250 ( 63 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.541 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.612 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 15.398 ns ;&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.3  =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05000003_21aug2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** ONLY valid REV C/D RC Cards&lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** flux loop commented, just to try sampling the ADC.&lt;br /&gt;
** updated tcl file, but still need to rely on project file as well as qsf file.&lt;br /&gt;
** changed default level of adc_sclk to '1'&lt;br /&gt;
** dac_clr_n was changed from an output to an input.&lt;br /&gt;
** added 'locked' interface to rc_pll_stratix_iii&lt;br /&gt;
** renamed the adc_pll clock signals to more explanitory names&lt;br /&gt;
** added the FPGA_DEVICE_FAMILY generic to the dispatch interace for synthesis of the dc_fifo in lvds_rx&lt;br /&gt;
** uncommented DDR interface to force the syntesizer to use correct left and right PLLs (in conjunction with ADC and DDR PLLs)&lt;br /&gt;
** added test signals to test_status to see clocks on the scope.&lt;br /&gt;
== Revision 5.0.2 (buggy) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000002_test00_tagged.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.1&lt;br /&gt;
** Fixed a bug in wbs_frame_data that stored data incorrectly if reporting 1 or 2 pixels only.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,186 / 41,250 ( 63 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.755 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.979 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.067 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.1 (buggy) (Filter + Raw + Rectangle, 2 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000001_26may2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Combines features in rev. 5.0.0 (2 LVDS Lines) and rev. 4.0.e (Filtered + Raw), with the NEW rectangle mode.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** [[CVS Diff Between sys_v05000000 and rc_v05000001]]&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** Has a bug in wbs_frame_data that stored data incorrectly if reporting 1 or 2 pixels only.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,565 / 41,250 ( 64 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.656 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.861 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 14.167 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.0 (Filter Only, 2 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000000_22dec2008.sof (tagged as sys_v05000000_22dec2008)&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware v05000000+ of all other cards!!!&lt;br /&gt;
** Adds the ability to read out one column of data continuously from readout cards&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** [[CVS Diff Between rc_v0400000c and sys_v05000000]]&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,607 / 41,250 ( 65 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 406,016 / 3,423,744 ( 12 % )             ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.558 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.892 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.987 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.f (Filter + Raw, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0400000f_12feb2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on 4.0.e and in parallel with 5.0.9 (equivalent version, clamping is not included)&lt;br /&gt;
** Incorporates fixes that were done to flux-jumping between 5.0.2 - 5.0.4 - 5.0.9.  Namely:&lt;br /&gt;
*** Changes a multiplier from signed to unsigned (in fsfb_corr_multplier.vhd).&lt;br /&gt;
*** Changes sign extension from signed to unsigned (in flux_quanta_ram_admin.vhd).&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None reported yet.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,773 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,321,984 / 3,423,744 ( 39 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.539 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.118 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.318 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.e (Filter + Raw, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0400000e_27apr2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on 4.0.d&lt;br /&gt;
** Combines both raw- and filtered-data modes.&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are disabled.&lt;br /&gt;
** Tested by Matt Hasselfield.  &lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are disabled.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,048 / 41,250 ( 66 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,321,984 / 3,423,744 ( 39 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.675 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.907 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.728 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.d (Raw Only, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  rc_v0400000d_20090417.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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.&lt;br /&gt;
** The firmware takes a new command called readout_col_index which specifies which column to capture raw data from.&lt;br /&gt;
** Other than readout_col_index, the firmware functions the same as previous raw-data firmware, including then need to issue a capture_raw command.&lt;br /&gt;
** For more information on raw-data, see:  http://e-mode.phas.ubc.ca/mcewiki/index.php/Raw-mode_readout&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** Differences between 4.0.c and 4.0.d&lt;br /&gt;
 U system/test/source/tb/tb_cc_rcs_bcs_ac.vhd&lt;br /&gt;
 U all_cards/dispatch/source/rtl/dispatch_wishbone.vhd&lt;br /&gt;
 U library/sys_param/source/rtl/wishbone_pack.vhd&lt;br /&gt;
 U readout_card/adc_sample_coadd/source/rtl/adc_sample_coadd.vhd&lt;br /&gt;
 U readout_card/adc_sample_coadd/source/rtl/adc_sample_coadd_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop/source/rtl/flux_loop.vhd&lt;br /&gt;
 U readout_card/flux_loop/source/rtl/flux_loop_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/rtl/flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/rtl/flux_loop_ctrl_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/tb/tb1_flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/tb/tb2_flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/fsfb_calc/source/rtl/fsfb_fltr_regs.vhd&lt;br /&gt;
 U readout_card/fsfb_corr/source/rtl/fsfb_corr.vhd&lt;br /&gt;
 U readout_card/readout_card/source/rtl/readout_card.vhd&lt;br /&gt;
 U readout_card/readout_card/source/rtl/readout_card_pack.vhd&lt;br /&gt;
 U readout_card/wbs_frame_data/source/rtl/wbs_frame_data.vhd&lt;br /&gt;
 U readout_card/wbs_frame_data/source/rtl/wbs_frame_data_pack.vhd&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are not supported.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 24,554 / 41,250 ( 60 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,262,592 / 3,423,744 ( 37 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.991 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.864 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.052 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.4.1 ==&lt;br /&gt;
* '''Filename:'''  rc_v04040001_21nov2008&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,241 / 41,250 ( 66 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 405,504 / 3,423,744 ( 12 % )                  ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.588 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.585 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.057 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.4.0 (buggy) ==&lt;br /&gt;
* '''Filename:'''  rc_v04040000_02oct2008&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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]].&lt;br /&gt;
** Re-integrated the id_thermo and fpga_thermo block in the readout_card.vhd top level that was removed in 4.0.c.&lt;br /&gt;
** 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.&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
** Adjusted the indentation in fsfb_io_controller.vhd to make the file more readable.&lt;br /&gt;
** 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.&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** The following commands lock up the Readout Card firmware:  CARD_ID_ADDR, CARD_TEMP_ADDR, FPGA_TEMP_ADDR.&lt;br /&gt;
** 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&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,099 / 41,250 ( 66 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 406,016 / 3,423,744 ( 12 % )                  ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.372 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.052 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.066 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.c ==&lt;br /&gt;
* '''Filename:'''  rc_v0400000c_15aug2008.sof&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Only has data modes 0, 1, 4, and 10.&lt;br /&gt;
** 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).&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** Changed a counter in the dispatch block to ease timing constraints in synthesis (dispatch_wishbone.vhd)&lt;br /&gt;
** 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.&lt;br /&gt;
** '''Removed''' the fpga_termo (command:  '''fpga_temp''') and id_thermo (commands: '''card_temp, card_id''') to ease timing constraints in synthesis (readout_card.vhd)&lt;br /&gt;
** Updated the tagged version of fpga_termo.vhd to include the new 'stale bit' feature&lt;br /&gt;
** Updated the tagged version of frame_timing_core.vhd to include the new 'err_o' interface&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None reported yet&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
* '''FPGA Resource Usage:'''&lt;br /&gt;
 Total logic elements : 25,058 / 41,250 ( 61 % )&lt;br /&gt;
 Total memory bits : 400,896 / 3,423,744 ( 12 % )&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.282 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.736 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.665 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.b (buggy) ==&lt;br /&gt;
Note: This revision is on a watch list, after the bug detected 15 July 2008.  See the bug section for more details.&lt;br /&gt;
* '''Filename''' : rc_v0400000b_04aug2008.sof&lt;br /&gt;
* '''Features'''&lt;br /&gt;
** data_mode 10 is added to provide more filtfb bits (compared to data mode 9) for planet observations. filtered_dat(27 downto 3) &amp;amp; flux_cnt_dat(6 downto 0)&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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]]&lt;br /&gt;
&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.a (buggy) ==&lt;br /&gt;
Note: This revision is on a watch list, after the bug detected 15 July 2008.  See the bug section for more details.&lt;br /&gt;
* '''Filename''' : rc_v0400000a_07jul2008.sof&lt;br /&gt;
* '''Bug Fix'''&lt;br /&gt;
** mce_status and adc_offset/flx_quanta commands do not fail after power up.&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** Seems to clip out channel 0 from data reporting.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.9 (buggy) ==&lt;br /&gt;
* '''Filename''' : rc_v04000009_26jun2008.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** sa_bias and offset DACs only refreshed when new values are written. (in previous versions, DACs were refreshed every frame)&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.8 ==&lt;br /&gt;
* '''Filename''' : rc_v04000008_26jun2008.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** The gaini, gainp, gaind resolution increased to 12-bit, i.e. -2048 to 2047 (formerly 10-bit).&lt;br /&gt;
&lt;br /&gt;
* '''Bug fix'''&lt;br /&gt;
** the bug associated with gainpid read before mce_reset is fixed.&lt;br /&gt;
&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.3.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04030007_26may2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** 14-bit raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** 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.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.2.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04020007_24may2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
* '''Bug fix'''&lt;br /&gt;
** the bug associated with reading from raw-buffer is fixed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.1.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04010007_25apr2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.6 (buggy) ==&lt;br /&gt;
* '''Filename''' : rc_v04000006_15feb2008.sof or .pof       &lt;br /&gt;
* '''Features''' &lt;br /&gt;
** '''bugfix''': unreliable reset due to unsafe and incomplete state machines is fixed.&lt;br /&gt;
** '''bugfix''': flux_jump sign problem fixed, so far proved in const_mode, to be tested in servo_mode with cold setup.&lt;br /&gt;
** servo_mode=2 or ramp previously only went from 0 to ramp_amp, but now goes from -8192 to -8192+ramp_amp&lt;br /&gt;
** new commands are added: ''scratch'' and ''card_type''. Scratch takes 8 values and can be used by software to detect reset.&lt;br /&gt;
** slot_id and fw_rev are now integrated as part of all_cards.vhd&lt;br /&gt;
** lvds_tx_b=0, This will allow Clock Card to use the secondary backplane lvds line and check whether RC is plugged in.&lt;br /&gt;
** filter_coeff in misc_banks_admin commented as it is not implemented and causes timing problems.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
** slot_id is only set after a resetmce is issued. (using the latest all_cards in the next revision will fix this)&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.5 ==&lt;br /&gt;
* '''Filename''' : rc_v04000005_01nov2007.sof or .pof       &lt;br /&gt;
* '''Features''' &lt;br /&gt;
** data mode 9 (mixed filt + flux jump) with windowing readjusted compared to data mode 8&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** unreliable resetmce. Sometimes, firmware waked up non-responsive on lvds lines.&lt;br /&gt;
** In data mode 5 and 9, flux-jump counter is not reported properly due to a sign error. However, flux jumping works fine.&lt;br /&gt;
&lt;br /&gt;
== Revision 3.0.19 ==&lt;br /&gt;
* '''Filename''' : rc_v03000019_16feb2007_raw.sof (no pof as one is not likely to run with this as regular firmware)&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** data mode 3 is enabled.&lt;br /&gt;
** filter is disabled as a compromise to fit the raw-mode buffer.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** unreliable resetmce. Sometimes, firmware waked up non-responsive on lvds lines.&lt;br /&gt;
&lt;br /&gt;
== Old Firmware Revisions ==&lt;br /&gt;
* '''4.0.4''':  rc_v04000004_11oct2007.sof  data mode 8 added (mixed filt + flux jump)&lt;br /&gt;
* '''4.0.3''':  rc_v04000003_19sep2007.sof  data mode 7 bit split readjusted to 10b error being bit 4 to 14&lt;br /&gt;
* '''4.0.2''':  rc_v04000002_11sep2007.sof  pid resolution increased to 10b, data mode 7 added&lt;br /&gt;
* '''4.0.1''':  rc_v04000001_06sep2007.sof  &lt;br /&gt;
* '''4.0.0''':  rc_v04000000_29aug2007.sof  supports readout_row_index * [[ bugs ]]&lt;br /&gt;
&lt;br /&gt;
= To-Do List =&lt;br /&gt;
* the starting point for the servo is currently zero and it would be nice to have it programmable.&lt;br /&gt;
&lt;br /&gt;
= RC Synthesis Notes =&lt;br /&gt;
# 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. &lt;br /&gt;
# Timing: There is no &amp;quot;lock region&amp;quot; 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.&lt;br /&gt;
# 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%.&lt;br /&gt;
# 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.&lt;br /&gt;
# 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):&lt;br /&gt;
 lpm_file =&amp;gt; &amp;quot;C:/scuba2_repository/cards/readout_card/fsfb_calc/source/rtl/ram_40x64.hex&amp;quot;, and&lt;br /&gt;
 lpm_file    : STRING;&lt;br /&gt;
#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. &lt;br /&gt;
----&lt;br /&gt;
[http://e-mode.phas.ubc.ca/mcewiki/index.php/Main_Page  MCE Main Page]&lt;/div&gt;</summary>
		<author><name>Bburger</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Readout_Card_firmware&amp;diff=4346</id>
		<title>Readout Card firmware</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Readout_Card_firmware&amp;diff=4346"/>
		<updated>2011-05-04T21:52:30Z</updated>

		<summary type="html">&lt;p&gt;Bburger: /* Revision 5.0.d */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Synthesis Reminders (for firmware developers)&lt;br /&gt;
** quartus.ini is not needed anymore (Fixed as of Q7, Altera SR10783580 2010-10-24)&lt;br /&gt;
** Remember that readout_card/fsfb_clac/source/rtl/ram_40x64.vhd must be initialized with the ram_40x64.hex file in the same directory.&lt;br /&gt;
= Revision 5.1.2 =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010002_18jan2011.sof (for Rev. E cards) &lt;br /&gt;
** rc_stratix3_v05010002_18jan2011.jic (for Rev. E cards) &lt;br /&gt;
** rc_v05010002_03feb2011.sof (for Rev. B cards) &lt;br /&gt;
** rc_v05010002_03feb2011.pof (for Rev. B cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.1 with k1 and k2 (filter params) limited to k1&amp;lt;16 and k2&amp;lt;32 in order to resolve the timing when compiling for smaller Stratix FPGA on RC Rev. B.&lt;br /&gt;
&lt;br /&gt;
* '''Bug fix:'''&lt;br /&gt;
** the 2-rows-off filtered data readout introduced with configurable filter in rev. 5.1.0 and 5.1.1 is fixed now.&lt;br /&gt;
 &lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** none so far.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt)&lt;br /&gt;
 ; Total logic elements      ; 33,285 / 41,250 ( 81 % )                       ;&lt;br /&gt;
 ; Total pins                ; 358 / 616 ( 58 % )                             ;&lt;br /&gt;
 ; Total memory bits         ; 1,405,440 / 3,423,744 ( 41 % )                 ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt)&lt;br /&gt;
 ; Fast Model Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 6.591 ns  &lt;br /&gt;
 ; Fast Model Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 7.206 ns  &lt;br /&gt;
 ; Fast Model Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 18.299 ns&lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.1 (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05010001_01dec2010.sof (for Rev. B cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.0, but k1 and k2 (filter params) are now limited to k1&amp;lt;16 and k2&amp;lt;32 in order to resolve the timing failures of compiling 5.1.0 for smaller Stratix FPGA on RC Rev. B.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** filter mode data is off by 2 rows. &lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.0 (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010000_01nov2010.sof  (for Rev. E cards)&lt;br /&gt;
** rc_v05010000_01nov2010.sof (for Rev. B cards) has timing failures '''do not use!!!'''&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** added configurable filter parameters specified by ''fltr_coeff'', default is the f&amp;lt;sub&amp;gt;cutoff&amp;lt;/sub&amp;gt;/f&amp;lt;sub&amp;gt;sampl&amp;lt;/sub&amp;gt;=122Hz/15kHz. see [[ Digital 4-pole Butterworth Low-pass filter ]]. &lt;br /&gt;
** ''fltr_type'' is set to 255 to indicate configurable filter parameters.&lt;br /&gt;
** see [http://www.phas.ubc.ca/~mce/mcedocs/software/SC2_ELE_S580_515_mce_command_description.pdf MCE command description]&lt;br /&gt;
** development notes: &lt;br /&gt;
*** It is built on Quartus10.1. &lt;br /&gt;
*** tcl files had to be updated as cmp syntax is not supported in Q10 anymore.&lt;br /&gt;
*** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** rc_v05010000_01nov2010.sof has timing failures that were overlooked, do not use this firmware for Rev.B cards. &lt;br /&gt;
** '''filter mode data is off by 2 rows.''' &lt;br /&gt;
&lt;br /&gt;
* '''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&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.f  =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000f_22oct2010.sof (for Rev. B cards)&lt;br /&gt;
** rc_stratix3_v0500000f_22oct2010.sof  (for Rev. E cards)&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
**  Bugfix: integral clamp should work now. only positive integral_clamp values are valid!&lt;br /&gt;
&lt;br /&gt;
* '''Details:''': &lt;br /&gt;
** 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.&lt;br /&gt;
** available for both Rev. E and Rev. B cards, the upper byte of card_type parameter now reports the pcb revision.&lt;br /&gt;
** development note: It is built on Quartus10.1. &lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
**none yet!&lt;br /&gt;
&lt;br /&gt;
* '''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&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.e (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000e_06oct2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''  &lt;br /&gt;
** 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!&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.d (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000d_04aug2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
**  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.&lt;br /&gt;
&lt;br /&gt;
* '''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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** '''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 [[http://e-mode.phas.ubc.ca/mcewiki/index.php/Image:Clamp_unstable.png scope snapshot]] used slow_fb_ramp.py script for testing.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage and Timing Report''' (readout_card.fit.rpt and readout_card.tan.rpt): no change compared to 5.0.a/b/c&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.c (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000c_16jun2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.b&lt;br /&gt;
** Re-introduced flux-jump counter clamping to maintain continuity in behavior from past versions of firmware in the field.&lt;br /&gt;
** '''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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** '''flux-jump is broken'''. flux-jumping block misbehaves at the first jump in the negative range.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt): [[rc_5.0.c_fit_rpt]]&lt;br /&gt;
 ; Total logic elements     ; 26,800 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total pins               ; 358 / 616 ( 58 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 76 / 112 ( 68 % )                             ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): [[rc_5.0.c_tan_rpt]]&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.964 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.382 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 15.924 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.b (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000b_03jun2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.a&lt;br /&gt;
** 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.&lt;br /&gt;
** 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&lt;br /&gt;
** A sticky bit that only affected servo_mode=0,1,2 was also removed from the flux-jumping block.&lt;br /&gt;
** flx_lp_init commands now also clear the flux-jumping block as well.&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** flux-jump does not work when jumping to negative values.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt): [[rc_5.0.b_fit_rpt]]&lt;br /&gt;
 ; Total logic elements     ; 26,745 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total pins               ; 358 / 616 ( 58 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 76 / 112 ( 68 % )                             ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): [[rc_5.0.b_tan_rpt]]&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.459 ns  &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.895 ns  &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 15.956 ns&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.a =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000a_12mar2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on the merger of rev. 5.0.8 and 5.0.9.&lt;br /&gt;
** '''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.&lt;br /&gt;
** The low pass filter has 20-bit input and f_3dB/f_samp = 122Hz/15kHz .&lt;br /&gt;
** The flux-jump clamping that was removed in 5.0.9 is included once again here, as we decided this is safer for now.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** &amp;quot;lock_dat_left&amp;quot; parameter that was removed in 5.0.9 is now implemented as &amp;quot;lock_dat_lsb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** flx_lp_init does not reinitialize the flux-jump block&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
** tag name: rc_v0500000a_12mar2009! years were mixed up!&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.9 (buggy) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000009_13nov2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** Removes a sticky bit in pid calculation result storage -- in fsfb_processor.&lt;br /&gt;
** Adds a command to clamp the growth of the I-term to prevent wrapping and track down the source of Caltech's FSFB jumps.&lt;br /&gt;
** Removed the unused lock_dat_left parameter.  The ability to shift left was moved to the fsfb_corr block some time ago.&lt;br /&gt;
** Fixed a sign extension bug acting on the flux quanta, which limited the value to 8191.  Changed the extension from signed to unsigned.&lt;br /&gt;
** Removed ineffective clamping in the flux-jump calculation block.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** integral_clamp read/write command does not work. &lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,960 / 41,250 ( 68 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.825 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.878 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 14.397 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.8 (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000008_09oct2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** type 1 low-pass filter: f&amp;lt;sub&amp;gt;3dB&amp;lt;/sub&amp;gt;=122Hz for f&amp;lt;sub&amp;gt;sample&amp;lt;/sub&amp;gt;=15kHz&lt;br /&gt;
** Filter-input-width changed from 18b to 20b with no sticky bits!&lt;br /&gt;
** removed sticky bits in internal arithmetic of the filter.&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.7 (type-2 filter) =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000007_09oct2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** type-2 low-pass-filter: f&amp;lt;sub&amp;gt;3dB&amp;lt;/sub&amp;gt;=75Hz for f&amp;lt;sub&amp;gt;sample&amp;lt;/sub&amp;gt;=30000.&lt;br /&gt;
** Filter-input-width changed from 18b to 20b with no sticky bits!&lt;br /&gt;
** inter-biquad-gain-scaling for the filter is 2^14&lt;br /&gt;
** filter results are scaled down by 2^3 in the output of the filter.&lt;br /&gt;
** removed sticky bits in internal arithmetics&lt;br /&gt;
** _correction_ disabled in fsfb_proc_pidz&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** quartus.ini file was '''not''' present in synth directory.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** none to report&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
== Revision 5.0.6  (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05000006_15sep2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Only Valid for Rev. C/D Cards&lt;br /&gt;
** Based on rev. 5.0.3&lt;br /&gt;
** tcl file updated for Rev. D and aligned with top-level and qsf (project file). &lt;br /&gt;
** flux loop commented, just to try sampling the ADC. &lt;br /&gt;
** compiled with Q9.1&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.5 (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000005_04sep2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** changed the low-pass-filter to f(3db)=75Hz for f(sample)=30000.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** quartus.ini file was '''not''' present in synth directory.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** negative inputs to the filter cause filter to have a non-flat pass-band region. may have to do with sign-handling...&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.4 =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000004_28aug2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** BUG Fix: handles 14-bit flux quanta (changed the multiplier to unsigned)&lt;br /&gt;
** BUG Fix: changed standard logic vector extension from signed to unsigned in flux-jumping slave.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,170 / 41,250 ( 63 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.541 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.612 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 15.398 ns ;&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.3  =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05000003_21aug2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** ONLY valid REV C/D RC Cards&lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** flux loop commented, just to try sampling the ADC.&lt;br /&gt;
** updated tcl file, but still need to rely on project file as well as qsf file.&lt;br /&gt;
** changed default level of adc_sclk to '1'&lt;br /&gt;
** dac_clr_n was changed from an output to an input.&lt;br /&gt;
** added 'locked' interface to rc_pll_stratix_iii&lt;br /&gt;
** renamed the adc_pll clock signals to more explanitory names&lt;br /&gt;
** added the FPGA_DEVICE_FAMILY generic to the dispatch interace for synthesis of the dc_fifo in lvds_rx&lt;br /&gt;
** uncommented DDR interface to force the syntesizer to use correct left and right PLLs (in conjunction with ADC and DDR PLLs)&lt;br /&gt;
** added test signals to test_status to see clocks on the scope.&lt;br /&gt;
== Revision 5.0.2 (buggy) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000002_test00_tagged.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.1&lt;br /&gt;
** Fixed a bug in wbs_frame_data that stored data incorrectly if reporting 1 or 2 pixels only.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,186 / 41,250 ( 63 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.755 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.979 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.067 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.1 (buggy) (Filter + Raw + Rectangle, 2 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000001_26may2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Combines features in rev. 5.0.0 (2 LVDS Lines) and rev. 4.0.e (Filtered + Raw), with the NEW rectangle mode.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** [[CVS Diff Between sys_v05000000 and rc_v05000001]]&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** Has a bug in wbs_frame_data that stored data incorrectly if reporting 1 or 2 pixels only.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,565 / 41,250 ( 64 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.656 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.861 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 14.167 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.0 (Filter Only, 2 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000000_22dec2008.sof (tagged as sys_v05000000_22dec2008)&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware v05000000+ of all other cards!!!&lt;br /&gt;
** Adds the ability to read out one column of data continuously from readout cards&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** [[CVS Diff Between rc_v0400000c and sys_v05000000]]&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,607 / 41,250 ( 65 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 406,016 / 3,423,744 ( 12 % )             ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.558 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.892 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.987 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.f (Filter + Raw, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0400000f_12feb2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on 4.0.e and in parallel with 5.0.9 (equivalent version, clamping is not included)&lt;br /&gt;
** Incorporates fixes that were done to flux-jumping between 5.0.2 - 5.0.4 - 5.0.9.  Namely:&lt;br /&gt;
*** Changes a multiplier from signed to unsigned (in fsfb_corr_multplier.vhd).&lt;br /&gt;
*** Changes sign extension from signed to unsigned (in flux_quanta_ram_admin.vhd).&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None reported yet.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,773 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,321,984 / 3,423,744 ( 39 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.539 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.118 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.318 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.e (Filter + Raw, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0400000e_27apr2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on 4.0.d&lt;br /&gt;
** Combines both raw- and filtered-data modes.&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are disabled.&lt;br /&gt;
** Tested by Matt Hasselfield.  &lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are disabled.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,048 / 41,250 ( 66 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,321,984 / 3,423,744 ( 39 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.675 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.907 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.728 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.d (Raw Only, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  rc_v0400000d_20090417.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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.&lt;br /&gt;
** The firmware takes a new command called readout_col_index which specifies which column to capture raw data from.&lt;br /&gt;
** Other than readout_col_index, the firmware functions the same as previous raw-data firmware, including then need to issue a capture_raw command.&lt;br /&gt;
** For more information on raw-data, see:  http://e-mode.phas.ubc.ca/mcewiki/index.php/Raw-mode_readout&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** Differences between 4.0.c and 4.0.d&lt;br /&gt;
 U system/test/source/tb/tb_cc_rcs_bcs_ac.vhd&lt;br /&gt;
 U all_cards/dispatch/source/rtl/dispatch_wishbone.vhd&lt;br /&gt;
 U library/sys_param/source/rtl/wishbone_pack.vhd&lt;br /&gt;
 U readout_card/adc_sample_coadd/source/rtl/adc_sample_coadd.vhd&lt;br /&gt;
 U readout_card/adc_sample_coadd/source/rtl/adc_sample_coadd_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop/source/rtl/flux_loop.vhd&lt;br /&gt;
 U readout_card/flux_loop/source/rtl/flux_loop_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/rtl/flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/rtl/flux_loop_ctrl_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/tb/tb1_flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/tb/tb2_flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/fsfb_calc/source/rtl/fsfb_fltr_regs.vhd&lt;br /&gt;
 U readout_card/fsfb_corr/source/rtl/fsfb_corr.vhd&lt;br /&gt;
 U readout_card/readout_card/source/rtl/readout_card.vhd&lt;br /&gt;
 U readout_card/readout_card/source/rtl/readout_card_pack.vhd&lt;br /&gt;
 U readout_card/wbs_frame_data/source/rtl/wbs_frame_data.vhd&lt;br /&gt;
 U readout_card/wbs_frame_data/source/rtl/wbs_frame_data_pack.vhd&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are not supported.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 24,554 / 41,250 ( 60 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,262,592 / 3,423,744 ( 37 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.991 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.864 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.052 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.4.1 ==&lt;br /&gt;
* '''Filename:'''  rc_v04040001_21nov2008&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,241 / 41,250 ( 66 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 405,504 / 3,423,744 ( 12 % )                  ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.588 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.585 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.057 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.4.0 (buggy) ==&lt;br /&gt;
* '''Filename:'''  rc_v04040000_02oct2008&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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]].&lt;br /&gt;
** Re-integrated the id_thermo and fpga_thermo block in the readout_card.vhd top level that was removed in 4.0.c.&lt;br /&gt;
** 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.&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
** Adjusted the indentation in fsfb_io_controller.vhd to make the file more readable.&lt;br /&gt;
** 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.&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** The following commands lock up the Readout Card firmware:  CARD_ID_ADDR, CARD_TEMP_ADDR, FPGA_TEMP_ADDR.&lt;br /&gt;
** 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&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,099 / 41,250 ( 66 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 406,016 / 3,423,744 ( 12 % )                  ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.372 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.052 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.066 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.c ==&lt;br /&gt;
* '''Filename:'''  rc_v0400000c_15aug2008.sof&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Only has data modes 0, 1, 4, and 10.&lt;br /&gt;
** 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).&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** Changed a counter in the dispatch block to ease timing constraints in synthesis (dispatch_wishbone.vhd)&lt;br /&gt;
** 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.&lt;br /&gt;
** '''Removed''' the fpga_termo (command:  '''fpga_temp''') and id_thermo (commands: '''card_temp, card_id''') to ease timing constraints in synthesis (readout_card.vhd)&lt;br /&gt;
** Updated the tagged version of fpga_termo.vhd to include the new 'stale bit' feature&lt;br /&gt;
** Updated the tagged version of frame_timing_core.vhd to include the new 'err_o' interface&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None reported yet&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
* '''FPGA Resource Usage:'''&lt;br /&gt;
 Total logic elements : 25,058 / 41,250 ( 61 % )&lt;br /&gt;
 Total memory bits : 400,896 / 3,423,744 ( 12 % )&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.282 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.736 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.665 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.b (buggy) ==&lt;br /&gt;
Note: This revision is on a watch list, after the bug detected 15 July 2008.  See the bug section for more details.&lt;br /&gt;
* '''Filename''' : rc_v0400000b_04aug2008.sof&lt;br /&gt;
* '''Features'''&lt;br /&gt;
** data_mode 10 is added to provide more filtfb bits (compared to data mode 9) for planet observations. filtered_dat(27 downto 3) &amp;amp; flux_cnt_dat(6 downto 0)&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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]]&lt;br /&gt;
&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.a (buggy) ==&lt;br /&gt;
Note: This revision is on a watch list, after the bug detected 15 July 2008.  See the bug section for more details.&lt;br /&gt;
* '''Filename''' : rc_v0400000a_07jul2008.sof&lt;br /&gt;
* '''Bug Fix'''&lt;br /&gt;
** mce_status and adc_offset/flx_quanta commands do not fail after power up.&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** Seems to clip out channel 0 from data reporting.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.9 (buggy) ==&lt;br /&gt;
* '''Filename''' : rc_v04000009_26jun2008.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** sa_bias and offset DACs only refreshed when new values are written. (in previous versions, DACs were refreshed every frame)&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.8 ==&lt;br /&gt;
* '''Filename''' : rc_v04000008_26jun2008.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** The gaini, gainp, gaind resolution increased to 12-bit, i.e. -2048 to 2047 (formerly 10-bit).&lt;br /&gt;
&lt;br /&gt;
* '''Bug fix'''&lt;br /&gt;
** the bug associated with gainpid read before mce_reset is fixed.&lt;br /&gt;
&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.3.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04030007_26may2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** 14-bit raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** 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.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.2.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04020007_24may2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
* '''Bug fix'''&lt;br /&gt;
** the bug associated with reading from raw-buffer is fixed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.1.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04010007_25apr2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.6 (buggy) ==&lt;br /&gt;
* '''Filename''' : rc_v04000006_15feb2008.sof or .pof       &lt;br /&gt;
* '''Features''' &lt;br /&gt;
** '''bugfix''': unreliable reset due to unsafe and incomplete state machines is fixed.&lt;br /&gt;
** '''bugfix''': flux_jump sign problem fixed, so far proved in const_mode, to be tested in servo_mode with cold setup.&lt;br /&gt;
** servo_mode=2 or ramp previously only went from 0 to ramp_amp, but now goes from -8192 to -8192+ramp_amp&lt;br /&gt;
** new commands are added: ''scratch'' and ''card_type''. Scratch takes 8 values and can be used by software to detect reset.&lt;br /&gt;
** slot_id and fw_rev are now integrated as part of all_cards.vhd&lt;br /&gt;
** lvds_tx_b=0, This will allow Clock Card to use the secondary backplane lvds line and check whether RC is plugged in.&lt;br /&gt;
** filter_coeff in misc_banks_admin commented as it is not implemented and causes timing problems.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
** slot_id is only set after a resetmce is issued. (using the latest all_cards in the next revision will fix this)&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.5 ==&lt;br /&gt;
* '''Filename''' : rc_v04000005_01nov2007.sof or .pof       &lt;br /&gt;
* '''Features''' &lt;br /&gt;
** data mode 9 (mixed filt + flux jump) with windowing readjusted compared to data mode 8&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** unreliable resetmce. Sometimes, firmware waked up non-responsive on lvds lines.&lt;br /&gt;
** In data mode 5 and 9, flux-jump counter is not reported properly due to a sign error. However, flux jumping works fine.&lt;br /&gt;
&lt;br /&gt;
== Revision 3.0.19 ==&lt;br /&gt;
* '''Filename''' : rc_v03000019_16feb2007_raw.sof (no pof as one is not likely to run with this as regular firmware)&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** data mode 3 is enabled.&lt;br /&gt;
** filter is disabled as a compromise to fit the raw-mode buffer.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** unreliable resetmce. Sometimes, firmware waked up non-responsive on lvds lines.&lt;br /&gt;
&lt;br /&gt;
== Old Firmware Revisions ==&lt;br /&gt;
* '''4.0.4''':  rc_v04000004_11oct2007.sof  data mode 8 added (mixed filt + flux jump)&lt;br /&gt;
* '''4.0.3''':  rc_v04000003_19sep2007.sof  data mode 7 bit split readjusted to 10b error being bit 4 to 14&lt;br /&gt;
* '''4.0.2''':  rc_v04000002_11sep2007.sof  pid resolution increased to 10b, data mode 7 added&lt;br /&gt;
* '''4.0.1''':  rc_v04000001_06sep2007.sof  &lt;br /&gt;
* '''4.0.0''':  rc_v04000000_29aug2007.sof  supports readout_row_index * [[ bugs ]]&lt;br /&gt;
&lt;br /&gt;
= To-Do List =&lt;br /&gt;
* the starting point for the servo is currently zero and it would be nice to have it programmable.&lt;br /&gt;
&lt;br /&gt;
= RC Synthesis Notes =&lt;br /&gt;
# 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. &lt;br /&gt;
# Timing: There is no &amp;quot;lock region&amp;quot; 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.&lt;br /&gt;
# 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%.&lt;br /&gt;
# 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.&lt;br /&gt;
# 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):&lt;br /&gt;
 lpm_file =&amp;gt; &amp;quot;C:/scuba2_repository/cards/readout_card/fsfb_calc/source/rtl/ram_40x64.hex&amp;quot;, and&lt;br /&gt;
 lpm_file    : STRING;&lt;br /&gt;
#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. &lt;br /&gt;
----&lt;br /&gt;
[http://e-mode.phas.ubc.ca/mcewiki/index.php/Main_Page  MCE Main Page]&lt;/div&gt;</summary>
		<author><name>Bburger</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Readout_Card_firmware&amp;diff=4345</id>
		<title>Readout Card firmware</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Readout_Card_firmware&amp;diff=4345"/>
		<updated>2011-05-04T21:52:02Z</updated>

		<summary type="html">&lt;p&gt;Bburger: /* Revision 5.0.d */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Synthesis Reminders (for firmware developers)&lt;br /&gt;
** quartus.ini is not needed anymore (Fixed as of Q7, Altera SR10783580 2010-10-24)&lt;br /&gt;
** Remember that readout_card/fsfb_clac/source/rtl/ram_40x64.vhd must be initialized with the ram_40x64.hex file in the same directory.&lt;br /&gt;
= Revision 5.1.2 =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010002_18jan2011.sof (for Rev. E cards) &lt;br /&gt;
** rc_stratix3_v05010002_18jan2011.jic (for Rev. E cards) &lt;br /&gt;
** rc_v05010002_03feb2011.sof (for Rev. B cards) &lt;br /&gt;
** rc_v05010002_03feb2011.pof (for Rev. B cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.1 with k1 and k2 (filter params) limited to k1&amp;lt;16 and k2&amp;lt;32 in order to resolve the timing when compiling for smaller Stratix FPGA on RC Rev. B.&lt;br /&gt;
&lt;br /&gt;
* '''Bug fix:'''&lt;br /&gt;
** the 2-rows-off filtered data readout introduced with configurable filter in rev. 5.1.0 and 5.1.1 is fixed now.&lt;br /&gt;
 &lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** none so far.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt)&lt;br /&gt;
 ; Total logic elements      ; 33,285 / 41,250 ( 81 % )                       ;&lt;br /&gt;
 ; Total pins                ; 358 / 616 ( 58 % )                             ;&lt;br /&gt;
 ; Total memory bits         ; 1,405,440 / 3,423,744 ( 41 % )                 ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt)&lt;br /&gt;
 ; Fast Model Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 6.591 ns  &lt;br /&gt;
 ; Fast Model Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 7.206 ns  &lt;br /&gt;
 ; Fast Model Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 18.299 ns&lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.1 (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05010001_01dec2010.sof (for Rev. B cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.0, but k1 and k2 (filter params) are now limited to k1&amp;lt;16 and k2&amp;lt;32 in order to resolve the timing failures of compiling 5.1.0 for smaller Stratix FPGA on RC Rev. B.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** filter mode data is off by 2 rows. &lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.0 (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010000_01nov2010.sof  (for Rev. E cards)&lt;br /&gt;
** rc_v05010000_01nov2010.sof (for Rev. B cards) has timing failures '''do not use!!!'''&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** added configurable filter parameters specified by ''fltr_coeff'', default is the f&amp;lt;sub&amp;gt;cutoff&amp;lt;/sub&amp;gt;/f&amp;lt;sub&amp;gt;sampl&amp;lt;/sub&amp;gt;=122Hz/15kHz. see [[ Digital 4-pole Butterworth Low-pass filter ]]. &lt;br /&gt;
** ''fltr_type'' is set to 255 to indicate configurable filter parameters.&lt;br /&gt;
** see [http://www.phas.ubc.ca/~mce/mcedocs/software/SC2_ELE_S580_515_mce_command_description.pdf MCE command description]&lt;br /&gt;
** development notes: &lt;br /&gt;
*** It is built on Quartus10.1. &lt;br /&gt;
*** tcl files had to be updated as cmp syntax is not supported in Q10 anymore.&lt;br /&gt;
*** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** rc_v05010000_01nov2010.sof has timing failures that were overlooked, do not use this firmware for Rev.B cards. &lt;br /&gt;
** '''filter mode data is off by 2 rows.''' &lt;br /&gt;
&lt;br /&gt;
* '''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&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.f  =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000f_22oct2010.sof (for Rev. B cards)&lt;br /&gt;
** rc_stratix3_v0500000f_22oct2010.sof  (for Rev. E cards)&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
**  Bugfix: integral clamp should work now. only positive integral_clamp values are valid!&lt;br /&gt;
&lt;br /&gt;
* '''Details:''': &lt;br /&gt;
** 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.&lt;br /&gt;
** available for both Rev. E and Rev. B cards, the upper byte of card_type parameter now reports the pcb revision.&lt;br /&gt;
** development note: It is built on Quartus10.1. &lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
**none yet!&lt;br /&gt;
&lt;br /&gt;
* '''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&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.e (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000e_06oct2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''  &lt;br /&gt;
** 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!&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.d ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000d_04aug2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
**  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.&lt;br /&gt;
&lt;br /&gt;
* '''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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** '''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 [[http://e-mode.phas.ubc.ca/mcewiki/index.php/Image:Clamp_unstable.png scope snapshot]] used slow_fb_ramp.py script for testing.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage and Timing Report''' (readout_card.fit.rpt and readout_card.tan.rpt): no change compared to 5.0.a/b/c&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.c (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000c_16jun2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.b&lt;br /&gt;
** Re-introduced flux-jump counter clamping to maintain continuity in behavior from past versions of firmware in the field.&lt;br /&gt;
** '''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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** '''flux-jump is broken'''. flux-jumping block misbehaves at the first jump in the negative range.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt): [[rc_5.0.c_fit_rpt]]&lt;br /&gt;
 ; Total logic elements     ; 26,800 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total pins               ; 358 / 616 ( 58 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 76 / 112 ( 68 % )                             ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): [[rc_5.0.c_tan_rpt]]&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.964 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.382 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 15.924 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.b (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000b_03jun2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.a&lt;br /&gt;
** 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.&lt;br /&gt;
** 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&lt;br /&gt;
** A sticky bit that only affected servo_mode=0,1,2 was also removed from the flux-jumping block.&lt;br /&gt;
** flx_lp_init commands now also clear the flux-jumping block as well.&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** flux-jump does not work when jumping to negative values.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt): [[rc_5.0.b_fit_rpt]]&lt;br /&gt;
 ; Total logic elements     ; 26,745 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total pins               ; 358 / 616 ( 58 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 76 / 112 ( 68 % )                             ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): [[rc_5.0.b_tan_rpt]]&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.459 ns  &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.895 ns  &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 15.956 ns&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.a =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000a_12mar2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on the merger of rev. 5.0.8 and 5.0.9.&lt;br /&gt;
** '''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.&lt;br /&gt;
** The low pass filter has 20-bit input and f_3dB/f_samp = 122Hz/15kHz .&lt;br /&gt;
** The flux-jump clamping that was removed in 5.0.9 is included once again here, as we decided this is safer for now.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** &amp;quot;lock_dat_left&amp;quot; parameter that was removed in 5.0.9 is now implemented as &amp;quot;lock_dat_lsb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** flx_lp_init does not reinitialize the flux-jump block&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
** tag name: rc_v0500000a_12mar2009! years were mixed up!&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.9 (buggy) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000009_13nov2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** Removes a sticky bit in pid calculation result storage -- in fsfb_processor.&lt;br /&gt;
** Adds a command to clamp the growth of the I-term to prevent wrapping and track down the source of Caltech's FSFB jumps.&lt;br /&gt;
** Removed the unused lock_dat_left parameter.  The ability to shift left was moved to the fsfb_corr block some time ago.&lt;br /&gt;
** Fixed a sign extension bug acting on the flux quanta, which limited the value to 8191.  Changed the extension from signed to unsigned.&lt;br /&gt;
** Removed ineffective clamping in the flux-jump calculation block.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** integral_clamp read/write command does not work. &lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,960 / 41,250 ( 68 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.825 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.878 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 14.397 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.8 (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000008_09oct2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** type 1 low-pass filter: f&amp;lt;sub&amp;gt;3dB&amp;lt;/sub&amp;gt;=122Hz for f&amp;lt;sub&amp;gt;sample&amp;lt;/sub&amp;gt;=15kHz&lt;br /&gt;
** Filter-input-width changed from 18b to 20b with no sticky bits!&lt;br /&gt;
** removed sticky bits in internal arithmetic of the filter.&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.7 (type-2 filter) =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000007_09oct2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** type-2 low-pass-filter: f&amp;lt;sub&amp;gt;3dB&amp;lt;/sub&amp;gt;=75Hz for f&amp;lt;sub&amp;gt;sample&amp;lt;/sub&amp;gt;=30000.&lt;br /&gt;
** Filter-input-width changed from 18b to 20b with no sticky bits!&lt;br /&gt;
** inter-biquad-gain-scaling for the filter is 2^14&lt;br /&gt;
** filter results are scaled down by 2^3 in the output of the filter.&lt;br /&gt;
** removed sticky bits in internal arithmetics&lt;br /&gt;
** _correction_ disabled in fsfb_proc_pidz&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** quartus.ini file was '''not''' present in synth directory.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** none to report&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
== Revision 5.0.6  (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05000006_15sep2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Only Valid for Rev. C/D Cards&lt;br /&gt;
** Based on rev. 5.0.3&lt;br /&gt;
** tcl file updated for Rev. D and aligned with top-level and qsf (project file). &lt;br /&gt;
** flux loop commented, just to try sampling the ADC. &lt;br /&gt;
** compiled with Q9.1&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.5 (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000005_04sep2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** changed the low-pass-filter to f(3db)=75Hz for f(sample)=30000.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** quartus.ini file was '''not''' present in synth directory.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** negative inputs to the filter cause filter to have a non-flat pass-band region. may have to do with sign-handling...&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.4 =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000004_28aug2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** BUG Fix: handles 14-bit flux quanta (changed the multiplier to unsigned)&lt;br /&gt;
** BUG Fix: changed standard logic vector extension from signed to unsigned in flux-jumping slave.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,170 / 41,250 ( 63 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.541 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.612 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 15.398 ns ;&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.3  =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05000003_21aug2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** ONLY valid REV C/D RC Cards&lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** flux loop commented, just to try sampling the ADC.&lt;br /&gt;
** updated tcl file, but still need to rely on project file as well as qsf file.&lt;br /&gt;
** changed default level of adc_sclk to '1'&lt;br /&gt;
** dac_clr_n was changed from an output to an input.&lt;br /&gt;
** added 'locked' interface to rc_pll_stratix_iii&lt;br /&gt;
** renamed the adc_pll clock signals to more explanitory names&lt;br /&gt;
** added the FPGA_DEVICE_FAMILY generic to the dispatch interace for synthesis of the dc_fifo in lvds_rx&lt;br /&gt;
** uncommented DDR interface to force the syntesizer to use correct left and right PLLs (in conjunction with ADC and DDR PLLs)&lt;br /&gt;
** added test signals to test_status to see clocks on the scope.&lt;br /&gt;
== Revision 5.0.2 (buggy) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000002_test00_tagged.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.1&lt;br /&gt;
** Fixed a bug in wbs_frame_data that stored data incorrectly if reporting 1 or 2 pixels only.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,186 / 41,250 ( 63 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.755 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.979 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.067 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.1 (buggy) (Filter + Raw + Rectangle, 2 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000001_26may2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Combines features in rev. 5.0.0 (2 LVDS Lines) and rev. 4.0.e (Filtered + Raw), with the NEW rectangle mode.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** [[CVS Diff Between sys_v05000000 and rc_v05000001]]&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** Has a bug in wbs_frame_data that stored data incorrectly if reporting 1 or 2 pixels only.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,565 / 41,250 ( 64 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.656 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.861 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 14.167 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.0 (Filter Only, 2 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000000_22dec2008.sof (tagged as sys_v05000000_22dec2008)&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware v05000000+ of all other cards!!!&lt;br /&gt;
** Adds the ability to read out one column of data continuously from readout cards&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** [[CVS Diff Between rc_v0400000c and sys_v05000000]]&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,607 / 41,250 ( 65 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 406,016 / 3,423,744 ( 12 % )             ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.558 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.892 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.987 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.f (Filter + Raw, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0400000f_12feb2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on 4.0.e and in parallel with 5.0.9 (equivalent version, clamping is not included)&lt;br /&gt;
** Incorporates fixes that were done to flux-jumping between 5.0.2 - 5.0.4 - 5.0.9.  Namely:&lt;br /&gt;
*** Changes a multiplier from signed to unsigned (in fsfb_corr_multplier.vhd).&lt;br /&gt;
*** Changes sign extension from signed to unsigned (in flux_quanta_ram_admin.vhd).&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None reported yet.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,773 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,321,984 / 3,423,744 ( 39 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.539 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.118 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.318 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.e (Filter + Raw, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0400000e_27apr2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on 4.0.d&lt;br /&gt;
** Combines both raw- and filtered-data modes.&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are disabled.&lt;br /&gt;
** Tested by Matt Hasselfield.  &lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are disabled.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,048 / 41,250 ( 66 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,321,984 / 3,423,744 ( 39 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.675 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.907 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.728 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.d (Raw Only, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  rc_v0400000d_20090417.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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.&lt;br /&gt;
** The firmware takes a new command called readout_col_index which specifies which column to capture raw data from.&lt;br /&gt;
** Other than readout_col_index, the firmware functions the same as previous raw-data firmware, including then need to issue a capture_raw command.&lt;br /&gt;
** For more information on raw-data, see:  http://e-mode.phas.ubc.ca/mcewiki/index.php/Raw-mode_readout&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** Differences between 4.0.c and 4.0.d&lt;br /&gt;
 U system/test/source/tb/tb_cc_rcs_bcs_ac.vhd&lt;br /&gt;
 U all_cards/dispatch/source/rtl/dispatch_wishbone.vhd&lt;br /&gt;
 U library/sys_param/source/rtl/wishbone_pack.vhd&lt;br /&gt;
 U readout_card/adc_sample_coadd/source/rtl/adc_sample_coadd.vhd&lt;br /&gt;
 U readout_card/adc_sample_coadd/source/rtl/adc_sample_coadd_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop/source/rtl/flux_loop.vhd&lt;br /&gt;
 U readout_card/flux_loop/source/rtl/flux_loop_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/rtl/flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/rtl/flux_loop_ctrl_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/tb/tb1_flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/tb/tb2_flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/fsfb_calc/source/rtl/fsfb_fltr_regs.vhd&lt;br /&gt;
 U readout_card/fsfb_corr/source/rtl/fsfb_corr.vhd&lt;br /&gt;
 U readout_card/readout_card/source/rtl/readout_card.vhd&lt;br /&gt;
 U readout_card/readout_card/source/rtl/readout_card_pack.vhd&lt;br /&gt;
 U readout_card/wbs_frame_data/source/rtl/wbs_frame_data.vhd&lt;br /&gt;
 U readout_card/wbs_frame_data/source/rtl/wbs_frame_data_pack.vhd&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are not supported.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 24,554 / 41,250 ( 60 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,262,592 / 3,423,744 ( 37 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.991 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.864 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.052 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.4.1 ==&lt;br /&gt;
* '''Filename:'''  rc_v04040001_21nov2008&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,241 / 41,250 ( 66 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 405,504 / 3,423,744 ( 12 % )                  ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.588 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.585 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.057 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.4.0 (buggy) ==&lt;br /&gt;
* '''Filename:'''  rc_v04040000_02oct2008&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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]].&lt;br /&gt;
** Re-integrated the id_thermo and fpga_thermo block in the readout_card.vhd top level that was removed in 4.0.c.&lt;br /&gt;
** 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.&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
** Adjusted the indentation in fsfb_io_controller.vhd to make the file more readable.&lt;br /&gt;
** 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.&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** The following commands lock up the Readout Card firmware:  CARD_ID_ADDR, CARD_TEMP_ADDR, FPGA_TEMP_ADDR.&lt;br /&gt;
** 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&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,099 / 41,250 ( 66 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 406,016 / 3,423,744 ( 12 % )                  ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.372 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.052 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.066 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.c ==&lt;br /&gt;
* '''Filename:'''  rc_v0400000c_15aug2008.sof&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Only has data modes 0, 1, 4, and 10.&lt;br /&gt;
** 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).&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** Changed a counter in the dispatch block to ease timing constraints in synthesis (dispatch_wishbone.vhd)&lt;br /&gt;
** 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.&lt;br /&gt;
** '''Removed''' the fpga_termo (command:  '''fpga_temp''') and id_thermo (commands: '''card_temp, card_id''') to ease timing constraints in synthesis (readout_card.vhd)&lt;br /&gt;
** Updated the tagged version of fpga_termo.vhd to include the new 'stale bit' feature&lt;br /&gt;
** Updated the tagged version of frame_timing_core.vhd to include the new 'err_o' interface&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None reported yet&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
* '''FPGA Resource Usage:'''&lt;br /&gt;
 Total logic elements : 25,058 / 41,250 ( 61 % )&lt;br /&gt;
 Total memory bits : 400,896 / 3,423,744 ( 12 % )&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.282 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.736 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.665 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.b (buggy) ==&lt;br /&gt;
Note: This revision is on a watch list, after the bug detected 15 July 2008.  See the bug section for more details.&lt;br /&gt;
* '''Filename''' : rc_v0400000b_04aug2008.sof&lt;br /&gt;
* '''Features'''&lt;br /&gt;
** data_mode 10 is added to provide more filtfb bits (compared to data mode 9) for planet observations. filtered_dat(27 downto 3) &amp;amp; flux_cnt_dat(6 downto 0)&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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]]&lt;br /&gt;
&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.a (buggy) ==&lt;br /&gt;
Note: This revision is on a watch list, after the bug detected 15 July 2008.  See the bug section for more details.&lt;br /&gt;
* '''Filename''' : rc_v0400000a_07jul2008.sof&lt;br /&gt;
* '''Bug Fix'''&lt;br /&gt;
** mce_status and adc_offset/flx_quanta commands do not fail after power up.&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** Seems to clip out channel 0 from data reporting.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.9 (buggy) ==&lt;br /&gt;
* '''Filename''' : rc_v04000009_26jun2008.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** sa_bias and offset DACs only refreshed when new values are written. (in previous versions, DACs were refreshed every frame)&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.8 ==&lt;br /&gt;
* '''Filename''' : rc_v04000008_26jun2008.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** The gaini, gainp, gaind resolution increased to 12-bit, i.e. -2048 to 2047 (formerly 10-bit).&lt;br /&gt;
&lt;br /&gt;
* '''Bug fix'''&lt;br /&gt;
** the bug associated with gainpid read before mce_reset is fixed.&lt;br /&gt;
&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.3.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04030007_26may2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** 14-bit raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** 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.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.2.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04020007_24may2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
* '''Bug fix'''&lt;br /&gt;
** the bug associated with reading from raw-buffer is fixed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.1.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04010007_25apr2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.6 (buggy) ==&lt;br /&gt;
* '''Filename''' : rc_v04000006_15feb2008.sof or .pof       &lt;br /&gt;
* '''Features''' &lt;br /&gt;
** '''bugfix''': unreliable reset due to unsafe and incomplete state machines is fixed.&lt;br /&gt;
** '''bugfix''': flux_jump sign problem fixed, so far proved in const_mode, to be tested in servo_mode with cold setup.&lt;br /&gt;
** servo_mode=2 or ramp previously only went from 0 to ramp_amp, but now goes from -8192 to -8192+ramp_amp&lt;br /&gt;
** new commands are added: ''scratch'' and ''card_type''. Scratch takes 8 values and can be used by software to detect reset.&lt;br /&gt;
** slot_id and fw_rev are now integrated as part of all_cards.vhd&lt;br /&gt;
** lvds_tx_b=0, This will allow Clock Card to use the secondary backplane lvds line and check whether RC is plugged in.&lt;br /&gt;
** filter_coeff in misc_banks_admin commented as it is not implemented and causes timing problems.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
** slot_id is only set after a resetmce is issued. (using the latest all_cards in the next revision will fix this)&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.5 ==&lt;br /&gt;
* '''Filename''' : rc_v04000005_01nov2007.sof or .pof       &lt;br /&gt;
* '''Features''' &lt;br /&gt;
** data mode 9 (mixed filt + flux jump) with windowing readjusted compared to data mode 8&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** unreliable resetmce. Sometimes, firmware waked up non-responsive on lvds lines.&lt;br /&gt;
** In data mode 5 and 9, flux-jump counter is not reported properly due to a sign error. However, flux jumping works fine.&lt;br /&gt;
&lt;br /&gt;
== Revision 3.0.19 ==&lt;br /&gt;
* '''Filename''' : rc_v03000019_16feb2007_raw.sof (no pof as one is not likely to run with this as regular firmware)&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** data mode 3 is enabled.&lt;br /&gt;
** filter is disabled as a compromise to fit the raw-mode buffer.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** unreliable resetmce. Sometimes, firmware waked up non-responsive on lvds lines.&lt;br /&gt;
&lt;br /&gt;
== Old Firmware Revisions ==&lt;br /&gt;
* '''4.0.4''':  rc_v04000004_11oct2007.sof  data mode 8 added (mixed filt + flux jump)&lt;br /&gt;
* '''4.0.3''':  rc_v04000003_19sep2007.sof  data mode 7 bit split readjusted to 10b error being bit 4 to 14&lt;br /&gt;
* '''4.0.2''':  rc_v04000002_11sep2007.sof  pid resolution increased to 10b, data mode 7 added&lt;br /&gt;
* '''4.0.1''':  rc_v04000001_06sep2007.sof  &lt;br /&gt;
* '''4.0.0''':  rc_v04000000_29aug2007.sof  supports readout_row_index * [[ bugs ]]&lt;br /&gt;
&lt;br /&gt;
= To-Do List =&lt;br /&gt;
* the starting point for the servo is currently zero and it would be nice to have it programmable.&lt;br /&gt;
&lt;br /&gt;
= RC Synthesis Notes =&lt;br /&gt;
# 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. &lt;br /&gt;
# Timing: There is no &amp;quot;lock region&amp;quot; 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.&lt;br /&gt;
# 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%.&lt;br /&gt;
# 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.&lt;br /&gt;
# 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):&lt;br /&gt;
 lpm_file =&amp;gt; &amp;quot;C:/scuba2_repository/cards/readout_card/fsfb_calc/source/rtl/ram_40x64.hex&amp;quot;, and&lt;br /&gt;
 lpm_file    : STRING;&lt;br /&gt;
#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. &lt;br /&gt;
----&lt;br /&gt;
[http://e-mode.phas.ubc.ca/mcewiki/index.php/Main_Page  MCE Main Page]&lt;/div&gt;</summary>
		<author><name>Bburger</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Readout_Card_firmware&amp;diff=4344</id>
		<title>Readout Card firmware</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Readout_Card_firmware&amp;diff=4344"/>
		<updated>2011-05-04T21:47:04Z</updated>

		<summary type="html">&lt;p&gt;Bburger: /* Revision 5.0.d */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Synthesis Reminders (for firmware developers)&lt;br /&gt;
** quartus.ini is not needed anymore (Fixed as of Q7, Altera SR10783580 2010-10-24)&lt;br /&gt;
** Remember that readout_card/fsfb_clac/source/rtl/ram_40x64.vhd must be initialized with the ram_40x64.hex file in the same directory.&lt;br /&gt;
= Revision 5.1.2 =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010002_18jan2011.sof (for Rev. E cards) &lt;br /&gt;
** rc_stratix3_v05010002_18jan2011.jic (for Rev. E cards) &lt;br /&gt;
** rc_v05010002_03feb2011.sof (for Rev. B cards) &lt;br /&gt;
** rc_v05010002_03feb2011.pof (for Rev. B cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.1 with k1 and k2 (filter params) limited to k1&amp;lt;16 and k2&amp;lt;32 in order to resolve the timing when compiling for smaller Stratix FPGA on RC Rev. B.&lt;br /&gt;
&lt;br /&gt;
* '''Bug fix:'''&lt;br /&gt;
** the 2-rows-off filtered data readout introduced with configurable filter in rev. 5.1.0 and 5.1.1 is fixed now.&lt;br /&gt;
 &lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** none so far.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt)&lt;br /&gt;
 ; Total logic elements      ; 33,285 / 41,250 ( 81 % )                       ;&lt;br /&gt;
 ; Total pins                ; 358 / 616 ( 58 % )                             ;&lt;br /&gt;
 ; Total memory bits         ; 1,405,440 / 3,423,744 ( 41 % )                 ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt)&lt;br /&gt;
 ; Fast Model Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 6.591 ns  &lt;br /&gt;
 ; Fast Model Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 7.206 ns  &lt;br /&gt;
 ; Fast Model Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 18.299 ns&lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.1 (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05010001_01dec2010.sof (for Rev. B cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.0, but k1 and k2 (filter params) are now limited to k1&amp;lt;16 and k2&amp;lt;32 in order to resolve the timing failures of compiling 5.1.0 for smaller Stratix FPGA on RC Rev. B.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** filter mode data is off by 2 rows. &lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.0 (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010000_01nov2010.sof  (for Rev. E cards)&lt;br /&gt;
** rc_v05010000_01nov2010.sof (for Rev. B cards) has timing failures '''do not use!!!'''&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** added configurable filter parameters specified by ''fltr_coeff'', default is the f&amp;lt;sub&amp;gt;cutoff&amp;lt;/sub&amp;gt;/f&amp;lt;sub&amp;gt;sampl&amp;lt;/sub&amp;gt;=122Hz/15kHz. see [[ Digital 4-pole Butterworth Low-pass filter ]]. &lt;br /&gt;
** ''fltr_type'' is set to 255 to indicate configurable filter parameters.&lt;br /&gt;
** see [http://www.phas.ubc.ca/~mce/mcedocs/software/SC2_ELE_S580_515_mce_command_description.pdf MCE command description]&lt;br /&gt;
** development notes: &lt;br /&gt;
*** It is built on Quartus10.1. &lt;br /&gt;
*** tcl files had to be updated as cmp syntax is not supported in Q10 anymore.&lt;br /&gt;
*** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** rc_v05010000_01nov2010.sof has timing failures that were overlooked, do not use this firmware for Rev.B cards. &lt;br /&gt;
** '''filter mode data is off by 2 rows.''' &lt;br /&gt;
&lt;br /&gt;
* '''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&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.f  =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000f_22oct2010.sof (for Rev. B cards)&lt;br /&gt;
** rc_stratix3_v0500000f_22oct2010.sof  (for Rev. E cards)&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
**  Bugfix: integral clamp should work now. only positive integral_clamp values are valid!&lt;br /&gt;
&lt;br /&gt;
* '''Details:''': &lt;br /&gt;
** 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.&lt;br /&gt;
** available for both Rev. E and Rev. B cards, the upper byte of card_type parameter now reports the pcb revision.&lt;br /&gt;
** development note: It is built on Quartus10.1. &lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
**none yet!&lt;br /&gt;
&lt;br /&gt;
* '''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&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.e (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000e_06oct2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''  &lt;br /&gt;
** 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!&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.d =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000d_04aug2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
**  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.&lt;br /&gt;
&lt;br /&gt;
* '''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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** '''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 [[http://e-mode.phas.ubc.ca/mcewiki/index.php/Image:Clamp_unstable.png scope snapshot]] used slow_fb_ramp.py script for testing.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage and Timing Report''' (readout_card.fit.rpt and readout_card.tan.rpt): no change compared to 5.0.a/b/c&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.c (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000c_16jun2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.b&lt;br /&gt;
** Re-introduced flux-jump counter clamping to maintain continuity in behavior from past versions of firmware in the field.&lt;br /&gt;
** '''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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** '''flux-jump is broken'''. flux-jumping block misbehaves at the first jump in the negative range.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt): [[rc_5.0.c_fit_rpt]]&lt;br /&gt;
 ; Total logic elements     ; 26,800 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total pins               ; 358 / 616 ( 58 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 76 / 112 ( 68 % )                             ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): [[rc_5.0.c_tan_rpt]]&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.964 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.382 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 15.924 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.b (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000b_03jun2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.a&lt;br /&gt;
** 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.&lt;br /&gt;
** 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&lt;br /&gt;
** A sticky bit that only affected servo_mode=0,1,2 was also removed from the flux-jumping block.&lt;br /&gt;
** flx_lp_init commands now also clear the flux-jumping block as well.&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** flux-jump does not work when jumping to negative values.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt): [[rc_5.0.b_fit_rpt]]&lt;br /&gt;
 ; Total logic elements     ; 26,745 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total pins               ; 358 / 616 ( 58 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 76 / 112 ( 68 % )                             ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): [[rc_5.0.b_tan_rpt]]&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.459 ns  &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.895 ns  &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 15.956 ns&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.a =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000a_12mar2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on the merger of rev. 5.0.8 and 5.0.9.&lt;br /&gt;
** '''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.&lt;br /&gt;
** The low pass filter has 20-bit input and f_3dB/f_samp = 122Hz/15kHz .&lt;br /&gt;
** The flux-jump clamping that was removed in 5.0.9 is included once again here, as we decided this is safer for now.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** &amp;quot;lock_dat_left&amp;quot; parameter that was removed in 5.0.9 is now implemented as &amp;quot;lock_dat_lsb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** flx_lp_init does not reinitialize the flux-jump block&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
** tag name: rc_v0500000a_12mar2009! years were mixed up!&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.9 (buggy) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000009_13nov2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** Removes a sticky bit in pid calculation result storage -- in fsfb_processor.&lt;br /&gt;
** Adds a command to clamp the growth of the I-term to prevent wrapping and track down the source of Caltech's FSFB jumps.&lt;br /&gt;
** Removed the unused lock_dat_left parameter.  The ability to shift left was moved to the fsfb_corr block some time ago.&lt;br /&gt;
** Fixed a sign extension bug acting on the flux quanta, which limited the value to 8191.  Changed the extension from signed to unsigned.&lt;br /&gt;
** Removed ineffective clamping in the flux-jump calculation block.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** integral_clamp read/write command does not work. &lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,960 / 41,250 ( 68 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.825 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.878 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 14.397 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.8 (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000008_09oct2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** type 1 low-pass filter: f&amp;lt;sub&amp;gt;3dB&amp;lt;/sub&amp;gt;=122Hz for f&amp;lt;sub&amp;gt;sample&amp;lt;/sub&amp;gt;=15kHz&lt;br /&gt;
** Filter-input-width changed from 18b to 20b with no sticky bits!&lt;br /&gt;
** removed sticky bits in internal arithmetic of the filter.&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.7 (type-2 filter) =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000007_09oct2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** type-2 low-pass-filter: f&amp;lt;sub&amp;gt;3dB&amp;lt;/sub&amp;gt;=75Hz for f&amp;lt;sub&amp;gt;sample&amp;lt;/sub&amp;gt;=30000.&lt;br /&gt;
** Filter-input-width changed from 18b to 20b with no sticky bits!&lt;br /&gt;
** inter-biquad-gain-scaling for the filter is 2^14&lt;br /&gt;
** filter results are scaled down by 2^3 in the output of the filter.&lt;br /&gt;
** removed sticky bits in internal arithmetics&lt;br /&gt;
** _correction_ disabled in fsfb_proc_pidz&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** quartus.ini file was '''not''' present in synth directory.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** none to report&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
== Revision 5.0.6  (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05000006_15sep2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Only Valid for Rev. C/D Cards&lt;br /&gt;
** Based on rev. 5.0.3&lt;br /&gt;
** tcl file updated for Rev. D and aligned with top-level and qsf (project file). &lt;br /&gt;
** flux loop commented, just to try sampling the ADC. &lt;br /&gt;
** compiled with Q9.1&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.5 (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000005_04sep2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** changed the low-pass-filter to f(3db)=75Hz for f(sample)=30000.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** quartus.ini file was '''not''' present in synth directory.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** negative inputs to the filter cause filter to have a non-flat pass-band region. may have to do with sign-handling...&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.4 =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000004_28aug2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** BUG Fix: handles 14-bit flux quanta (changed the multiplier to unsigned)&lt;br /&gt;
** BUG Fix: changed standard logic vector extension from signed to unsigned in flux-jumping slave.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,170 / 41,250 ( 63 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.541 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.612 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 15.398 ns ;&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.3  =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05000003_21aug2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** ONLY valid REV C/D RC Cards&lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** flux loop commented, just to try sampling the ADC.&lt;br /&gt;
** updated tcl file, but still need to rely on project file as well as qsf file.&lt;br /&gt;
** changed default level of adc_sclk to '1'&lt;br /&gt;
** dac_clr_n was changed from an output to an input.&lt;br /&gt;
** added 'locked' interface to rc_pll_stratix_iii&lt;br /&gt;
** renamed the adc_pll clock signals to more explanitory names&lt;br /&gt;
** added the FPGA_DEVICE_FAMILY generic to the dispatch interace for synthesis of the dc_fifo in lvds_rx&lt;br /&gt;
** uncommented DDR interface to force the syntesizer to use correct left and right PLLs (in conjunction with ADC and DDR PLLs)&lt;br /&gt;
** added test signals to test_status to see clocks on the scope.&lt;br /&gt;
== Revision 5.0.2 (buggy) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000002_test00_tagged.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.1&lt;br /&gt;
** Fixed a bug in wbs_frame_data that stored data incorrectly if reporting 1 or 2 pixels only.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,186 / 41,250 ( 63 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.755 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.979 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.067 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.1 (buggy) (Filter + Raw + Rectangle, 2 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000001_26may2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Combines features in rev. 5.0.0 (2 LVDS Lines) and rev. 4.0.e (Filtered + Raw), with the NEW rectangle mode.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** [[CVS Diff Between sys_v05000000 and rc_v05000001]]&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** Has a bug in wbs_frame_data that stored data incorrectly if reporting 1 or 2 pixels only.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,565 / 41,250 ( 64 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.656 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.861 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 14.167 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.0 (Filter Only, 2 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000000_22dec2008.sof (tagged as sys_v05000000_22dec2008)&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware v05000000+ of all other cards!!!&lt;br /&gt;
** Adds the ability to read out one column of data continuously from readout cards&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** [[CVS Diff Between rc_v0400000c and sys_v05000000]]&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,607 / 41,250 ( 65 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 406,016 / 3,423,744 ( 12 % )             ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.558 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.892 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.987 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.f (Filter + Raw, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0400000f_12feb2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on 4.0.e and in parallel with 5.0.9 (equivalent version, clamping is not included)&lt;br /&gt;
** Incorporates fixes that were done to flux-jumping between 5.0.2 - 5.0.4 - 5.0.9.  Namely:&lt;br /&gt;
*** Changes a multiplier from signed to unsigned (in fsfb_corr_multplier.vhd).&lt;br /&gt;
*** Changes sign extension from signed to unsigned (in flux_quanta_ram_admin.vhd).&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None reported yet.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,773 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,321,984 / 3,423,744 ( 39 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.539 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.118 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.318 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.e (Filter + Raw, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0400000e_27apr2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on 4.0.d&lt;br /&gt;
** Combines both raw- and filtered-data modes.&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are disabled.&lt;br /&gt;
** Tested by Matt Hasselfield.  &lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are disabled.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,048 / 41,250 ( 66 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,321,984 / 3,423,744 ( 39 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.675 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.907 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.728 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.d (Raw Only, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  rc_v0400000d_20090417.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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.&lt;br /&gt;
** The firmware takes a new command called readout_col_index which specifies which column to capture raw data from.&lt;br /&gt;
** Other than readout_col_index, the firmware functions the same as previous raw-data firmware, including then need to issue a capture_raw command.&lt;br /&gt;
** For more information on raw-data, see:  http://e-mode.phas.ubc.ca/mcewiki/index.php/Raw-mode_readout&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** Differences between 4.0.c and 4.0.d&lt;br /&gt;
 U system/test/source/tb/tb_cc_rcs_bcs_ac.vhd&lt;br /&gt;
 U all_cards/dispatch/source/rtl/dispatch_wishbone.vhd&lt;br /&gt;
 U library/sys_param/source/rtl/wishbone_pack.vhd&lt;br /&gt;
 U readout_card/adc_sample_coadd/source/rtl/adc_sample_coadd.vhd&lt;br /&gt;
 U readout_card/adc_sample_coadd/source/rtl/adc_sample_coadd_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop/source/rtl/flux_loop.vhd&lt;br /&gt;
 U readout_card/flux_loop/source/rtl/flux_loop_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/rtl/flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/rtl/flux_loop_ctrl_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/tb/tb1_flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/tb/tb2_flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/fsfb_calc/source/rtl/fsfb_fltr_regs.vhd&lt;br /&gt;
 U readout_card/fsfb_corr/source/rtl/fsfb_corr.vhd&lt;br /&gt;
 U readout_card/readout_card/source/rtl/readout_card.vhd&lt;br /&gt;
 U readout_card/readout_card/source/rtl/readout_card_pack.vhd&lt;br /&gt;
 U readout_card/wbs_frame_data/source/rtl/wbs_frame_data.vhd&lt;br /&gt;
 U readout_card/wbs_frame_data/source/rtl/wbs_frame_data_pack.vhd&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are not supported.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 24,554 / 41,250 ( 60 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,262,592 / 3,423,744 ( 37 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.991 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.864 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.052 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.4.1 ==&lt;br /&gt;
* '''Filename:'''  rc_v04040001_21nov2008&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,241 / 41,250 ( 66 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 405,504 / 3,423,744 ( 12 % )                  ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.588 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.585 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.057 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.4.0 (buggy) ==&lt;br /&gt;
* '''Filename:'''  rc_v04040000_02oct2008&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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]].&lt;br /&gt;
** Re-integrated the id_thermo and fpga_thermo block in the readout_card.vhd top level that was removed in 4.0.c.&lt;br /&gt;
** 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.&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
** Adjusted the indentation in fsfb_io_controller.vhd to make the file more readable.&lt;br /&gt;
** 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.&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** The following commands lock up the Readout Card firmware:  CARD_ID_ADDR, CARD_TEMP_ADDR, FPGA_TEMP_ADDR.&lt;br /&gt;
** 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&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,099 / 41,250 ( 66 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 406,016 / 3,423,744 ( 12 % )                  ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.372 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.052 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.066 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.c ==&lt;br /&gt;
* '''Filename:'''  rc_v0400000c_15aug2008.sof&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Only has data modes 0, 1, 4, and 10.&lt;br /&gt;
** 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).&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** Changed a counter in the dispatch block to ease timing constraints in synthesis (dispatch_wishbone.vhd)&lt;br /&gt;
** 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.&lt;br /&gt;
** '''Removed''' the fpga_termo (command:  '''fpga_temp''') and id_thermo (commands: '''card_temp, card_id''') to ease timing constraints in synthesis (readout_card.vhd)&lt;br /&gt;
** Updated the tagged version of fpga_termo.vhd to include the new 'stale bit' feature&lt;br /&gt;
** Updated the tagged version of frame_timing_core.vhd to include the new 'err_o' interface&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None reported yet&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
* '''FPGA Resource Usage:'''&lt;br /&gt;
 Total logic elements : 25,058 / 41,250 ( 61 % )&lt;br /&gt;
 Total memory bits : 400,896 / 3,423,744 ( 12 % )&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.282 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.736 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.665 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.b (buggy) ==&lt;br /&gt;
Note: This revision is on a watch list, after the bug detected 15 July 2008.  See the bug section for more details.&lt;br /&gt;
* '''Filename''' : rc_v0400000b_04aug2008.sof&lt;br /&gt;
* '''Features'''&lt;br /&gt;
** data_mode 10 is added to provide more filtfb bits (compared to data mode 9) for planet observations. filtered_dat(27 downto 3) &amp;amp; flux_cnt_dat(6 downto 0)&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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]]&lt;br /&gt;
&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.a (buggy) ==&lt;br /&gt;
Note: This revision is on a watch list, after the bug detected 15 July 2008.  See the bug section for more details.&lt;br /&gt;
* '''Filename''' : rc_v0400000a_07jul2008.sof&lt;br /&gt;
* '''Bug Fix'''&lt;br /&gt;
** mce_status and adc_offset/flx_quanta commands do not fail after power up.&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** Seems to clip out channel 0 from data reporting.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.9 (buggy) ==&lt;br /&gt;
* '''Filename''' : rc_v04000009_26jun2008.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** sa_bias and offset DACs only refreshed when new values are written. (in previous versions, DACs were refreshed every frame)&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.8 ==&lt;br /&gt;
* '''Filename''' : rc_v04000008_26jun2008.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** The gaini, gainp, gaind resolution increased to 12-bit, i.e. -2048 to 2047 (formerly 10-bit).&lt;br /&gt;
&lt;br /&gt;
* '''Bug fix'''&lt;br /&gt;
** the bug associated with gainpid read before mce_reset is fixed.&lt;br /&gt;
&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.3.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04030007_26may2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** 14-bit raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** 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.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.2.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04020007_24may2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
* '''Bug fix'''&lt;br /&gt;
** the bug associated with reading from raw-buffer is fixed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.1.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04010007_25apr2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.6 (buggy) ==&lt;br /&gt;
* '''Filename''' : rc_v04000006_15feb2008.sof or .pof       &lt;br /&gt;
* '''Features''' &lt;br /&gt;
** '''bugfix''': unreliable reset due to unsafe and incomplete state machines is fixed.&lt;br /&gt;
** '''bugfix''': flux_jump sign problem fixed, so far proved in const_mode, to be tested in servo_mode with cold setup.&lt;br /&gt;
** servo_mode=2 or ramp previously only went from 0 to ramp_amp, but now goes from -8192 to -8192+ramp_amp&lt;br /&gt;
** new commands are added: ''scratch'' and ''card_type''. Scratch takes 8 values and can be used by software to detect reset.&lt;br /&gt;
** slot_id and fw_rev are now integrated as part of all_cards.vhd&lt;br /&gt;
** lvds_tx_b=0, This will allow Clock Card to use the secondary backplane lvds line and check whether RC is plugged in.&lt;br /&gt;
** filter_coeff in misc_banks_admin commented as it is not implemented and causes timing problems.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
** slot_id is only set after a resetmce is issued. (using the latest all_cards in the next revision will fix this)&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.5 ==&lt;br /&gt;
* '''Filename''' : rc_v04000005_01nov2007.sof or .pof       &lt;br /&gt;
* '''Features''' &lt;br /&gt;
** data mode 9 (mixed filt + flux jump) with windowing readjusted compared to data mode 8&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** unreliable resetmce. Sometimes, firmware waked up non-responsive on lvds lines.&lt;br /&gt;
** In data mode 5 and 9, flux-jump counter is not reported properly due to a sign error. However, flux jumping works fine.&lt;br /&gt;
&lt;br /&gt;
== Revision 3.0.19 ==&lt;br /&gt;
* '''Filename''' : rc_v03000019_16feb2007_raw.sof (no pof as one is not likely to run with this as regular firmware)&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** data mode 3 is enabled.&lt;br /&gt;
** filter is disabled as a compromise to fit the raw-mode buffer.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** unreliable resetmce. Sometimes, firmware waked up non-responsive on lvds lines.&lt;br /&gt;
&lt;br /&gt;
== Old Firmware Revisions ==&lt;br /&gt;
* '''4.0.4''':  rc_v04000004_11oct2007.sof  data mode 8 added (mixed filt + flux jump)&lt;br /&gt;
* '''4.0.3''':  rc_v04000003_19sep2007.sof  data mode 7 bit split readjusted to 10b error being bit 4 to 14&lt;br /&gt;
* '''4.0.2''':  rc_v04000002_11sep2007.sof  pid resolution increased to 10b, data mode 7 added&lt;br /&gt;
* '''4.0.1''':  rc_v04000001_06sep2007.sof  &lt;br /&gt;
* '''4.0.0''':  rc_v04000000_29aug2007.sof  supports readout_row_index * [[ bugs ]]&lt;br /&gt;
&lt;br /&gt;
= To-Do List =&lt;br /&gt;
* the starting point for the servo is currently zero and it would be nice to have it programmable.&lt;br /&gt;
&lt;br /&gt;
= RC Synthesis Notes =&lt;br /&gt;
# 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. &lt;br /&gt;
# Timing: There is no &amp;quot;lock region&amp;quot; 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.&lt;br /&gt;
# 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%.&lt;br /&gt;
# 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.&lt;br /&gt;
# 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):&lt;br /&gt;
 lpm_file =&amp;gt; &amp;quot;C:/scuba2_repository/cards/readout_card/fsfb_calc/source/rtl/ram_40x64.hex&amp;quot;, and&lt;br /&gt;
 lpm_file    : STRING;&lt;br /&gt;
#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. &lt;br /&gt;
----&lt;br /&gt;
[http://e-mode.phas.ubc.ca/mcewiki/index.php/Main_Page  MCE Main Page]&lt;/div&gt;</summary>
		<author><name>Bburger</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Readout_Card_firmware&amp;diff=4343</id>
		<title>Readout Card firmware</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Readout_Card_firmware&amp;diff=4343"/>
		<updated>2011-05-04T21:46:57Z</updated>

		<summary type="html">&lt;p&gt;Bburger: /* Revision 5.0.f */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Synthesis Reminders (for firmware developers)&lt;br /&gt;
** quartus.ini is not needed anymore (Fixed as of Q7, Altera SR10783580 2010-10-24)&lt;br /&gt;
** Remember that readout_card/fsfb_clac/source/rtl/ram_40x64.vhd must be initialized with the ram_40x64.hex file in the same directory.&lt;br /&gt;
= Revision 5.1.2 =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010002_18jan2011.sof (for Rev. E cards) &lt;br /&gt;
** rc_stratix3_v05010002_18jan2011.jic (for Rev. E cards) &lt;br /&gt;
** rc_v05010002_03feb2011.sof (for Rev. B cards) &lt;br /&gt;
** rc_v05010002_03feb2011.pof (for Rev. B cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.1 with k1 and k2 (filter params) limited to k1&amp;lt;16 and k2&amp;lt;32 in order to resolve the timing when compiling for smaller Stratix FPGA on RC Rev. B.&lt;br /&gt;
&lt;br /&gt;
* '''Bug fix:'''&lt;br /&gt;
** the 2-rows-off filtered data readout introduced with configurable filter in rev. 5.1.0 and 5.1.1 is fixed now.&lt;br /&gt;
 &lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** none so far.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt)&lt;br /&gt;
 ; Total logic elements      ; 33,285 / 41,250 ( 81 % )                       ;&lt;br /&gt;
 ; Total pins                ; 358 / 616 ( 58 % )                             ;&lt;br /&gt;
 ; Total memory bits         ; 1,405,440 / 3,423,744 ( 41 % )                 ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt)&lt;br /&gt;
 ; Fast Model Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 6.591 ns  &lt;br /&gt;
 ; Fast Model Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 7.206 ns  &lt;br /&gt;
 ; Fast Model Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 18.299 ns&lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.1 (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05010001_01dec2010.sof (for Rev. B cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.0, but k1 and k2 (filter params) are now limited to k1&amp;lt;16 and k2&amp;lt;32 in order to resolve the timing failures of compiling 5.1.0 for smaller Stratix FPGA on RC Rev. B.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** filter mode data is off by 2 rows. &lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.0 (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010000_01nov2010.sof  (for Rev. E cards)&lt;br /&gt;
** rc_v05010000_01nov2010.sof (for Rev. B cards) has timing failures '''do not use!!!'''&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** added configurable filter parameters specified by ''fltr_coeff'', default is the f&amp;lt;sub&amp;gt;cutoff&amp;lt;/sub&amp;gt;/f&amp;lt;sub&amp;gt;sampl&amp;lt;/sub&amp;gt;=122Hz/15kHz. see [[ Digital 4-pole Butterworth Low-pass filter ]]. &lt;br /&gt;
** ''fltr_type'' is set to 255 to indicate configurable filter parameters.&lt;br /&gt;
** see [http://www.phas.ubc.ca/~mce/mcedocs/software/SC2_ELE_S580_515_mce_command_description.pdf MCE command description]&lt;br /&gt;
** development notes: &lt;br /&gt;
*** It is built on Quartus10.1. &lt;br /&gt;
*** tcl files had to be updated as cmp syntax is not supported in Q10 anymore.&lt;br /&gt;
*** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** rc_v05010000_01nov2010.sof has timing failures that were overlooked, do not use this firmware for Rev.B cards. &lt;br /&gt;
** '''filter mode data is off by 2 rows.''' &lt;br /&gt;
&lt;br /&gt;
* '''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&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.f  =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000f_22oct2010.sof (for Rev. B cards)&lt;br /&gt;
** rc_stratix3_v0500000f_22oct2010.sof  (for Rev. E cards)&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
**  Bugfix: integral clamp should work now. only positive integral_clamp values are valid!&lt;br /&gt;
&lt;br /&gt;
* '''Details:''': &lt;br /&gt;
** 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.&lt;br /&gt;
** available for both Rev. E and Rev. B cards, the upper byte of card_type parameter now reports the pcb revision.&lt;br /&gt;
** development note: It is built on Quartus10.1. &lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
**none yet!&lt;br /&gt;
&lt;br /&gt;
* '''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&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.e (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000e_06oct2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''  &lt;br /&gt;
** 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!&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.d ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000d_04aug2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
**  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.&lt;br /&gt;
&lt;br /&gt;
* '''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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** '''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 [[http://e-mode.phas.ubc.ca/mcewiki/index.php/Image:Clamp_unstable.png scope snapshot]] used slow_fb_ramp.py script for testing.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage and Timing Report''' (readout_card.fit.rpt and readout_card.tan.rpt): no change compared to 5.0.a/b/c&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.c (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000c_16jun2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.b&lt;br /&gt;
** Re-introduced flux-jump counter clamping to maintain continuity in behavior from past versions of firmware in the field.&lt;br /&gt;
** '''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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** '''flux-jump is broken'''. flux-jumping block misbehaves at the first jump in the negative range.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt): [[rc_5.0.c_fit_rpt]]&lt;br /&gt;
 ; Total logic elements     ; 26,800 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total pins               ; 358 / 616 ( 58 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 76 / 112 ( 68 % )                             ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): [[rc_5.0.c_tan_rpt]]&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.964 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.382 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 15.924 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.b (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000b_03jun2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.a&lt;br /&gt;
** 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.&lt;br /&gt;
** 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&lt;br /&gt;
** A sticky bit that only affected servo_mode=0,1,2 was also removed from the flux-jumping block.&lt;br /&gt;
** flx_lp_init commands now also clear the flux-jumping block as well.&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** flux-jump does not work when jumping to negative values.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt): [[rc_5.0.b_fit_rpt]]&lt;br /&gt;
 ; Total logic elements     ; 26,745 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total pins               ; 358 / 616 ( 58 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 76 / 112 ( 68 % )                             ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): [[rc_5.0.b_tan_rpt]]&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.459 ns  &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.895 ns  &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 15.956 ns&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.a =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000a_12mar2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on the merger of rev. 5.0.8 and 5.0.9.&lt;br /&gt;
** '''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.&lt;br /&gt;
** The low pass filter has 20-bit input and f_3dB/f_samp = 122Hz/15kHz .&lt;br /&gt;
** The flux-jump clamping that was removed in 5.0.9 is included once again here, as we decided this is safer for now.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** &amp;quot;lock_dat_left&amp;quot; parameter that was removed in 5.0.9 is now implemented as &amp;quot;lock_dat_lsb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** flx_lp_init does not reinitialize the flux-jump block&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
** tag name: rc_v0500000a_12mar2009! years were mixed up!&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.9 (buggy) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000009_13nov2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** Removes a sticky bit in pid calculation result storage -- in fsfb_processor.&lt;br /&gt;
** Adds a command to clamp the growth of the I-term to prevent wrapping and track down the source of Caltech's FSFB jumps.&lt;br /&gt;
** Removed the unused lock_dat_left parameter.  The ability to shift left was moved to the fsfb_corr block some time ago.&lt;br /&gt;
** Fixed a sign extension bug acting on the flux quanta, which limited the value to 8191.  Changed the extension from signed to unsigned.&lt;br /&gt;
** Removed ineffective clamping in the flux-jump calculation block.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** integral_clamp read/write command does not work. &lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,960 / 41,250 ( 68 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.825 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.878 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 14.397 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.8 (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000008_09oct2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** type 1 low-pass filter: f&amp;lt;sub&amp;gt;3dB&amp;lt;/sub&amp;gt;=122Hz for f&amp;lt;sub&amp;gt;sample&amp;lt;/sub&amp;gt;=15kHz&lt;br /&gt;
** Filter-input-width changed from 18b to 20b with no sticky bits!&lt;br /&gt;
** removed sticky bits in internal arithmetic of the filter.&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.7 (type-2 filter) =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000007_09oct2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** type-2 low-pass-filter: f&amp;lt;sub&amp;gt;3dB&amp;lt;/sub&amp;gt;=75Hz for f&amp;lt;sub&amp;gt;sample&amp;lt;/sub&amp;gt;=30000.&lt;br /&gt;
** Filter-input-width changed from 18b to 20b with no sticky bits!&lt;br /&gt;
** inter-biquad-gain-scaling for the filter is 2^14&lt;br /&gt;
** filter results are scaled down by 2^3 in the output of the filter.&lt;br /&gt;
** removed sticky bits in internal arithmetics&lt;br /&gt;
** _correction_ disabled in fsfb_proc_pidz&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** quartus.ini file was '''not''' present in synth directory.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** none to report&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
== Revision 5.0.6  (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05000006_15sep2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Only Valid for Rev. C/D Cards&lt;br /&gt;
** Based on rev. 5.0.3&lt;br /&gt;
** tcl file updated for Rev. D and aligned with top-level and qsf (project file). &lt;br /&gt;
** flux loop commented, just to try sampling the ADC. &lt;br /&gt;
** compiled with Q9.1&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.5 (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000005_04sep2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** changed the low-pass-filter to f(3db)=75Hz for f(sample)=30000.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** quartus.ini file was '''not''' present in synth directory.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** negative inputs to the filter cause filter to have a non-flat pass-band region. may have to do with sign-handling...&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.4 =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000004_28aug2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** BUG Fix: handles 14-bit flux quanta (changed the multiplier to unsigned)&lt;br /&gt;
** BUG Fix: changed standard logic vector extension from signed to unsigned in flux-jumping slave.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,170 / 41,250 ( 63 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.541 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.612 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 15.398 ns ;&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.3  =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05000003_21aug2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** ONLY valid REV C/D RC Cards&lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** flux loop commented, just to try sampling the ADC.&lt;br /&gt;
** updated tcl file, but still need to rely on project file as well as qsf file.&lt;br /&gt;
** changed default level of adc_sclk to '1'&lt;br /&gt;
** dac_clr_n was changed from an output to an input.&lt;br /&gt;
** added 'locked' interface to rc_pll_stratix_iii&lt;br /&gt;
** renamed the adc_pll clock signals to more explanitory names&lt;br /&gt;
** added the FPGA_DEVICE_FAMILY generic to the dispatch interace for synthesis of the dc_fifo in lvds_rx&lt;br /&gt;
** uncommented DDR interface to force the syntesizer to use correct left and right PLLs (in conjunction with ADC and DDR PLLs)&lt;br /&gt;
** added test signals to test_status to see clocks on the scope.&lt;br /&gt;
== Revision 5.0.2 (buggy) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000002_test00_tagged.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.1&lt;br /&gt;
** Fixed a bug in wbs_frame_data that stored data incorrectly if reporting 1 or 2 pixels only.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,186 / 41,250 ( 63 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.755 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.979 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.067 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.1 (buggy) (Filter + Raw + Rectangle, 2 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000001_26may2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Combines features in rev. 5.0.0 (2 LVDS Lines) and rev. 4.0.e (Filtered + Raw), with the NEW rectangle mode.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** [[CVS Diff Between sys_v05000000 and rc_v05000001]]&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** Has a bug in wbs_frame_data that stored data incorrectly if reporting 1 or 2 pixels only.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,565 / 41,250 ( 64 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.656 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.861 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 14.167 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.0 (Filter Only, 2 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000000_22dec2008.sof (tagged as sys_v05000000_22dec2008)&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware v05000000+ of all other cards!!!&lt;br /&gt;
** Adds the ability to read out one column of data continuously from readout cards&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** [[CVS Diff Between rc_v0400000c and sys_v05000000]]&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,607 / 41,250 ( 65 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 406,016 / 3,423,744 ( 12 % )             ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.558 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.892 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.987 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.f (Filter + Raw, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0400000f_12feb2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on 4.0.e and in parallel with 5.0.9 (equivalent version, clamping is not included)&lt;br /&gt;
** Incorporates fixes that were done to flux-jumping between 5.0.2 - 5.0.4 - 5.0.9.  Namely:&lt;br /&gt;
*** Changes a multiplier from signed to unsigned (in fsfb_corr_multplier.vhd).&lt;br /&gt;
*** Changes sign extension from signed to unsigned (in flux_quanta_ram_admin.vhd).&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None reported yet.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,773 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,321,984 / 3,423,744 ( 39 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.539 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.118 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.318 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.e (Filter + Raw, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0400000e_27apr2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on 4.0.d&lt;br /&gt;
** Combines both raw- and filtered-data modes.&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are disabled.&lt;br /&gt;
** Tested by Matt Hasselfield.  &lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are disabled.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,048 / 41,250 ( 66 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,321,984 / 3,423,744 ( 39 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.675 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.907 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.728 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.d (Raw Only, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  rc_v0400000d_20090417.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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.&lt;br /&gt;
** The firmware takes a new command called readout_col_index which specifies which column to capture raw data from.&lt;br /&gt;
** Other than readout_col_index, the firmware functions the same as previous raw-data firmware, including then need to issue a capture_raw command.&lt;br /&gt;
** For more information on raw-data, see:  http://e-mode.phas.ubc.ca/mcewiki/index.php/Raw-mode_readout&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** Differences between 4.0.c and 4.0.d&lt;br /&gt;
 U system/test/source/tb/tb_cc_rcs_bcs_ac.vhd&lt;br /&gt;
 U all_cards/dispatch/source/rtl/dispatch_wishbone.vhd&lt;br /&gt;
 U library/sys_param/source/rtl/wishbone_pack.vhd&lt;br /&gt;
 U readout_card/adc_sample_coadd/source/rtl/adc_sample_coadd.vhd&lt;br /&gt;
 U readout_card/adc_sample_coadd/source/rtl/adc_sample_coadd_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop/source/rtl/flux_loop.vhd&lt;br /&gt;
 U readout_card/flux_loop/source/rtl/flux_loop_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/rtl/flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/rtl/flux_loop_ctrl_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/tb/tb1_flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/tb/tb2_flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/fsfb_calc/source/rtl/fsfb_fltr_regs.vhd&lt;br /&gt;
 U readout_card/fsfb_corr/source/rtl/fsfb_corr.vhd&lt;br /&gt;
 U readout_card/readout_card/source/rtl/readout_card.vhd&lt;br /&gt;
 U readout_card/readout_card/source/rtl/readout_card_pack.vhd&lt;br /&gt;
 U readout_card/wbs_frame_data/source/rtl/wbs_frame_data.vhd&lt;br /&gt;
 U readout_card/wbs_frame_data/source/rtl/wbs_frame_data_pack.vhd&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are not supported.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 24,554 / 41,250 ( 60 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,262,592 / 3,423,744 ( 37 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.991 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.864 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.052 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.4.1 ==&lt;br /&gt;
* '''Filename:'''  rc_v04040001_21nov2008&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,241 / 41,250 ( 66 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 405,504 / 3,423,744 ( 12 % )                  ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.588 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.585 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.057 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.4.0 (buggy) ==&lt;br /&gt;
* '''Filename:'''  rc_v04040000_02oct2008&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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]].&lt;br /&gt;
** Re-integrated the id_thermo and fpga_thermo block in the readout_card.vhd top level that was removed in 4.0.c.&lt;br /&gt;
** 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.&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
** Adjusted the indentation in fsfb_io_controller.vhd to make the file more readable.&lt;br /&gt;
** 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.&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** The following commands lock up the Readout Card firmware:  CARD_ID_ADDR, CARD_TEMP_ADDR, FPGA_TEMP_ADDR.&lt;br /&gt;
** 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&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,099 / 41,250 ( 66 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 406,016 / 3,423,744 ( 12 % )                  ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.372 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.052 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.066 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.c ==&lt;br /&gt;
* '''Filename:'''  rc_v0400000c_15aug2008.sof&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Only has data modes 0, 1, 4, and 10.&lt;br /&gt;
** 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).&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** Changed a counter in the dispatch block to ease timing constraints in synthesis (dispatch_wishbone.vhd)&lt;br /&gt;
** 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.&lt;br /&gt;
** '''Removed''' the fpga_termo (command:  '''fpga_temp''') and id_thermo (commands: '''card_temp, card_id''') to ease timing constraints in synthesis (readout_card.vhd)&lt;br /&gt;
** Updated the tagged version of fpga_termo.vhd to include the new 'stale bit' feature&lt;br /&gt;
** Updated the tagged version of frame_timing_core.vhd to include the new 'err_o' interface&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None reported yet&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
* '''FPGA Resource Usage:'''&lt;br /&gt;
 Total logic elements : 25,058 / 41,250 ( 61 % )&lt;br /&gt;
 Total memory bits : 400,896 / 3,423,744 ( 12 % )&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.282 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.736 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.665 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.b (buggy) ==&lt;br /&gt;
Note: This revision is on a watch list, after the bug detected 15 July 2008.  See the bug section for more details.&lt;br /&gt;
* '''Filename''' : rc_v0400000b_04aug2008.sof&lt;br /&gt;
* '''Features'''&lt;br /&gt;
** data_mode 10 is added to provide more filtfb bits (compared to data mode 9) for planet observations. filtered_dat(27 downto 3) &amp;amp; flux_cnt_dat(6 downto 0)&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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]]&lt;br /&gt;
&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.a (buggy) ==&lt;br /&gt;
Note: This revision is on a watch list, after the bug detected 15 July 2008.  See the bug section for more details.&lt;br /&gt;
* '''Filename''' : rc_v0400000a_07jul2008.sof&lt;br /&gt;
* '''Bug Fix'''&lt;br /&gt;
** mce_status and adc_offset/flx_quanta commands do not fail after power up.&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** Seems to clip out channel 0 from data reporting.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.9 (buggy) ==&lt;br /&gt;
* '''Filename''' : rc_v04000009_26jun2008.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** sa_bias and offset DACs only refreshed when new values are written. (in previous versions, DACs were refreshed every frame)&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.8 ==&lt;br /&gt;
* '''Filename''' : rc_v04000008_26jun2008.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** The gaini, gainp, gaind resolution increased to 12-bit, i.e. -2048 to 2047 (formerly 10-bit).&lt;br /&gt;
&lt;br /&gt;
* '''Bug fix'''&lt;br /&gt;
** the bug associated with gainpid read before mce_reset is fixed.&lt;br /&gt;
&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.3.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04030007_26may2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** 14-bit raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** 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.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.2.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04020007_24may2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
* '''Bug fix'''&lt;br /&gt;
** the bug associated with reading from raw-buffer is fixed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.1.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04010007_25apr2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.6 (buggy) ==&lt;br /&gt;
* '''Filename''' : rc_v04000006_15feb2008.sof or .pof       &lt;br /&gt;
* '''Features''' &lt;br /&gt;
** '''bugfix''': unreliable reset due to unsafe and incomplete state machines is fixed.&lt;br /&gt;
** '''bugfix''': flux_jump sign problem fixed, so far proved in const_mode, to be tested in servo_mode with cold setup.&lt;br /&gt;
** servo_mode=2 or ramp previously only went from 0 to ramp_amp, but now goes from -8192 to -8192+ramp_amp&lt;br /&gt;
** new commands are added: ''scratch'' and ''card_type''. Scratch takes 8 values and can be used by software to detect reset.&lt;br /&gt;
** slot_id and fw_rev are now integrated as part of all_cards.vhd&lt;br /&gt;
** lvds_tx_b=0, This will allow Clock Card to use the secondary backplane lvds line and check whether RC is plugged in.&lt;br /&gt;
** filter_coeff in misc_banks_admin commented as it is not implemented and causes timing problems.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
** slot_id is only set after a resetmce is issued. (using the latest all_cards in the next revision will fix this)&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.5 ==&lt;br /&gt;
* '''Filename''' : rc_v04000005_01nov2007.sof or .pof       &lt;br /&gt;
* '''Features''' &lt;br /&gt;
** data mode 9 (mixed filt + flux jump) with windowing readjusted compared to data mode 8&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** unreliable resetmce. Sometimes, firmware waked up non-responsive on lvds lines.&lt;br /&gt;
** In data mode 5 and 9, flux-jump counter is not reported properly due to a sign error. However, flux jumping works fine.&lt;br /&gt;
&lt;br /&gt;
== Revision 3.0.19 ==&lt;br /&gt;
* '''Filename''' : rc_v03000019_16feb2007_raw.sof (no pof as one is not likely to run with this as regular firmware)&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** data mode 3 is enabled.&lt;br /&gt;
** filter is disabled as a compromise to fit the raw-mode buffer.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** unreliable resetmce. Sometimes, firmware waked up non-responsive on lvds lines.&lt;br /&gt;
&lt;br /&gt;
== Old Firmware Revisions ==&lt;br /&gt;
* '''4.0.4''':  rc_v04000004_11oct2007.sof  data mode 8 added (mixed filt + flux jump)&lt;br /&gt;
* '''4.0.3''':  rc_v04000003_19sep2007.sof  data mode 7 bit split readjusted to 10b error being bit 4 to 14&lt;br /&gt;
* '''4.0.2''':  rc_v04000002_11sep2007.sof  pid resolution increased to 10b, data mode 7 added&lt;br /&gt;
* '''4.0.1''':  rc_v04000001_06sep2007.sof  &lt;br /&gt;
* '''4.0.0''':  rc_v04000000_29aug2007.sof  supports readout_row_index * [[ bugs ]]&lt;br /&gt;
&lt;br /&gt;
= To-Do List =&lt;br /&gt;
* the starting point for the servo is currently zero and it would be nice to have it programmable.&lt;br /&gt;
&lt;br /&gt;
= RC Synthesis Notes =&lt;br /&gt;
# 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. &lt;br /&gt;
# Timing: There is no &amp;quot;lock region&amp;quot; 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.&lt;br /&gt;
# 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%.&lt;br /&gt;
# 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.&lt;br /&gt;
# 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):&lt;br /&gt;
 lpm_file =&amp;gt; &amp;quot;C:/scuba2_repository/cards/readout_card/fsfb_calc/source/rtl/ram_40x64.hex&amp;quot;, and&lt;br /&gt;
 lpm_file    : STRING;&lt;br /&gt;
#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. &lt;br /&gt;
----&lt;br /&gt;
[http://e-mode.phas.ubc.ca/mcewiki/index.php/Main_Page  MCE Main Page]&lt;/div&gt;</summary>
		<author><name>Bburger</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Readout_Card_firmware&amp;diff=4342</id>
		<title>Readout Card firmware</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Readout_Card_firmware&amp;diff=4342"/>
		<updated>2011-05-04T21:46:41Z</updated>

		<summary type="html">&lt;p&gt;Bburger: /* Revision 5.1.2 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Synthesis Reminders (for firmware developers)&lt;br /&gt;
** quartus.ini is not needed anymore (Fixed as of Q7, Altera SR10783580 2010-10-24)&lt;br /&gt;
** Remember that readout_card/fsfb_clac/source/rtl/ram_40x64.vhd must be initialized with the ram_40x64.hex file in the same directory.&lt;br /&gt;
= Revision 5.1.2 =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010002_18jan2011.sof (for Rev. E cards) &lt;br /&gt;
** rc_stratix3_v05010002_18jan2011.jic (for Rev. E cards) &lt;br /&gt;
** rc_v05010002_03feb2011.sof (for Rev. B cards) &lt;br /&gt;
** rc_v05010002_03feb2011.pof (for Rev. B cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.1 with k1 and k2 (filter params) limited to k1&amp;lt;16 and k2&amp;lt;32 in order to resolve the timing when compiling for smaller Stratix FPGA on RC Rev. B.&lt;br /&gt;
&lt;br /&gt;
* '''Bug fix:'''&lt;br /&gt;
** the 2-rows-off filtered data readout introduced with configurable filter in rev. 5.1.0 and 5.1.1 is fixed now.&lt;br /&gt;
 &lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** none so far.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt)&lt;br /&gt;
 ; Total logic elements      ; 33,285 / 41,250 ( 81 % )                       ;&lt;br /&gt;
 ; Total pins                ; 358 / 616 ( 58 % )                             ;&lt;br /&gt;
 ; Total memory bits         ; 1,405,440 / 3,423,744 ( 41 % )                 ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt)&lt;br /&gt;
 ; Fast Model Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 6.591 ns  &lt;br /&gt;
 ; Fast Model Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 7.206 ns  &lt;br /&gt;
 ; Fast Model Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 18.299 ns&lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.1 (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05010001_01dec2010.sof (for Rev. B cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.0, but k1 and k2 (filter params) are now limited to k1&amp;lt;16 and k2&amp;lt;32 in order to resolve the timing failures of compiling 5.1.0 for smaller Stratix FPGA on RC Rev. B.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** filter mode data is off by 2 rows. &lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.0 (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010000_01nov2010.sof  (for Rev. E cards)&lt;br /&gt;
** rc_v05010000_01nov2010.sof (for Rev. B cards) has timing failures '''do not use!!!'''&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** added configurable filter parameters specified by ''fltr_coeff'', default is the f&amp;lt;sub&amp;gt;cutoff&amp;lt;/sub&amp;gt;/f&amp;lt;sub&amp;gt;sampl&amp;lt;/sub&amp;gt;=122Hz/15kHz. see [[ Digital 4-pole Butterworth Low-pass filter ]]. &lt;br /&gt;
** ''fltr_type'' is set to 255 to indicate configurable filter parameters.&lt;br /&gt;
** see [http://www.phas.ubc.ca/~mce/mcedocs/software/SC2_ELE_S580_515_mce_command_description.pdf MCE command description]&lt;br /&gt;
** development notes: &lt;br /&gt;
*** It is built on Quartus10.1. &lt;br /&gt;
*** tcl files had to be updated as cmp syntax is not supported in Q10 anymore.&lt;br /&gt;
*** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** rc_v05010000_01nov2010.sof has timing failures that were overlooked, do not use this firmware for Rev.B cards. &lt;br /&gt;
** '''filter mode data is off by 2 rows.''' &lt;br /&gt;
&lt;br /&gt;
* '''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&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.f  ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000f_22oct2010.sof (for Rev. B cards)&lt;br /&gt;
** rc_stratix3_v0500000f_22oct2010.sof  (for Rev. E cards)&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
**  Bugfix: integral clamp should work now. only positive integral_clamp values are valid!&lt;br /&gt;
&lt;br /&gt;
* '''Details:''': &lt;br /&gt;
** 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.&lt;br /&gt;
** available for both Rev. E and Rev. B cards, the upper byte of card_type parameter now reports the pcb revision.&lt;br /&gt;
** development note: It is built on Quartus10.1. &lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
**none yet!&lt;br /&gt;
&lt;br /&gt;
* '''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&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.e (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000e_06oct2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''  &lt;br /&gt;
** 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!&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.d ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000d_04aug2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
**  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.&lt;br /&gt;
&lt;br /&gt;
* '''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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** '''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 [[http://e-mode.phas.ubc.ca/mcewiki/index.php/Image:Clamp_unstable.png scope snapshot]] used slow_fb_ramp.py script for testing.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage and Timing Report''' (readout_card.fit.rpt and readout_card.tan.rpt): no change compared to 5.0.a/b/c&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.c (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000c_16jun2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.b&lt;br /&gt;
** Re-introduced flux-jump counter clamping to maintain continuity in behavior from past versions of firmware in the field.&lt;br /&gt;
** '''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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** '''flux-jump is broken'''. flux-jumping block misbehaves at the first jump in the negative range.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt): [[rc_5.0.c_fit_rpt]]&lt;br /&gt;
 ; Total logic elements     ; 26,800 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total pins               ; 358 / 616 ( 58 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 76 / 112 ( 68 % )                             ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): [[rc_5.0.c_tan_rpt]]&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.964 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.382 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 15.924 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.b (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000b_03jun2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.a&lt;br /&gt;
** 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.&lt;br /&gt;
** 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&lt;br /&gt;
** A sticky bit that only affected servo_mode=0,1,2 was also removed from the flux-jumping block.&lt;br /&gt;
** flx_lp_init commands now also clear the flux-jumping block as well.&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** flux-jump does not work when jumping to negative values.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt): [[rc_5.0.b_fit_rpt]]&lt;br /&gt;
 ; Total logic elements     ; 26,745 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total pins               ; 358 / 616 ( 58 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 76 / 112 ( 68 % )                             ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): [[rc_5.0.b_tan_rpt]]&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.459 ns  &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.895 ns  &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 15.956 ns&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.a =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000a_12mar2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on the merger of rev. 5.0.8 and 5.0.9.&lt;br /&gt;
** '''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.&lt;br /&gt;
** The low pass filter has 20-bit input and f_3dB/f_samp = 122Hz/15kHz .&lt;br /&gt;
** The flux-jump clamping that was removed in 5.0.9 is included once again here, as we decided this is safer for now.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** &amp;quot;lock_dat_left&amp;quot; parameter that was removed in 5.0.9 is now implemented as &amp;quot;lock_dat_lsb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** flx_lp_init does not reinitialize the flux-jump block&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
** tag name: rc_v0500000a_12mar2009! years were mixed up!&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.9 (buggy) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000009_13nov2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** Removes a sticky bit in pid calculation result storage -- in fsfb_processor.&lt;br /&gt;
** Adds a command to clamp the growth of the I-term to prevent wrapping and track down the source of Caltech's FSFB jumps.&lt;br /&gt;
** Removed the unused lock_dat_left parameter.  The ability to shift left was moved to the fsfb_corr block some time ago.&lt;br /&gt;
** Fixed a sign extension bug acting on the flux quanta, which limited the value to 8191.  Changed the extension from signed to unsigned.&lt;br /&gt;
** Removed ineffective clamping in the flux-jump calculation block.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** integral_clamp read/write command does not work. &lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,960 / 41,250 ( 68 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.825 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.878 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 14.397 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.8 (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000008_09oct2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** type 1 low-pass filter: f&amp;lt;sub&amp;gt;3dB&amp;lt;/sub&amp;gt;=122Hz for f&amp;lt;sub&amp;gt;sample&amp;lt;/sub&amp;gt;=15kHz&lt;br /&gt;
** Filter-input-width changed from 18b to 20b with no sticky bits!&lt;br /&gt;
** removed sticky bits in internal arithmetic of the filter.&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.7 (type-2 filter) =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000007_09oct2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** type-2 low-pass-filter: f&amp;lt;sub&amp;gt;3dB&amp;lt;/sub&amp;gt;=75Hz for f&amp;lt;sub&amp;gt;sample&amp;lt;/sub&amp;gt;=30000.&lt;br /&gt;
** Filter-input-width changed from 18b to 20b with no sticky bits!&lt;br /&gt;
** inter-biquad-gain-scaling for the filter is 2^14&lt;br /&gt;
** filter results are scaled down by 2^3 in the output of the filter.&lt;br /&gt;
** removed sticky bits in internal arithmetics&lt;br /&gt;
** _correction_ disabled in fsfb_proc_pidz&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** quartus.ini file was '''not''' present in synth directory.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** none to report&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
== Revision 5.0.6  (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05000006_15sep2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Only Valid for Rev. C/D Cards&lt;br /&gt;
** Based on rev. 5.0.3&lt;br /&gt;
** tcl file updated for Rev. D and aligned with top-level and qsf (project file). &lt;br /&gt;
** flux loop commented, just to try sampling the ADC. &lt;br /&gt;
** compiled with Q9.1&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.5 (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000005_04sep2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** changed the low-pass-filter to f(3db)=75Hz for f(sample)=30000.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** quartus.ini file was '''not''' present in synth directory.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** negative inputs to the filter cause filter to have a non-flat pass-band region. may have to do with sign-handling...&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.4 =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000004_28aug2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** BUG Fix: handles 14-bit flux quanta (changed the multiplier to unsigned)&lt;br /&gt;
** BUG Fix: changed standard logic vector extension from signed to unsigned in flux-jumping slave.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,170 / 41,250 ( 63 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.541 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.612 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 15.398 ns ;&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.3  =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05000003_21aug2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** ONLY valid REV C/D RC Cards&lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** flux loop commented, just to try sampling the ADC.&lt;br /&gt;
** updated tcl file, but still need to rely on project file as well as qsf file.&lt;br /&gt;
** changed default level of adc_sclk to '1'&lt;br /&gt;
** dac_clr_n was changed from an output to an input.&lt;br /&gt;
** added 'locked' interface to rc_pll_stratix_iii&lt;br /&gt;
** renamed the adc_pll clock signals to more explanitory names&lt;br /&gt;
** added the FPGA_DEVICE_FAMILY generic to the dispatch interace for synthesis of the dc_fifo in lvds_rx&lt;br /&gt;
** uncommented DDR interface to force the syntesizer to use correct left and right PLLs (in conjunction with ADC and DDR PLLs)&lt;br /&gt;
** added test signals to test_status to see clocks on the scope.&lt;br /&gt;
== Revision 5.0.2 (buggy) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000002_test00_tagged.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.1&lt;br /&gt;
** Fixed a bug in wbs_frame_data that stored data incorrectly if reporting 1 or 2 pixels only.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,186 / 41,250 ( 63 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.755 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.979 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.067 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.1 (buggy) (Filter + Raw + Rectangle, 2 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000001_26may2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Combines features in rev. 5.0.0 (2 LVDS Lines) and rev. 4.0.e (Filtered + Raw), with the NEW rectangle mode.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** [[CVS Diff Between sys_v05000000 and rc_v05000001]]&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** Has a bug in wbs_frame_data that stored data incorrectly if reporting 1 or 2 pixels only.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,565 / 41,250 ( 64 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.656 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.861 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 14.167 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.0 (Filter Only, 2 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000000_22dec2008.sof (tagged as sys_v05000000_22dec2008)&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware v05000000+ of all other cards!!!&lt;br /&gt;
** Adds the ability to read out one column of data continuously from readout cards&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** [[CVS Diff Between rc_v0400000c and sys_v05000000]]&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,607 / 41,250 ( 65 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 406,016 / 3,423,744 ( 12 % )             ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.558 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.892 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.987 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.f (Filter + Raw, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0400000f_12feb2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on 4.0.e and in parallel with 5.0.9 (equivalent version, clamping is not included)&lt;br /&gt;
** Incorporates fixes that were done to flux-jumping between 5.0.2 - 5.0.4 - 5.0.9.  Namely:&lt;br /&gt;
*** Changes a multiplier from signed to unsigned (in fsfb_corr_multplier.vhd).&lt;br /&gt;
*** Changes sign extension from signed to unsigned (in flux_quanta_ram_admin.vhd).&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None reported yet.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,773 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,321,984 / 3,423,744 ( 39 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.539 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.118 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.318 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.e (Filter + Raw, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0400000e_27apr2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on 4.0.d&lt;br /&gt;
** Combines both raw- and filtered-data modes.&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are disabled.&lt;br /&gt;
** Tested by Matt Hasselfield.  &lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are disabled.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,048 / 41,250 ( 66 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,321,984 / 3,423,744 ( 39 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.675 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.907 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.728 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.d (Raw Only, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  rc_v0400000d_20090417.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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.&lt;br /&gt;
** The firmware takes a new command called readout_col_index which specifies which column to capture raw data from.&lt;br /&gt;
** Other than readout_col_index, the firmware functions the same as previous raw-data firmware, including then need to issue a capture_raw command.&lt;br /&gt;
** For more information on raw-data, see:  http://e-mode.phas.ubc.ca/mcewiki/index.php/Raw-mode_readout&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** Differences between 4.0.c and 4.0.d&lt;br /&gt;
 U system/test/source/tb/tb_cc_rcs_bcs_ac.vhd&lt;br /&gt;
 U all_cards/dispatch/source/rtl/dispatch_wishbone.vhd&lt;br /&gt;
 U library/sys_param/source/rtl/wishbone_pack.vhd&lt;br /&gt;
 U readout_card/adc_sample_coadd/source/rtl/adc_sample_coadd.vhd&lt;br /&gt;
 U readout_card/adc_sample_coadd/source/rtl/adc_sample_coadd_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop/source/rtl/flux_loop.vhd&lt;br /&gt;
 U readout_card/flux_loop/source/rtl/flux_loop_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/rtl/flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/rtl/flux_loop_ctrl_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/tb/tb1_flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/tb/tb2_flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/fsfb_calc/source/rtl/fsfb_fltr_regs.vhd&lt;br /&gt;
 U readout_card/fsfb_corr/source/rtl/fsfb_corr.vhd&lt;br /&gt;
 U readout_card/readout_card/source/rtl/readout_card.vhd&lt;br /&gt;
 U readout_card/readout_card/source/rtl/readout_card_pack.vhd&lt;br /&gt;
 U readout_card/wbs_frame_data/source/rtl/wbs_frame_data.vhd&lt;br /&gt;
 U readout_card/wbs_frame_data/source/rtl/wbs_frame_data_pack.vhd&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are not supported.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 24,554 / 41,250 ( 60 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,262,592 / 3,423,744 ( 37 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.991 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.864 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.052 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.4.1 ==&lt;br /&gt;
* '''Filename:'''  rc_v04040001_21nov2008&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,241 / 41,250 ( 66 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 405,504 / 3,423,744 ( 12 % )                  ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.588 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.585 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.057 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.4.0 (buggy) ==&lt;br /&gt;
* '''Filename:'''  rc_v04040000_02oct2008&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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]].&lt;br /&gt;
** Re-integrated the id_thermo and fpga_thermo block in the readout_card.vhd top level that was removed in 4.0.c.&lt;br /&gt;
** 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.&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
** Adjusted the indentation in fsfb_io_controller.vhd to make the file more readable.&lt;br /&gt;
** 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.&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** The following commands lock up the Readout Card firmware:  CARD_ID_ADDR, CARD_TEMP_ADDR, FPGA_TEMP_ADDR.&lt;br /&gt;
** 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&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,099 / 41,250 ( 66 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 406,016 / 3,423,744 ( 12 % )                  ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.372 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.052 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.066 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.c ==&lt;br /&gt;
* '''Filename:'''  rc_v0400000c_15aug2008.sof&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Only has data modes 0, 1, 4, and 10.&lt;br /&gt;
** 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).&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** Changed a counter in the dispatch block to ease timing constraints in synthesis (dispatch_wishbone.vhd)&lt;br /&gt;
** 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.&lt;br /&gt;
** '''Removed''' the fpga_termo (command:  '''fpga_temp''') and id_thermo (commands: '''card_temp, card_id''') to ease timing constraints in synthesis (readout_card.vhd)&lt;br /&gt;
** Updated the tagged version of fpga_termo.vhd to include the new 'stale bit' feature&lt;br /&gt;
** Updated the tagged version of frame_timing_core.vhd to include the new 'err_o' interface&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None reported yet&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
* '''FPGA Resource Usage:'''&lt;br /&gt;
 Total logic elements : 25,058 / 41,250 ( 61 % )&lt;br /&gt;
 Total memory bits : 400,896 / 3,423,744 ( 12 % )&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.282 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.736 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.665 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.b (buggy) ==&lt;br /&gt;
Note: This revision is on a watch list, after the bug detected 15 July 2008.  See the bug section for more details.&lt;br /&gt;
* '''Filename''' : rc_v0400000b_04aug2008.sof&lt;br /&gt;
* '''Features'''&lt;br /&gt;
** data_mode 10 is added to provide more filtfb bits (compared to data mode 9) for planet observations. filtered_dat(27 downto 3) &amp;amp; flux_cnt_dat(6 downto 0)&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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]]&lt;br /&gt;
&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.a (buggy) ==&lt;br /&gt;
Note: This revision is on a watch list, after the bug detected 15 July 2008.  See the bug section for more details.&lt;br /&gt;
* '''Filename''' : rc_v0400000a_07jul2008.sof&lt;br /&gt;
* '''Bug Fix'''&lt;br /&gt;
** mce_status and adc_offset/flx_quanta commands do not fail after power up.&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** Seems to clip out channel 0 from data reporting.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.9 (buggy) ==&lt;br /&gt;
* '''Filename''' : rc_v04000009_26jun2008.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** sa_bias and offset DACs only refreshed when new values are written. (in previous versions, DACs were refreshed every frame)&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.8 ==&lt;br /&gt;
* '''Filename''' : rc_v04000008_26jun2008.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** The gaini, gainp, gaind resolution increased to 12-bit, i.e. -2048 to 2047 (formerly 10-bit).&lt;br /&gt;
&lt;br /&gt;
* '''Bug fix'''&lt;br /&gt;
** the bug associated with gainpid read before mce_reset is fixed.&lt;br /&gt;
&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.3.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04030007_26may2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** 14-bit raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** 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.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.2.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04020007_24may2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
* '''Bug fix'''&lt;br /&gt;
** the bug associated with reading from raw-buffer is fixed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.1.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04010007_25apr2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.6 (buggy) ==&lt;br /&gt;
* '''Filename''' : rc_v04000006_15feb2008.sof or .pof       &lt;br /&gt;
* '''Features''' &lt;br /&gt;
** '''bugfix''': unreliable reset due to unsafe and incomplete state machines is fixed.&lt;br /&gt;
** '''bugfix''': flux_jump sign problem fixed, so far proved in const_mode, to be tested in servo_mode with cold setup.&lt;br /&gt;
** servo_mode=2 or ramp previously only went from 0 to ramp_amp, but now goes from -8192 to -8192+ramp_amp&lt;br /&gt;
** new commands are added: ''scratch'' and ''card_type''. Scratch takes 8 values and can be used by software to detect reset.&lt;br /&gt;
** slot_id and fw_rev are now integrated as part of all_cards.vhd&lt;br /&gt;
** lvds_tx_b=0, This will allow Clock Card to use the secondary backplane lvds line and check whether RC is plugged in.&lt;br /&gt;
** filter_coeff in misc_banks_admin commented as it is not implemented and causes timing problems.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
** slot_id is only set after a resetmce is issued. (using the latest all_cards in the next revision will fix this)&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.5 ==&lt;br /&gt;
* '''Filename''' : rc_v04000005_01nov2007.sof or .pof       &lt;br /&gt;
* '''Features''' &lt;br /&gt;
** data mode 9 (mixed filt + flux jump) with windowing readjusted compared to data mode 8&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** unreliable resetmce. Sometimes, firmware waked up non-responsive on lvds lines.&lt;br /&gt;
** In data mode 5 and 9, flux-jump counter is not reported properly due to a sign error. However, flux jumping works fine.&lt;br /&gt;
&lt;br /&gt;
== Revision 3.0.19 ==&lt;br /&gt;
* '''Filename''' : rc_v03000019_16feb2007_raw.sof (no pof as one is not likely to run with this as regular firmware)&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** data mode 3 is enabled.&lt;br /&gt;
** filter is disabled as a compromise to fit the raw-mode buffer.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** unreliable resetmce. Sometimes, firmware waked up non-responsive on lvds lines.&lt;br /&gt;
&lt;br /&gt;
== Old Firmware Revisions ==&lt;br /&gt;
* '''4.0.4''':  rc_v04000004_11oct2007.sof  data mode 8 added (mixed filt + flux jump)&lt;br /&gt;
* '''4.0.3''':  rc_v04000003_19sep2007.sof  data mode 7 bit split readjusted to 10b error being bit 4 to 14&lt;br /&gt;
* '''4.0.2''':  rc_v04000002_11sep2007.sof  pid resolution increased to 10b, data mode 7 added&lt;br /&gt;
* '''4.0.1''':  rc_v04000001_06sep2007.sof  &lt;br /&gt;
* '''4.0.0''':  rc_v04000000_29aug2007.sof  supports readout_row_index * [[ bugs ]]&lt;br /&gt;
&lt;br /&gt;
= To-Do List =&lt;br /&gt;
* the starting point for the servo is currently zero and it would be nice to have it programmable.&lt;br /&gt;
&lt;br /&gt;
= RC Synthesis Notes =&lt;br /&gt;
# 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. &lt;br /&gt;
# Timing: There is no &amp;quot;lock region&amp;quot; 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.&lt;br /&gt;
# 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%.&lt;br /&gt;
# 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.&lt;br /&gt;
# 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):&lt;br /&gt;
 lpm_file =&amp;gt; &amp;quot;C:/scuba2_repository/cards/readout_card/fsfb_calc/source/rtl/ram_40x64.hex&amp;quot;, and&lt;br /&gt;
 lpm_file    : STRING;&lt;br /&gt;
#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. &lt;br /&gt;
----&lt;br /&gt;
[http://e-mode.phas.ubc.ca/mcewiki/index.php/Main_Page  MCE Main Page]&lt;/div&gt;</summary>
		<author><name>Bburger</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Readout_Card_firmware&amp;diff=4341</id>
		<title>Readout Card firmware</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Readout_Card_firmware&amp;diff=4341"/>
		<updated>2011-05-04T21:45:19Z</updated>

		<summary type="html">&lt;p&gt;Bburger: /* Revision 5.0.f */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Synthesis Reminders (for firmware developers)&lt;br /&gt;
** quartus.ini is not needed anymore (Fixed as of Q7, Altera SR10783580 2010-10-24)&lt;br /&gt;
** Remember that readout_card/fsfb_clac/source/rtl/ram_40x64.vhd must be initialized with the ram_40x64.hex file in the same directory.&lt;br /&gt;
== Revision 5.1.2 ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010002_18jan2011.sof (for Rev. E cards) &lt;br /&gt;
** rc_stratix3_v05010002_18jan2011.jic (for Rev. E cards) &lt;br /&gt;
** rc_v05010002_03feb2011.sof (for Rev. B cards) &lt;br /&gt;
** rc_v05010002_03feb2011.pof (for Rev. B cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.1 with k1 and k2 (filter params) limited to k1&amp;lt;16 and k2&amp;lt;32 in order to resolve the timing when compiling for smaller Stratix FPGA on RC Rev. B.&lt;br /&gt;
&lt;br /&gt;
* '''Bug fix:'''&lt;br /&gt;
** the 2-rows-off filtered data readout introduced with configurable filter in rev. 5.1.0 and 5.1.1 is fixed now.&lt;br /&gt;
 &lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** none so far.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt)&lt;br /&gt;
 ; Total logic elements      ; 33,285 / 41,250 ( 81 % )                       ;&lt;br /&gt;
 ; Total pins                ; 358 / 616 ( 58 % )                             ;&lt;br /&gt;
 ; Total memory bits         ; 1,405,440 / 3,423,744 ( 41 % )                 ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt)&lt;br /&gt;
 ; Fast Model Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 6.591 ns  &lt;br /&gt;
 ; Fast Model Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 7.206 ns  &lt;br /&gt;
 ; Fast Model Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 18.299 ns&lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.1 (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05010001_01dec2010.sof (for Rev. B cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.0, but k1 and k2 (filter params) are now limited to k1&amp;lt;16 and k2&amp;lt;32 in order to resolve the timing failures of compiling 5.1.0 for smaller Stratix FPGA on RC Rev. B.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** filter mode data is off by 2 rows. &lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.0 (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010000_01nov2010.sof  (for Rev. E cards)&lt;br /&gt;
** rc_v05010000_01nov2010.sof (for Rev. B cards) has timing failures '''do not use!!!'''&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** added configurable filter parameters specified by ''fltr_coeff'', default is the f&amp;lt;sub&amp;gt;cutoff&amp;lt;/sub&amp;gt;/f&amp;lt;sub&amp;gt;sampl&amp;lt;/sub&amp;gt;=122Hz/15kHz. see [[ Digital 4-pole Butterworth Low-pass filter ]]. &lt;br /&gt;
** ''fltr_type'' is set to 255 to indicate configurable filter parameters.&lt;br /&gt;
** see [http://www.phas.ubc.ca/~mce/mcedocs/software/SC2_ELE_S580_515_mce_command_description.pdf MCE command description]&lt;br /&gt;
** development notes: &lt;br /&gt;
*** It is built on Quartus10.1. &lt;br /&gt;
*** tcl files had to be updated as cmp syntax is not supported in Q10 anymore.&lt;br /&gt;
*** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** rc_v05010000_01nov2010.sof has timing failures that were overlooked, do not use this firmware for Rev.B cards. &lt;br /&gt;
** '''filter mode data is off by 2 rows.''' &lt;br /&gt;
&lt;br /&gt;
* '''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&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.f  ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000f_22oct2010.sof (for Rev. B cards)&lt;br /&gt;
** rc_stratix3_v0500000f_22oct2010.sof  (for Rev. E cards)&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
**  Bugfix: integral clamp should work now. only positive integral_clamp values are valid!&lt;br /&gt;
&lt;br /&gt;
* '''Details:''': &lt;br /&gt;
** 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.&lt;br /&gt;
** available for both Rev. E and Rev. B cards, the upper byte of card_type parameter now reports the pcb revision.&lt;br /&gt;
** development note: It is built on Quartus10.1. &lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
**none yet!&lt;br /&gt;
&lt;br /&gt;
* '''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&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.e (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000e_06oct2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''  &lt;br /&gt;
** 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!&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.d ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000d_04aug2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
**  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.&lt;br /&gt;
&lt;br /&gt;
* '''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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** '''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 [[http://e-mode.phas.ubc.ca/mcewiki/index.php/Image:Clamp_unstable.png scope snapshot]] used slow_fb_ramp.py script for testing.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage and Timing Report''' (readout_card.fit.rpt and readout_card.tan.rpt): no change compared to 5.0.a/b/c&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.c (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000c_16jun2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.b&lt;br /&gt;
** Re-introduced flux-jump counter clamping to maintain continuity in behavior from past versions of firmware in the field.&lt;br /&gt;
** '''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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** '''flux-jump is broken'''. flux-jumping block misbehaves at the first jump in the negative range.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt): [[rc_5.0.c_fit_rpt]]&lt;br /&gt;
 ; Total logic elements     ; 26,800 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total pins               ; 358 / 616 ( 58 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 76 / 112 ( 68 % )                             ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): [[rc_5.0.c_tan_rpt]]&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.964 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.382 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 15.924 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.b (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000b_03jun2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.a&lt;br /&gt;
** 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.&lt;br /&gt;
** 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&lt;br /&gt;
** A sticky bit that only affected servo_mode=0,1,2 was also removed from the flux-jumping block.&lt;br /&gt;
** flx_lp_init commands now also clear the flux-jumping block as well.&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** flux-jump does not work when jumping to negative values.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt): [[rc_5.0.b_fit_rpt]]&lt;br /&gt;
 ; Total logic elements     ; 26,745 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total pins               ; 358 / 616 ( 58 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 76 / 112 ( 68 % )                             ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): [[rc_5.0.b_tan_rpt]]&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.459 ns  &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.895 ns  &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 15.956 ns&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.a =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000a_12mar2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on the merger of rev. 5.0.8 and 5.0.9.&lt;br /&gt;
** '''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.&lt;br /&gt;
** The low pass filter has 20-bit input and f_3dB/f_samp = 122Hz/15kHz .&lt;br /&gt;
** The flux-jump clamping that was removed in 5.0.9 is included once again here, as we decided this is safer for now.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** &amp;quot;lock_dat_left&amp;quot; parameter that was removed in 5.0.9 is now implemented as &amp;quot;lock_dat_lsb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** flx_lp_init does not reinitialize the flux-jump block&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
** tag name: rc_v0500000a_12mar2009! years were mixed up!&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.9 (buggy) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000009_13nov2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** Removes a sticky bit in pid calculation result storage -- in fsfb_processor.&lt;br /&gt;
** Adds a command to clamp the growth of the I-term to prevent wrapping and track down the source of Caltech's FSFB jumps.&lt;br /&gt;
** Removed the unused lock_dat_left parameter.  The ability to shift left was moved to the fsfb_corr block some time ago.&lt;br /&gt;
** Fixed a sign extension bug acting on the flux quanta, which limited the value to 8191.  Changed the extension from signed to unsigned.&lt;br /&gt;
** Removed ineffective clamping in the flux-jump calculation block.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** integral_clamp read/write command does not work. &lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,960 / 41,250 ( 68 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.825 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.878 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 14.397 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.8 (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000008_09oct2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** type 1 low-pass filter: f&amp;lt;sub&amp;gt;3dB&amp;lt;/sub&amp;gt;=122Hz for f&amp;lt;sub&amp;gt;sample&amp;lt;/sub&amp;gt;=15kHz&lt;br /&gt;
** Filter-input-width changed from 18b to 20b with no sticky bits!&lt;br /&gt;
** removed sticky bits in internal arithmetic of the filter.&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.7 (type-2 filter) =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000007_09oct2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** type-2 low-pass-filter: f&amp;lt;sub&amp;gt;3dB&amp;lt;/sub&amp;gt;=75Hz for f&amp;lt;sub&amp;gt;sample&amp;lt;/sub&amp;gt;=30000.&lt;br /&gt;
** Filter-input-width changed from 18b to 20b with no sticky bits!&lt;br /&gt;
** inter-biquad-gain-scaling for the filter is 2^14&lt;br /&gt;
** filter results are scaled down by 2^3 in the output of the filter.&lt;br /&gt;
** removed sticky bits in internal arithmetics&lt;br /&gt;
** _correction_ disabled in fsfb_proc_pidz&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** quartus.ini file was '''not''' present in synth directory.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** none to report&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
== Revision 5.0.6  (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05000006_15sep2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Only Valid for Rev. C/D Cards&lt;br /&gt;
** Based on rev. 5.0.3&lt;br /&gt;
** tcl file updated for Rev. D and aligned with top-level and qsf (project file). &lt;br /&gt;
** flux loop commented, just to try sampling the ADC. &lt;br /&gt;
** compiled with Q9.1&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.5 (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000005_04sep2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** changed the low-pass-filter to f(3db)=75Hz for f(sample)=30000.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** quartus.ini file was '''not''' present in synth directory.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** negative inputs to the filter cause filter to have a non-flat pass-band region. may have to do with sign-handling...&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.4 =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000004_28aug2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** BUG Fix: handles 14-bit flux quanta (changed the multiplier to unsigned)&lt;br /&gt;
** BUG Fix: changed standard logic vector extension from signed to unsigned in flux-jumping slave.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,170 / 41,250 ( 63 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.541 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.612 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 15.398 ns ;&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.3  =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05000003_21aug2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** ONLY valid REV C/D RC Cards&lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** flux loop commented, just to try sampling the ADC.&lt;br /&gt;
** updated tcl file, but still need to rely on project file as well as qsf file.&lt;br /&gt;
** changed default level of adc_sclk to '1'&lt;br /&gt;
** dac_clr_n was changed from an output to an input.&lt;br /&gt;
** added 'locked' interface to rc_pll_stratix_iii&lt;br /&gt;
** renamed the adc_pll clock signals to more explanitory names&lt;br /&gt;
** added the FPGA_DEVICE_FAMILY generic to the dispatch interace for synthesis of the dc_fifo in lvds_rx&lt;br /&gt;
** uncommented DDR interface to force the syntesizer to use correct left and right PLLs (in conjunction with ADC and DDR PLLs)&lt;br /&gt;
** added test signals to test_status to see clocks on the scope.&lt;br /&gt;
== Revision 5.0.2 (buggy) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000002_test00_tagged.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.1&lt;br /&gt;
** Fixed a bug in wbs_frame_data that stored data incorrectly if reporting 1 or 2 pixels only.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,186 / 41,250 ( 63 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.755 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.979 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.067 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.1 (buggy) (Filter + Raw + Rectangle, 2 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000001_26may2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Combines features in rev. 5.0.0 (2 LVDS Lines) and rev. 4.0.e (Filtered + Raw), with the NEW rectangle mode.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** [[CVS Diff Between sys_v05000000 and rc_v05000001]]&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** Has a bug in wbs_frame_data that stored data incorrectly if reporting 1 or 2 pixels only.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,565 / 41,250 ( 64 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.656 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.861 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 14.167 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.0 (Filter Only, 2 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000000_22dec2008.sof (tagged as sys_v05000000_22dec2008)&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware v05000000+ of all other cards!!!&lt;br /&gt;
** Adds the ability to read out one column of data continuously from readout cards&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** [[CVS Diff Between rc_v0400000c and sys_v05000000]]&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,607 / 41,250 ( 65 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 406,016 / 3,423,744 ( 12 % )             ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.558 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.892 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.987 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.f (Filter + Raw, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0400000f_12feb2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on 4.0.e and in parallel with 5.0.9 (equivalent version, clamping is not included)&lt;br /&gt;
** Incorporates fixes that were done to flux-jumping between 5.0.2 - 5.0.4 - 5.0.9.  Namely:&lt;br /&gt;
*** Changes a multiplier from signed to unsigned (in fsfb_corr_multplier.vhd).&lt;br /&gt;
*** Changes sign extension from signed to unsigned (in flux_quanta_ram_admin.vhd).&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None reported yet.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,773 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,321,984 / 3,423,744 ( 39 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.539 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.118 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.318 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.e (Filter + Raw, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0400000e_27apr2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on 4.0.d&lt;br /&gt;
** Combines both raw- and filtered-data modes.&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are disabled.&lt;br /&gt;
** Tested by Matt Hasselfield.  &lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are disabled.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,048 / 41,250 ( 66 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,321,984 / 3,423,744 ( 39 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.675 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.907 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.728 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.d (Raw Only, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  rc_v0400000d_20090417.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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.&lt;br /&gt;
** The firmware takes a new command called readout_col_index which specifies which column to capture raw data from.&lt;br /&gt;
** Other than readout_col_index, the firmware functions the same as previous raw-data firmware, including then need to issue a capture_raw command.&lt;br /&gt;
** For more information on raw-data, see:  http://e-mode.phas.ubc.ca/mcewiki/index.php/Raw-mode_readout&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** Differences between 4.0.c and 4.0.d&lt;br /&gt;
 U system/test/source/tb/tb_cc_rcs_bcs_ac.vhd&lt;br /&gt;
 U all_cards/dispatch/source/rtl/dispatch_wishbone.vhd&lt;br /&gt;
 U library/sys_param/source/rtl/wishbone_pack.vhd&lt;br /&gt;
 U readout_card/adc_sample_coadd/source/rtl/adc_sample_coadd.vhd&lt;br /&gt;
 U readout_card/adc_sample_coadd/source/rtl/adc_sample_coadd_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop/source/rtl/flux_loop.vhd&lt;br /&gt;
 U readout_card/flux_loop/source/rtl/flux_loop_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/rtl/flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/rtl/flux_loop_ctrl_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/tb/tb1_flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/tb/tb2_flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/fsfb_calc/source/rtl/fsfb_fltr_regs.vhd&lt;br /&gt;
 U readout_card/fsfb_corr/source/rtl/fsfb_corr.vhd&lt;br /&gt;
 U readout_card/readout_card/source/rtl/readout_card.vhd&lt;br /&gt;
 U readout_card/readout_card/source/rtl/readout_card_pack.vhd&lt;br /&gt;
 U readout_card/wbs_frame_data/source/rtl/wbs_frame_data.vhd&lt;br /&gt;
 U readout_card/wbs_frame_data/source/rtl/wbs_frame_data_pack.vhd&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are not supported.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 24,554 / 41,250 ( 60 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,262,592 / 3,423,744 ( 37 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.991 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.864 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.052 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.4.1 ==&lt;br /&gt;
* '''Filename:'''  rc_v04040001_21nov2008&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,241 / 41,250 ( 66 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 405,504 / 3,423,744 ( 12 % )                  ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.588 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.585 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.057 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.4.0 (buggy) ==&lt;br /&gt;
* '''Filename:'''  rc_v04040000_02oct2008&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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]].&lt;br /&gt;
** Re-integrated the id_thermo and fpga_thermo block in the readout_card.vhd top level that was removed in 4.0.c.&lt;br /&gt;
** 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.&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
** Adjusted the indentation in fsfb_io_controller.vhd to make the file more readable.&lt;br /&gt;
** 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.&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** The following commands lock up the Readout Card firmware:  CARD_ID_ADDR, CARD_TEMP_ADDR, FPGA_TEMP_ADDR.&lt;br /&gt;
** 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&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,099 / 41,250 ( 66 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 406,016 / 3,423,744 ( 12 % )                  ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.372 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.052 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.066 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.c ==&lt;br /&gt;
* '''Filename:'''  rc_v0400000c_15aug2008.sof&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Only has data modes 0, 1, 4, and 10.&lt;br /&gt;
** 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).&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** Changed a counter in the dispatch block to ease timing constraints in synthesis (dispatch_wishbone.vhd)&lt;br /&gt;
** 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.&lt;br /&gt;
** '''Removed''' the fpga_termo (command:  '''fpga_temp''') and id_thermo (commands: '''card_temp, card_id''') to ease timing constraints in synthesis (readout_card.vhd)&lt;br /&gt;
** Updated the tagged version of fpga_termo.vhd to include the new 'stale bit' feature&lt;br /&gt;
** Updated the tagged version of frame_timing_core.vhd to include the new 'err_o' interface&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None reported yet&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
* '''FPGA Resource Usage:'''&lt;br /&gt;
 Total logic elements : 25,058 / 41,250 ( 61 % )&lt;br /&gt;
 Total memory bits : 400,896 / 3,423,744 ( 12 % )&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.282 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.736 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.665 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.b (buggy) ==&lt;br /&gt;
Note: This revision is on a watch list, after the bug detected 15 July 2008.  See the bug section for more details.&lt;br /&gt;
* '''Filename''' : rc_v0400000b_04aug2008.sof&lt;br /&gt;
* '''Features'''&lt;br /&gt;
** data_mode 10 is added to provide more filtfb bits (compared to data mode 9) for planet observations. filtered_dat(27 downto 3) &amp;amp; flux_cnt_dat(6 downto 0)&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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]]&lt;br /&gt;
&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.a (buggy) ==&lt;br /&gt;
Note: This revision is on a watch list, after the bug detected 15 July 2008.  See the bug section for more details.&lt;br /&gt;
* '''Filename''' : rc_v0400000a_07jul2008.sof&lt;br /&gt;
* '''Bug Fix'''&lt;br /&gt;
** mce_status and adc_offset/flx_quanta commands do not fail after power up.&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** Seems to clip out channel 0 from data reporting.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.9 (buggy) ==&lt;br /&gt;
* '''Filename''' : rc_v04000009_26jun2008.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** sa_bias and offset DACs only refreshed when new values are written. (in previous versions, DACs were refreshed every frame)&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.8 ==&lt;br /&gt;
* '''Filename''' : rc_v04000008_26jun2008.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** The gaini, gainp, gaind resolution increased to 12-bit, i.e. -2048 to 2047 (formerly 10-bit).&lt;br /&gt;
&lt;br /&gt;
* '''Bug fix'''&lt;br /&gt;
** the bug associated with gainpid read before mce_reset is fixed.&lt;br /&gt;
&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.3.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04030007_26may2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** 14-bit raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** 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.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.2.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04020007_24may2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
* '''Bug fix'''&lt;br /&gt;
** the bug associated with reading from raw-buffer is fixed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.1.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04010007_25apr2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.6 (buggy) ==&lt;br /&gt;
* '''Filename''' : rc_v04000006_15feb2008.sof or .pof       &lt;br /&gt;
* '''Features''' &lt;br /&gt;
** '''bugfix''': unreliable reset due to unsafe and incomplete state machines is fixed.&lt;br /&gt;
** '''bugfix''': flux_jump sign problem fixed, so far proved in const_mode, to be tested in servo_mode with cold setup.&lt;br /&gt;
** servo_mode=2 or ramp previously only went from 0 to ramp_amp, but now goes from -8192 to -8192+ramp_amp&lt;br /&gt;
** new commands are added: ''scratch'' and ''card_type''. Scratch takes 8 values and can be used by software to detect reset.&lt;br /&gt;
** slot_id and fw_rev are now integrated as part of all_cards.vhd&lt;br /&gt;
** lvds_tx_b=0, This will allow Clock Card to use the secondary backplane lvds line and check whether RC is plugged in.&lt;br /&gt;
** filter_coeff in misc_banks_admin commented as it is not implemented and causes timing problems.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
** slot_id is only set after a resetmce is issued. (using the latest all_cards in the next revision will fix this)&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.5 ==&lt;br /&gt;
* '''Filename''' : rc_v04000005_01nov2007.sof or .pof       &lt;br /&gt;
* '''Features''' &lt;br /&gt;
** data mode 9 (mixed filt + flux jump) with windowing readjusted compared to data mode 8&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** unreliable resetmce. Sometimes, firmware waked up non-responsive on lvds lines.&lt;br /&gt;
** In data mode 5 and 9, flux-jump counter is not reported properly due to a sign error. However, flux jumping works fine.&lt;br /&gt;
&lt;br /&gt;
== Revision 3.0.19 ==&lt;br /&gt;
* '''Filename''' : rc_v03000019_16feb2007_raw.sof (no pof as one is not likely to run with this as regular firmware)&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** data mode 3 is enabled.&lt;br /&gt;
** filter is disabled as a compromise to fit the raw-mode buffer.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** unreliable resetmce. Sometimes, firmware waked up non-responsive on lvds lines.&lt;br /&gt;
&lt;br /&gt;
== Old Firmware Revisions ==&lt;br /&gt;
* '''4.0.4''':  rc_v04000004_11oct2007.sof  data mode 8 added (mixed filt + flux jump)&lt;br /&gt;
* '''4.0.3''':  rc_v04000003_19sep2007.sof  data mode 7 bit split readjusted to 10b error being bit 4 to 14&lt;br /&gt;
* '''4.0.2''':  rc_v04000002_11sep2007.sof  pid resolution increased to 10b, data mode 7 added&lt;br /&gt;
* '''4.0.1''':  rc_v04000001_06sep2007.sof  &lt;br /&gt;
* '''4.0.0''':  rc_v04000000_29aug2007.sof  supports readout_row_index * [[ bugs ]]&lt;br /&gt;
&lt;br /&gt;
= To-Do List =&lt;br /&gt;
* the starting point for the servo is currently zero and it would be nice to have it programmable.&lt;br /&gt;
&lt;br /&gt;
= RC Synthesis Notes =&lt;br /&gt;
# 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. &lt;br /&gt;
# Timing: There is no &amp;quot;lock region&amp;quot; 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.&lt;br /&gt;
# 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%.&lt;br /&gt;
# 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.&lt;br /&gt;
# 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):&lt;br /&gt;
 lpm_file =&amp;gt; &amp;quot;C:/scuba2_repository/cards/readout_card/fsfb_calc/source/rtl/ram_40x64.hex&amp;quot;, and&lt;br /&gt;
 lpm_file    : STRING;&lt;br /&gt;
#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. &lt;br /&gt;
----&lt;br /&gt;
[http://e-mode.phas.ubc.ca/mcewiki/index.php/Main_Page  MCE Main Page]&lt;/div&gt;</summary>
		<author><name>Bburger</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Readout_Card_firmware&amp;diff=4340</id>
		<title>Readout Card firmware</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Readout_Card_firmware&amp;diff=4340"/>
		<updated>2011-05-04T21:45:08Z</updated>

		<summary type="html">&lt;p&gt;Bburger: /* Revision 5.0.d */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Synthesis Reminders (for firmware developers)&lt;br /&gt;
** quartus.ini is not needed anymore (Fixed as of Q7, Altera SR10783580 2010-10-24)&lt;br /&gt;
** Remember that readout_card/fsfb_clac/source/rtl/ram_40x64.vhd must be initialized with the ram_40x64.hex file in the same directory.&lt;br /&gt;
== Revision 5.1.2 ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010002_18jan2011.sof (for Rev. E cards) &lt;br /&gt;
** rc_stratix3_v05010002_18jan2011.jic (for Rev. E cards) &lt;br /&gt;
** rc_v05010002_03feb2011.sof (for Rev. B cards) &lt;br /&gt;
** rc_v05010002_03feb2011.pof (for Rev. B cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.1 with k1 and k2 (filter params) limited to k1&amp;lt;16 and k2&amp;lt;32 in order to resolve the timing when compiling for smaller Stratix FPGA on RC Rev. B.&lt;br /&gt;
&lt;br /&gt;
* '''Bug fix:'''&lt;br /&gt;
** the 2-rows-off filtered data readout introduced with configurable filter in rev. 5.1.0 and 5.1.1 is fixed now.&lt;br /&gt;
 &lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** none so far.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt)&lt;br /&gt;
 ; Total logic elements      ; 33,285 / 41,250 ( 81 % )                       ;&lt;br /&gt;
 ; Total pins                ; 358 / 616 ( 58 % )                             ;&lt;br /&gt;
 ; Total memory bits         ; 1,405,440 / 3,423,744 ( 41 % )                 ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt)&lt;br /&gt;
 ; Fast Model Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 6.591 ns  &lt;br /&gt;
 ; Fast Model Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 7.206 ns  &lt;br /&gt;
 ; Fast Model Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 18.299 ns&lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.1 (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05010001_01dec2010.sof (for Rev. B cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.0, but k1 and k2 (filter params) are now limited to k1&amp;lt;16 and k2&amp;lt;32 in order to resolve the timing failures of compiling 5.1.0 for smaller Stratix FPGA on RC Rev. B.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** filter mode data is off by 2 rows. &lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.0 (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010000_01nov2010.sof  (for Rev. E cards)&lt;br /&gt;
** rc_v05010000_01nov2010.sof (for Rev. B cards) has timing failures '''do not use!!!'''&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** added configurable filter parameters specified by ''fltr_coeff'', default is the f&amp;lt;sub&amp;gt;cutoff&amp;lt;/sub&amp;gt;/f&amp;lt;sub&amp;gt;sampl&amp;lt;/sub&amp;gt;=122Hz/15kHz. see [[ Digital 4-pole Butterworth Low-pass filter ]]. &lt;br /&gt;
** ''fltr_type'' is set to 255 to indicate configurable filter parameters.&lt;br /&gt;
** see [http://www.phas.ubc.ca/~mce/mcedocs/software/SC2_ELE_S580_515_mce_command_description.pdf MCE command description]&lt;br /&gt;
** development notes: &lt;br /&gt;
*** It is built on Quartus10.1. &lt;br /&gt;
*** tcl files had to be updated as cmp syntax is not supported in Q10 anymore.&lt;br /&gt;
*** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** rc_v05010000_01nov2010.sof has timing failures that were overlooked, do not use this firmware for Rev.B cards. &lt;br /&gt;
** '''filter mode data is off by 2 rows.''' &lt;br /&gt;
&lt;br /&gt;
* '''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&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.f  =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000f_22oct2010.sof (for Rev. B cards)&lt;br /&gt;
** rc_stratix3_v0500000f_22oct2010.sof  (for Rev. E cards)&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
**  Bugfix: integral clamp should work now. only positive integral_clamp values are valid!&lt;br /&gt;
&lt;br /&gt;
* '''Details:''': &lt;br /&gt;
** 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.&lt;br /&gt;
** available for both Rev. E and Rev. B cards, the upper byte of card_type parameter now reports the pcb revision.&lt;br /&gt;
** development note: It is built on Quartus10.1. &lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
**none yet!&lt;br /&gt;
&lt;br /&gt;
* '''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&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.e (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000e_06oct2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''  &lt;br /&gt;
** 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!&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.d ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000d_04aug2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
**  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.&lt;br /&gt;
&lt;br /&gt;
* '''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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** '''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 [[http://e-mode.phas.ubc.ca/mcewiki/index.php/Image:Clamp_unstable.png scope snapshot]] used slow_fb_ramp.py script for testing.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage and Timing Report''' (readout_card.fit.rpt and readout_card.tan.rpt): no change compared to 5.0.a/b/c&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.c (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000c_16jun2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.b&lt;br /&gt;
** Re-introduced flux-jump counter clamping to maintain continuity in behavior from past versions of firmware in the field.&lt;br /&gt;
** '''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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** '''flux-jump is broken'''. flux-jumping block misbehaves at the first jump in the negative range.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt): [[rc_5.0.c_fit_rpt]]&lt;br /&gt;
 ; Total logic elements     ; 26,800 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total pins               ; 358 / 616 ( 58 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 76 / 112 ( 68 % )                             ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): [[rc_5.0.c_tan_rpt]]&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.964 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.382 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 15.924 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.b (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000b_03jun2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.a&lt;br /&gt;
** 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.&lt;br /&gt;
** 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&lt;br /&gt;
** A sticky bit that only affected servo_mode=0,1,2 was also removed from the flux-jumping block.&lt;br /&gt;
** flx_lp_init commands now also clear the flux-jumping block as well.&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** flux-jump does not work when jumping to negative values.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt): [[rc_5.0.b_fit_rpt]]&lt;br /&gt;
 ; Total logic elements     ; 26,745 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total pins               ; 358 / 616 ( 58 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 76 / 112 ( 68 % )                             ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): [[rc_5.0.b_tan_rpt]]&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.459 ns  &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.895 ns  &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 15.956 ns&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.a =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000a_12mar2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on the merger of rev. 5.0.8 and 5.0.9.&lt;br /&gt;
** '''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.&lt;br /&gt;
** The low pass filter has 20-bit input and f_3dB/f_samp = 122Hz/15kHz .&lt;br /&gt;
** The flux-jump clamping that was removed in 5.0.9 is included once again here, as we decided this is safer for now.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** &amp;quot;lock_dat_left&amp;quot; parameter that was removed in 5.0.9 is now implemented as &amp;quot;lock_dat_lsb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** flx_lp_init does not reinitialize the flux-jump block&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
** tag name: rc_v0500000a_12mar2009! years were mixed up!&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.9 (buggy) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000009_13nov2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** Removes a sticky bit in pid calculation result storage -- in fsfb_processor.&lt;br /&gt;
** Adds a command to clamp the growth of the I-term to prevent wrapping and track down the source of Caltech's FSFB jumps.&lt;br /&gt;
** Removed the unused lock_dat_left parameter.  The ability to shift left was moved to the fsfb_corr block some time ago.&lt;br /&gt;
** Fixed a sign extension bug acting on the flux quanta, which limited the value to 8191.  Changed the extension from signed to unsigned.&lt;br /&gt;
** Removed ineffective clamping in the flux-jump calculation block.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** integral_clamp read/write command does not work. &lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,960 / 41,250 ( 68 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.825 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.878 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 14.397 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.8 (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000008_09oct2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** type 1 low-pass filter: f&amp;lt;sub&amp;gt;3dB&amp;lt;/sub&amp;gt;=122Hz for f&amp;lt;sub&amp;gt;sample&amp;lt;/sub&amp;gt;=15kHz&lt;br /&gt;
** Filter-input-width changed from 18b to 20b with no sticky bits!&lt;br /&gt;
** removed sticky bits in internal arithmetic of the filter.&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.7 (type-2 filter) =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000007_09oct2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** type-2 low-pass-filter: f&amp;lt;sub&amp;gt;3dB&amp;lt;/sub&amp;gt;=75Hz for f&amp;lt;sub&amp;gt;sample&amp;lt;/sub&amp;gt;=30000.&lt;br /&gt;
** Filter-input-width changed from 18b to 20b with no sticky bits!&lt;br /&gt;
** inter-biquad-gain-scaling for the filter is 2^14&lt;br /&gt;
** filter results are scaled down by 2^3 in the output of the filter.&lt;br /&gt;
** removed sticky bits in internal arithmetics&lt;br /&gt;
** _correction_ disabled in fsfb_proc_pidz&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** quartus.ini file was '''not''' present in synth directory.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** none to report&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
== Revision 5.0.6  (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05000006_15sep2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Only Valid for Rev. C/D Cards&lt;br /&gt;
** Based on rev. 5.0.3&lt;br /&gt;
** tcl file updated for Rev. D and aligned with top-level and qsf (project file). &lt;br /&gt;
** flux loop commented, just to try sampling the ADC. &lt;br /&gt;
** compiled with Q9.1&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.5 (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000005_04sep2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** changed the low-pass-filter to f(3db)=75Hz for f(sample)=30000.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** quartus.ini file was '''not''' present in synth directory.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** negative inputs to the filter cause filter to have a non-flat pass-band region. may have to do with sign-handling...&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.4 =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000004_28aug2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** BUG Fix: handles 14-bit flux quanta (changed the multiplier to unsigned)&lt;br /&gt;
** BUG Fix: changed standard logic vector extension from signed to unsigned in flux-jumping slave.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,170 / 41,250 ( 63 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.541 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.612 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 15.398 ns ;&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.3  =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05000003_21aug2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** ONLY valid REV C/D RC Cards&lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** flux loop commented, just to try sampling the ADC.&lt;br /&gt;
** updated tcl file, but still need to rely on project file as well as qsf file.&lt;br /&gt;
** changed default level of adc_sclk to '1'&lt;br /&gt;
** dac_clr_n was changed from an output to an input.&lt;br /&gt;
** added 'locked' interface to rc_pll_stratix_iii&lt;br /&gt;
** renamed the adc_pll clock signals to more explanitory names&lt;br /&gt;
** added the FPGA_DEVICE_FAMILY generic to the dispatch interace for synthesis of the dc_fifo in lvds_rx&lt;br /&gt;
** uncommented DDR interface to force the syntesizer to use correct left and right PLLs (in conjunction with ADC and DDR PLLs)&lt;br /&gt;
** added test signals to test_status to see clocks on the scope.&lt;br /&gt;
== Revision 5.0.2 (buggy) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000002_test00_tagged.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.1&lt;br /&gt;
** Fixed a bug in wbs_frame_data that stored data incorrectly if reporting 1 or 2 pixels only.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,186 / 41,250 ( 63 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.755 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.979 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.067 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.1 (buggy) (Filter + Raw + Rectangle, 2 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000001_26may2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Combines features in rev. 5.0.0 (2 LVDS Lines) and rev. 4.0.e (Filtered + Raw), with the NEW rectangle mode.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** [[CVS Diff Between sys_v05000000 and rc_v05000001]]&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** Has a bug in wbs_frame_data that stored data incorrectly if reporting 1 or 2 pixels only.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,565 / 41,250 ( 64 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.656 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.861 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 14.167 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.0 (Filter Only, 2 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000000_22dec2008.sof (tagged as sys_v05000000_22dec2008)&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware v05000000+ of all other cards!!!&lt;br /&gt;
** Adds the ability to read out one column of data continuously from readout cards&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** [[CVS Diff Between rc_v0400000c and sys_v05000000]]&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,607 / 41,250 ( 65 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 406,016 / 3,423,744 ( 12 % )             ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.558 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.892 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.987 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.f (Filter + Raw, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0400000f_12feb2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on 4.0.e and in parallel with 5.0.9 (equivalent version, clamping is not included)&lt;br /&gt;
** Incorporates fixes that were done to flux-jumping between 5.0.2 - 5.0.4 - 5.0.9.  Namely:&lt;br /&gt;
*** Changes a multiplier from signed to unsigned (in fsfb_corr_multplier.vhd).&lt;br /&gt;
*** Changes sign extension from signed to unsigned (in flux_quanta_ram_admin.vhd).&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None reported yet.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,773 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,321,984 / 3,423,744 ( 39 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.539 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.118 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.318 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.e (Filter + Raw, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0400000e_27apr2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on 4.0.d&lt;br /&gt;
** Combines both raw- and filtered-data modes.&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are disabled.&lt;br /&gt;
** Tested by Matt Hasselfield.  &lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are disabled.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,048 / 41,250 ( 66 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,321,984 / 3,423,744 ( 39 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.675 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.907 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.728 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.d (Raw Only, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  rc_v0400000d_20090417.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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.&lt;br /&gt;
** The firmware takes a new command called readout_col_index which specifies which column to capture raw data from.&lt;br /&gt;
** Other than readout_col_index, the firmware functions the same as previous raw-data firmware, including then need to issue a capture_raw command.&lt;br /&gt;
** For more information on raw-data, see:  http://e-mode.phas.ubc.ca/mcewiki/index.php/Raw-mode_readout&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** Differences between 4.0.c and 4.0.d&lt;br /&gt;
 U system/test/source/tb/tb_cc_rcs_bcs_ac.vhd&lt;br /&gt;
 U all_cards/dispatch/source/rtl/dispatch_wishbone.vhd&lt;br /&gt;
 U library/sys_param/source/rtl/wishbone_pack.vhd&lt;br /&gt;
 U readout_card/adc_sample_coadd/source/rtl/adc_sample_coadd.vhd&lt;br /&gt;
 U readout_card/adc_sample_coadd/source/rtl/adc_sample_coadd_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop/source/rtl/flux_loop.vhd&lt;br /&gt;
 U readout_card/flux_loop/source/rtl/flux_loop_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/rtl/flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/rtl/flux_loop_ctrl_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/tb/tb1_flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/tb/tb2_flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/fsfb_calc/source/rtl/fsfb_fltr_regs.vhd&lt;br /&gt;
 U readout_card/fsfb_corr/source/rtl/fsfb_corr.vhd&lt;br /&gt;
 U readout_card/readout_card/source/rtl/readout_card.vhd&lt;br /&gt;
 U readout_card/readout_card/source/rtl/readout_card_pack.vhd&lt;br /&gt;
 U readout_card/wbs_frame_data/source/rtl/wbs_frame_data.vhd&lt;br /&gt;
 U readout_card/wbs_frame_data/source/rtl/wbs_frame_data_pack.vhd&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are not supported.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 24,554 / 41,250 ( 60 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,262,592 / 3,423,744 ( 37 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.991 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.864 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.052 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.4.1 ==&lt;br /&gt;
* '''Filename:'''  rc_v04040001_21nov2008&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,241 / 41,250 ( 66 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 405,504 / 3,423,744 ( 12 % )                  ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.588 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.585 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.057 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.4.0 (buggy) ==&lt;br /&gt;
* '''Filename:'''  rc_v04040000_02oct2008&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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]].&lt;br /&gt;
** Re-integrated the id_thermo and fpga_thermo block in the readout_card.vhd top level that was removed in 4.0.c.&lt;br /&gt;
** 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.&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
** Adjusted the indentation in fsfb_io_controller.vhd to make the file more readable.&lt;br /&gt;
** 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.&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** The following commands lock up the Readout Card firmware:  CARD_ID_ADDR, CARD_TEMP_ADDR, FPGA_TEMP_ADDR.&lt;br /&gt;
** 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&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,099 / 41,250 ( 66 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 406,016 / 3,423,744 ( 12 % )                  ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.372 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.052 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.066 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.c ==&lt;br /&gt;
* '''Filename:'''  rc_v0400000c_15aug2008.sof&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Only has data modes 0, 1, 4, and 10.&lt;br /&gt;
** 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).&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** Changed a counter in the dispatch block to ease timing constraints in synthesis (dispatch_wishbone.vhd)&lt;br /&gt;
** 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.&lt;br /&gt;
** '''Removed''' the fpga_termo (command:  '''fpga_temp''') and id_thermo (commands: '''card_temp, card_id''') to ease timing constraints in synthesis (readout_card.vhd)&lt;br /&gt;
** Updated the tagged version of fpga_termo.vhd to include the new 'stale bit' feature&lt;br /&gt;
** Updated the tagged version of frame_timing_core.vhd to include the new 'err_o' interface&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None reported yet&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
* '''FPGA Resource Usage:'''&lt;br /&gt;
 Total logic elements : 25,058 / 41,250 ( 61 % )&lt;br /&gt;
 Total memory bits : 400,896 / 3,423,744 ( 12 % )&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.282 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.736 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.665 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.b (buggy) ==&lt;br /&gt;
Note: This revision is on a watch list, after the bug detected 15 July 2008.  See the bug section for more details.&lt;br /&gt;
* '''Filename''' : rc_v0400000b_04aug2008.sof&lt;br /&gt;
* '''Features'''&lt;br /&gt;
** data_mode 10 is added to provide more filtfb bits (compared to data mode 9) for planet observations. filtered_dat(27 downto 3) &amp;amp; flux_cnt_dat(6 downto 0)&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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]]&lt;br /&gt;
&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.a (buggy) ==&lt;br /&gt;
Note: This revision is on a watch list, after the bug detected 15 July 2008.  See the bug section for more details.&lt;br /&gt;
* '''Filename''' : rc_v0400000a_07jul2008.sof&lt;br /&gt;
* '''Bug Fix'''&lt;br /&gt;
** mce_status and adc_offset/flx_quanta commands do not fail after power up.&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** Seems to clip out channel 0 from data reporting.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.9 (buggy) ==&lt;br /&gt;
* '''Filename''' : rc_v04000009_26jun2008.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** sa_bias and offset DACs only refreshed when new values are written. (in previous versions, DACs were refreshed every frame)&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.8 ==&lt;br /&gt;
* '''Filename''' : rc_v04000008_26jun2008.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** The gaini, gainp, gaind resolution increased to 12-bit, i.e. -2048 to 2047 (formerly 10-bit).&lt;br /&gt;
&lt;br /&gt;
* '''Bug fix'''&lt;br /&gt;
** the bug associated with gainpid read before mce_reset is fixed.&lt;br /&gt;
&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.3.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04030007_26may2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** 14-bit raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** 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.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.2.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04020007_24may2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
* '''Bug fix'''&lt;br /&gt;
** the bug associated with reading from raw-buffer is fixed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.1.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04010007_25apr2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.6 (buggy) ==&lt;br /&gt;
* '''Filename''' : rc_v04000006_15feb2008.sof or .pof       &lt;br /&gt;
* '''Features''' &lt;br /&gt;
** '''bugfix''': unreliable reset due to unsafe and incomplete state machines is fixed.&lt;br /&gt;
** '''bugfix''': flux_jump sign problem fixed, so far proved in const_mode, to be tested in servo_mode with cold setup.&lt;br /&gt;
** servo_mode=2 or ramp previously only went from 0 to ramp_amp, but now goes from -8192 to -8192+ramp_amp&lt;br /&gt;
** new commands are added: ''scratch'' and ''card_type''. Scratch takes 8 values and can be used by software to detect reset.&lt;br /&gt;
** slot_id and fw_rev are now integrated as part of all_cards.vhd&lt;br /&gt;
** lvds_tx_b=0, This will allow Clock Card to use the secondary backplane lvds line and check whether RC is plugged in.&lt;br /&gt;
** filter_coeff in misc_banks_admin commented as it is not implemented and causes timing problems.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
** slot_id is only set after a resetmce is issued. (using the latest all_cards in the next revision will fix this)&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.5 ==&lt;br /&gt;
* '''Filename''' : rc_v04000005_01nov2007.sof or .pof       &lt;br /&gt;
* '''Features''' &lt;br /&gt;
** data mode 9 (mixed filt + flux jump) with windowing readjusted compared to data mode 8&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** unreliable resetmce. Sometimes, firmware waked up non-responsive on lvds lines.&lt;br /&gt;
** In data mode 5 and 9, flux-jump counter is not reported properly due to a sign error. However, flux jumping works fine.&lt;br /&gt;
&lt;br /&gt;
== Revision 3.0.19 ==&lt;br /&gt;
* '''Filename''' : rc_v03000019_16feb2007_raw.sof (no pof as one is not likely to run with this as regular firmware)&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** data mode 3 is enabled.&lt;br /&gt;
** filter is disabled as a compromise to fit the raw-mode buffer.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** unreliable resetmce. Sometimes, firmware waked up non-responsive on lvds lines.&lt;br /&gt;
&lt;br /&gt;
== Old Firmware Revisions ==&lt;br /&gt;
* '''4.0.4''':  rc_v04000004_11oct2007.sof  data mode 8 added (mixed filt + flux jump)&lt;br /&gt;
* '''4.0.3''':  rc_v04000003_19sep2007.sof  data mode 7 bit split readjusted to 10b error being bit 4 to 14&lt;br /&gt;
* '''4.0.2''':  rc_v04000002_11sep2007.sof  pid resolution increased to 10b, data mode 7 added&lt;br /&gt;
* '''4.0.1''':  rc_v04000001_06sep2007.sof  &lt;br /&gt;
* '''4.0.0''':  rc_v04000000_29aug2007.sof  supports readout_row_index * [[ bugs ]]&lt;br /&gt;
&lt;br /&gt;
= To-Do List =&lt;br /&gt;
* the starting point for the servo is currently zero and it would be nice to have it programmable.&lt;br /&gt;
&lt;br /&gt;
= RC Synthesis Notes =&lt;br /&gt;
# 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. &lt;br /&gt;
# Timing: There is no &amp;quot;lock region&amp;quot; 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.&lt;br /&gt;
# 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%.&lt;br /&gt;
# 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.&lt;br /&gt;
# 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):&lt;br /&gt;
 lpm_file =&amp;gt; &amp;quot;C:/scuba2_repository/cards/readout_card/fsfb_calc/source/rtl/ram_40x64.hex&amp;quot;, and&lt;br /&gt;
 lpm_file    : STRING;&lt;br /&gt;
#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. &lt;br /&gt;
----&lt;br /&gt;
[http://e-mode.phas.ubc.ca/mcewiki/index.php/Main_Page  MCE Main Page]&lt;/div&gt;</summary>
		<author><name>Bburger</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Readout_Card_firmware&amp;diff=4339</id>
		<title>Readout Card firmware</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Readout_Card_firmware&amp;diff=4339"/>
		<updated>2011-05-04T21:43:36Z</updated>

		<summary type="html">&lt;p&gt;Bburger: /* Revision 5.0.f */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Synthesis Reminders (for firmware developers)&lt;br /&gt;
** quartus.ini is not needed anymore (Fixed as of Q7, Altera SR10783580 2010-10-24)&lt;br /&gt;
** Remember that readout_card/fsfb_clac/source/rtl/ram_40x64.vhd must be initialized with the ram_40x64.hex file in the same directory.&lt;br /&gt;
== Revision 5.1.2 ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010002_18jan2011.sof (for Rev. E cards) &lt;br /&gt;
** rc_stratix3_v05010002_18jan2011.jic (for Rev. E cards) &lt;br /&gt;
** rc_v05010002_03feb2011.sof (for Rev. B cards) &lt;br /&gt;
** rc_v05010002_03feb2011.pof (for Rev. B cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.1 with k1 and k2 (filter params) limited to k1&amp;lt;16 and k2&amp;lt;32 in order to resolve the timing when compiling for smaller Stratix FPGA on RC Rev. B.&lt;br /&gt;
&lt;br /&gt;
* '''Bug fix:'''&lt;br /&gt;
** the 2-rows-off filtered data readout introduced with configurable filter in rev. 5.1.0 and 5.1.1 is fixed now.&lt;br /&gt;
 &lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** none so far.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt)&lt;br /&gt;
 ; Total logic elements      ; 33,285 / 41,250 ( 81 % )                       ;&lt;br /&gt;
 ; Total pins                ; 358 / 616 ( 58 % )                             ;&lt;br /&gt;
 ; Total memory bits         ; 1,405,440 / 3,423,744 ( 41 % )                 ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt)&lt;br /&gt;
 ; Fast Model Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 6.591 ns  &lt;br /&gt;
 ; Fast Model Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 7.206 ns  &lt;br /&gt;
 ; Fast Model Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 18.299 ns&lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.1 (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05010001_01dec2010.sof (for Rev. B cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.0, but k1 and k2 (filter params) are now limited to k1&amp;lt;16 and k2&amp;lt;32 in order to resolve the timing failures of compiling 5.1.0 for smaller Stratix FPGA on RC Rev. B.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** filter mode data is off by 2 rows. &lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.0 (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010000_01nov2010.sof  (for Rev. E cards)&lt;br /&gt;
** rc_v05010000_01nov2010.sof (for Rev. B cards) has timing failures '''do not use!!!'''&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** added configurable filter parameters specified by ''fltr_coeff'', default is the f&amp;lt;sub&amp;gt;cutoff&amp;lt;/sub&amp;gt;/f&amp;lt;sub&amp;gt;sampl&amp;lt;/sub&amp;gt;=122Hz/15kHz. see [[ Digital 4-pole Butterworth Low-pass filter ]]. &lt;br /&gt;
** ''fltr_type'' is set to 255 to indicate configurable filter parameters.&lt;br /&gt;
** see [http://www.phas.ubc.ca/~mce/mcedocs/software/SC2_ELE_S580_515_mce_command_description.pdf MCE command description]&lt;br /&gt;
** development notes: &lt;br /&gt;
*** It is built on Quartus10.1. &lt;br /&gt;
*** tcl files had to be updated as cmp syntax is not supported in Q10 anymore.&lt;br /&gt;
*** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** rc_v05010000_01nov2010.sof has timing failures that were overlooked, do not use this firmware for Rev.B cards. &lt;br /&gt;
** '''filter mode data is off by 2 rows.''' &lt;br /&gt;
&lt;br /&gt;
* '''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&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.f  =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000f_22oct2010.sof (for Rev. B cards)&lt;br /&gt;
** rc_stratix3_v0500000f_22oct2010.sof  (for Rev. E cards)&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
**  Bugfix: integral clamp should work now. only positive integral_clamp values are valid!&lt;br /&gt;
&lt;br /&gt;
* '''Details:''': &lt;br /&gt;
** 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.&lt;br /&gt;
** available for both Rev. E and Rev. B cards, the upper byte of card_type parameter now reports the pcb revision.&lt;br /&gt;
** development note: It is built on Quartus10.1. &lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
**none yet!&lt;br /&gt;
&lt;br /&gt;
* '''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&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.e (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000e_06oct2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''  &lt;br /&gt;
** 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!&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.d =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000d_04aug2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
**  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.&lt;br /&gt;
&lt;br /&gt;
* '''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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** '''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 [[http://e-mode.phas.ubc.ca/mcewiki/index.php/Image:Clamp_unstable.png scope snapshot]] used slow_fb_ramp.py script for testing.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage and Timing Report''' (readout_card.fit.rpt and readout_card.tan.rpt): no change compared to 5.0.a/b/c&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.c (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000c_16jun2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.b&lt;br /&gt;
** Re-introduced flux-jump counter clamping to maintain continuity in behavior from past versions of firmware in the field.&lt;br /&gt;
** '''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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** '''flux-jump is broken'''. flux-jumping block misbehaves at the first jump in the negative range.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt): [[rc_5.0.c_fit_rpt]]&lt;br /&gt;
 ; Total logic elements     ; 26,800 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total pins               ; 358 / 616 ( 58 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 76 / 112 ( 68 % )                             ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): [[rc_5.0.c_tan_rpt]]&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.964 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.382 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 15.924 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.b (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000b_03jun2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.a&lt;br /&gt;
** 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.&lt;br /&gt;
** 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&lt;br /&gt;
** A sticky bit that only affected servo_mode=0,1,2 was also removed from the flux-jumping block.&lt;br /&gt;
** flx_lp_init commands now also clear the flux-jumping block as well.&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** flux-jump does not work when jumping to negative values.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt): [[rc_5.0.b_fit_rpt]]&lt;br /&gt;
 ; Total logic elements     ; 26,745 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total pins               ; 358 / 616 ( 58 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 76 / 112 ( 68 % )                             ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): [[rc_5.0.b_tan_rpt]]&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.459 ns  &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.895 ns  &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 15.956 ns&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.a =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000a_12mar2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on the merger of rev. 5.0.8 and 5.0.9.&lt;br /&gt;
** '''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.&lt;br /&gt;
** The low pass filter has 20-bit input and f_3dB/f_samp = 122Hz/15kHz .&lt;br /&gt;
** The flux-jump clamping that was removed in 5.0.9 is included once again here, as we decided this is safer for now.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** &amp;quot;lock_dat_left&amp;quot; parameter that was removed in 5.0.9 is now implemented as &amp;quot;lock_dat_lsb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** flx_lp_init does not reinitialize the flux-jump block&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
** tag name: rc_v0500000a_12mar2009! years were mixed up!&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.9 (buggy) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000009_13nov2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** Removes a sticky bit in pid calculation result storage -- in fsfb_processor.&lt;br /&gt;
** Adds a command to clamp the growth of the I-term to prevent wrapping and track down the source of Caltech's FSFB jumps.&lt;br /&gt;
** Removed the unused lock_dat_left parameter.  The ability to shift left was moved to the fsfb_corr block some time ago.&lt;br /&gt;
** Fixed a sign extension bug acting on the flux quanta, which limited the value to 8191.  Changed the extension from signed to unsigned.&lt;br /&gt;
** Removed ineffective clamping in the flux-jump calculation block.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** integral_clamp read/write command does not work. &lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,960 / 41,250 ( 68 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.825 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.878 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 14.397 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.8 (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000008_09oct2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** type 1 low-pass filter: f&amp;lt;sub&amp;gt;3dB&amp;lt;/sub&amp;gt;=122Hz for f&amp;lt;sub&amp;gt;sample&amp;lt;/sub&amp;gt;=15kHz&lt;br /&gt;
** Filter-input-width changed from 18b to 20b with no sticky bits!&lt;br /&gt;
** removed sticky bits in internal arithmetic of the filter.&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.7 (type-2 filter) =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000007_09oct2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** type-2 low-pass-filter: f&amp;lt;sub&amp;gt;3dB&amp;lt;/sub&amp;gt;=75Hz for f&amp;lt;sub&amp;gt;sample&amp;lt;/sub&amp;gt;=30000.&lt;br /&gt;
** Filter-input-width changed from 18b to 20b with no sticky bits!&lt;br /&gt;
** inter-biquad-gain-scaling for the filter is 2^14&lt;br /&gt;
** filter results are scaled down by 2^3 in the output of the filter.&lt;br /&gt;
** removed sticky bits in internal arithmetics&lt;br /&gt;
** _correction_ disabled in fsfb_proc_pidz&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** quartus.ini file was '''not''' present in synth directory.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** none to report&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
== Revision 5.0.6  (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05000006_15sep2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Only Valid for Rev. C/D Cards&lt;br /&gt;
** Based on rev. 5.0.3&lt;br /&gt;
** tcl file updated for Rev. D and aligned with top-level and qsf (project file). &lt;br /&gt;
** flux loop commented, just to try sampling the ADC. &lt;br /&gt;
** compiled with Q9.1&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.5 (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000005_04sep2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** changed the low-pass-filter to f(3db)=75Hz for f(sample)=30000.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** quartus.ini file was '''not''' present in synth directory.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** negative inputs to the filter cause filter to have a non-flat pass-band region. may have to do with sign-handling...&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.4 =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000004_28aug2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** BUG Fix: handles 14-bit flux quanta (changed the multiplier to unsigned)&lt;br /&gt;
** BUG Fix: changed standard logic vector extension from signed to unsigned in flux-jumping slave.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,170 / 41,250 ( 63 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.541 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.612 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 15.398 ns ;&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.3  =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05000003_21aug2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** ONLY valid REV C/D RC Cards&lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** flux loop commented, just to try sampling the ADC.&lt;br /&gt;
** updated tcl file, but still need to rely on project file as well as qsf file.&lt;br /&gt;
** changed default level of adc_sclk to '1'&lt;br /&gt;
** dac_clr_n was changed from an output to an input.&lt;br /&gt;
** added 'locked' interface to rc_pll_stratix_iii&lt;br /&gt;
** renamed the adc_pll clock signals to more explanitory names&lt;br /&gt;
** added the FPGA_DEVICE_FAMILY generic to the dispatch interace for synthesis of the dc_fifo in lvds_rx&lt;br /&gt;
** uncommented DDR interface to force the syntesizer to use correct left and right PLLs (in conjunction with ADC and DDR PLLs)&lt;br /&gt;
** added test signals to test_status to see clocks on the scope.&lt;br /&gt;
== Revision 5.0.2 (buggy) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000002_test00_tagged.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.1&lt;br /&gt;
** Fixed a bug in wbs_frame_data that stored data incorrectly if reporting 1 or 2 pixels only.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,186 / 41,250 ( 63 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.755 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.979 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.067 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.1 (buggy) (Filter + Raw + Rectangle, 2 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000001_26may2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Combines features in rev. 5.0.0 (2 LVDS Lines) and rev. 4.0.e (Filtered + Raw), with the NEW rectangle mode.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** [[CVS Diff Between sys_v05000000 and rc_v05000001]]&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** Has a bug in wbs_frame_data that stored data incorrectly if reporting 1 or 2 pixels only.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,565 / 41,250 ( 64 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.656 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.861 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 14.167 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.0 (Filter Only, 2 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000000_22dec2008.sof (tagged as sys_v05000000_22dec2008)&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware v05000000+ of all other cards!!!&lt;br /&gt;
** Adds the ability to read out one column of data continuously from readout cards&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** [[CVS Diff Between rc_v0400000c and sys_v05000000]]&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,607 / 41,250 ( 65 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 406,016 / 3,423,744 ( 12 % )             ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.558 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.892 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.987 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.f (Filter + Raw, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0400000f_12feb2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on 4.0.e and in parallel with 5.0.9 (equivalent version, clamping is not included)&lt;br /&gt;
** Incorporates fixes that were done to flux-jumping between 5.0.2 - 5.0.4 - 5.0.9.  Namely:&lt;br /&gt;
*** Changes a multiplier from signed to unsigned (in fsfb_corr_multplier.vhd).&lt;br /&gt;
*** Changes sign extension from signed to unsigned (in flux_quanta_ram_admin.vhd).&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None reported yet.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,773 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,321,984 / 3,423,744 ( 39 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.539 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.118 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.318 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.e (Filter + Raw, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0400000e_27apr2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on 4.0.d&lt;br /&gt;
** Combines both raw- and filtered-data modes.&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are disabled.&lt;br /&gt;
** Tested by Matt Hasselfield.  &lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are disabled.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,048 / 41,250 ( 66 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,321,984 / 3,423,744 ( 39 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.675 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.907 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.728 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.d (Raw Only, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  rc_v0400000d_20090417.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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.&lt;br /&gt;
** The firmware takes a new command called readout_col_index which specifies which column to capture raw data from.&lt;br /&gt;
** Other than readout_col_index, the firmware functions the same as previous raw-data firmware, including then need to issue a capture_raw command.&lt;br /&gt;
** For more information on raw-data, see:  http://e-mode.phas.ubc.ca/mcewiki/index.php/Raw-mode_readout&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** Differences between 4.0.c and 4.0.d&lt;br /&gt;
 U system/test/source/tb/tb_cc_rcs_bcs_ac.vhd&lt;br /&gt;
 U all_cards/dispatch/source/rtl/dispatch_wishbone.vhd&lt;br /&gt;
 U library/sys_param/source/rtl/wishbone_pack.vhd&lt;br /&gt;
 U readout_card/adc_sample_coadd/source/rtl/adc_sample_coadd.vhd&lt;br /&gt;
 U readout_card/adc_sample_coadd/source/rtl/adc_sample_coadd_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop/source/rtl/flux_loop.vhd&lt;br /&gt;
 U readout_card/flux_loop/source/rtl/flux_loop_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/rtl/flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/rtl/flux_loop_ctrl_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/tb/tb1_flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/tb/tb2_flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/fsfb_calc/source/rtl/fsfb_fltr_regs.vhd&lt;br /&gt;
 U readout_card/fsfb_corr/source/rtl/fsfb_corr.vhd&lt;br /&gt;
 U readout_card/readout_card/source/rtl/readout_card.vhd&lt;br /&gt;
 U readout_card/readout_card/source/rtl/readout_card_pack.vhd&lt;br /&gt;
 U readout_card/wbs_frame_data/source/rtl/wbs_frame_data.vhd&lt;br /&gt;
 U readout_card/wbs_frame_data/source/rtl/wbs_frame_data_pack.vhd&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are not supported.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 24,554 / 41,250 ( 60 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,262,592 / 3,423,744 ( 37 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.991 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.864 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.052 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.4.1 ==&lt;br /&gt;
* '''Filename:'''  rc_v04040001_21nov2008&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,241 / 41,250 ( 66 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 405,504 / 3,423,744 ( 12 % )                  ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.588 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.585 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.057 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.4.0 (buggy) ==&lt;br /&gt;
* '''Filename:'''  rc_v04040000_02oct2008&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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]].&lt;br /&gt;
** Re-integrated the id_thermo and fpga_thermo block in the readout_card.vhd top level that was removed in 4.0.c.&lt;br /&gt;
** 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.&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
** Adjusted the indentation in fsfb_io_controller.vhd to make the file more readable.&lt;br /&gt;
** 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.&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** The following commands lock up the Readout Card firmware:  CARD_ID_ADDR, CARD_TEMP_ADDR, FPGA_TEMP_ADDR.&lt;br /&gt;
** 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&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,099 / 41,250 ( 66 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 406,016 / 3,423,744 ( 12 % )                  ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.372 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.052 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.066 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.c ==&lt;br /&gt;
* '''Filename:'''  rc_v0400000c_15aug2008.sof&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Only has data modes 0, 1, 4, and 10.&lt;br /&gt;
** 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).&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** Changed a counter in the dispatch block to ease timing constraints in synthesis (dispatch_wishbone.vhd)&lt;br /&gt;
** 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.&lt;br /&gt;
** '''Removed''' the fpga_termo (command:  '''fpga_temp''') and id_thermo (commands: '''card_temp, card_id''') to ease timing constraints in synthesis (readout_card.vhd)&lt;br /&gt;
** Updated the tagged version of fpga_termo.vhd to include the new 'stale bit' feature&lt;br /&gt;
** Updated the tagged version of frame_timing_core.vhd to include the new 'err_o' interface&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None reported yet&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
* '''FPGA Resource Usage:'''&lt;br /&gt;
 Total logic elements : 25,058 / 41,250 ( 61 % )&lt;br /&gt;
 Total memory bits : 400,896 / 3,423,744 ( 12 % )&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.282 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.736 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.665 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.b (buggy) ==&lt;br /&gt;
Note: This revision is on a watch list, after the bug detected 15 July 2008.  See the bug section for more details.&lt;br /&gt;
* '''Filename''' : rc_v0400000b_04aug2008.sof&lt;br /&gt;
* '''Features'''&lt;br /&gt;
** data_mode 10 is added to provide more filtfb bits (compared to data mode 9) for planet observations. filtered_dat(27 downto 3) &amp;amp; flux_cnt_dat(6 downto 0)&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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]]&lt;br /&gt;
&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.a (buggy) ==&lt;br /&gt;
Note: This revision is on a watch list, after the bug detected 15 July 2008.  See the bug section for more details.&lt;br /&gt;
* '''Filename''' : rc_v0400000a_07jul2008.sof&lt;br /&gt;
* '''Bug Fix'''&lt;br /&gt;
** mce_status and adc_offset/flx_quanta commands do not fail after power up.&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** Seems to clip out channel 0 from data reporting.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.9 (buggy) ==&lt;br /&gt;
* '''Filename''' : rc_v04000009_26jun2008.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** sa_bias and offset DACs only refreshed when new values are written. (in previous versions, DACs were refreshed every frame)&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.8 ==&lt;br /&gt;
* '''Filename''' : rc_v04000008_26jun2008.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** The gaini, gainp, gaind resolution increased to 12-bit, i.e. -2048 to 2047 (formerly 10-bit).&lt;br /&gt;
&lt;br /&gt;
* '''Bug fix'''&lt;br /&gt;
** the bug associated with gainpid read before mce_reset is fixed.&lt;br /&gt;
&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.3.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04030007_26may2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** 14-bit raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** 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.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.2.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04020007_24may2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
* '''Bug fix'''&lt;br /&gt;
** the bug associated with reading from raw-buffer is fixed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.1.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04010007_25apr2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.6 (buggy) ==&lt;br /&gt;
* '''Filename''' : rc_v04000006_15feb2008.sof or .pof       &lt;br /&gt;
* '''Features''' &lt;br /&gt;
** '''bugfix''': unreliable reset due to unsafe and incomplete state machines is fixed.&lt;br /&gt;
** '''bugfix''': flux_jump sign problem fixed, so far proved in const_mode, to be tested in servo_mode with cold setup.&lt;br /&gt;
** servo_mode=2 or ramp previously only went from 0 to ramp_amp, but now goes from -8192 to -8192+ramp_amp&lt;br /&gt;
** new commands are added: ''scratch'' and ''card_type''. Scratch takes 8 values and can be used by software to detect reset.&lt;br /&gt;
** slot_id and fw_rev are now integrated as part of all_cards.vhd&lt;br /&gt;
** lvds_tx_b=0, This will allow Clock Card to use the secondary backplane lvds line and check whether RC is plugged in.&lt;br /&gt;
** filter_coeff in misc_banks_admin commented as it is not implemented and causes timing problems.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
** slot_id is only set after a resetmce is issued. (using the latest all_cards in the next revision will fix this)&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.5 ==&lt;br /&gt;
* '''Filename''' : rc_v04000005_01nov2007.sof or .pof       &lt;br /&gt;
* '''Features''' &lt;br /&gt;
** data mode 9 (mixed filt + flux jump) with windowing readjusted compared to data mode 8&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** unreliable resetmce. Sometimes, firmware waked up non-responsive on lvds lines.&lt;br /&gt;
** In data mode 5 and 9, flux-jump counter is not reported properly due to a sign error. However, flux jumping works fine.&lt;br /&gt;
&lt;br /&gt;
== Revision 3.0.19 ==&lt;br /&gt;
* '''Filename''' : rc_v03000019_16feb2007_raw.sof (no pof as one is not likely to run with this as regular firmware)&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** data mode 3 is enabled.&lt;br /&gt;
** filter is disabled as a compromise to fit the raw-mode buffer.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** unreliable resetmce. Sometimes, firmware waked up non-responsive on lvds lines.&lt;br /&gt;
&lt;br /&gt;
== Old Firmware Revisions ==&lt;br /&gt;
* '''4.0.4''':  rc_v04000004_11oct2007.sof  data mode 8 added (mixed filt + flux jump)&lt;br /&gt;
* '''4.0.3''':  rc_v04000003_19sep2007.sof  data mode 7 bit split readjusted to 10b error being bit 4 to 14&lt;br /&gt;
* '''4.0.2''':  rc_v04000002_11sep2007.sof  pid resolution increased to 10b, data mode 7 added&lt;br /&gt;
* '''4.0.1''':  rc_v04000001_06sep2007.sof  &lt;br /&gt;
* '''4.0.0''':  rc_v04000000_29aug2007.sof  supports readout_row_index * [[ bugs ]]&lt;br /&gt;
&lt;br /&gt;
= To-Do List =&lt;br /&gt;
* the starting point for the servo is currently zero and it would be nice to have it programmable.&lt;br /&gt;
&lt;br /&gt;
= RC Synthesis Notes =&lt;br /&gt;
# 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. &lt;br /&gt;
# Timing: There is no &amp;quot;lock region&amp;quot; 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.&lt;br /&gt;
# 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%.&lt;br /&gt;
# 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.&lt;br /&gt;
# 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):&lt;br /&gt;
 lpm_file =&amp;gt; &amp;quot;C:/scuba2_repository/cards/readout_card/fsfb_calc/source/rtl/ram_40x64.hex&amp;quot;, and&lt;br /&gt;
 lpm_file    : STRING;&lt;br /&gt;
#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. &lt;br /&gt;
----&lt;br /&gt;
[http://e-mode.phas.ubc.ca/mcewiki/index.php/Main_Page  MCE Main Page]&lt;/div&gt;</summary>
		<author><name>Bburger</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Readout_Card_firmware&amp;diff=4338</id>
		<title>Readout Card firmware</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Readout_Card_firmware&amp;diff=4338"/>
		<updated>2011-05-04T21:36:42Z</updated>

		<summary type="html">&lt;p&gt;Bburger: /* Revision 5.1.2 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Synthesis Reminders (for firmware developers)&lt;br /&gt;
** quartus.ini is not needed anymore (Fixed as of Q7, Altera SR10783580 2010-10-24)&lt;br /&gt;
** Remember that readout_card/fsfb_clac/source/rtl/ram_40x64.vhd must be initialized with the ram_40x64.hex file in the same directory.&lt;br /&gt;
== Revision 5.1.2 ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010002_18jan2011.sof (for Rev. E cards) &lt;br /&gt;
** rc_stratix3_v05010002_18jan2011.jic (for Rev. E cards) &lt;br /&gt;
** rc_v05010002_03feb2011.sof (for Rev. B cards) &lt;br /&gt;
** rc_v05010002_03feb2011.pof (for Rev. B cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.1 with k1 and k2 (filter params) limited to k1&amp;lt;16 and k2&amp;lt;32 in order to resolve the timing when compiling for smaller Stratix FPGA on RC Rev. B.&lt;br /&gt;
&lt;br /&gt;
* '''Bug fix:'''&lt;br /&gt;
** the 2-rows-off filtered data readout introduced with configurable filter in rev. 5.1.0 and 5.1.1 is fixed now.&lt;br /&gt;
 &lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** none so far.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt)&lt;br /&gt;
 ; Total logic elements      ; 33,285 / 41,250 ( 81 % )                       ;&lt;br /&gt;
 ; Total pins                ; 358 / 616 ( 58 % )                             ;&lt;br /&gt;
 ; Total memory bits         ; 1,405,440 / 3,423,744 ( 41 % )                 ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt)&lt;br /&gt;
 ; Fast Model Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 6.591 ns  &lt;br /&gt;
 ; Fast Model Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 7.206 ns  &lt;br /&gt;
 ; Fast Model Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 18.299 ns&lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.1 (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05010001_01dec2010.sof (for Rev. B cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.0, but k1 and k2 (filter params) are now limited to k1&amp;lt;16 and k2&amp;lt;32 in order to resolve the timing failures of compiling 5.1.0 for smaller Stratix FPGA on RC Rev. B.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** filter mode data is off by 2 rows. &lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.0 (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010000_01nov2010.sof  (for Rev. E cards)&lt;br /&gt;
** rc_v05010000_01nov2010.sof (for Rev. B cards) has timing failures '''do not use!!!'''&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** added configurable filter parameters specified by ''fltr_coeff'', default is the f&amp;lt;sub&amp;gt;cutoff&amp;lt;/sub&amp;gt;/f&amp;lt;sub&amp;gt;sampl&amp;lt;/sub&amp;gt;=122Hz/15kHz. see [[ Digital 4-pole Butterworth Low-pass filter ]]. &lt;br /&gt;
** ''fltr_type'' is set to 255 to indicate configurable filter parameters.&lt;br /&gt;
** see [http://www.phas.ubc.ca/~mce/mcedocs/software/SC2_ELE_S580_515_mce_command_description.pdf MCE command description]&lt;br /&gt;
** development notes: &lt;br /&gt;
*** It is built on Quartus10.1. &lt;br /&gt;
*** tcl files had to be updated as cmp syntax is not supported in Q10 anymore.&lt;br /&gt;
*** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** rc_v05010000_01nov2010.sof has timing failures that were overlooked, do not use this firmware for Rev.B cards. &lt;br /&gt;
** '''filter mode data is off by 2 rows.''' &lt;br /&gt;
&lt;br /&gt;
* '''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&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.f  =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000f_22oct2010.sof (for Rev. B cards)&lt;br /&gt;
** rc_stratix3_v0500000f_22oct2010.sof  (for Rev. E cards)&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
**  Bugfix: integral clamp should work now. only positive integral_clamp values are valid!&lt;br /&gt;
&lt;br /&gt;
* '''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.&lt;br /&gt;
** available for both Rev. E and Rev. B cards, the upper byte of card_type parameter now reports the pcb revision.&lt;br /&gt;
** development note: It is built on Quartus10.1. &lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
**none yet!&lt;br /&gt;
&lt;br /&gt;
* '''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&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.e (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000e_06oct2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''  &lt;br /&gt;
** 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!&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.d =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000d_04aug2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
**  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.&lt;br /&gt;
&lt;br /&gt;
* '''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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** '''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 [[http://e-mode.phas.ubc.ca/mcewiki/index.php/Image:Clamp_unstable.png scope snapshot]] used slow_fb_ramp.py script for testing.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage and Timing Report''' (readout_card.fit.rpt and readout_card.tan.rpt): no change compared to 5.0.a/b/c&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.c (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000c_16jun2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.b&lt;br /&gt;
** Re-introduced flux-jump counter clamping to maintain continuity in behavior from past versions of firmware in the field.&lt;br /&gt;
** '''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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** '''flux-jump is broken'''. flux-jumping block misbehaves at the first jump in the negative range.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt): [[rc_5.0.c_fit_rpt]]&lt;br /&gt;
 ; Total logic elements     ; 26,800 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total pins               ; 358 / 616 ( 58 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 76 / 112 ( 68 % )                             ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): [[rc_5.0.c_tan_rpt]]&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.964 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.382 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 15.924 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.b (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000b_03jun2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.a&lt;br /&gt;
** 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.&lt;br /&gt;
** 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&lt;br /&gt;
** A sticky bit that only affected servo_mode=0,1,2 was also removed from the flux-jumping block.&lt;br /&gt;
** flx_lp_init commands now also clear the flux-jumping block as well.&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** flux-jump does not work when jumping to negative values.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt): [[rc_5.0.b_fit_rpt]]&lt;br /&gt;
 ; Total logic elements     ; 26,745 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total pins               ; 358 / 616 ( 58 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 76 / 112 ( 68 % )                             ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): [[rc_5.0.b_tan_rpt]]&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.459 ns  &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.895 ns  &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 15.956 ns&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.a =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000a_12mar2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on the merger of rev. 5.0.8 and 5.0.9.&lt;br /&gt;
** '''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.&lt;br /&gt;
** The low pass filter has 20-bit input and f_3dB/f_samp = 122Hz/15kHz .&lt;br /&gt;
** The flux-jump clamping that was removed in 5.0.9 is included once again here, as we decided this is safer for now.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** &amp;quot;lock_dat_left&amp;quot; parameter that was removed in 5.0.9 is now implemented as &amp;quot;lock_dat_lsb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** flx_lp_init does not reinitialize the flux-jump block&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
** tag name: rc_v0500000a_12mar2009! years were mixed up!&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.9 (buggy) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000009_13nov2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** Removes a sticky bit in pid calculation result storage -- in fsfb_processor.&lt;br /&gt;
** Adds a command to clamp the growth of the I-term to prevent wrapping and track down the source of Caltech's FSFB jumps.&lt;br /&gt;
** Removed the unused lock_dat_left parameter.  The ability to shift left was moved to the fsfb_corr block some time ago.&lt;br /&gt;
** Fixed a sign extension bug acting on the flux quanta, which limited the value to 8191.  Changed the extension from signed to unsigned.&lt;br /&gt;
** Removed ineffective clamping in the flux-jump calculation block.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** integral_clamp read/write command does not work. &lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,960 / 41,250 ( 68 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.825 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.878 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 14.397 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.8 (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000008_09oct2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** type 1 low-pass filter: f&amp;lt;sub&amp;gt;3dB&amp;lt;/sub&amp;gt;=122Hz for f&amp;lt;sub&amp;gt;sample&amp;lt;/sub&amp;gt;=15kHz&lt;br /&gt;
** Filter-input-width changed from 18b to 20b with no sticky bits!&lt;br /&gt;
** removed sticky bits in internal arithmetic of the filter.&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.7 (type-2 filter) =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000007_09oct2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** type-2 low-pass-filter: f&amp;lt;sub&amp;gt;3dB&amp;lt;/sub&amp;gt;=75Hz for f&amp;lt;sub&amp;gt;sample&amp;lt;/sub&amp;gt;=30000.&lt;br /&gt;
** Filter-input-width changed from 18b to 20b with no sticky bits!&lt;br /&gt;
** inter-biquad-gain-scaling for the filter is 2^14&lt;br /&gt;
** filter results are scaled down by 2^3 in the output of the filter.&lt;br /&gt;
** removed sticky bits in internal arithmetics&lt;br /&gt;
** _correction_ disabled in fsfb_proc_pidz&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** quartus.ini file was '''not''' present in synth directory.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** none to report&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
== Revision 5.0.6  (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05000006_15sep2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Only Valid for Rev. C/D Cards&lt;br /&gt;
** Based on rev. 5.0.3&lt;br /&gt;
** tcl file updated for Rev. D and aligned with top-level and qsf (project file). &lt;br /&gt;
** flux loop commented, just to try sampling the ADC. &lt;br /&gt;
** compiled with Q9.1&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.5 (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000005_04sep2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** changed the low-pass-filter to f(3db)=75Hz for f(sample)=30000.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** quartus.ini file was '''not''' present in synth directory.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** negative inputs to the filter cause filter to have a non-flat pass-band region. may have to do with sign-handling...&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.4 =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000004_28aug2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** BUG Fix: handles 14-bit flux quanta (changed the multiplier to unsigned)&lt;br /&gt;
** BUG Fix: changed standard logic vector extension from signed to unsigned in flux-jumping slave.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,170 / 41,250 ( 63 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.541 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.612 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 15.398 ns ;&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.3  =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05000003_21aug2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** ONLY valid REV C/D RC Cards&lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** flux loop commented, just to try sampling the ADC.&lt;br /&gt;
** updated tcl file, but still need to rely on project file as well as qsf file.&lt;br /&gt;
** changed default level of adc_sclk to '1'&lt;br /&gt;
** dac_clr_n was changed from an output to an input.&lt;br /&gt;
** added 'locked' interface to rc_pll_stratix_iii&lt;br /&gt;
** renamed the adc_pll clock signals to more explanitory names&lt;br /&gt;
** added the FPGA_DEVICE_FAMILY generic to the dispatch interace for synthesis of the dc_fifo in lvds_rx&lt;br /&gt;
** uncommented DDR interface to force the syntesizer to use correct left and right PLLs (in conjunction with ADC and DDR PLLs)&lt;br /&gt;
** added test signals to test_status to see clocks on the scope.&lt;br /&gt;
== Revision 5.0.2 (buggy) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000002_test00_tagged.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.1&lt;br /&gt;
** Fixed a bug in wbs_frame_data that stored data incorrectly if reporting 1 or 2 pixels only.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,186 / 41,250 ( 63 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.755 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.979 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.067 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.1 (buggy) (Filter + Raw + Rectangle, 2 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000001_26may2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Combines features in rev. 5.0.0 (2 LVDS Lines) and rev. 4.0.e (Filtered + Raw), with the NEW rectangle mode.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** [[CVS Diff Between sys_v05000000 and rc_v05000001]]&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** Has a bug in wbs_frame_data that stored data incorrectly if reporting 1 or 2 pixels only.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,565 / 41,250 ( 64 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.656 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.861 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 14.167 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.0 (Filter Only, 2 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000000_22dec2008.sof (tagged as sys_v05000000_22dec2008)&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware v05000000+ of all other cards!!!&lt;br /&gt;
** Adds the ability to read out one column of data continuously from readout cards&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** [[CVS Diff Between rc_v0400000c and sys_v05000000]]&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,607 / 41,250 ( 65 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 406,016 / 3,423,744 ( 12 % )             ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.558 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.892 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.987 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.f (Filter + Raw, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0400000f_12feb2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on 4.0.e and in parallel with 5.0.9 (equivalent version, clamping is not included)&lt;br /&gt;
** Incorporates fixes that were done to flux-jumping between 5.0.2 - 5.0.4 - 5.0.9.  Namely:&lt;br /&gt;
*** Changes a multiplier from signed to unsigned (in fsfb_corr_multplier.vhd).&lt;br /&gt;
*** Changes sign extension from signed to unsigned (in flux_quanta_ram_admin.vhd).&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None reported yet.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,773 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,321,984 / 3,423,744 ( 39 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.539 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.118 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.318 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.e (Filter + Raw, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0400000e_27apr2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on 4.0.d&lt;br /&gt;
** Combines both raw- and filtered-data modes.&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are disabled.&lt;br /&gt;
** Tested by Matt Hasselfield.  &lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are disabled.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,048 / 41,250 ( 66 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,321,984 / 3,423,744 ( 39 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.675 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.907 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.728 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.d (Raw Only, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  rc_v0400000d_20090417.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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.&lt;br /&gt;
** The firmware takes a new command called readout_col_index which specifies which column to capture raw data from.&lt;br /&gt;
** Other than readout_col_index, the firmware functions the same as previous raw-data firmware, including then need to issue a capture_raw command.&lt;br /&gt;
** For more information on raw-data, see:  http://e-mode.phas.ubc.ca/mcewiki/index.php/Raw-mode_readout&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** Differences between 4.0.c and 4.0.d&lt;br /&gt;
 U system/test/source/tb/tb_cc_rcs_bcs_ac.vhd&lt;br /&gt;
 U all_cards/dispatch/source/rtl/dispatch_wishbone.vhd&lt;br /&gt;
 U library/sys_param/source/rtl/wishbone_pack.vhd&lt;br /&gt;
 U readout_card/adc_sample_coadd/source/rtl/adc_sample_coadd.vhd&lt;br /&gt;
 U readout_card/adc_sample_coadd/source/rtl/adc_sample_coadd_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop/source/rtl/flux_loop.vhd&lt;br /&gt;
 U readout_card/flux_loop/source/rtl/flux_loop_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/rtl/flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/rtl/flux_loop_ctrl_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/tb/tb1_flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/tb/tb2_flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/fsfb_calc/source/rtl/fsfb_fltr_regs.vhd&lt;br /&gt;
 U readout_card/fsfb_corr/source/rtl/fsfb_corr.vhd&lt;br /&gt;
 U readout_card/readout_card/source/rtl/readout_card.vhd&lt;br /&gt;
 U readout_card/readout_card/source/rtl/readout_card_pack.vhd&lt;br /&gt;
 U readout_card/wbs_frame_data/source/rtl/wbs_frame_data.vhd&lt;br /&gt;
 U readout_card/wbs_frame_data/source/rtl/wbs_frame_data_pack.vhd&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are not supported.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 24,554 / 41,250 ( 60 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,262,592 / 3,423,744 ( 37 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.991 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.864 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.052 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.4.1 ==&lt;br /&gt;
* '''Filename:'''  rc_v04040001_21nov2008&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,241 / 41,250 ( 66 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 405,504 / 3,423,744 ( 12 % )                  ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.588 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.585 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.057 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.4.0 (buggy) ==&lt;br /&gt;
* '''Filename:'''  rc_v04040000_02oct2008&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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]].&lt;br /&gt;
** Re-integrated the id_thermo and fpga_thermo block in the readout_card.vhd top level that was removed in 4.0.c.&lt;br /&gt;
** 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.&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
** Adjusted the indentation in fsfb_io_controller.vhd to make the file more readable.&lt;br /&gt;
** 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.&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** The following commands lock up the Readout Card firmware:  CARD_ID_ADDR, CARD_TEMP_ADDR, FPGA_TEMP_ADDR.&lt;br /&gt;
** 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&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,099 / 41,250 ( 66 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 406,016 / 3,423,744 ( 12 % )                  ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.372 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.052 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.066 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.c ==&lt;br /&gt;
* '''Filename:'''  rc_v0400000c_15aug2008.sof&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Only has data modes 0, 1, 4, and 10.&lt;br /&gt;
** 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).&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** Changed a counter in the dispatch block to ease timing constraints in synthesis (dispatch_wishbone.vhd)&lt;br /&gt;
** 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.&lt;br /&gt;
** '''Removed''' the fpga_termo (command:  '''fpga_temp''') and id_thermo (commands: '''card_temp, card_id''') to ease timing constraints in synthesis (readout_card.vhd)&lt;br /&gt;
** Updated the tagged version of fpga_termo.vhd to include the new 'stale bit' feature&lt;br /&gt;
** Updated the tagged version of frame_timing_core.vhd to include the new 'err_o' interface&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None reported yet&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
* '''FPGA Resource Usage:'''&lt;br /&gt;
 Total logic elements : 25,058 / 41,250 ( 61 % )&lt;br /&gt;
 Total memory bits : 400,896 / 3,423,744 ( 12 % )&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.282 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.736 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.665 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.b (buggy) ==&lt;br /&gt;
Note: This revision is on a watch list, after the bug detected 15 July 2008.  See the bug section for more details.&lt;br /&gt;
* '''Filename''' : rc_v0400000b_04aug2008.sof&lt;br /&gt;
* '''Features'''&lt;br /&gt;
** data_mode 10 is added to provide more filtfb bits (compared to data mode 9) for planet observations. filtered_dat(27 downto 3) &amp;amp; flux_cnt_dat(6 downto 0)&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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]]&lt;br /&gt;
&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.a (buggy) ==&lt;br /&gt;
Note: This revision is on a watch list, after the bug detected 15 July 2008.  See the bug section for more details.&lt;br /&gt;
* '''Filename''' : rc_v0400000a_07jul2008.sof&lt;br /&gt;
* '''Bug Fix'''&lt;br /&gt;
** mce_status and adc_offset/flx_quanta commands do not fail after power up.&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** Seems to clip out channel 0 from data reporting.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.9 (buggy) ==&lt;br /&gt;
* '''Filename''' : rc_v04000009_26jun2008.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** sa_bias and offset DACs only refreshed when new values are written. (in previous versions, DACs were refreshed every frame)&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.8 ==&lt;br /&gt;
* '''Filename''' : rc_v04000008_26jun2008.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** The gaini, gainp, gaind resolution increased to 12-bit, i.e. -2048 to 2047 (formerly 10-bit).&lt;br /&gt;
&lt;br /&gt;
* '''Bug fix'''&lt;br /&gt;
** the bug associated with gainpid read before mce_reset is fixed.&lt;br /&gt;
&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.3.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04030007_26may2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** 14-bit raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** 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.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.2.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04020007_24may2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
* '''Bug fix'''&lt;br /&gt;
** the bug associated with reading from raw-buffer is fixed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.1.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04010007_25apr2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.6 (buggy) ==&lt;br /&gt;
* '''Filename''' : rc_v04000006_15feb2008.sof or .pof       &lt;br /&gt;
* '''Features''' &lt;br /&gt;
** '''bugfix''': unreliable reset due to unsafe and incomplete state machines is fixed.&lt;br /&gt;
** '''bugfix''': flux_jump sign problem fixed, so far proved in const_mode, to be tested in servo_mode with cold setup.&lt;br /&gt;
** servo_mode=2 or ramp previously only went from 0 to ramp_amp, but now goes from -8192 to -8192+ramp_amp&lt;br /&gt;
** new commands are added: ''scratch'' and ''card_type''. Scratch takes 8 values and can be used by software to detect reset.&lt;br /&gt;
** slot_id and fw_rev are now integrated as part of all_cards.vhd&lt;br /&gt;
** lvds_tx_b=0, This will allow Clock Card to use the secondary backplane lvds line and check whether RC is plugged in.&lt;br /&gt;
** filter_coeff in misc_banks_admin commented as it is not implemented and causes timing problems.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
** slot_id is only set after a resetmce is issued. (using the latest all_cards in the next revision will fix this)&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.5 ==&lt;br /&gt;
* '''Filename''' : rc_v04000005_01nov2007.sof or .pof       &lt;br /&gt;
* '''Features''' &lt;br /&gt;
** data mode 9 (mixed filt + flux jump) with windowing readjusted compared to data mode 8&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** unreliable resetmce. Sometimes, firmware waked up non-responsive on lvds lines.&lt;br /&gt;
** In data mode 5 and 9, flux-jump counter is not reported properly due to a sign error. However, flux jumping works fine.&lt;br /&gt;
&lt;br /&gt;
== Revision 3.0.19 ==&lt;br /&gt;
* '''Filename''' : rc_v03000019_16feb2007_raw.sof (no pof as one is not likely to run with this as regular firmware)&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** data mode 3 is enabled.&lt;br /&gt;
** filter is disabled as a compromise to fit the raw-mode buffer.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** unreliable resetmce. Sometimes, firmware waked up non-responsive on lvds lines.&lt;br /&gt;
&lt;br /&gt;
== Old Firmware Revisions ==&lt;br /&gt;
* '''4.0.4''':  rc_v04000004_11oct2007.sof  data mode 8 added (mixed filt + flux jump)&lt;br /&gt;
* '''4.0.3''':  rc_v04000003_19sep2007.sof  data mode 7 bit split readjusted to 10b error being bit 4 to 14&lt;br /&gt;
* '''4.0.2''':  rc_v04000002_11sep2007.sof  pid resolution increased to 10b, data mode 7 added&lt;br /&gt;
* '''4.0.1''':  rc_v04000001_06sep2007.sof  &lt;br /&gt;
* '''4.0.0''':  rc_v04000000_29aug2007.sof  supports readout_row_index * [[ bugs ]]&lt;br /&gt;
&lt;br /&gt;
= To-Do List =&lt;br /&gt;
* the starting point for the servo is currently zero and it would be nice to have it programmable.&lt;br /&gt;
&lt;br /&gt;
= RC Synthesis Notes =&lt;br /&gt;
# 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. &lt;br /&gt;
# Timing: There is no &amp;quot;lock region&amp;quot; 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.&lt;br /&gt;
# 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%.&lt;br /&gt;
# 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.&lt;br /&gt;
# 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):&lt;br /&gt;
 lpm_file =&amp;gt; &amp;quot;C:/scuba2_repository/cards/readout_card/fsfb_calc/source/rtl/ram_40x64.hex&amp;quot;, and&lt;br /&gt;
 lpm_file    : STRING;&lt;br /&gt;
#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. &lt;br /&gt;
----&lt;br /&gt;
[http://e-mode.phas.ubc.ca/mcewiki/index.php/Main_Page  MCE Main Page]&lt;/div&gt;</summary>
		<author><name>Bburger</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Readout_Card_firmware&amp;diff=4337</id>
		<title>Readout Card firmware</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Readout_Card_firmware&amp;diff=4337"/>
		<updated>2011-05-04T21:35:39Z</updated>

		<summary type="html">&lt;p&gt;Bburger: /* Revision 5.0.b (not recommended) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Synthesis Reminders (for firmware developers)&lt;br /&gt;
** quartus.ini is not needed anymore (Fixed as of Q7, Altera SR10783580 2010-10-24)&lt;br /&gt;
** Remember that readout_card/fsfb_clac/source/rtl/ram_40x64.vhd must be initialized with the ram_40x64.hex file in the same directory.&lt;br /&gt;
== Revision 5.1.2 ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010002_18jan2011.sof (for Rev. E cards) &lt;br /&gt;
** rc_stratix3_v05010002_18jan2011.jic (for Rev. E cards) &lt;br /&gt;
** rc_v05010002_03feb2011.sof (for Rev. B cards) &lt;br /&gt;
** rc_v05010002_03feb2011.pof (for Rev. B cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.1 with k1 and k2 (filter params) limited to k1&amp;lt;16 and k2&amp;lt;32 in order to resolve the timing when compiling for smaller Stratix FPGA on RC Rev. B.&lt;br /&gt;
&lt;br /&gt;
* '''Bug fix:'''&lt;br /&gt;
** the 2-rows-off filtered data readout introduced with configurable filter in rev. 5.1.0 and 5.1.1 is fixed now.&lt;br /&gt;
 &lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** none so far.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt)&lt;br /&gt;
 ; Total logic elements      ; 33,285 / 41,250 ( 81 % )                       ;&lt;br /&gt;
 ; Total pins                ; 358 / 616 ( 58 % )                             ;&lt;br /&gt;
 ; Total memory bits         ; 1,405,440 / 3,423,744 ( 41 % )                 ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt)&lt;br /&gt;
 ; Fast Model Clock Hold: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0'  ; 0.364 ns  &lt;br /&gt;
 ; Fast Model Clock Hold: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3'  ; 0.365 ns  &lt;br /&gt;
 ; Fast Model Clock Hold: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2'  ; 0.379 ns&lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.1 (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05010001_01dec2010.sof (for Rev. B cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.0, but k1 and k2 (filter params) are now limited to k1&amp;lt;16 and k2&amp;lt;32 in order to resolve the timing failures of compiling 5.1.0 for smaller Stratix FPGA on RC Rev. B.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** filter mode data is off by 2 rows. &lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.0 (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010000_01nov2010.sof  (for Rev. E cards)&lt;br /&gt;
** rc_v05010000_01nov2010.sof (for Rev. B cards) has timing failures '''do not use!!!'''&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** added configurable filter parameters specified by ''fltr_coeff'', default is the f&amp;lt;sub&amp;gt;cutoff&amp;lt;/sub&amp;gt;/f&amp;lt;sub&amp;gt;sampl&amp;lt;/sub&amp;gt;=122Hz/15kHz. see [[ Digital 4-pole Butterworth Low-pass filter ]]. &lt;br /&gt;
** ''fltr_type'' is set to 255 to indicate configurable filter parameters.&lt;br /&gt;
** see [http://www.phas.ubc.ca/~mce/mcedocs/software/SC2_ELE_S580_515_mce_command_description.pdf MCE command description]&lt;br /&gt;
** development notes: &lt;br /&gt;
*** It is built on Quartus10.1. &lt;br /&gt;
*** tcl files had to be updated as cmp syntax is not supported in Q10 anymore.&lt;br /&gt;
*** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** rc_v05010000_01nov2010.sof has timing failures that were overlooked, do not use this firmware for Rev.B cards. &lt;br /&gt;
** '''filter mode data is off by 2 rows.''' &lt;br /&gt;
&lt;br /&gt;
* '''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&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.f  =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000f_22oct2010.sof (for Rev. B cards)&lt;br /&gt;
** rc_stratix3_v0500000f_22oct2010.sof  (for Rev. E cards)&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
**  Bugfix: integral clamp should work now. only positive integral_clamp values are valid!&lt;br /&gt;
&lt;br /&gt;
* '''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.&lt;br /&gt;
** available for both Rev. E and Rev. B cards, the upper byte of card_type parameter now reports the pcb revision.&lt;br /&gt;
** development note: It is built on Quartus10.1. &lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
**none yet!&lt;br /&gt;
&lt;br /&gt;
* '''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&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.e (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000e_06oct2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''  &lt;br /&gt;
** 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!&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.d =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000d_04aug2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
**  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.&lt;br /&gt;
&lt;br /&gt;
* '''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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** '''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 [[http://e-mode.phas.ubc.ca/mcewiki/index.php/Image:Clamp_unstable.png scope snapshot]] used slow_fb_ramp.py script for testing.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage and Timing Report''' (readout_card.fit.rpt and readout_card.tan.rpt): no change compared to 5.0.a/b/c&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.c (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000c_16jun2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.b&lt;br /&gt;
** Re-introduced flux-jump counter clamping to maintain continuity in behavior from past versions of firmware in the field.&lt;br /&gt;
** '''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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** '''flux-jump is broken'''. flux-jumping block misbehaves at the first jump in the negative range.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt): [[rc_5.0.c_fit_rpt]]&lt;br /&gt;
 ; Total logic elements     ; 26,800 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total pins               ; 358 / 616 ( 58 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 76 / 112 ( 68 % )                             ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): [[rc_5.0.c_tan_rpt]]&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.964 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.382 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 15.924 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.b (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000b_03jun2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.a&lt;br /&gt;
** 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.&lt;br /&gt;
** 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&lt;br /&gt;
** A sticky bit that only affected servo_mode=0,1,2 was also removed from the flux-jumping block.&lt;br /&gt;
** flx_lp_init commands now also clear the flux-jumping block as well.&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** flux-jump does not work when jumping to negative values.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt): [[rc_5.0.b_fit_rpt]]&lt;br /&gt;
 ; Total logic elements     ; 26,745 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total pins               ; 358 / 616 ( 58 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 76 / 112 ( 68 % )                             ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): [[rc_5.0.b_tan_rpt]]&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.459 ns  &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.895 ns  &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 15.956 ns&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.a =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000a_12mar2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on the merger of rev. 5.0.8 and 5.0.9.&lt;br /&gt;
** '''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.&lt;br /&gt;
** The low pass filter has 20-bit input and f_3dB/f_samp = 122Hz/15kHz .&lt;br /&gt;
** The flux-jump clamping that was removed in 5.0.9 is included once again here, as we decided this is safer for now.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** &amp;quot;lock_dat_left&amp;quot; parameter that was removed in 5.0.9 is now implemented as &amp;quot;lock_dat_lsb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** flx_lp_init does not reinitialize the flux-jump block&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
** tag name: rc_v0500000a_12mar2009! years were mixed up!&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.9 (buggy) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000009_13nov2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** Removes a sticky bit in pid calculation result storage -- in fsfb_processor.&lt;br /&gt;
** Adds a command to clamp the growth of the I-term to prevent wrapping and track down the source of Caltech's FSFB jumps.&lt;br /&gt;
** Removed the unused lock_dat_left parameter.  The ability to shift left was moved to the fsfb_corr block some time ago.&lt;br /&gt;
** Fixed a sign extension bug acting on the flux quanta, which limited the value to 8191.  Changed the extension from signed to unsigned.&lt;br /&gt;
** Removed ineffective clamping in the flux-jump calculation block.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** integral_clamp read/write command does not work. &lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,960 / 41,250 ( 68 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.825 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.878 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 14.397 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.8 (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000008_09oct2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** type 1 low-pass filter: f&amp;lt;sub&amp;gt;3dB&amp;lt;/sub&amp;gt;=122Hz for f&amp;lt;sub&amp;gt;sample&amp;lt;/sub&amp;gt;=15kHz&lt;br /&gt;
** Filter-input-width changed from 18b to 20b with no sticky bits!&lt;br /&gt;
** removed sticky bits in internal arithmetic of the filter.&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.7 (type-2 filter) =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000007_09oct2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** type-2 low-pass-filter: f&amp;lt;sub&amp;gt;3dB&amp;lt;/sub&amp;gt;=75Hz for f&amp;lt;sub&amp;gt;sample&amp;lt;/sub&amp;gt;=30000.&lt;br /&gt;
** Filter-input-width changed from 18b to 20b with no sticky bits!&lt;br /&gt;
** inter-biquad-gain-scaling for the filter is 2^14&lt;br /&gt;
** filter results are scaled down by 2^3 in the output of the filter.&lt;br /&gt;
** removed sticky bits in internal arithmetics&lt;br /&gt;
** _correction_ disabled in fsfb_proc_pidz&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** quartus.ini file was '''not''' present in synth directory.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** none to report&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
== Revision 5.0.6  (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05000006_15sep2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Only Valid for Rev. C/D Cards&lt;br /&gt;
** Based on rev. 5.0.3&lt;br /&gt;
** tcl file updated for Rev. D and aligned with top-level and qsf (project file). &lt;br /&gt;
** flux loop commented, just to try sampling the ADC. &lt;br /&gt;
** compiled with Q9.1&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.5 (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000005_04sep2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** changed the low-pass-filter to f(3db)=75Hz for f(sample)=30000.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** quartus.ini file was '''not''' present in synth directory.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** negative inputs to the filter cause filter to have a non-flat pass-band region. may have to do with sign-handling...&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.4 =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000004_28aug2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** BUG Fix: handles 14-bit flux quanta (changed the multiplier to unsigned)&lt;br /&gt;
** BUG Fix: changed standard logic vector extension from signed to unsigned in flux-jumping slave.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,170 / 41,250 ( 63 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.541 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.612 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 15.398 ns ;&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.3  =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05000003_21aug2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** ONLY valid REV C/D RC Cards&lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** flux loop commented, just to try sampling the ADC.&lt;br /&gt;
** updated tcl file, but still need to rely on project file as well as qsf file.&lt;br /&gt;
** changed default level of adc_sclk to '1'&lt;br /&gt;
** dac_clr_n was changed from an output to an input.&lt;br /&gt;
** added 'locked' interface to rc_pll_stratix_iii&lt;br /&gt;
** renamed the adc_pll clock signals to more explanitory names&lt;br /&gt;
** added the FPGA_DEVICE_FAMILY generic to the dispatch interace for synthesis of the dc_fifo in lvds_rx&lt;br /&gt;
** uncommented DDR interface to force the syntesizer to use correct left and right PLLs (in conjunction with ADC and DDR PLLs)&lt;br /&gt;
** added test signals to test_status to see clocks on the scope.&lt;br /&gt;
== Revision 5.0.2 (buggy) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000002_test00_tagged.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.1&lt;br /&gt;
** Fixed a bug in wbs_frame_data that stored data incorrectly if reporting 1 or 2 pixels only.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,186 / 41,250 ( 63 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.755 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.979 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.067 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.1 (buggy) (Filter + Raw + Rectangle, 2 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000001_26may2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Combines features in rev. 5.0.0 (2 LVDS Lines) and rev. 4.0.e (Filtered + Raw), with the NEW rectangle mode.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** [[CVS Diff Between sys_v05000000 and rc_v05000001]]&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** Has a bug in wbs_frame_data that stored data incorrectly if reporting 1 or 2 pixels only.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,565 / 41,250 ( 64 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.656 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.861 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 14.167 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.0 (Filter Only, 2 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000000_22dec2008.sof (tagged as sys_v05000000_22dec2008)&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware v05000000+ of all other cards!!!&lt;br /&gt;
** Adds the ability to read out one column of data continuously from readout cards&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** [[CVS Diff Between rc_v0400000c and sys_v05000000]]&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,607 / 41,250 ( 65 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 406,016 / 3,423,744 ( 12 % )             ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.558 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.892 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.987 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.f (Filter + Raw, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0400000f_12feb2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on 4.0.e and in parallel with 5.0.9 (equivalent version, clamping is not included)&lt;br /&gt;
** Incorporates fixes that were done to flux-jumping between 5.0.2 - 5.0.4 - 5.0.9.  Namely:&lt;br /&gt;
*** Changes a multiplier from signed to unsigned (in fsfb_corr_multplier.vhd).&lt;br /&gt;
*** Changes sign extension from signed to unsigned (in flux_quanta_ram_admin.vhd).&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None reported yet.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,773 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,321,984 / 3,423,744 ( 39 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.539 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.118 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.318 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.e (Filter + Raw, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0400000e_27apr2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on 4.0.d&lt;br /&gt;
** Combines both raw- and filtered-data modes.&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are disabled.&lt;br /&gt;
** Tested by Matt Hasselfield.  &lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are disabled.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,048 / 41,250 ( 66 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,321,984 / 3,423,744 ( 39 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.675 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.907 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.728 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.d (Raw Only, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  rc_v0400000d_20090417.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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.&lt;br /&gt;
** The firmware takes a new command called readout_col_index which specifies which column to capture raw data from.&lt;br /&gt;
** Other than readout_col_index, the firmware functions the same as previous raw-data firmware, including then need to issue a capture_raw command.&lt;br /&gt;
** For more information on raw-data, see:  http://e-mode.phas.ubc.ca/mcewiki/index.php/Raw-mode_readout&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** Differences between 4.0.c and 4.0.d&lt;br /&gt;
 U system/test/source/tb/tb_cc_rcs_bcs_ac.vhd&lt;br /&gt;
 U all_cards/dispatch/source/rtl/dispatch_wishbone.vhd&lt;br /&gt;
 U library/sys_param/source/rtl/wishbone_pack.vhd&lt;br /&gt;
 U readout_card/adc_sample_coadd/source/rtl/adc_sample_coadd.vhd&lt;br /&gt;
 U readout_card/adc_sample_coadd/source/rtl/adc_sample_coadd_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop/source/rtl/flux_loop.vhd&lt;br /&gt;
 U readout_card/flux_loop/source/rtl/flux_loop_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/rtl/flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/rtl/flux_loop_ctrl_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/tb/tb1_flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/tb/tb2_flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/fsfb_calc/source/rtl/fsfb_fltr_regs.vhd&lt;br /&gt;
 U readout_card/fsfb_corr/source/rtl/fsfb_corr.vhd&lt;br /&gt;
 U readout_card/readout_card/source/rtl/readout_card.vhd&lt;br /&gt;
 U readout_card/readout_card/source/rtl/readout_card_pack.vhd&lt;br /&gt;
 U readout_card/wbs_frame_data/source/rtl/wbs_frame_data.vhd&lt;br /&gt;
 U readout_card/wbs_frame_data/source/rtl/wbs_frame_data_pack.vhd&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are not supported.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 24,554 / 41,250 ( 60 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,262,592 / 3,423,744 ( 37 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.991 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.864 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.052 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.4.1 ==&lt;br /&gt;
* '''Filename:'''  rc_v04040001_21nov2008&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,241 / 41,250 ( 66 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 405,504 / 3,423,744 ( 12 % )                  ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.588 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.585 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.057 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.4.0 (buggy) ==&lt;br /&gt;
* '''Filename:'''  rc_v04040000_02oct2008&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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]].&lt;br /&gt;
** Re-integrated the id_thermo and fpga_thermo block in the readout_card.vhd top level that was removed in 4.0.c.&lt;br /&gt;
** 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.&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
** Adjusted the indentation in fsfb_io_controller.vhd to make the file more readable.&lt;br /&gt;
** 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.&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** The following commands lock up the Readout Card firmware:  CARD_ID_ADDR, CARD_TEMP_ADDR, FPGA_TEMP_ADDR.&lt;br /&gt;
** 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&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,099 / 41,250 ( 66 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 406,016 / 3,423,744 ( 12 % )                  ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.372 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.052 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.066 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.c ==&lt;br /&gt;
* '''Filename:'''  rc_v0400000c_15aug2008.sof&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Only has data modes 0, 1, 4, and 10.&lt;br /&gt;
** 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).&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** Changed a counter in the dispatch block to ease timing constraints in synthesis (dispatch_wishbone.vhd)&lt;br /&gt;
** 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.&lt;br /&gt;
** '''Removed''' the fpga_termo (command:  '''fpga_temp''') and id_thermo (commands: '''card_temp, card_id''') to ease timing constraints in synthesis (readout_card.vhd)&lt;br /&gt;
** Updated the tagged version of fpga_termo.vhd to include the new 'stale bit' feature&lt;br /&gt;
** Updated the tagged version of frame_timing_core.vhd to include the new 'err_o' interface&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None reported yet&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
* '''FPGA Resource Usage:'''&lt;br /&gt;
 Total logic elements : 25,058 / 41,250 ( 61 % )&lt;br /&gt;
 Total memory bits : 400,896 / 3,423,744 ( 12 % )&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.282 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.736 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.665 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.b (buggy) ==&lt;br /&gt;
Note: This revision is on a watch list, after the bug detected 15 July 2008.  See the bug section for more details.&lt;br /&gt;
* '''Filename''' : rc_v0400000b_04aug2008.sof&lt;br /&gt;
* '''Features'''&lt;br /&gt;
** data_mode 10 is added to provide more filtfb bits (compared to data mode 9) for planet observations. filtered_dat(27 downto 3) &amp;amp; flux_cnt_dat(6 downto 0)&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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]]&lt;br /&gt;
&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.a (buggy) ==&lt;br /&gt;
Note: This revision is on a watch list, after the bug detected 15 July 2008.  See the bug section for more details.&lt;br /&gt;
* '''Filename''' : rc_v0400000a_07jul2008.sof&lt;br /&gt;
* '''Bug Fix'''&lt;br /&gt;
** mce_status and adc_offset/flx_quanta commands do not fail after power up.&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** Seems to clip out channel 0 from data reporting.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.9 (buggy) ==&lt;br /&gt;
* '''Filename''' : rc_v04000009_26jun2008.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** sa_bias and offset DACs only refreshed when new values are written. (in previous versions, DACs were refreshed every frame)&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.8 ==&lt;br /&gt;
* '''Filename''' : rc_v04000008_26jun2008.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** The gaini, gainp, gaind resolution increased to 12-bit, i.e. -2048 to 2047 (formerly 10-bit).&lt;br /&gt;
&lt;br /&gt;
* '''Bug fix'''&lt;br /&gt;
** the bug associated with gainpid read before mce_reset is fixed.&lt;br /&gt;
&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.3.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04030007_26may2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** 14-bit raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** 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.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.2.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04020007_24may2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
* '''Bug fix'''&lt;br /&gt;
** the bug associated with reading from raw-buffer is fixed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.1.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04010007_25apr2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.6 (buggy) ==&lt;br /&gt;
* '''Filename''' : rc_v04000006_15feb2008.sof or .pof       &lt;br /&gt;
* '''Features''' &lt;br /&gt;
** '''bugfix''': unreliable reset due to unsafe and incomplete state machines is fixed.&lt;br /&gt;
** '''bugfix''': flux_jump sign problem fixed, so far proved in const_mode, to be tested in servo_mode with cold setup.&lt;br /&gt;
** servo_mode=2 or ramp previously only went from 0 to ramp_amp, but now goes from -8192 to -8192+ramp_amp&lt;br /&gt;
** new commands are added: ''scratch'' and ''card_type''. Scratch takes 8 values and can be used by software to detect reset.&lt;br /&gt;
** slot_id and fw_rev are now integrated as part of all_cards.vhd&lt;br /&gt;
** lvds_tx_b=0, This will allow Clock Card to use the secondary backplane lvds line and check whether RC is plugged in.&lt;br /&gt;
** filter_coeff in misc_banks_admin commented as it is not implemented and causes timing problems.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
** slot_id is only set after a resetmce is issued. (using the latest all_cards in the next revision will fix this)&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.5 ==&lt;br /&gt;
* '''Filename''' : rc_v04000005_01nov2007.sof or .pof       &lt;br /&gt;
* '''Features''' &lt;br /&gt;
** data mode 9 (mixed filt + flux jump) with windowing readjusted compared to data mode 8&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** unreliable resetmce. Sometimes, firmware waked up non-responsive on lvds lines.&lt;br /&gt;
** In data mode 5 and 9, flux-jump counter is not reported properly due to a sign error. However, flux jumping works fine.&lt;br /&gt;
&lt;br /&gt;
== Revision 3.0.19 ==&lt;br /&gt;
* '''Filename''' : rc_v03000019_16feb2007_raw.sof (no pof as one is not likely to run with this as regular firmware)&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** data mode 3 is enabled.&lt;br /&gt;
** filter is disabled as a compromise to fit the raw-mode buffer.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** unreliable resetmce. Sometimes, firmware waked up non-responsive on lvds lines.&lt;br /&gt;
&lt;br /&gt;
== Old Firmware Revisions ==&lt;br /&gt;
* '''4.0.4''':  rc_v04000004_11oct2007.sof  data mode 8 added (mixed filt + flux jump)&lt;br /&gt;
* '''4.0.3''':  rc_v04000003_19sep2007.sof  data mode 7 bit split readjusted to 10b error being bit 4 to 14&lt;br /&gt;
* '''4.0.2''':  rc_v04000002_11sep2007.sof  pid resolution increased to 10b, data mode 7 added&lt;br /&gt;
* '''4.0.1''':  rc_v04000001_06sep2007.sof  &lt;br /&gt;
* '''4.0.0''':  rc_v04000000_29aug2007.sof  supports readout_row_index * [[ bugs ]]&lt;br /&gt;
&lt;br /&gt;
= To-Do List =&lt;br /&gt;
* the starting point for the servo is currently zero and it would be nice to have it programmable.&lt;br /&gt;
&lt;br /&gt;
= RC Synthesis Notes =&lt;br /&gt;
# 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. &lt;br /&gt;
# Timing: There is no &amp;quot;lock region&amp;quot; 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.&lt;br /&gt;
# 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%.&lt;br /&gt;
# 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.&lt;br /&gt;
# 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):&lt;br /&gt;
 lpm_file =&amp;gt; &amp;quot;C:/scuba2_repository/cards/readout_card/fsfb_calc/source/rtl/ram_40x64.hex&amp;quot;, and&lt;br /&gt;
 lpm_file    : STRING;&lt;br /&gt;
#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. &lt;br /&gt;
----&lt;br /&gt;
[http://e-mode.phas.ubc.ca/mcewiki/index.php/Main_Page  MCE Main Page]&lt;/div&gt;</summary>
		<author><name>Bburger</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Readout_Card_firmware&amp;diff=4336</id>
		<title>Readout Card firmware</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Readout_Card_firmware&amp;diff=4336"/>
		<updated>2011-05-04T21:35:14Z</updated>

		<summary type="html">&lt;p&gt;Bburger: /* Revision 5.0.b (not recommended) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Synthesis Reminders (for firmware developers)&lt;br /&gt;
** quartus.ini is not needed anymore (Fixed as of Q7, Altera SR10783580 2010-10-24)&lt;br /&gt;
** Remember that readout_card/fsfb_clac/source/rtl/ram_40x64.vhd must be initialized with the ram_40x64.hex file in the same directory.&lt;br /&gt;
== Revision 5.1.2 ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010002_18jan2011.sof (for Rev. E cards) &lt;br /&gt;
** rc_stratix3_v05010002_18jan2011.jic (for Rev. E cards) &lt;br /&gt;
** rc_v05010002_03feb2011.sof (for Rev. B cards) &lt;br /&gt;
** rc_v05010002_03feb2011.pof (for Rev. B cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.1 with k1 and k2 (filter params) limited to k1&amp;lt;16 and k2&amp;lt;32 in order to resolve the timing when compiling for smaller Stratix FPGA on RC Rev. B.&lt;br /&gt;
&lt;br /&gt;
* '''Bug fix:'''&lt;br /&gt;
** the 2-rows-off filtered data readout introduced with configurable filter in rev. 5.1.0 and 5.1.1 is fixed now.&lt;br /&gt;
 &lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** none so far.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt)&lt;br /&gt;
 ; Total logic elements      ; 33,285 / 41,250 ( 81 % )                       ;&lt;br /&gt;
 ; Total pins                ; 358 / 616 ( 58 % )                             ;&lt;br /&gt;
 ; Total memory bits         ; 1,405,440 / 3,423,744 ( 41 % )                 ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt)&lt;br /&gt;
 ; Fast Model Clock Hold: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0'  ; 0.364 ns  &lt;br /&gt;
 ; Fast Model Clock Hold: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3'  ; 0.365 ns  &lt;br /&gt;
 ; Fast Model Clock Hold: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2'  ; 0.379 ns&lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.1 (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05010001_01dec2010.sof (for Rev. B cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.0, but k1 and k2 (filter params) are now limited to k1&amp;lt;16 and k2&amp;lt;32 in order to resolve the timing failures of compiling 5.1.0 for smaller Stratix FPGA on RC Rev. B.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** filter mode data is off by 2 rows. &lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.0 (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010000_01nov2010.sof  (for Rev. E cards)&lt;br /&gt;
** rc_v05010000_01nov2010.sof (for Rev. B cards) has timing failures '''do not use!!!'''&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** added configurable filter parameters specified by ''fltr_coeff'', default is the f&amp;lt;sub&amp;gt;cutoff&amp;lt;/sub&amp;gt;/f&amp;lt;sub&amp;gt;sampl&amp;lt;/sub&amp;gt;=122Hz/15kHz. see [[ Digital 4-pole Butterworth Low-pass filter ]]. &lt;br /&gt;
** ''fltr_type'' is set to 255 to indicate configurable filter parameters.&lt;br /&gt;
** see [http://www.phas.ubc.ca/~mce/mcedocs/software/SC2_ELE_S580_515_mce_command_description.pdf MCE command description]&lt;br /&gt;
** development notes: &lt;br /&gt;
*** It is built on Quartus10.1. &lt;br /&gt;
*** tcl files had to be updated as cmp syntax is not supported in Q10 anymore.&lt;br /&gt;
*** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** rc_v05010000_01nov2010.sof has timing failures that were overlooked, do not use this firmware for Rev.B cards. &lt;br /&gt;
** '''filter mode data is off by 2 rows.''' &lt;br /&gt;
&lt;br /&gt;
* '''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&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.f  =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000f_22oct2010.sof (for Rev. B cards)&lt;br /&gt;
** rc_stratix3_v0500000f_22oct2010.sof  (for Rev. E cards)&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
**  Bugfix: integral clamp should work now. only positive integral_clamp values are valid!&lt;br /&gt;
&lt;br /&gt;
* '''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.&lt;br /&gt;
** available for both Rev. E and Rev. B cards, the upper byte of card_type parameter now reports the pcb revision.&lt;br /&gt;
** development note: It is built on Quartus10.1. &lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
**none yet!&lt;br /&gt;
&lt;br /&gt;
* '''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&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.e (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000e_06oct2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''  &lt;br /&gt;
** 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!&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.d =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000d_04aug2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
**  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.&lt;br /&gt;
&lt;br /&gt;
* '''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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** '''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 [[http://e-mode.phas.ubc.ca/mcewiki/index.php/Image:Clamp_unstable.png scope snapshot]] used slow_fb_ramp.py script for testing.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage and Timing Report''' (readout_card.fit.rpt and readout_card.tan.rpt): no change compared to 5.0.a/b/c&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.c (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000c_16jun2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.b&lt;br /&gt;
** Re-introduced flux-jump counter clamping to maintain continuity in behavior from past versions of firmware in the field.&lt;br /&gt;
** '''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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** '''flux-jump is broken'''. flux-jumping block misbehaves at the first jump in the negative range.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt): [[rc_5.0.c_fit_rpt]]&lt;br /&gt;
 ; Total logic elements     ; 26,800 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total pins               ; 358 / 616 ( 58 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 76 / 112 ( 68 % )                             ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): [[rc_5.0.c_tan_rpt]]&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.964 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.382 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 15.924 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.b (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000b_03jun2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.a&lt;br /&gt;
** 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.&lt;br /&gt;
** 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&lt;br /&gt;
** A sticky bit that only affected servo_mode=0,1,2 was also removed from the flux-jumping block.&lt;br /&gt;
** flx_lp_init commands now also clear the flux-jumping block as well.&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** flux-jump does not work when jumping to negative values.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt): [[rc_5.0.b_fit_rpt]]&lt;br /&gt;
 ; Total logic elements     ; 26,745 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total pins               ; 358 / 616 ( 58 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 76 / 112 ( 68 % )                             ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): [[rc_5.0.b_tan_rpt]]&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.a =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000a_12mar2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on the merger of rev. 5.0.8 and 5.0.9.&lt;br /&gt;
** '''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.&lt;br /&gt;
** The low pass filter has 20-bit input and f_3dB/f_samp = 122Hz/15kHz .&lt;br /&gt;
** The flux-jump clamping that was removed in 5.0.9 is included once again here, as we decided this is safer for now.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** &amp;quot;lock_dat_left&amp;quot; parameter that was removed in 5.0.9 is now implemented as &amp;quot;lock_dat_lsb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** flx_lp_init does not reinitialize the flux-jump block&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
** tag name: rc_v0500000a_12mar2009! years were mixed up!&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.9 (buggy) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000009_13nov2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** Removes a sticky bit in pid calculation result storage -- in fsfb_processor.&lt;br /&gt;
** Adds a command to clamp the growth of the I-term to prevent wrapping and track down the source of Caltech's FSFB jumps.&lt;br /&gt;
** Removed the unused lock_dat_left parameter.  The ability to shift left was moved to the fsfb_corr block some time ago.&lt;br /&gt;
** Fixed a sign extension bug acting on the flux quanta, which limited the value to 8191.  Changed the extension from signed to unsigned.&lt;br /&gt;
** Removed ineffective clamping in the flux-jump calculation block.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** integral_clamp read/write command does not work. &lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,960 / 41,250 ( 68 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.825 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.878 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 14.397 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.8 (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000008_09oct2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** type 1 low-pass filter: f&amp;lt;sub&amp;gt;3dB&amp;lt;/sub&amp;gt;=122Hz for f&amp;lt;sub&amp;gt;sample&amp;lt;/sub&amp;gt;=15kHz&lt;br /&gt;
** Filter-input-width changed from 18b to 20b with no sticky bits!&lt;br /&gt;
** removed sticky bits in internal arithmetic of the filter.&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.7 (type-2 filter) =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000007_09oct2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** type-2 low-pass-filter: f&amp;lt;sub&amp;gt;3dB&amp;lt;/sub&amp;gt;=75Hz for f&amp;lt;sub&amp;gt;sample&amp;lt;/sub&amp;gt;=30000.&lt;br /&gt;
** Filter-input-width changed from 18b to 20b with no sticky bits!&lt;br /&gt;
** inter-biquad-gain-scaling for the filter is 2^14&lt;br /&gt;
** filter results are scaled down by 2^3 in the output of the filter.&lt;br /&gt;
** removed sticky bits in internal arithmetics&lt;br /&gt;
** _correction_ disabled in fsfb_proc_pidz&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** quartus.ini file was '''not''' present in synth directory.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** none to report&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
== Revision 5.0.6  (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05000006_15sep2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Only Valid for Rev. C/D Cards&lt;br /&gt;
** Based on rev. 5.0.3&lt;br /&gt;
** tcl file updated for Rev. D and aligned with top-level and qsf (project file). &lt;br /&gt;
** flux loop commented, just to try sampling the ADC. &lt;br /&gt;
** compiled with Q9.1&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.5 (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000005_04sep2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** changed the low-pass-filter to f(3db)=75Hz for f(sample)=30000.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** quartus.ini file was '''not''' present in synth directory.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** negative inputs to the filter cause filter to have a non-flat pass-band region. may have to do with sign-handling...&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.4 =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000004_28aug2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** BUG Fix: handles 14-bit flux quanta (changed the multiplier to unsigned)&lt;br /&gt;
** BUG Fix: changed standard logic vector extension from signed to unsigned in flux-jumping slave.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,170 / 41,250 ( 63 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.541 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.612 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 15.398 ns ;&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.3  =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05000003_21aug2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** ONLY valid REV C/D RC Cards&lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** flux loop commented, just to try sampling the ADC.&lt;br /&gt;
** updated tcl file, but still need to rely on project file as well as qsf file.&lt;br /&gt;
** changed default level of adc_sclk to '1'&lt;br /&gt;
** dac_clr_n was changed from an output to an input.&lt;br /&gt;
** added 'locked' interface to rc_pll_stratix_iii&lt;br /&gt;
** renamed the adc_pll clock signals to more explanitory names&lt;br /&gt;
** added the FPGA_DEVICE_FAMILY generic to the dispatch interace for synthesis of the dc_fifo in lvds_rx&lt;br /&gt;
** uncommented DDR interface to force the syntesizer to use correct left and right PLLs (in conjunction with ADC and DDR PLLs)&lt;br /&gt;
** added test signals to test_status to see clocks on the scope.&lt;br /&gt;
== Revision 5.0.2 (buggy) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000002_test00_tagged.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.1&lt;br /&gt;
** Fixed a bug in wbs_frame_data that stored data incorrectly if reporting 1 or 2 pixels only.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,186 / 41,250 ( 63 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.755 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.979 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.067 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.1 (buggy) (Filter + Raw + Rectangle, 2 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000001_26may2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Combines features in rev. 5.0.0 (2 LVDS Lines) and rev. 4.0.e (Filtered + Raw), with the NEW rectangle mode.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** [[CVS Diff Between sys_v05000000 and rc_v05000001]]&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** Has a bug in wbs_frame_data that stored data incorrectly if reporting 1 or 2 pixels only.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,565 / 41,250 ( 64 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.656 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.861 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 14.167 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.0 (Filter Only, 2 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000000_22dec2008.sof (tagged as sys_v05000000_22dec2008)&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware v05000000+ of all other cards!!!&lt;br /&gt;
** Adds the ability to read out one column of data continuously from readout cards&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** [[CVS Diff Between rc_v0400000c and sys_v05000000]]&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,607 / 41,250 ( 65 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 406,016 / 3,423,744 ( 12 % )             ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.558 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.892 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.987 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.f (Filter + Raw, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0400000f_12feb2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on 4.0.e and in parallel with 5.0.9 (equivalent version, clamping is not included)&lt;br /&gt;
** Incorporates fixes that were done to flux-jumping between 5.0.2 - 5.0.4 - 5.0.9.  Namely:&lt;br /&gt;
*** Changes a multiplier from signed to unsigned (in fsfb_corr_multplier.vhd).&lt;br /&gt;
*** Changes sign extension from signed to unsigned (in flux_quanta_ram_admin.vhd).&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None reported yet.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,773 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,321,984 / 3,423,744 ( 39 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.539 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.118 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.318 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.e (Filter + Raw, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0400000e_27apr2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on 4.0.d&lt;br /&gt;
** Combines both raw- and filtered-data modes.&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are disabled.&lt;br /&gt;
** Tested by Matt Hasselfield.  &lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are disabled.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,048 / 41,250 ( 66 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,321,984 / 3,423,744 ( 39 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.675 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.907 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.728 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.d (Raw Only, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  rc_v0400000d_20090417.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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.&lt;br /&gt;
** The firmware takes a new command called readout_col_index which specifies which column to capture raw data from.&lt;br /&gt;
** Other than readout_col_index, the firmware functions the same as previous raw-data firmware, including then need to issue a capture_raw command.&lt;br /&gt;
** For more information on raw-data, see:  http://e-mode.phas.ubc.ca/mcewiki/index.php/Raw-mode_readout&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** Differences between 4.0.c and 4.0.d&lt;br /&gt;
 U system/test/source/tb/tb_cc_rcs_bcs_ac.vhd&lt;br /&gt;
 U all_cards/dispatch/source/rtl/dispatch_wishbone.vhd&lt;br /&gt;
 U library/sys_param/source/rtl/wishbone_pack.vhd&lt;br /&gt;
 U readout_card/adc_sample_coadd/source/rtl/adc_sample_coadd.vhd&lt;br /&gt;
 U readout_card/adc_sample_coadd/source/rtl/adc_sample_coadd_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop/source/rtl/flux_loop.vhd&lt;br /&gt;
 U readout_card/flux_loop/source/rtl/flux_loop_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/rtl/flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/rtl/flux_loop_ctrl_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/tb/tb1_flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/tb/tb2_flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/fsfb_calc/source/rtl/fsfb_fltr_regs.vhd&lt;br /&gt;
 U readout_card/fsfb_corr/source/rtl/fsfb_corr.vhd&lt;br /&gt;
 U readout_card/readout_card/source/rtl/readout_card.vhd&lt;br /&gt;
 U readout_card/readout_card/source/rtl/readout_card_pack.vhd&lt;br /&gt;
 U readout_card/wbs_frame_data/source/rtl/wbs_frame_data.vhd&lt;br /&gt;
 U readout_card/wbs_frame_data/source/rtl/wbs_frame_data_pack.vhd&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are not supported.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 24,554 / 41,250 ( 60 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,262,592 / 3,423,744 ( 37 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.991 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.864 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.052 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.4.1 ==&lt;br /&gt;
* '''Filename:'''  rc_v04040001_21nov2008&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,241 / 41,250 ( 66 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 405,504 / 3,423,744 ( 12 % )                  ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.588 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.585 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.057 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.4.0 (buggy) ==&lt;br /&gt;
* '''Filename:'''  rc_v04040000_02oct2008&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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]].&lt;br /&gt;
** Re-integrated the id_thermo and fpga_thermo block in the readout_card.vhd top level that was removed in 4.0.c.&lt;br /&gt;
** 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.&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
** Adjusted the indentation in fsfb_io_controller.vhd to make the file more readable.&lt;br /&gt;
** 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.&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** The following commands lock up the Readout Card firmware:  CARD_ID_ADDR, CARD_TEMP_ADDR, FPGA_TEMP_ADDR.&lt;br /&gt;
** 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&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,099 / 41,250 ( 66 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 406,016 / 3,423,744 ( 12 % )                  ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.372 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.052 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.066 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.c ==&lt;br /&gt;
* '''Filename:'''  rc_v0400000c_15aug2008.sof&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Only has data modes 0, 1, 4, and 10.&lt;br /&gt;
** 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).&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** Changed a counter in the dispatch block to ease timing constraints in synthesis (dispatch_wishbone.vhd)&lt;br /&gt;
** 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.&lt;br /&gt;
** '''Removed''' the fpga_termo (command:  '''fpga_temp''') and id_thermo (commands: '''card_temp, card_id''') to ease timing constraints in synthesis (readout_card.vhd)&lt;br /&gt;
** Updated the tagged version of fpga_termo.vhd to include the new 'stale bit' feature&lt;br /&gt;
** Updated the tagged version of frame_timing_core.vhd to include the new 'err_o' interface&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None reported yet&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
* '''FPGA Resource Usage:'''&lt;br /&gt;
 Total logic elements : 25,058 / 41,250 ( 61 % )&lt;br /&gt;
 Total memory bits : 400,896 / 3,423,744 ( 12 % )&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.282 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.736 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.665 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.b (buggy) ==&lt;br /&gt;
Note: This revision is on a watch list, after the bug detected 15 July 2008.  See the bug section for more details.&lt;br /&gt;
* '''Filename''' : rc_v0400000b_04aug2008.sof&lt;br /&gt;
* '''Features'''&lt;br /&gt;
** data_mode 10 is added to provide more filtfb bits (compared to data mode 9) for planet observations. filtered_dat(27 downto 3) &amp;amp; flux_cnt_dat(6 downto 0)&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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]]&lt;br /&gt;
&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.a (buggy) ==&lt;br /&gt;
Note: This revision is on a watch list, after the bug detected 15 July 2008.  See the bug section for more details.&lt;br /&gt;
* '''Filename''' : rc_v0400000a_07jul2008.sof&lt;br /&gt;
* '''Bug Fix'''&lt;br /&gt;
** mce_status and adc_offset/flx_quanta commands do not fail after power up.&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** Seems to clip out channel 0 from data reporting.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.9 (buggy) ==&lt;br /&gt;
* '''Filename''' : rc_v04000009_26jun2008.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** sa_bias and offset DACs only refreshed when new values are written. (in previous versions, DACs were refreshed every frame)&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.8 ==&lt;br /&gt;
* '''Filename''' : rc_v04000008_26jun2008.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** The gaini, gainp, gaind resolution increased to 12-bit, i.e. -2048 to 2047 (formerly 10-bit).&lt;br /&gt;
&lt;br /&gt;
* '''Bug fix'''&lt;br /&gt;
** the bug associated with gainpid read before mce_reset is fixed.&lt;br /&gt;
&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.3.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04030007_26may2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** 14-bit raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** 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.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.2.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04020007_24may2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
* '''Bug fix'''&lt;br /&gt;
** the bug associated with reading from raw-buffer is fixed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.1.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04010007_25apr2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.6 (buggy) ==&lt;br /&gt;
* '''Filename''' : rc_v04000006_15feb2008.sof or .pof       &lt;br /&gt;
* '''Features''' &lt;br /&gt;
** '''bugfix''': unreliable reset due to unsafe and incomplete state machines is fixed.&lt;br /&gt;
** '''bugfix''': flux_jump sign problem fixed, so far proved in const_mode, to be tested in servo_mode with cold setup.&lt;br /&gt;
** servo_mode=2 or ramp previously only went from 0 to ramp_amp, but now goes from -8192 to -8192+ramp_amp&lt;br /&gt;
** new commands are added: ''scratch'' and ''card_type''. Scratch takes 8 values and can be used by software to detect reset.&lt;br /&gt;
** slot_id and fw_rev are now integrated as part of all_cards.vhd&lt;br /&gt;
** lvds_tx_b=0, This will allow Clock Card to use the secondary backplane lvds line and check whether RC is plugged in.&lt;br /&gt;
** filter_coeff in misc_banks_admin commented as it is not implemented and causes timing problems.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
** slot_id is only set after a resetmce is issued. (using the latest all_cards in the next revision will fix this)&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.5 ==&lt;br /&gt;
* '''Filename''' : rc_v04000005_01nov2007.sof or .pof       &lt;br /&gt;
* '''Features''' &lt;br /&gt;
** data mode 9 (mixed filt + flux jump) with windowing readjusted compared to data mode 8&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** unreliable resetmce. Sometimes, firmware waked up non-responsive on lvds lines.&lt;br /&gt;
** In data mode 5 and 9, flux-jump counter is not reported properly due to a sign error. However, flux jumping works fine.&lt;br /&gt;
&lt;br /&gt;
== Revision 3.0.19 ==&lt;br /&gt;
* '''Filename''' : rc_v03000019_16feb2007_raw.sof (no pof as one is not likely to run with this as regular firmware)&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** data mode 3 is enabled.&lt;br /&gt;
** filter is disabled as a compromise to fit the raw-mode buffer.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** unreliable resetmce. Sometimes, firmware waked up non-responsive on lvds lines.&lt;br /&gt;
&lt;br /&gt;
== Old Firmware Revisions ==&lt;br /&gt;
* '''4.0.4''':  rc_v04000004_11oct2007.sof  data mode 8 added (mixed filt + flux jump)&lt;br /&gt;
* '''4.0.3''':  rc_v04000003_19sep2007.sof  data mode 7 bit split readjusted to 10b error being bit 4 to 14&lt;br /&gt;
* '''4.0.2''':  rc_v04000002_11sep2007.sof  pid resolution increased to 10b, data mode 7 added&lt;br /&gt;
* '''4.0.1''':  rc_v04000001_06sep2007.sof  &lt;br /&gt;
* '''4.0.0''':  rc_v04000000_29aug2007.sof  supports readout_row_index * [[ bugs ]]&lt;br /&gt;
&lt;br /&gt;
= To-Do List =&lt;br /&gt;
* the starting point for the servo is currently zero and it would be nice to have it programmable.&lt;br /&gt;
&lt;br /&gt;
= RC Synthesis Notes =&lt;br /&gt;
# 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. &lt;br /&gt;
# Timing: There is no &amp;quot;lock region&amp;quot; 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.&lt;br /&gt;
# 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%.&lt;br /&gt;
# 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.&lt;br /&gt;
# 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):&lt;br /&gt;
 lpm_file =&amp;gt; &amp;quot;C:/scuba2_repository/cards/readout_card/fsfb_calc/source/rtl/ram_40x64.hex&amp;quot;, and&lt;br /&gt;
 lpm_file    : STRING;&lt;br /&gt;
#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. &lt;br /&gt;
----&lt;br /&gt;
[http://e-mode.phas.ubc.ca/mcewiki/index.php/Main_Page  MCE Main Page]&lt;/div&gt;</summary>
		<author><name>Bburger</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Readout_Card_firmware&amp;diff=4335</id>
		<title>Readout Card firmware</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Readout_Card_firmware&amp;diff=4335"/>
		<updated>2011-05-04T21:33:47Z</updated>

		<summary type="html">&lt;p&gt;Bburger: /* Revision 5.1.2 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Synthesis Reminders (for firmware developers)&lt;br /&gt;
** quartus.ini is not needed anymore (Fixed as of Q7, Altera SR10783580 2010-10-24)&lt;br /&gt;
** Remember that readout_card/fsfb_clac/source/rtl/ram_40x64.vhd must be initialized with the ram_40x64.hex file in the same directory.&lt;br /&gt;
== Revision 5.1.2 ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010002_18jan2011.sof (for Rev. E cards) &lt;br /&gt;
** rc_stratix3_v05010002_18jan2011.jic (for Rev. E cards) &lt;br /&gt;
** rc_v05010002_03feb2011.sof (for Rev. B cards) &lt;br /&gt;
** rc_v05010002_03feb2011.pof (for Rev. B cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.1 with k1 and k2 (filter params) limited to k1&amp;lt;16 and k2&amp;lt;32 in order to resolve the timing when compiling for smaller Stratix FPGA on RC Rev. B.&lt;br /&gt;
&lt;br /&gt;
* '''Bug fix:'''&lt;br /&gt;
** the 2-rows-off filtered data readout introduced with configurable filter in rev. 5.1.0 and 5.1.1 is fixed now.&lt;br /&gt;
 &lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** none so far.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt)&lt;br /&gt;
 ; Total logic elements      ; 33,285 / 41,250 ( 81 % )                       ;&lt;br /&gt;
 ; Total pins                ; 358 / 616 ( 58 % )                             ;&lt;br /&gt;
 ; Total memory bits         ; 1,405,440 / 3,423,744 ( 41 % )                 ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt)&lt;br /&gt;
 ; Fast Model Clock Hold: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0'  ; 0.364 ns  &lt;br /&gt;
 ; Fast Model Clock Hold: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3'  ; 0.365 ns  &lt;br /&gt;
 ; Fast Model Clock Hold: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2'  ; 0.379 ns&lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.1 (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05010001_01dec2010.sof (for Rev. B cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.0, but k1 and k2 (filter params) are now limited to k1&amp;lt;16 and k2&amp;lt;32 in order to resolve the timing failures of compiling 5.1.0 for smaller Stratix FPGA on RC Rev. B.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** filter mode data is off by 2 rows. &lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.0 (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010000_01nov2010.sof  (for Rev. E cards)&lt;br /&gt;
** rc_v05010000_01nov2010.sof (for Rev. B cards) has timing failures '''do not use!!!'''&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** added configurable filter parameters specified by ''fltr_coeff'', default is the f&amp;lt;sub&amp;gt;cutoff&amp;lt;/sub&amp;gt;/f&amp;lt;sub&amp;gt;sampl&amp;lt;/sub&amp;gt;=122Hz/15kHz. see [[ Digital 4-pole Butterworth Low-pass filter ]]. &lt;br /&gt;
** ''fltr_type'' is set to 255 to indicate configurable filter parameters.&lt;br /&gt;
** see [http://www.phas.ubc.ca/~mce/mcedocs/software/SC2_ELE_S580_515_mce_command_description.pdf MCE command description]&lt;br /&gt;
** development notes: &lt;br /&gt;
*** It is built on Quartus10.1. &lt;br /&gt;
*** tcl files had to be updated as cmp syntax is not supported in Q10 anymore.&lt;br /&gt;
*** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** rc_v05010000_01nov2010.sof has timing failures that were overlooked, do not use this firmware for Rev.B cards. &lt;br /&gt;
** '''filter mode data is off by 2 rows.''' &lt;br /&gt;
&lt;br /&gt;
* '''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&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.f  =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000f_22oct2010.sof (for Rev. B cards)&lt;br /&gt;
** rc_stratix3_v0500000f_22oct2010.sof  (for Rev. E cards)&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
**  Bugfix: integral clamp should work now. only positive integral_clamp values are valid!&lt;br /&gt;
&lt;br /&gt;
* '''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.&lt;br /&gt;
** available for both Rev. E and Rev. B cards, the upper byte of card_type parameter now reports the pcb revision.&lt;br /&gt;
** development note: It is built on Quartus10.1. &lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
**none yet!&lt;br /&gt;
&lt;br /&gt;
* '''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&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.e (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000e_06oct2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''  &lt;br /&gt;
** 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!&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.d =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000d_04aug2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
**  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.&lt;br /&gt;
&lt;br /&gt;
* '''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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** '''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 [[http://e-mode.phas.ubc.ca/mcewiki/index.php/Image:Clamp_unstable.png scope snapshot]] used slow_fb_ramp.py script for testing.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage and Timing Report''' (readout_card.fit.rpt and readout_card.tan.rpt): no change compared to 5.0.a/b/c&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.c (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000c_16jun2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.b&lt;br /&gt;
** Re-introduced flux-jump counter clamping to maintain continuity in behavior from past versions of firmware in the field.&lt;br /&gt;
** '''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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** '''flux-jump is broken'''. flux-jumping block misbehaves at the first jump in the negative range.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt): [[rc_5.0.c_fit_rpt]]&lt;br /&gt;
 ; Total logic elements     ; 26,800 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total pins               ; 358 / 616 ( 58 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 76 / 112 ( 68 % )                             ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): [[rc_5.0.c_tan_rpt]]&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.964 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.382 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 15.924 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.b (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000b_03jun2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.a&lt;br /&gt;
** 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.&lt;br /&gt;
** 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&lt;br /&gt;
** A sticky bit that only affected servo_mode=0,1,2 was also removed from the flux-jumping block.&lt;br /&gt;
** flx_lp_init commands now also clear the flux-jumping block as well.&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** flux-jump does not work when jumping to negative values.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt): [[rc_5.0.b_fit_rpt]]&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): [[rc_5.0.b_tan_rpt]]&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.a =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000a_12mar2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on the merger of rev. 5.0.8 and 5.0.9.&lt;br /&gt;
** '''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.&lt;br /&gt;
** The low pass filter has 20-bit input and f_3dB/f_samp = 122Hz/15kHz .&lt;br /&gt;
** The flux-jump clamping that was removed in 5.0.9 is included once again here, as we decided this is safer for now.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** &amp;quot;lock_dat_left&amp;quot; parameter that was removed in 5.0.9 is now implemented as &amp;quot;lock_dat_lsb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** flx_lp_init does not reinitialize the flux-jump block&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
** tag name: rc_v0500000a_12mar2009! years were mixed up!&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.9 (buggy) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000009_13nov2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** Removes a sticky bit in pid calculation result storage -- in fsfb_processor.&lt;br /&gt;
** Adds a command to clamp the growth of the I-term to prevent wrapping and track down the source of Caltech's FSFB jumps.&lt;br /&gt;
** Removed the unused lock_dat_left parameter.  The ability to shift left was moved to the fsfb_corr block some time ago.&lt;br /&gt;
** Fixed a sign extension bug acting on the flux quanta, which limited the value to 8191.  Changed the extension from signed to unsigned.&lt;br /&gt;
** Removed ineffective clamping in the flux-jump calculation block.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** integral_clamp read/write command does not work. &lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,960 / 41,250 ( 68 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.825 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.878 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 14.397 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.8 (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000008_09oct2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** type 1 low-pass filter: f&amp;lt;sub&amp;gt;3dB&amp;lt;/sub&amp;gt;=122Hz for f&amp;lt;sub&amp;gt;sample&amp;lt;/sub&amp;gt;=15kHz&lt;br /&gt;
** Filter-input-width changed from 18b to 20b with no sticky bits!&lt;br /&gt;
** removed sticky bits in internal arithmetic of the filter.&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.7 (type-2 filter) =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000007_09oct2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** type-2 low-pass-filter: f&amp;lt;sub&amp;gt;3dB&amp;lt;/sub&amp;gt;=75Hz for f&amp;lt;sub&amp;gt;sample&amp;lt;/sub&amp;gt;=30000.&lt;br /&gt;
** Filter-input-width changed from 18b to 20b with no sticky bits!&lt;br /&gt;
** inter-biquad-gain-scaling for the filter is 2^14&lt;br /&gt;
** filter results are scaled down by 2^3 in the output of the filter.&lt;br /&gt;
** removed sticky bits in internal arithmetics&lt;br /&gt;
** _correction_ disabled in fsfb_proc_pidz&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** quartus.ini file was '''not''' present in synth directory.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** none to report&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
== Revision 5.0.6  (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05000006_15sep2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Only Valid for Rev. C/D Cards&lt;br /&gt;
** Based on rev. 5.0.3&lt;br /&gt;
** tcl file updated for Rev. D and aligned with top-level and qsf (project file). &lt;br /&gt;
** flux loop commented, just to try sampling the ADC. &lt;br /&gt;
** compiled with Q9.1&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.5 (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000005_04sep2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** changed the low-pass-filter to f(3db)=75Hz for f(sample)=30000.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** quartus.ini file was '''not''' present in synth directory.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** negative inputs to the filter cause filter to have a non-flat pass-band region. may have to do with sign-handling...&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.4 =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000004_28aug2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** BUG Fix: handles 14-bit flux quanta (changed the multiplier to unsigned)&lt;br /&gt;
** BUG Fix: changed standard logic vector extension from signed to unsigned in flux-jumping slave.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,170 / 41,250 ( 63 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.541 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.612 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 15.398 ns ;&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.3  =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05000003_21aug2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** ONLY valid REV C/D RC Cards&lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** flux loop commented, just to try sampling the ADC.&lt;br /&gt;
** updated tcl file, but still need to rely on project file as well as qsf file.&lt;br /&gt;
** changed default level of adc_sclk to '1'&lt;br /&gt;
** dac_clr_n was changed from an output to an input.&lt;br /&gt;
** added 'locked' interface to rc_pll_stratix_iii&lt;br /&gt;
** renamed the adc_pll clock signals to more explanitory names&lt;br /&gt;
** added the FPGA_DEVICE_FAMILY generic to the dispatch interace for synthesis of the dc_fifo in lvds_rx&lt;br /&gt;
** uncommented DDR interface to force the syntesizer to use correct left and right PLLs (in conjunction with ADC and DDR PLLs)&lt;br /&gt;
** added test signals to test_status to see clocks on the scope.&lt;br /&gt;
== Revision 5.0.2 (buggy) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000002_test00_tagged.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.1&lt;br /&gt;
** Fixed a bug in wbs_frame_data that stored data incorrectly if reporting 1 or 2 pixels only.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,186 / 41,250 ( 63 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.755 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.979 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.067 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.1 (buggy) (Filter + Raw + Rectangle, 2 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000001_26may2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Combines features in rev. 5.0.0 (2 LVDS Lines) and rev. 4.0.e (Filtered + Raw), with the NEW rectangle mode.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** [[CVS Diff Between sys_v05000000 and rc_v05000001]]&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** Has a bug in wbs_frame_data that stored data incorrectly if reporting 1 or 2 pixels only.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,565 / 41,250 ( 64 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.656 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.861 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 14.167 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.0 (Filter Only, 2 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000000_22dec2008.sof (tagged as sys_v05000000_22dec2008)&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware v05000000+ of all other cards!!!&lt;br /&gt;
** Adds the ability to read out one column of data continuously from readout cards&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** [[CVS Diff Between rc_v0400000c and sys_v05000000]]&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,607 / 41,250 ( 65 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 406,016 / 3,423,744 ( 12 % )             ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.558 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.892 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.987 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.f (Filter + Raw, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0400000f_12feb2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on 4.0.e and in parallel with 5.0.9 (equivalent version, clamping is not included)&lt;br /&gt;
** Incorporates fixes that were done to flux-jumping between 5.0.2 - 5.0.4 - 5.0.9.  Namely:&lt;br /&gt;
*** Changes a multiplier from signed to unsigned (in fsfb_corr_multplier.vhd).&lt;br /&gt;
*** Changes sign extension from signed to unsigned (in flux_quanta_ram_admin.vhd).&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None reported yet.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,773 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,321,984 / 3,423,744 ( 39 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.539 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.118 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.318 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.e (Filter + Raw, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0400000e_27apr2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on 4.0.d&lt;br /&gt;
** Combines both raw- and filtered-data modes.&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are disabled.&lt;br /&gt;
** Tested by Matt Hasselfield.  &lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are disabled.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,048 / 41,250 ( 66 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,321,984 / 3,423,744 ( 39 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.675 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.907 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.728 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.d (Raw Only, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  rc_v0400000d_20090417.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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.&lt;br /&gt;
** The firmware takes a new command called readout_col_index which specifies which column to capture raw data from.&lt;br /&gt;
** Other than readout_col_index, the firmware functions the same as previous raw-data firmware, including then need to issue a capture_raw command.&lt;br /&gt;
** For more information on raw-data, see:  http://e-mode.phas.ubc.ca/mcewiki/index.php/Raw-mode_readout&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** Differences between 4.0.c and 4.0.d&lt;br /&gt;
 U system/test/source/tb/tb_cc_rcs_bcs_ac.vhd&lt;br /&gt;
 U all_cards/dispatch/source/rtl/dispatch_wishbone.vhd&lt;br /&gt;
 U library/sys_param/source/rtl/wishbone_pack.vhd&lt;br /&gt;
 U readout_card/adc_sample_coadd/source/rtl/adc_sample_coadd.vhd&lt;br /&gt;
 U readout_card/adc_sample_coadd/source/rtl/adc_sample_coadd_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop/source/rtl/flux_loop.vhd&lt;br /&gt;
 U readout_card/flux_loop/source/rtl/flux_loop_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/rtl/flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/rtl/flux_loop_ctrl_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/tb/tb1_flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/tb/tb2_flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/fsfb_calc/source/rtl/fsfb_fltr_regs.vhd&lt;br /&gt;
 U readout_card/fsfb_corr/source/rtl/fsfb_corr.vhd&lt;br /&gt;
 U readout_card/readout_card/source/rtl/readout_card.vhd&lt;br /&gt;
 U readout_card/readout_card/source/rtl/readout_card_pack.vhd&lt;br /&gt;
 U readout_card/wbs_frame_data/source/rtl/wbs_frame_data.vhd&lt;br /&gt;
 U readout_card/wbs_frame_data/source/rtl/wbs_frame_data_pack.vhd&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are not supported.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 24,554 / 41,250 ( 60 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,262,592 / 3,423,744 ( 37 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.991 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.864 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.052 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.4.1 ==&lt;br /&gt;
* '''Filename:'''  rc_v04040001_21nov2008&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,241 / 41,250 ( 66 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 405,504 / 3,423,744 ( 12 % )                  ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.588 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.585 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.057 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.4.0 (buggy) ==&lt;br /&gt;
* '''Filename:'''  rc_v04040000_02oct2008&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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]].&lt;br /&gt;
** Re-integrated the id_thermo and fpga_thermo block in the readout_card.vhd top level that was removed in 4.0.c.&lt;br /&gt;
** 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.&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
** Adjusted the indentation in fsfb_io_controller.vhd to make the file more readable.&lt;br /&gt;
** 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.&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** The following commands lock up the Readout Card firmware:  CARD_ID_ADDR, CARD_TEMP_ADDR, FPGA_TEMP_ADDR.&lt;br /&gt;
** 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&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,099 / 41,250 ( 66 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 406,016 / 3,423,744 ( 12 % )                  ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.372 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.052 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.066 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.c ==&lt;br /&gt;
* '''Filename:'''  rc_v0400000c_15aug2008.sof&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Only has data modes 0, 1, 4, and 10.&lt;br /&gt;
** 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).&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** Changed a counter in the dispatch block to ease timing constraints in synthesis (dispatch_wishbone.vhd)&lt;br /&gt;
** 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.&lt;br /&gt;
** '''Removed''' the fpga_termo (command:  '''fpga_temp''') and id_thermo (commands: '''card_temp, card_id''') to ease timing constraints in synthesis (readout_card.vhd)&lt;br /&gt;
** Updated the tagged version of fpga_termo.vhd to include the new 'stale bit' feature&lt;br /&gt;
** Updated the tagged version of frame_timing_core.vhd to include the new 'err_o' interface&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None reported yet&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
* '''FPGA Resource Usage:'''&lt;br /&gt;
 Total logic elements : 25,058 / 41,250 ( 61 % )&lt;br /&gt;
 Total memory bits : 400,896 / 3,423,744 ( 12 % )&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.282 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.736 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.665 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.b (buggy) ==&lt;br /&gt;
Note: This revision is on a watch list, after the bug detected 15 July 2008.  See the bug section for more details.&lt;br /&gt;
* '''Filename''' : rc_v0400000b_04aug2008.sof&lt;br /&gt;
* '''Features'''&lt;br /&gt;
** data_mode 10 is added to provide more filtfb bits (compared to data mode 9) for planet observations. filtered_dat(27 downto 3) &amp;amp; flux_cnt_dat(6 downto 0)&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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]]&lt;br /&gt;
&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.a (buggy) ==&lt;br /&gt;
Note: This revision is on a watch list, after the bug detected 15 July 2008.  See the bug section for more details.&lt;br /&gt;
* '''Filename''' : rc_v0400000a_07jul2008.sof&lt;br /&gt;
* '''Bug Fix'''&lt;br /&gt;
** mce_status and adc_offset/flx_quanta commands do not fail after power up.&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** Seems to clip out channel 0 from data reporting.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.9 (buggy) ==&lt;br /&gt;
* '''Filename''' : rc_v04000009_26jun2008.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** sa_bias and offset DACs only refreshed when new values are written. (in previous versions, DACs were refreshed every frame)&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.8 ==&lt;br /&gt;
* '''Filename''' : rc_v04000008_26jun2008.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** The gaini, gainp, gaind resolution increased to 12-bit, i.e. -2048 to 2047 (formerly 10-bit).&lt;br /&gt;
&lt;br /&gt;
* '''Bug fix'''&lt;br /&gt;
** the bug associated with gainpid read before mce_reset is fixed.&lt;br /&gt;
&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.3.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04030007_26may2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** 14-bit raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** 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.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.2.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04020007_24may2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
* '''Bug fix'''&lt;br /&gt;
** the bug associated with reading from raw-buffer is fixed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.1.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04010007_25apr2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.6 (buggy) ==&lt;br /&gt;
* '''Filename''' : rc_v04000006_15feb2008.sof or .pof       &lt;br /&gt;
* '''Features''' &lt;br /&gt;
** '''bugfix''': unreliable reset due to unsafe and incomplete state machines is fixed.&lt;br /&gt;
** '''bugfix''': flux_jump sign problem fixed, so far proved in const_mode, to be tested in servo_mode with cold setup.&lt;br /&gt;
** servo_mode=2 or ramp previously only went from 0 to ramp_amp, but now goes from -8192 to -8192+ramp_amp&lt;br /&gt;
** new commands are added: ''scratch'' and ''card_type''. Scratch takes 8 values and can be used by software to detect reset.&lt;br /&gt;
** slot_id and fw_rev are now integrated as part of all_cards.vhd&lt;br /&gt;
** lvds_tx_b=0, This will allow Clock Card to use the secondary backplane lvds line and check whether RC is plugged in.&lt;br /&gt;
** filter_coeff in misc_banks_admin commented as it is not implemented and causes timing problems.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
** slot_id is only set after a resetmce is issued. (using the latest all_cards in the next revision will fix this)&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.5 ==&lt;br /&gt;
* '''Filename''' : rc_v04000005_01nov2007.sof or .pof       &lt;br /&gt;
* '''Features''' &lt;br /&gt;
** data mode 9 (mixed filt + flux jump) with windowing readjusted compared to data mode 8&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** unreliable resetmce. Sometimes, firmware waked up non-responsive on lvds lines.&lt;br /&gt;
** In data mode 5 and 9, flux-jump counter is not reported properly due to a sign error. However, flux jumping works fine.&lt;br /&gt;
&lt;br /&gt;
== Revision 3.0.19 ==&lt;br /&gt;
* '''Filename''' : rc_v03000019_16feb2007_raw.sof (no pof as one is not likely to run with this as regular firmware)&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** data mode 3 is enabled.&lt;br /&gt;
** filter is disabled as a compromise to fit the raw-mode buffer.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** unreliable resetmce. Sometimes, firmware waked up non-responsive on lvds lines.&lt;br /&gt;
&lt;br /&gt;
== Old Firmware Revisions ==&lt;br /&gt;
* '''4.0.4''':  rc_v04000004_11oct2007.sof  data mode 8 added (mixed filt + flux jump)&lt;br /&gt;
* '''4.0.3''':  rc_v04000003_19sep2007.sof  data mode 7 bit split readjusted to 10b error being bit 4 to 14&lt;br /&gt;
* '''4.0.2''':  rc_v04000002_11sep2007.sof  pid resolution increased to 10b, data mode 7 added&lt;br /&gt;
* '''4.0.1''':  rc_v04000001_06sep2007.sof  &lt;br /&gt;
* '''4.0.0''':  rc_v04000000_29aug2007.sof  supports readout_row_index * [[ bugs ]]&lt;br /&gt;
&lt;br /&gt;
= To-Do List =&lt;br /&gt;
* the starting point for the servo is currently zero and it would be nice to have it programmable.&lt;br /&gt;
&lt;br /&gt;
= RC Synthesis Notes =&lt;br /&gt;
# 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. &lt;br /&gt;
# Timing: There is no &amp;quot;lock region&amp;quot; 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.&lt;br /&gt;
# 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%.&lt;br /&gt;
# 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.&lt;br /&gt;
# 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):&lt;br /&gt;
 lpm_file =&amp;gt; &amp;quot;C:/scuba2_repository/cards/readout_card/fsfb_calc/source/rtl/ram_40x64.hex&amp;quot;, and&lt;br /&gt;
 lpm_file    : STRING;&lt;br /&gt;
#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. &lt;br /&gt;
----&lt;br /&gt;
[http://e-mode.phas.ubc.ca/mcewiki/index.php/Main_Page  MCE Main Page]&lt;/div&gt;</summary>
		<author><name>Bburger</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Readout_Card_firmware&amp;diff=4334</id>
		<title>Readout Card firmware</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Readout_Card_firmware&amp;diff=4334"/>
		<updated>2011-05-04T21:32:49Z</updated>

		<summary type="html">&lt;p&gt;Bburger: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Synthesis Reminders (for firmware developers)&lt;br /&gt;
** quartus.ini is not needed anymore (Fixed as of Q7, Altera SR10783580 2010-10-24)&lt;br /&gt;
** Remember that readout_card/fsfb_clac/source/rtl/ram_40x64.vhd must be initialized with the ram_40x64.hex file in the same directory.&lt;br /&gt;
== Revision 5.1.2 ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010002_18jan2011.sof (for Rev. E cards) &lt;br /&gt;
** rc_stratix3_v05010002_18jan2011.jic (for Rev. E cards) &lt;br /&gt;
** rc_v05010002_03feb2011.sof (for Rev. B cards) &lt;br /&gt;
** rc_v05010002_03feb2011.pof (for Rev. B cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.1 with k1 and k2 (filter params) limited to k1&amp;lt;16 and k2&amp;lt;32 in order to resolve the timing when compiling for smaller Stratix FPGA on RC Rev. B.&lt;br /&gt;
&lt;br /&gt;
* '''Bug fix:'''&lt;br /&gt;
** the 2-rows-off filtered data readout introduced with configurable filter in rev. 5.1.0 and 5.1.1 is fixed now.&lt;br /&gt;
 &lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** none so far.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage and Timing Report''' (readout_card.fit.rpt and readout_card.tan.rpt): TO BE UPDATED LATER&lt;br /&gt;
 ; Total logic elements      ; 33,285 / 41,250 ( 81 % )                       ;&lt;br /&gt;
 ; Total pins                ; 358 / 616 ( 58 % )                             ;&lt;br /&gt;
 ; Total memory bits         ; 1,405,440 / 3,423,744 ( 41 % )                 ;&lt;br /&gt;
 ; Fast Model Clock Hold: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0'  ; 0.364 ns  &lt;br /&gt;
 ; Fast Model Clock Hold: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3'  ; 0.365 ns  &lt;br /&gt;
 ; Fast Model Clock Hold: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2'  ; 0.379 ns  &lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.1 (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05010001_01dec2010.sof (for Rev. B cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.0, but k1 and k2 (filter params) are now limited to k1&amp;lt;16 and k2&amp;lt;32 in order to resolve the timing failures of compiling 5.1.0 for smaller Stratix FPGA on RC Rev. B.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** filter mode data is off by 2 rows. &lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.0 (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010000_01nov2010.sof  (for Rev. E cards)&lt;br /&gt;
** rc_v05010000_01nov2010.sof (for Rev. B cards) has timing failures '''do not use!!!'''&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** added configurable filter parameters specified by ''fltr_coeff'', default is the f&amp;lt;sub&amp;gt;cutoff&amp;lt;/sub&amp;gt;/f&amp;lt;sub&amp;gt;sampl&amp;lt;/sub&amp;gt;=122Hz/15kHz. see [[ Digital 4-pole Butterworth Low-pass filter ]]. &lt;br /&gt;
** ''fltr_type'' is set to 255 to indicate configurable filter parameters.&lt;br /&gt;
** see [http://www.phas.ubc.ca/~mce/mcedocs/software/SC2_ELE_S580_515_mce_command_description.pdf MCE command description]&lt;br /&gt;
** development notes: &lt;br /&gt;
*** It is built on Quartus10.1. &lt;br /&gt;
*** tcl files had to be updated as cmp syntax is not supported in Q10 anymore.&lt;br /&gt;
*** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** rc_v05010000_01nov2010.sof has timing failures that were overlooked, do not use this firmware for Rev.B cards. &lt;br /&gt;
** '''filter mode data is off by 2 rows.''' &lt;br /&gt;
&lt;br /&gt;
* '''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&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.f  =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000f_22oct2010.sof (for Rev. B cards)&lt;br /&gt;
** rc_stratix3_v0500000f_22oct2010.sof  (for Rev. E cards)&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
**  Bugfix: integral clamp should work now. only positive integral_clamp values are valid!&lt;br /&gt;
&lt;br /&gt;
* '''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.&lt;br /&gt;
** available for both Rev. E and Rev. B cards, the upper byte of card_type parameter now reports the pcb revision.&lt;br /&gt;
** development note: It is built on Quartus10.1. &lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
**none yet!&lt;br /&gt;
&lt;br /&gt;
* '''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&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.e (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000e_06oct2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''  &lt;br /&gt;
** 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!&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.d =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000d_04aug2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
**  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.&lt;br /&gt;
&lt;br /&gt;
* '''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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** '''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 [[http://e-mode.phas.ubc.ca/mcewiki/index.php/Image:Clamp_unstable.png scope snapshot]] used slow_fb_ramp.py script for testing.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage and Timing Report''' (readout_card.fit.rpt and readout_card.tan.rpt): no change compared to 5.0.a/b/c&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.c (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000c_16jun2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.b&lt;br /&gt;
** Re-introduced flux-jump counter clamping to maintain continuity in behavior from past versions of firmware in the field.&lt;br /&gt;
** '''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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** '''flux-jump is broken'''. flux-jumping block misbehaves at the first jump in the negative range.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt): [[rc_5.0.c_fit_rpt]]&lt;br /&gt;
 ; Total logic elements     ; 26,800 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total pins               ; 358 / 616 ( 58 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 76 / 112 ( 68 % )                             ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): [[rc_5.0.c_tan_rpt]]&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.964 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.382 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 15.924 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.b (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000b_03jun2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.a&lt;br /&gt;
** 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.&lt;br /&gt;
** 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&lt;br /&gt;
** A sticky bit that only affected servo_mode=0,1,2 was also removed from the flux-jumping block.&lt;br /&gt;
** flx_lp_init commands now also clear the flux-jumping block as well.&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** flux-jump does not work when jumping to negative values.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt): [[rc_5.0.b_fit_rpt]]&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): [[rc_5.0.b_tan_rpt]]&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.a =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000a_12mar2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on the merger of rev. 5.0.8 and 5.0.9.&lt;br /&gt;
** '''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.&lt;br /&gt;
** The low pass filter has 20-bit input and f_3dB/f_samp = 122Hz/15kHz .&lt;br /&gt;
** The flux-jump clamping that was removed in 5.0.9 is included once again here, as we decided this is safer for now.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** &amp;quot;lock_dat_left&amp;quot; parameter that was removed in 5.0.9 is now implemented as &amp;quot;lock_dat_lsb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** flx_lp_init does not reinitialize the flux-jump block&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
** tag name: rc_v0500000a_12mar2009! years were mixed up!&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.9 (buggy) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000009_13nov2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** Removes a sticky bit in pid calculation result storage -- in fsfb_processor.&lt;br /&gt;
** Adds a command to clamp the growth of the I-term to prevent wrapping and track down the source of Caltech's FSFB jumps.&lt;br /&gt;
** Removed the unused lock_dat_left parameter.  The ability to shift left was moved to the fsfb_corr block some time ago.&lt;br /&gt;
** Fixed a sign extension bug acting on the flux quanta, which limited the value to 8191.  Changed the extension from signed to unsigned.&lt;br /&gt;
** Removed ineffective clamping in the flux-jump calculation block.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** integral_clamp read/write command does not work. &lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,960 / 41,250 ( 68 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.825 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.878 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 14.397 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.8 (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000008_09oct2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** type 1 low-pass filter: f&amp;lt;sub&amp;gt;3dB&amp;lt;/sub&amp;gt;=122Hz for f&amp;lt;sub&amp;gt;sample&amp;lt;/sub&amp;gt;=15kHz&lt;br /&gt;
** Filter-input-width changed from 18b to 20b with no sticky bits!&lt;br /&gt;
** removed sticky bits in internal arithmetic of the filter.&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.7 (type-2 filter) =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000007_09oct2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** type-2 low-pass-filter: f&amp;lt;sub&amp;gt;3dB&amp;lt;/sub&amp;gt;=75Hz for f&amp;lt;sub&amp;gt;sample&amp;lt;/sub&amp;gt;=30000.&lt;br /&gt;
** Filter-input-width changed from 18b to 20b with no sticky bits!&lt;br /&gt;
** inter-biquad-gain-scaling for the filter is 2^14&lt;br /&gt;
** filter results are scaled down by 2^3 in the output of the filter.&lt;br /&gt;
** removed sticky bits in internal arithmetics&lt;br /&gt;
** _correction_ disabled in fsfb_proc_pidz&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** quartus.ini file was '''not''' present in synth directory.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** none to report&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
== Revision 5.0.6  (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05000006_15sep2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Only Valid for Rev. C/D Cards&lt;br /&gt;
** Based on rev. 5.0.3&lt;br /&gt;
** tcl file updated for Rev. D and aligned with top-level and qsf (project file). &lt;br /&gt;
** flux loop commented, just to try sampling the ADC. &lt;br /&gt;
** compiled with Q9.1&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.5 (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000005_04sep2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** changed the low-pass-filter to f(3db)=75Hz for f(sample)=30000.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** quartus.ini file was '''not''' present in synth directory.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** negative inputs to the filter cause filter to have a non-flat pass-band region. may have to do with sign-handling...&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.4 =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000004_28aug2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** BUG Fix: handles 14-bit flux quanta (changed the multiplier to unsigned)&lt;br /&gt;
** BUG Fix: changed standard logic vector extension from signed to unsigned in flux-jumping slave.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,170 / 41,250 ( 63 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.541 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.612 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 15.398 ns ;&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.3  =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05000003_21aug2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** ONLY valid REV C/D RC Cards&lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** flux loop commented, just to try sampling the ADC.&lt;br /&gt;
** updated tcl file, but still need to rely on project file as well as qsf file.&lt;br /&gt;
** changed default level of adc_sclk to '1'&lt;br /&gt;
** dac_clr_n was changed from an output to an input.&lt;br /&gt;
** added 'locked' interface to rc_pll_stratix_iii&lt;br /&gt;
** renamed the adc_pll clock signals to more explanitory names&lt;br /&gt;
** added the FPGA_DEVICE_FAMILY generic to the dispatch interace for synthesis of the dc_fifo in lvds_rx&lt;br /&gt;
** uncommented DDR interface to force the syntesizer to use correct left and right PLLs (in conjunction with ADC and DDR PLLs)&lt;br /&gt;
** added test signals to test_status to see clocks on the scope.&lt;br /&gt;
== Revision 5.0.2 (buggy) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000002_test00_tagged.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.1&lt;br /&gt;
** Fixed a bug in wbs_frame_data that stored data incorrectly if reporting 1 or 2 pixels only.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,186 / 41,250 ( 63 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.755 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.979 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.067 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.1 (buggy) (Filter + Raw + Rectangle, 2 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000001_26may2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Combines features in rev. 5.0.0 (2 LVDS Lines) and rev. 4.0.e (Filtered + Raw), with the NEW rectangle mode.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** [[CVS Diff Between sys_v05000000 and rc_v05000001]]&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** Has a bug in wbs_frame_data that stored data incorrectly if reporting 1 or 2 pixels only.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,565 / 41,250 ( 64 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.656 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.861 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 14.167 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.0 (Filter Only, 2 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000000_22dec2008.sof (tagged as sys_v05000000_22dec2008)&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware v05000000+ of all other cards!!!&lt;br /&gt;
** Adds the ability to read out one column of data continuously from readout cards&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** [[CVS Diff Between rc_v0400000c and sys_v05000000]]&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,607 / 41,250 ( 65 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 406,016 / 3,423,744 ( 12 % )             ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.558 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.892 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.987 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.f (Filter + Raw, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0400000f_12feb2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on 4.0.e and in parallel with 5.0.9 (equivalent version, clamping is not included)&lt;br /&gt;
** Incorporates fixes that were done to flux-jumping between 5.0.2 - 5.0.4 - 5.0.9.  Namely:&lt;br /&gt;
*** Changes a multiplier from signed to unsigned (in fsfb_corr_multplier.vhd).&lt;br /&gt;
*** Changes sign extension from signed to unsigned (in flux_quanta_ram_admin.vhd).&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None reported yet.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,773 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,321,984 / 3,423,744 ( 39 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.539 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.118 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.318 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.e (Filter + Raw, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0400000e_27apr2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on 4.0.d&lt;br /&gt;
** Combines both raw- and filtered-data modes.&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are disabled.&lt;br /&gt;
** Tested by Matt Hasselfield.  &lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are disabled.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,048 / 41,250 ( 66 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,321,984 / 3,423,744 ( 39 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.675 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.907 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.728 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.d (Raw Only, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  rc_v0400000d_20090417.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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.&lt;br /&gt;
** The firmware takes a new command called readout_col_index which specifies which column to capture raw data from.&lt;br /&gt;
** Other than readout_col_index, the firmware functions the same as previous raw-data firmware, including then need to issue a capture_raw command.&lt;br /&gt;
** For more information on raw-data, see:  http://e-mode.phas.ubc.ca/mcewiki/index.php/Raw-mode_readout&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** Differences between 4.0.c and 4.0.d&lt;br /&gt;
 U system/test/source/tb/tb_cc_rcs_bcs_ac.vhd&lt;br /&gt;
 U all_cards/dispatch/source/rtl/dispatch_wishbone.vhd&lt;br /&gt;
 U library/sys_param/source/rtl/wishbone_pack.vhd&lt;br /&gt;
 U readout_card/adc_sample_coadd/source/rtl/adc_sample_coadd.vhd&lt;br /&gt;
 U readout_card/adc_sample_coadd/source/rtl/adc_sample_coadd_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop/source/rtl/flux_loop.vhd&lt;br /&gt;
 U readout_card/flux_loop/source/rtl/flux_loop_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/rtl/flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/rtl/flux_loop_ctrl_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/tb/tb1_flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/tb/tb2_flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/fsfb_calc/source/rtl/fsfb_fltr_regs.vhd&lt;br /&gt;
 U readout_card/fsfb_corr/source/rtl/fsfb_corr.vhd&lt;br /&gt;
 U readout_card/readout_card/source/rtl/readout_card.vhd&lt;br /&gt;
 U readout_card/readout_card/source/rtl/readout_card_pack.vhd&lt;br /&gt;
 U readout_card/wbs_frame_data/source/rtl/wbs_frame_data.vhd&lt;br /&gt;
 U readout_card/wbs_frame_data/source/rtl/wbs_frame_data_pack.vhd&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are not supported.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 24,554 / 41,250 ( 60 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,262,592 / 3,423,744 ( 37 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.991 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.864 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.052 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.4.1 ==&lt;br /&gt;
* '''Filename:'''  rc_v04040001_21nov2008&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,241 / 41,250 ( 66 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 405,504 / 3,423,744 ( 12 % )                  ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.588 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.585 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.057 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.4.0 (buggy) ==&lt;br /&gt;
* '''Filename:'''  rc_v04040000_02oct2008&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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]].&lt;br /&gt;
** Re-integrated the id_thermo and fpga_thermo block in the readout_card.vhd top level that was removed in 4.0.c.&lt;br /&gt;
** 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.&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
** Adjusted the indentation in fsfb_io_controller.vhd to make the file more readable.&lt;br /&gt;
** 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.&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** The following commands lock up the Readout Card firmware:  CARD_ID_ADDR, CARD_TEMP_ADDR, FPGA_TEMP_ADDR.&lt;br /&gt;
** 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&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,099 / 41,250 ( 66 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 406,016 / 3,423,744 ( 12 % )                  ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.372 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.052 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.066 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.c ==&lt;br /&gt;
* '''Filename:'''  rc_v0400000c_15aug2008.sof&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Only has data modes 0, 1, 4, and 10.&lt;br /&gt;
** 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).&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** Changed a counter in the dispatch block to ease timing constraints in synthesis (dispatch_wishbone.vhd)&lt;br /&gt;
** 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.&lt;br /&gt;
** '''Removed''' the fpga_termo (command:  '''fpga_temp''') and id_thermo (commands: '''card_temp, card_id''') to ease timing constraints in synthesis (readout_card.vhd)&lt;br /&gt;
** Updated the tagged version of fpga_termo.vhd to include the new 'stale bit' feature&lt;br /&gt;
** Updated the tagged version of frame_timing_core.vhd to include the new 'err_o' interface&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None reported yet&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
* '''FPGA Resource Usage:'''&lt;br /&gt;
 Total logic elements : 25,058 / 41,250 ( 61 % )&lt;br /&gt;
 Total memory bits : 400,896 / 3,423,744 ( 12 % )&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.282 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.736 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.665 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.b (buggy) ==&lt;br /&gt;
Note: This revision is on a watch list, after the bug detected 15 July 2008.  See the bug section for more details.&lt;br /&gt;
* '''Filename''' : rc_v0400000b_04aug2008.sof&lt;br /&gt;
* '''Features'''&lt;br /&gt;
** data_mode 10 is added to provide more filtfb bits (compared to data mode 9) for planet observations. filtered_dat(27 downto 3) &amp;amp; flux_cnt_dat(6 downto 0)&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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]]&lt;br /&gt;
&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.a (buggy) ==&lt;br /&gt;
Note: This revision is on a watch list, after the bug detected 15 July 2008.  See the bug section for more details.&lt;br /&gt;
* '''Filename''' : rc_v0400000a_07jul2008.sof&lt;br /&gt;
* '''Bug Fix'''&lt;br /&gt;
** mce_status and adc_offset/flx_quanta commands do not fail after power up.&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** Seems to clip out channel 0 from data reporting.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.9 (buggy) ==&lt;br /&gt;
* '''Filename''' : rc_v04000009_26jun2008.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** sa_bias and offset DACs only refreshed when new values are written. (in previous versions, DACs were refreshed every frame)&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.8 ==&lt;br /&gt;
* '''Filename''' : rc_v04000008_26jun2008.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** The gaini, gainp, gaind resolution increased to 12-bit, i.e. -2048 to 2047 (formerly 10-bit).&lt;br /&gt;
&lt;br /&gt;
* '''Bug fix'''&lt;br /&gt;
** the bug associated with gainpid read before mce_reset is fixed.&lt;br /&gt;
&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.3.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04030007_26may2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** 14-bit raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** 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.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.2.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04020007_24may2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
* '''Bug fix'''&lt;br /&gt;
** the bug associated with reading from raw-buffer is fixed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.1.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04010007_25apr2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.6 (buggy) ==&lt;br /&gt;
* '''Filename''' : rc_v04000006_15feb2008.sof or .pof       &lt;br /&gt;
* '''Features''' &lt;br /&gt;
** '''bugfix''': unreliable reset due to unsafe and incomplete state machines is fixed.&lt;br /&gt;
** '''bugfix''': flux_jump sign problem fixed, so far proved in const_mode, to be tested in servo_mode with cold setup.&lt;br /&gt;
** servo_mode=2 or ramp previously only went from 0 to ramp_amp, but now goes from -8192 to -8192+ramp_amp&lt;br /&gt;
** new commands are added: ''scratch'' and ''card_type''. Scratch takes 8 values and can be used by software to detect reset.&lt;br /&gt;
** slot_id and fw_rev are now integrated as part of all_cards.vhd&lt;br /&gt;
** lvds_tx_b=0, This will allow Clock Card to use the secondary backplane lvds line and check whether RC is plugged in.&lt;br /&gt;
** filter_coeff in misc_banks_admin commented as it is not implemented and causes timing problems.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
** slot_id is only set after a resetmce is issued. (using the latest all_cards in the next revision will fix this)&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.5 ==&lt;br /&gt;
* '''Filename''' : rc_v04000005_01nov2007.sof or .pof       &lt;br /&gt;
* '''Features''' &lt;br /&gt;
** data mode 9 (mixed filt + flux jump) with windowing readjusted compared to data mode 8&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** unreliable resetmce. Sometimes, firmware waked up non-responsive on lvds lines.&lt;br /&gt;
** In data mode 5 and 9, flux-jump counter is not reported properly due to a sign error. However, flux jumping works fine.&lt;br /&gt;
&lt;br /&gt;
== Revision 3.0.19 ==&lt;br /&gt;
* '''Filename''' : rc_v03000019_16feb2007_raw.sof (no pof as one is not likely to run with this as regular firmware)&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** data mode 3 is enabled.&lt;br /&gt;
** filter is disabled as a compromise to fit the raw-mode buffer.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** unreliable resetmce. Sometimes, firmware waked up non-responsive on lvds lines.&lt;br /&gt;
&lt;br /&gt;
== Old Firmware Revisions ==&lt;br /&gt;
* '''4.0.4''':  rc_v04000004_11oct2007.sof  data mode 8 added (mixed filt + flux jump)&lt;br /&gt;
* '''4.0.3''':  rc_v04000003_19sep2007.sof  data mode 7 bit split readjusted to 10b error being bit 4 to 14&lt;br /&gt;
* '''4.0.2''':  rc_v04000002_11sep2007.sof  pid resolution increased to 10b, data mode 7 added&lt;br /&gt;
* '''4.0.1''':  rc_v04000001_06sep2007.sof  &lt;br /&gt;
* '''4.0.0''':  rc_v04000000_29aug2007.sof  supports readout_row_index * [[ bugs ]]&lt;br /&gt;
&lt;br /&gt;
= To-Do List =&lt;br /&gt;
* the starting point for the servo is currently zero and it would be nice to have it programmable.&lt;br /&gt;
&lt;br /&gt;
= RC Synthesis Notes =&lt;br /&gt;
# 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. &lt;br /&gt;
# Timing: There is no &amp;quot;lock region&amp;quot; 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.&lt;br /&gt;
# 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%.&lt;br /&gt;
# 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.&lt;br /&gt;
# 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):&lt;br /&gt;
 lpm_file =&amp;gt; &amp;quot;C:/scuba2_repository/cards/readout_card/fsfb_calc/source/rtl/ram_40x64.hex&amp;quot;, and&lt;br /&gt;
 lpm_file    : STRING;&lt;br /&gt;
#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. &lt;br /&gt;
----&lt;br /&gt;
[http://e-mode.phas.ubc.ca/mcewiki/index.php/Main_Page  MCE Main Page]&lt;/div&gt;</summary>
		<author><name>Bburger</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Readout_Card_firmware&amp;diff=4333</id>
		<title>Readout Card firmware</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Readout_Card_firmware&amp;diff=4333"/>
		<updated>2011-05-04T21:28:23Z</updated>

		<summary type="html">&lt;p&gt;Bburger: /* Revision 5.0.c (not recommended) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Synthesis Reminders (for firmware developers)&lt;br /&gt;
** quartus.ini is not needed anymore (Fixed as of Q7, Altera SR10783580 2010-10-24)&lt;br /&gt;
** Remember that readout_card/fsfb_clac/source/rtl/ram_40x64.vhd must be initialized with the ram_40x64.hex file in the same directory.&lt;br /&gt;
= Revision 5.1.2 =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010002_18jan2011.sof (for Rev. E cards) &lt;br /&gt;
** rc_stratix3_v05010002_18jan2011.jic (for Rev. E cards) &lt;br /&gt;
** rc_v05010002_03feb2011.sof (for Rev. B cards) &lt;br /&gt;
** rc_v05010002_03feb2011.pof (for Rev. B cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.1 with k1 and k2 (filter params) limited to k1&amp;lt;16 and k2&amp;lt;32 in order to resolve the timing when compiling for smaller Stratix FPGA on RC Rev. B.&lt;br /&gt;
&lt;br /&gt;
* '''Bug fix:'''&lt;br /&gt;
** the 2-rows-off filtered data readout introduced with configurable filter in rev. 5.1.0 and 5.1.1 is fixed now.&lt;br /&gt;
 &lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** none so far.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage and Timing Report''' (readout_card.fit.rpt and readout_card.tan.rpt): TO BE UPDATED LATER&lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.1 (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05010001_01dec2010.sof (for Rev. B cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.0, but k1 and k2 (filter params) are now limited to k1&amp;lt;16 and k2&amp;lt;32 in order to resolve the timing failures of compiling 5.1.0 for smaller Stratix FPGA on RC Rev. B.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** filter mode data is off by 2 rows. &lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.0 (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010000_01nov2010.sof  (for Rev. E cards)&lt;br /&gt;
** rc_v05010000_01nov2010.sof (for Rev. B cards) has timing failures '''do not use!!!'''&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** added configurable filter parameters specified by ''fltr_coeff'', default is the f&amp;lt;sub&amp;gt;cutoff&amp;lt;/sub&amp;gt;/f&amp;lt;sub&amp;gt;sampl&amp;lt;/sub&amp;gt;=122Hz/15kHz. see [[ Digital 4-pole Butterworth Low-pass filter ]]. &lt;br /&gt;
** ''fltr_type'' is set to 255 to indicate configurable filter parameters.&lt;br /&gt;
** see [http://www.phas.ubc.ca/~mce/mcedocs/software/SC2_ELE_S580_515_mce_command_description.pdf MCE command description]&lt;br /&gt;
** development notes: &lt;br /&gt;
*** It is built on Quartus10.1. &lt;br /&gt;
*** tcl files had to be updated as cmp syntax is not supported in Q10 anymore.&lt;br /&gt;
*** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** rc_v05010000_01nov2010.sof has timing failures that were overlooked, do not use this firmware for Rev.B cards. &lt;br /&gt;
** '''filter mode data is off by 2 rows.''' &lt;br /&gt;
&lt;br /&gt;
* '''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&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.f  =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000f_22oct2010.sof (for Rev. B cards)&lt;br /&gt;
** rc_stratix3_v0500000f_22oct2010.sof  (for Rev. E cards)&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
**  Bugfix: integral clamp should work now. only positive integral_clamp values are valid!&lt;br /&gt;
&lt;br /&gt;
* '''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.&lt;br /&gt;
** available for both Rev. E and Rev. B cards, the upper byte of card_type parameter now reports the pcb revision.&lt;br /&gt;
** development note: It is built on Quartus10.1. &lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
**none yet!&lt;br /&gt;
&lt;br /&gt;
* '''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&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.e (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000e_06oct2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''  &lt;br /&gt;
** 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!&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.d =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000d_04aug2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
**  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.&lt;br /&gt;
&lt;br /&gt;
* '''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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** '''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 [[http://e-mode.phas.ubc.ca/mcewiki/index.php/Image:Clamp_unstable.png scope snapshot]] used slow_fb_ramp.py script for testing.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage and Timing Report''' (readout_card.fit.rpt and readout_card.tan.rpt): no change compared to 5.0.a/b/c&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.c (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000c_16jun2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.b&lt;br /&gt;
** Re-introduced flux-jump counter clamping to maintain continuity in behavior from past versions of firmware in the field.&lt;br /&gt;
** '''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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** '''flux-jump is broken'''. flux-jumping block misbehaves at the first jump in the negative range.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt): [[rc_5.0.c_fit_rpt]]&lt;br /&gt;
 ; Total logic elements     ; 26,800 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total pins               ; 358 / 616 ( 58 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 76 / 112 ( 68 % )                             ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): [[rc_5.0.c_tan_rpt]]&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.964 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.382 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 15.924 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.b (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000b_03jun2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.a&lt;br /&gt;
** 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.&lt;br /&gt;
** 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&lt;br /&gt;
** A sticky bit that only affected servo_mode=0,1,2 was also removed from the flux-jumping block.&lt;br /&gt;
** flx_lp_init commands now also clear the flux-jumping block as well.&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** flux-jump does not work when jumping to negative values.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt): [[rc_5.0.b_fit_rpt]]&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): [[rc_5.0.b_tan_rpt]]&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.a =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000a_12mar2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on the merger of rev. 5.0.8 and 5.0.9.&lt;br /&gt;
** '''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.&lt;br /&gt;
** The low pass filter has 20-bit input and f_3dB/f_samp = 122Hz/15kHz .&lt;br /&gt;
** The flux-jump clamping that was removed in 5.0.9 is included once again here, as we decided this is safer for now.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** &amp;quot;lock_dat_left&amp;quot; parameter that was removed in 5.0.9 is now implemented as &amp;quot;lock_dat_lsb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** flx_lp_init does not reinitialize the flux-jump block&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
** tag name: rc_v0500000a_12mar2009! years were mixed up!&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.9 (buggy) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000009_13nov2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** Removes a sticky bit in pid calculation result storage -- in fsfb_processor.&lt;br /&gt;
** Adds a command to clamp the growth of the I-term to prevent wrapping and track down the source of Caltech's FSFB jumps.&lt;br /&gt;
** Removed the unused lock_dat_left parameter.  The ability to shift left was moved to the fsfb_corr block some time ago.&lt;br /&gt;
** Fixed a sign extension bug acting on the flux quanta, which limited the value to 8191.  Changed the extension from signed to unsigned.&lt;br /&gt;
** Removed ineffective clamping in the flux-jump calculation block.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** integral_clamp read/write command does not work. &lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,960 / 41,250 ( 68 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.825 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.878 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 14.397 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.8 (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000008_09oct2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** type 1 low-pass filter: f&amp;lt;sub&amp;gt;3dB&amp;lt;/sub&amp;gt;=122Hz for f&amp;lt;sub&amp;gt;sample&amp;lt;/sub&amp;gt;=15kHz&lt;br /&gt;
** Filter-input-width changed from 18b to 20b with no sticky bits!&lt;br /&gt;
** removed sticky bits in internal arithmetic of the filter.&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.7 (type-2 filter) =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000007_09oct2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** type-2 low-pass-filter: f&amp;lt;sub&amp;gt;3dB&amp;lt;/sub&amp;gt;=75Hz for f&amp;lt;sub&amp;gt;sample&amp;lt;/sub&amp;gt;=30000.&lt;br /&gt;
** Filter-input-width changed from 18b to 20b with no sticky bits!&lt;br /&gt;
** inter-biquad-gain-scaling for the filter is 2^14&lt;br /&gt;
** filter results are scaled down by 2^3 in the output of the filter.&lt;br /&gt;
** removed sticky bits in internal arithmetics&lt;br /&gt;
** _correction_ disabled in fsfb_proc_pidz&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** quartus.ini file was '''not''' present in synth directory.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** none to report&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
== Revision 5.0.6  (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05000006_15sep2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Only Valid for Rev. C/D Cards&lt;br /&gt;
** Based on rev. 5.0.3&lt;br /&gt;
** tcl file updated for Rev. D and aligned with top-level and qsf (project file). &lt;br /&gt;
** flux loop commented, just to try sampling the ADC. &lt;br /&gt;
** compiled with Q9.1&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.5 (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000005_04sep2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** changed the low-pass-filter to f(3db)=75Hz for f(sample)=30000.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** quartus.ini file was '''not''' present in synth directory.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** negative inputs to the filter cause filter to have a non-flat pass-band region. may have to do with sign-handling...&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.4 =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000004_28aug2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** BUG Fix: handles 14-bit flux quanta (changed the multiplier to unsigned)&lt;br /&gt;
** BUG Fix: changed standard logic vector extension from signed to unsigned in flux-jumping slave.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,170 / 41,250 ( 63 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.541 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.612 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 15.398 ns ;&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.3  =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05000003_21aug2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** ONLY valid REV C/D RC Cards&lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** flux loop commented, just to try sampling the ADC.&lt;br /&gt;
** updated tcl file, but still need to rely on project file as well as qsf file.&lt;br /&gt;
** changed default level of adc_sclk to '1'&lt;br /&gt;
** dac_clr_n was changed from an output to an input.&lt;br /&gt;
** added 'locked' interface to rc_pll_stratix_iii&lt;br /&gt;
** renamed the adc_pll clock signals to more explanitory names&lt;br /&gt;
** added the FPGA_DEVICE_FAMILY generic to the dispatch interace for synthesis of the dc_fifo in lvds_rx&lt;br /&gt;
** uncommented DDR interface to force the syntesizer to use correct left and right PLLs (in conjunction with ADC and DDR PLLs)&lt;br /&gt;
** added test signals to test_status to see clocks on the scope.&lt;br /&gt;
== Revision 5.0.2 (buggy) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000002_test00_tagged.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.1&lt;br /&gt;
** Fixed a bug in wbs_frame_data that stored data incorrectly if reporting 1 or 2 pixels only.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,186 / 41,250 ( 63 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.755 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.979 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.067 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.1 (buggy) (Filter + Raw + Rectangle, 2 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000001_26may2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Combines features in rev. 5.0.0 (2 LVDS Lines) and rev. 4.0.e (Filtered + Raw), with the NEW rectangle mode.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** [[CVS Diff Between sys_v05000000 and rc_v05000001]]&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** Has a bug in wbs_frame_data that stored data incorrectly if reporting 1 or 2 pixels only.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,565 / 41,250 ( 64 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.656 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.861 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 14.167 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.0 (Filter Only, 2 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000000_22dec2008.sof (tagged as sys_v05000000_22dec2008)&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware v05000000+ of all other cards!!!&lt;br /&gt;
** Adds the ability to read out one column of data continuously from readout cards&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** [[CVS Diff Between rc_v0400000c and sys_v05000000]]&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,607 / 41,250 ( 65 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 406,016 / 3,423,744 ( 12 % )             ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.558 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.892 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.987 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.f (Filter + Raw, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0400000f_12feb2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on 4.0.e and in parallel with 5.0.9 (equivalent version, clamping is not included)&lt;br /&gt;
** Incorporates fixes that were done to flux-jumping between 5.0.2 - 5.0.4 - 5.0.9.  Namely:&lt;br /&gt;
*** Changes a multiplier from signed to unsigned (in fsfb_corr_multplier.vhd).&lt;br /&gt;
*** Changes sign extension from signed to unsigned (in flux_quanta_ram_admin.vhd).&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None reported yet.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,773 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,321,984 / 3,423,744 ( 39 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.539 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.118 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.318 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.e (Filter + Raw, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0400000e_27apr2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on 4.0.d&lt;br /&gt;
** Combines both raw- and filtered-data modes.&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are disabled.&lt;br /&gt;
** Tested by Matt Hasselfield.  &lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are disabled.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,048 / 41,250 ( 66 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,321,984 / 3,423,744 ( 39 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.675 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.907 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.728 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.d (Raw Only, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  rc_v0400000d_20090417.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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.&lt;br /&gt;
** The firmware takes a new command called readout_col_index which specifies which column to capture raw data from.&lt;br /&gt;
** Other than readout_col_index, the firmware functions the same as previous raw-data firmware, including then need to issue a capture_raw command.&lt;br /&gt;
** For more information on raw-data, see:  http://e-mode.phas.ubc.ca/mcewiki/index.php/Raw-mode_readout&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** Differences between 4.0.c and 4.0.d&lt;br /&gt;
 U system/test/source/tb/tb_cc_rcs_bcs_ac.vhd&lt;br /&gt;
 U all_cards/dispatch/source/rtl/dispatch_wishbone.vhd&lt;br /&gt;
 U library/sys_param/source/rtl/wishbone_pack.vhd&lt;br /&gt;
 U readout_card/adc_sample_coadd/source/rtl/adc_sample_coadd.vhd&lt;br /&gt;
 U readout_card/adc_sample_coadd/source/rtl/adc_sample_coadd_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop/source/rtl/flux_loop.vhd&lt;br /&gt;
 U readout_card/flux_loop/source/rtl/flux_loop_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/rtl/flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/rtl/flux_loop_ctrl_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/tb/tb1_flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/tb/tb2_flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/fsfb_calc/source/rtl/fsfb_fltr_regs.vhd&lt;br /&gt;
 U readout_card/fsfb_corr/source/rtl/fsfb_corr.vhd&lt;br /&gt;
 U readout_card/readout_card/source/rtl/readout_card.vhd&lt;br /&gt;
 U readout_card/readout_card/source/rtl/readout_card_pack.vhd&lt;br /&gt;
 U readout_card/wbs_frame_data/source/rtl/wbs_frame_data.vhd&lt;br /&gt;
 U readout_card/wbs_frame_data/source/rtl/wbs_frame_data_pack.vhd&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are not supported.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 24,554 / 41,250 ( 60 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,262,592 / 3,423,744 ( 37 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.991 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.864 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.052 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.4.1 ==&lt;br /&gt;
* '''Filename:'''  rc_v04040001_21nov2008&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,241 / 41,250 ( 66 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 405,504 / 3,423,744 ( 12 % )                  ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.588 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.585 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.057 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.4.0 (buggy) ==&lt;br /&gt;
* '''Filename:'''  rc_v04040000_02oct2008&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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]].&lt;br /&gt;
** Re-integrated the id_thermo and fpga_thermo block in the readout_card.vhd top level that was removed in 4.0.c.&lt;br /&gt;
** 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.&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
** Adjusted the indentation in fsfb_io_controller.vhd to make the file more readable.&lt;br /&gt;
** 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.&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** The following commands lock up the Readout Card firmware:  CARD_ID_ADDR, CARD_TEMP_ADDR, FPGA_TEMP_ADDR.&lt;br /&gt;
** 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&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,099 / 41,250 ( 66 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 406,016 / 3,423,744 ( 12 % )                  ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.372 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.052 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.066 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.c ==&lt;br /&gt;
* '''Filename:'''  rc_v0400000c_15aug2008.sof&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Only has data modes 0, 1, 4, and 10.&lt;br /&gt;
** 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).&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** Changed a counter in the dispatch block to ease timing constraints in synthesis (dispatch_wishbone.vhd)&lt;br /&gt;
** 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.&lt;br /&gt;
** '''Removed''' the fpga_termo (command:  '''fpga_temp''') and id_thermo (commands: '''card_temp, card_id''') to ease timing constraints in synthesis (readout_card.vhd)&lt;br /&gt;
** Updated the tagged version of fpga_termo.vhd to include the new 'stale bit' feature&lt;br /&gt;
** Updated the tagged version of frame_timing_core.vhd to include the new 'err_o' interface&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None reported yet&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
* '''FPGA Resource Usage:'''&lt;br /&gt;
 Total logic elements : 25,058 / 41,250 ( 61 % )&lt;br /&gt;
 Total memory bits : 400,896 / 3,423,744 ( 12 % )&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.282 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.736 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.665 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.b (buggy) ==&lt;br /&gt;
Note: This revision is on a watch list, after the bug detected 15 July 2008.  See the bug section for more details.&lt;br /&gt;
* '''Filename''' : rc_v0400000b_04aug2008.sof&lt;br /&gt;
* '''Features'''&lt;br /&gt;
** data_mode 10 is added to provide more filtfb bits (compared to data mode 9) for planet observations. filtered_dat(27 downto 3) &amp;amp; flux_cnt_dat(6 downto 0)&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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]]&lt;br /&gt;
&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.a (buggy) ==&lt;br /&gt;
Note: This revision is on a watch list, after the bug detected 15 July 2008.  See the bug section for more details.&lt;br /&gt;
* '''Filename''' : rc_v0400000a_07jul2008.sof&lt;br /&gt;
* '''Bug Fix'''&lt;br /&gt;
** mce_status and adc_offset/flx_quanta commands do not fail after power up.&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** Seems to clip out channel 0 from data reporting.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.9 (buggy) ==&lt;br /&gt;
* '''Filename''' : rc_v04000009_26jun2008.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** sa_bias and offset DACs only refreshed when new values are written. (in previous versions, DACs were refreshed every frame)&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.8 ==&lt;br /&gt;
* '''Filename''' : rc_v04000008_26jun2008.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** The gaini, gainp, gaind resolution increased to 12-bit, i.e. -2048 to 2047 (formerly 10-bit).&lt;br /&gt;
&lt;br /&gt;
* '''Bug fix'''&lt;br /&gt;
** the bug associated with gainpid read before mce_reset is fixed.&lt;br /&gt;
&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.3.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04030007_26may2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** 14-bit raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** 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.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.2.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04020007_24may2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
* '''Bug fix'''&lt;br /&gt;
** the bug associated with reading from raw-buffer is fixed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.1.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04010007_25apr2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.6 (buggy) ==&lt;br /&gt;
* '''Filename''' : rc_v04000006_15feb2008.sof or .pof       &lt;br /&gt;
* '''Features''' &lt;br /&gt;
** '''bugfix''': unreliable reset due to unsafe and incomplete state machines is fixed.&lt;br /&gt;
** '''bugfix''': flux_jump sign problem fixed, so far proved in const_mode, to be tested in servo_mode with cold setup.&lt;br /&gt;
** servo_mode=2 or ramp previously only went from 0 to ramp_amp, but now goes from -8192 to -8192+ramp_amp&lt;br /&gt;
** new commands are added: ''scratch'' and ''card_type''. Scratch takes 8 values and can be used by software to detect reset.&lt;br /&gt;
** slot_id and fw_rev are now integrated as part of all_cards.vhd&lt;br /&gt;
** lvds_tx_b=0, This will allow Clock Card to use the secondary backplane lvds line and check whether RC is plugged in.&lt;br /&gt;
** filter_coeff in misc_banks_admin commented as it is not implemented and causes timing problems.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
** slot_id is only set after a resetmce is issued. (using the latest all_cards in the next revision will fix this)&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.5 ==&lt;br /&gt;
* '''Filename''' : rc_v04000005_01nov2007.sof or .pof       &lt;br /&gt;
* '''Features''' &lt;br /&gt;
** data mode 9 (mixed filt + flux jump) with windowing readjusted compared to data mode 8&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** unreliable resetmce. Sometimes, firmware waked up non-responsive on lvds lines.&lt;br /&gt;
** In data mode 5 and 9, flux-jump counter is not reported properly due to a sign error. However, flux jumping works fine.&lt;br /&gt;
&lt;br /&gt;
== Revision 3.0.19 ==&lt;br /&gt;
* '''Filename''' : rc_v03000019_16feb2007_raw.sof (no pof as one is not likely to run with this as regular firmware)&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** data mode 3 is enabled.&lt;br /&gt;
** filter is disabled as a compromise to fit the raw-mode buffer.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** unreliable resetmce. Sometimes, firmware waked up non-responsive on lvds lines.&lt;br /&gt;
&lt;br /&gt;
== Old Firmware Revisions ==&lt;br /&gt;
* '''4.0.4''':  rc_v04000004_11oct2007.sof  data mode 8 added (mixed filt + flux jump)&lt;br /&gt;
* '''4.0.3''':  rc_v04000003_19sep2007.sof  data mode 7 bit split readjusted to 10b error being bit 4 to 14&lt;br /&gt;
* '''4.0.2''':  rc_v04000002_11sep2007.sof  pid resolution increased to 10b, data mode 7 added&lt;br /&gt;
* '''4.0.1''':  rc_v04000001_06sep2007.sof  &lt;br /&gt;
* '''4.0.0''':  rc_v04000000_29aug2007.sof  supports readout_row_index * [[ bugs ]]&lt;br /&gt;
&lt;br /&gt;
= To-Do List =&lt;br /&gt;
* the starting point for the servo is currently zero and it would be nice to have it programmable.&lt;br /&gt;
&lt;br /&gt;
= RC Synthesis Notes =&lt;br /&gt;
# 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. &lt;br /&gt;
# Timing: There is no &amp;quot;lock region&amp;quot; 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.&lt;br /&gt;
# 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%.&lt;br /&gt;
# 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.&lt;br /&gt;
# 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):&lt;br /&gt;
 lpm_file =&amp;gt; &amp;quot;C:/scuba2_repository/cards/readout_card/fsfb_calc/source/rtl/ram_40x64.hex&amp;quot;, and&lt;br /&gt;
 lpm_file    : STRING;&lt;br /&gt;
#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. &lt;br /&gt;
----&lt;br /&gt;
[http://e-mode.phas.ubc.ca/mcewiki/index.php/Main_Page  MCE Main Page]&lt;/div&gt;</summary>
		<author><name>Bburger</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Readout_Card_firmware&amp;diff=4332</id>
		<title>Readout Card firmware</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Readout_Card_firmware&amp;diff=4332"/>
		<updated>2011-05-04T21:28:03Z</updated>

		<summary type="html">&lt;p&gt;Bburger: /* Revision 5.0.c (not recommended) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Synthesis Reminders (for firmware developers)&lt;br /&gt;
** quartus.ini is not needed anymore (Fixed as of Q7, Altera SR10783580 2010-10-24)&lt;br /&gt;
** Remember that readout_card/fsfb_clac/source/rtl/ram_40x64.vhd must be initialized with the ram_40x64.hex file in the same directory.&lt;br /&gt;
= Revision 5.1.2 =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010002_18jan2011.sof (for Rev. E cards) &lt;br /&gt;
** rc_stratix3_v05010002_18jan2011.jic (for Rev. E cards) &lt;br /&gt;
** rc_v05010002_03feb2011.sof (for Rev. B cards) &lt;br /&gt;
** rc_v05010002_03feb2011.pof (for Rev. B cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.1 with k1 and k2 (filter params) limited to k1&amp;lt;16 and k2&amp;lt;32 in order to resolve the timing when compiling for smaller Stratix FPGA on RC Rev. B.&lt;br /&gt;
&lt;br /&gt;
* '''Bug fix:'''&lt;br /&gt;
** the 2-rows-off filtered data readout introduced with configurable filter in rev. 5.1.0 and 5.1.1 is fixed now.&lt;br /&gt;
 &lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** none so far.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage and Timing Report''' (readout_card.fit.rpt and readout_card.tan.rpt): TO BE UPDATED LATER&lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.1 (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05010001_01dec2010.sof (for Rev. B cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.0, but k1 and k2 (filter params) are now limited to k1&amp;lt;16 and k2&amp;lt;32 in order to resolve the timing failures of compiling 5.1.0 for smaller Stratix FPGA on RC Rev. B.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** filter mode data is off by 2 rows. &lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.0 (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010000_01nov2010.sof  (for Rev. E cards)&lt;br /&gt;
** rc_v05010000_01nov2010.sof (for Rev. B cards) has timing failures '''do not use!!!'''&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** added configurable filter parameters specified by ''fltr_coeff'', default is the f&amp;lt;sub&amp;gt;cutoff&amp;lt;/sub&amp;gt;/f&amp;lt;sub&amp;gt;sampl&amp;lt;/sub&amp;gt;=122Hz/15kHz. see [[ Digital 4-pole Butterworth Low-pass filter ]]. &lt;br /&gt;
** ''fltr_type'' is set to 255 to indicate configurable filter parameters.&lt;br /&gt;
** see [http://www.phas.ubc.ca/~mce/mcedocs/software/SC2_ELE_S580_515_mce_command_description.pdf MCE command description]&lt;br /&gt;
** development notes: &lt;br /&gt;
*** It is built on Quartus10.1. &lt;br /&gt;
*** tcl files had to be updated as cmp syntax is not supported in Q10 anymore.&lt;br /&gt;
*** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** rc_v05010000_01nov2010.sof has timing failures that were overlooked, do not use this firmware for Rev.B cards. &lt;br /&gt;
** '''filter mode data is off by 2 rows.''' &lt;br /&gt;
&lt;br /&gt;
* '''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&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.f  =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000f_22oct2010.sof (for Rev. B cards)&lt;br /&gt;
** rc_stratix3_v0500000f_22oct2010.sof  (for Rev. E cards)&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
**  Bugfix: integral clamp should work now. only positive integral_clamp values are valid!&lt;br /&gt;
&lt;br /&gt;
* '''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.&lt;br /&gt;
** available for both Rev. E and Rev. B cards, the upper byte of card_type parameter now reports the pcb revision.&lt;br /&gt;
** development note: It is built on Quartus10.1. &lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
**none yet!&lt;br /&gt;
&lt;br /&gt;
* '''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&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.e (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000e_06oct2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''  &lt;br /&gt;
** 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!&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.d =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000d_04aug2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
**  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.&lt;br /&gt;
&lt;br /&gt;
* '''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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** '''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 [[http://e-mode.phas.ubc.ca/mcewiki/index.php/Image:Clamp_unstable.png scope snapshot]] used slow_fb_ramp.py script for testing.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage and Timing Report''' (readout_card.fit.rpt and readout_card.tan.rpt): no change compared to 5.0.a/b/c&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.c (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000c_16jun2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.b&lt;br /&gt;
** Re-introduced flux-jump counter clamping to maintain continuity in behavior from past versions of firmware in the field.&lt;br /&gt;
** '''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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** '''flux-jump is broken'''. flux-jumping block misbehaves at the first jump in the negative range.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt): [[rc_5.0.c_fit_rpt]]&lt;br /&gt;
 ; Total logic elements     ; 26,800 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total pins               ; 358 / 616 ( 58 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 76 / 112 ( 68 % )                             ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): [[rc_5.0.c_tan_rpt]]&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.b (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000b_03jun2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.a&lt;br /&gt;
** 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.&lt;br /&gt;
** 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&lt;br /&gt;
** A sticky bit that only affected servo_mode=0,1,2 was also removed from the flux-jumping block.&lt;br /&gt;
** flx_lp_init commands now also clear the flux-jumping block as well.&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** flux-jump does not work when jumping to negative values.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt): [[rc_5.0.b_fit_rpt]]&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): [[rc_5.0.b_tan_rpt]]&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.a =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000a_12mar2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on the merger of rev. 5.0.8 and 5.0.9.&lt;br /&gt;
** '''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.&lt;br /&gt;
** The low pass filter has 20-bit input and f_3dB/f_samp = 122Hz/15kHz .&lt;br /&gt;
** The flux-jump clamping that was removed in 5.0.9 is included once again here, as we decided this is safer for now.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** &amp;quot;lock_dat_left&amp;quot; parameter that was removed in 5.0.9 is now implemented as &amp;quot;lock_dat_lsb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** flx_lp_init does not reinitialize the flux-jump block&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
** tag name: rc_v0500000a_12mar2009! years were mixed up!&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.9 (buggy) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000009_13nov2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** Removes a sticky bit in pid calculation result storage -- in fsfb_processor.&lt;br /&gt;
** Adds a command to clamp the growth of the I-term to prevent wrapping and track down the source of Caltech's FSFB jumps.&lt;br /&gt;
** Removed the unused lock_dat_left parameter.  The ability to shift left was moved to the fsfb_corr block some time ago.&lt;br /&gt;
** Fixed a sign extension bug acting on the flux quanta, which limited the value to 8191.  Changed the extension from signed to unsigned.&lt;br /&gt;
** Removed ineffective clamping in the flux-jump calculation block.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** integral_clamp read/write command does not work. &lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,960 / 41,250 ( 68 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.825 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.878 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 14.397 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.8 (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000008_09oct2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** type 1 low-pass filter: f&amp;lt;sub&amp;gt;3dB&amp;lt;/sub&amp;gt;=122Hz for f&amp;lt;sub&amp;gt;sample&amp;lt;/sub&amp;gt;=15kHz&lt;br /&gt;
** Filter-input-width changed from 18b to 20b with no sticky bits!&lt;br /&gt;
** removed sticky bits in internal arithmetic of the filter.&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.7 (type-2 filter) =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000007_09oct2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** type-2 low-pass-filter: f&amp;lt;sub&amp;gt;3dB&amp;lt;/sub&amp;gt;=75Hz for f&amp;lt;sub&amp;gt;sample&amp;lt;/sub&amp;gt;=30000.&lt;br /&gt;
** Filter-input-width changed from 18b to 20b with no sticky bits!&lt;br /&gt;
** inter-biquad-gain-scaling for the filter is 2^14&lt;br /&gt;
** filter results are scaled down by 2^3 in the output of the filter.&lt;br /&gt;
** removed sticky bits in internal arithmetics&lt;br /&gt;
** _correction_ disabled in fsfb_proc_pidz&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** quartus.ini file was '''not''' present in synth directory.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** none to report&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
== Revision 5.0.6  (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05000006_15sep2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Only Valid for Rev. C/D Cards&lt;br /&gt;
** Based on rev. 5.0.3&lt;br /&gt;
** tcl file updated for Rev. D and aligned with top-level and qsf (project file). &lt;br /&gt;
** flux loop commented, just to try sampling the ADC. &lt;br /&gt;
** compiled with Q9.1&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.5 (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000005_04sep2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** changed the low-pass-filter to f(3db)=75Hz for f(sample)=30000.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** quartus.ini file was '''not''' present in synth directory.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** negative inputs to the filter cause filter to have a non-flat pass-band region. may have to do with sign-handling...&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.4 =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000004_28aug2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** BUG Fix: handles 14-bit flux quanta (changed the multiplier to unsigned)&lt;br /&gt;
** BUG Fix: changed standard logic vector extension from signed to unsigned in flux-jumping slave.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,170 / 41,250 ( 63 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.541 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.612 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 15.398 ns ;&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.3  =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05000003_21aug2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** ONLY valid REV C/D RC Cards&lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** flux loop commented, just to try sampling the ADC.&lt;br /&gt;
** updated tcl file, but still need to rely on project file as well as qsf file.&lt;br /&gt;
** changed default level of adc_sclk to '1'&lt;br /&gt;
** dac_clr_n was changed from an output to an input.&lt;br /&gt;
** added 'locked' interface to rc_pll_stratix_iii&lt;br /&gt;
** renamed the adc_pll clock signals to more explanitory names&lt;br /&gt;
** added the FPGA_DEVICE_FAMILY generic to the dispatch interace for synthesis of the dc_fifo in lvds_rx&lt;br /&gt;
** uncommented DDR interface to force the syntesizer to use correct left and right PLLs (in conjunction with ADC and DDR PLLs)&lt;br /&gt;
** added test signals to test_status to see clocks on the scope.&lt;br /&gt;
== Revision 5.0.2 (buggy) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000002_test00_tagged.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.1&lt;br /&gt;
** Fixed a bug in wbs_frame_data that stored data incorrectly if reporting 1 or 2 pixels only.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,186 / 41,250 ( 63 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.755 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.979 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.067 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.1 (buggy) (Filter + Raw + Rectangle, 2 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000001_26may2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Combines features in rev. 5.0.0 (2 LVDS Lines) and rev. 4.0.e (Filtered + Raw), with the NEW rectangle mode.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** [[CVS Diff Between sys_v05000000 and rc_v05000001]]&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** Has a bug in wbs_frame_data that stored data incorrectly if reporting 1 or 2 pixels only.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,565 / 41,250 ( 64 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.656 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.861 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 14.167 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.0 (Filter Only, 2 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000000_22dec2008.sof (tagged as sys_v05000000_22dec2008)&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware v05000000+ of all other cards!!!&lt;br /&gt;
** Adds the ability to read out one column of data continuously from readout cards&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** [[CVS Diff Between rc_v0400000c and sys_v05000000]]&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,607 / 41,250 ( 65 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 406,016 / 3,423,744 ( 12 % )             ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.558 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.892 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.987 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.f (Filter + Raw, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0400000f_12feb2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on 4.0.e and in parallel with 5.0.9 (equivalent version, clamping is not included)&lt;br /&gt;
** Incorporates fixes that were done to flux-jumping between 5.0.2 - 5.0.4 - 5.0.9.  Namely:&lt;br /&gt;
*** Changes a multiplier from signed to unsigned (in fsfb_corr_multplier.vhd).&lt;br /&gt;
*** Changes sign extension from signed to unsigned (in flux_quanta_ram_admin.vhd).&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None reported yet.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,773 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,321,984 / 3,423,744 ( 39 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.539 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.118 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.318 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.e (Filter + Raw, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0400000e_27apr2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on 4.0.d&lt;br /&gt;
** Combines both raw- and filtered-data modes.&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are disabled.&lt;br /&gt;
** Tested by Matt Hasselfield.  &lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are disabled.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,048 / 41,250 ( 66 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,321,984 / 3,423,744 ( 39 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.675 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.907 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.728 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.d (Raw Only, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  rc_v0400000d_20090417.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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.&lt;br /&gt;
** The firmware takes a new command called readout_col_index which specifies which column to capture raw data from.&lt;br /&gt;
** Other than readout_col_index, the firmware functions the same as previous raw-data firmware, including then need to issue a capture_raw command.&lt;br /&gt;
** For more information on raw-data, see:  http://e-mode.phas.ubc.ca/mcewiki/index.php/Raw-mode_readout&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** Differences between 4.0.c and 4.0.d&lt;br /&gt;
 U system/test/source/tb/tb_cc_rcs_bcs_ac.vhd&lt;br /&gt;
 U all_cards/dispatch/source/rtl/dispatch_wishbone.vhd&lt;br /&gt;
 U library/sys_param/source/rtl/wishbone_pack.vhd&lt;br /&gt;
 U readout_card/adc_sample_coadd/source/rtl/adc_sample_coadd.vhd&lt;br /&gt;
 U readout_card/adc_sample_coadd/source/rtl/adc_sample_coadd_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop/source/rtl/flux_loop.vhd&lt;br /&gt;
 U readout_card/flux_loop/source/rtl/flux_loop_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/rtl/flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/rtl/flux_loop_ctrl_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/tb/tb1_flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/tb/tb2_flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/fsfb_calc/source/rtl/fsfb_fltr_regs.vhd&lt;br /&gt;
 U readout_card/fsfb_corr/source/rtl/fsfb_corr.vhd&lt;br /&gt;
 U readout_card/readout_card/source/rtl/readout_card.vhd&lt;br /&gt;
 U readout_card/readout_card/source/rtl/readout_card_pack.vhd&lt;br /&gt;
 U readout_card/wbs_frame_data/source/rtl/wbs_frame_data.vhd&lt;br /&gt;
 U readout_card/wbs_frame_data/source/rtl/wbs_frame_data_pack.vhd&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are not supported.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 24,554 / 41,250 ( 60 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,262,592 / 3,423,744 ( 37 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.991 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.864 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.052 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.4.1 ==&lt;br /&gt;
* '''Filename:'''  rc_v04040001_21nov2008&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,241 / 41,250 ( 66 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 405,504 / 3,423,744 ( 12 % )                  ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.588 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.585 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.057 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.4.0 (buggy) ==&lt;br /&gt;
* '''Filename:'''  rc_v04040000_02oct2008&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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]].&lt;br /&gt;
** Re-integrated the id_thermo and fpga_thermo block in the readout_card.vhd top level that was removed in 4.0.c.&lt;br /&gt;
** 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.&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
** Adjusted the indentation in fsfb_io_controller.vhd to make the file more readable.&lt;br /&gt;
** 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.&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** The following commands lock up the Readout Card firmware:  CARD_ID_ADDR, CARD_TEMP_ADDR, FPGA_TEMP_ADDR.&lt;br /&gt;
** 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&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,099 / 41,250 ( 66 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 406,016 / 3,423,744 ( 12 % )                  ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.372 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.052 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.066 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.c ==&lt;br /&gt;
* '''Filename:'''  rc_v0400000c_15aug2008.sof&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Only has data modes 0, 1, 4, and 10.&lt;br /&gt;
** 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).&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** Changed a counter in the dispatch block to ease timing constraints in synthesis (dispatch_wishbone.vhd)&lt;br /&gt;
** 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.&lt;br /&gt;
** '''Removed''' the fpga_termo (command:  '''fpga_temp''') and id_thermo (commands: '''card_temp, card_id''') to ease timing constraints in synthesis (readout_card.vhd)&lt;br /&gt;
** Updated the tagged version of fpga_termo.vhd to include the new 'stale bit' feature&lt;br /&gt;
** Updated the tagged version of frame_timing_core.vhd to include the new 'err_o' interface&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None reported yet&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
* '''FPGA Resource Usage:'''&lt;br /&gt;
 Total logic elements : 25,058 / 41,250 ( 61 % )&lt;br /&gt;
 Total memory bits : 400,896 / 3,423,744 ( 12 % )&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.282 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.736 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.665 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.b (buggy) ==&lt;br /&gt;
Note: This revision is on a watch list, after the bug detected 15 July 2008.  See the bug section for more details.&lt;br /&gt;
* '''Filename''' : rc_v0400000b_04aug2008.sof&lt;br /&gt;
* '''Features'''&lt;br /&gt;
** data_mode 10 is added to provide more filtfb bits (compared to data mode 9) for planet observations. filtered_dat(27 downto 3) &amp;amp; flux_cnt_dat(6 downto 0)&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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]]&lt;br /&gt;
&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.a (buggy) ==&lt;br /&gt;
Note: This revision is on a watch list, after the bug detected 15 July 2008.  See the bug section for more details.&lt;br /&gt;
* '''Filename''' : rc_v0400000a_07jul2008.sof&lt;br /&gt;
* '''Bug Fix'''&lt;br /&gt;
** mce_status and adc_offset/flx_quanta commands do not fail after power up.&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** Seems to clip out channel 0 from data reporting.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.9 (buggy) ==&lt;br /&gt;
* '''Filename''' : rc_v04000009_26jun2008.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** sa_bias and offset DACs only refreshed when new values are written. (in previous versions, DACs were refreshed every frame)&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.8 ==&lt;br /&gt;
* '''Filename''' : rc_v04000008_26jun2008.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** The gaini, gainp, gaind resolution increased to 12-bit, i.e. -2048 to 2047 (formerly 10-bit).&lt;br /&gt;
&lt;br /&gt;
* '''Bug fix'''&lt;br /&gt;
** the bug associated with gainpid read before mce_reset is fixed.&lt;br /&gt;
&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.3.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04030007_26may2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** 14-bit raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** 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.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.2.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04020007_24may2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
* '''Bug fix'''&lt;br /&gt;
** the bug associated with reading from raw-buffer is fixed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.1.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04010007_25apr2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.6 (buggy) ==&lt;br /&gt;
* '''Filename''' : rc_v04000006_15feb2008.sof or .pof       &lt;br /&gt;
* '''Features''' &lt;br /&gt;
** '''bugfix''': unreliable reset due to unsafe and incomplete state machines is fixed.&lt;br /&gt;
** '''bugfix''': flux_jump sign problem fixed, so far proved in const_mode, to be tested in servo_mode with cold setup.&lt;br /&gt;
** servo_mode=2 or ramp previously only went from 0 to ramp_amp, but now goes from -8192 to -8192+ramp_amp&lt;br /&gt;
** new commands are added: ''scratch'' and ''card_type''. Scratch takes 8 values and can be used by software to detect reset.&lt;br /&gt;
** slot_id and fw_rev are now integrated as part of all_cards.vhd&lt;br /&gt;
** lvds_tx_b=0, This will allow Clock Card to use the secondary backplane lvds line and check whether RC is plugged in.&lt;br /&gt;
** filter_coeff in misc_banks_admin commented as it is not implemented and causes timing problems.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
** slot_id is only set after a resetmce is issued. (using the latest all_cards in the next revision will fix this)&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.5 ==&lt;br /&gt;
* '''Filename''' : rc_v04000005_01nov2007.sof or .pof       &lt;br /&gt;
* '''Features''' &lt;br /&gt;
** data mode 9 (mixed filt + flux jump) with windowing readjusted compared to data mode 8&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** unreliable resetmce. Sometimes, firmware waked up non-responsive on lvds lines.&lt;br /&gt;
** In data mode 5 and 9, flux-jump counter is not reported properly due to a sign error. However, flux jumping works fine.&lt;br /&gt;
&lt;br /&gt;
== Revision 3.0.19 ==&lt;br /&gt;
* '''Filename''' : rc_v03000019_16feb2007_raw.sof (no pof as one is not likely to run with this as regular firmware)&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** data mode 3 is enabled.&lt;br /&gt;
** filter is disabled as a compromise to fit the raw-mode buffer.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** unreliable resetmce. Sometimes, firmware waked up non-responsive on lvds lines.&lt;br /&gt;
&lt;br /&gt;
== Old Firmware Revisions ==&lt;br /&gt;
* '''4.0.4''':  rc_v04000004_11oct2007.sof  data mode 8 added (mixed filt + flux jump)&lt;br /&gt;
* '''4.0.3''':  rc_v04000003_19sep2007.sof  data mode 7 bit split readjusted to 10b error being bit 4 to 14&lt;br /&gt;
* '''4.0.2''':  rc_v04000002_11sep2007.sof  pid resolution increased to 10b, data mode 7 added&lt;br /&gt;
* '''4.0.1''':  rc_v04000001_06sep2007.sof  &lt;br /&gt;
* '''4.0.0''':  rc_v04000000_29aug2007.sof  supports readout_row_index * [[ bugs ]]&lt;br /&gt;
&lt;br /&gt;
= To-Do List =&lt;br /&gt;
* the starting point for the servo is currently zero and it would be nice to have it programmable.&lt;br /&gt;
&lt;br /&gt;
= RC Synthesis Notes =&lt;br /&gt;
# 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. &lt;br /&gt;
# Timing: There is no &amp;quot;lock region&amp;quot; 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.&lt;br /&gt;
# 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%.&lt;br /&gt;
# 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.&lt;br /&gt;
# 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):&lt;br /&gt;
 lpm_file =&amp;gt; &amp;quot;C:/scuba2_repository/cards/readout_card/fsfb_calc/source/rtl/ram_40x64.hex&amp;quot;, and&lt;br /&gt;
 lpm_file    : STRING;&lt;br /&gt;
#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. &lt;br /&gt;
----&lt;br /&gt;
[http://e-mode.phas.ubc.ca/mcewiki/index.php/Main_Page  MCE Main Page]&lt;/div&gt;</summary>
		<author><name>Bburger</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Integral_clamp&amp;diff=4331</id>
		<title>Integral clamp</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Integral_clamp&amp;diff=4331"/>
		<updated>2011-05-03T17:55:00Z</updated>

		<summary type="html">&lt;p&gt;Bburger: /* Usage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This feature was implemented in an effort to eliminate the effects of unlocked and ramping pixels on locked pixels on an array. This feature is available in rev. 5.0.e as a beta release. (A preliminary version was introduced starting RC firmware rev. 5.0.9, but it was not yet functional as of RC firmware 5.0.d.)&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
* Typically, the dominant term in the MCE's PID-loop calculation is the accumulated integral.  When the operating environment changes, it is possible that some pixels that were locked before can no longer.  When this occurs, the integral-term in the PID-loop calculation grows linearly in time until it wraps.  Because the FSFB affects the ground-plane level, a large change in the FSFB (i.e. wrapping) causes a considerable level shift in healthy pixels as well.&lt;br /&gt;
* Often, these unlocked/ ramping pixels are caught, but only after they ruin observing data.  At that time, they are turned off manually, usually by setting p_coeff = i_coeff = d_coeff = 0.&lt;br /&gt;
* The goal of the FSFB clamping feature is to stop pixels from ramping at all by clamping them at a user-specified value.  If their absolute value exceeds this value, then they are clamped.  In this way, unlocked pixels no longer affect the rest of the array after they have reached that value. &lt;br /&gt;
&lt;br /&gt;
= Usage = &lt;br /&gt;
* The '''integral_clamp''' parameter is a 32-bit positive number per Readout Card (8x41 pixels) and is set to 0 by default, meaning no clamping is performed by default. The '''integral_clamp''' parameter is used to clamp the calculated servo integral-term (before it is multiplied by the integral coefficient aka gaini) on both positive and negative ends. This prevents unlocked pixels from wrapping continuously in lock mode. The value needs to be determined based on different parameter settings like: gaini, flux-quanta, and other experiment dependent variables. Here is a guide to calculate what the value should be set to.&lt;br /&gt;
&lt;br /&gt;
* Note that this calculation assumes that gainp = gaind = 0.&lt;br /&gt;
* No matter how large the calculated value is, it must still allow for a reasonable margin between it and the wrap-point of the I-term.  If the margin is too small, then calculated values of the I-term will wrap if the I-term value jumps from I-term &amp;lt; integral_clamp to I-term &amp;gt; I_term_max.&lt;br /&gt;
* Note also that when integral_clamp = 0 (default), this feature is disabled.&lt;br /&gt;
&lt;br /&gt;
 //Typical for ACT: &lt;br /&gt;
 wb rc1 gaini0 480 480 ..&lt;br /&gt;
 wb rc1 flx_quanta0 6500 6500 ..&lt;br /&gt;
 ..(other PID-setup commands)&lt;br /&gt;
 wb rc1 integral_clamp 6389760 &lt;br /&gt;
 wb rc1 flx_lp_init 1&lt;br /&gt;
&lt;br /&gt;
* To calculate the right integral_clamp value, the maximum valid SQ1 FB value must be converted to an equivalent maximum I-term.  Since&lt;br /&gt;
  fb = gaini * I / 4096&lt;br /&gt;
we have&lt;br /&gt;
  I_max = fb_max * 4096 / gaini&lt;br /&gt;
&lt;br /&gt;
* With flux-jumping '''enabled''', the maximum FB value can be as large as the number of allowable flux jumps (127) times the flux quantum:&lt;br /&gt;
  fb_max = 127 * flux_quantum&lt;br /&gt;
  I_max  = 127 * 4096 * flux_quantum / gaini&lt;br /&gt;
&lt;br /&gt;
* When flux jumping is '''disabled''', the maximum FB can be taken to lie within a single DAC range (+-8192):&lt;br /&gt;
  fb_max = 8192&lt;br /&gt;
  I_max  = 8192 * 4096 / gaini&lt;br /&gt;
&lt;br /&gt;
* Including a factor of 0.9 (to keep the clamp value slightly lower than the critical cut-off), and rounding, we have the rules:&lt;br /&gt;
  integral_clamp ~ I_max * 0.9&lt;br /&gt;
  &lt;br /&gt;
                   { 30,000,000 / gaini                (for flux jumping OFF)&lt;br /&gt;
                 = {&lt;br /&gt;
                   { 470,000 * flux_quantum / gaini    (for flux jumping ON)&lt;br /&gt;
&lt;br /&gt;
* Typical Values (Calculated in data_mode_outputs.xls)&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Telescope !! Flux Quanta !! I Coefficient &lt;br /&gt;
! integral_clamp &lt;br /&gt;
(Flux Jumping ON)&lt;br /&gt;
! integral_clamp &lt;br /&gt;
(Flux Jumping OFF)&lt;br /&gt;
|- &lt;br /&gt;
| ACT || 6500 || 480 || 6389760 || 62915 &lt;br /&gt;
|- &lt;br /&gt;
| SPIDER || 9500 || 50 || 89653248 || 603980 &lt;br /&gt;
|- &lt;br /&gt;
| SCUBA-2 || 6500 || 2024 || 1515358 || 14920 &lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Bburger</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Integral_clamp&amp;diff=4330</id>
		<title>Integral clamp</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Integral_clamp&amp;diff=4330"/>
		<updated>2011-05-03T17:54:40Z</updated>

		<summary type="html">&lt;p&gt;Bburger: /* Usage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This feature was implemented in an effort to eliminate the effects of unlocked and ramping pixels on locked pixels on an array. This feature is available in rev. 5.0.e as a beta release. (A preliminary version was introduced starting RC firmware rev. 5.0.9, but it was not yet functional as of RC firmware 5.0.d.)&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
* Typically, the dominant term in the MCE's PID-loop calculation is the accumulated integral.  When the operating environment changes, it is possible that some pixels that were locked before can no longer.  When this occurs, the integral-term in the PID-loop calculation grows linearly in time until it wraps.  Because the FSFB affects the ground-plane level, a large change in the FSFB (i.e. wrapping) causes a considerable level shift in healthy pixels as well.&lt;br /&gt;
* Often, these unlocked/ ramping pixels are caught, but only after they ruin observing data.  At that time, they are turned off manually, usually by setting p_coeff = i_coeff = d_coeff = 0.&lt;br /&gt;
* The goal of the FSFB clamping feature is to stop pixels from ramping at all by clamping them at a user-specified value.  If their absolute value exceeds this value, then they are clamped.  In this way, unlocked pixels no longer affect the rest of the array after they have reached that value. &lt;br /&gt;
&lt;br /&gt;
= Usage = &lt;br /&gt;
* The '''integral_clamp''' parameter is a 32-bit positive number per Readout Card (8x41 pixels) and is set to 0 by default, meaning no clamping is performed by default. The '''integral_clamp''' parameter is used to clamp the calculated servo integral-term (before it is multiplied by the integral coefficient aka gaini) on both positive and negative ends. This prevents unlocked pixels from wrapping continuously in lock mode. The value needs to be determined based on different parameter settings like: gaini, flux-quanta, and other experiment dependent variables. Here is a guide to calculate what the value should be set to.&lt;br /&gt;
&lt;br /&gt;
* Note that this calculation assumes that gainp = gaind = 0.&lt;br /&gt;
* No matter how large the calculated value is, it must still allow for a reasonable margin between it and the wrap-point of the I-term.  If the margin is too small, then calculated values of the I-term will wrap if the I-term value jumps from I-term &amp;lt; integral_clamp to I-term &amp;gt; I_term_max.&lt;br /&gt;
* Note also that when integral_clamp = 0 (default), this feature is disabled.&lt;br /&gt;
&lt;br /&gt;
 //Typical for ACT: &lt;br /&gt;
 wb rc1 gaini0 480 480 ..&lt;br /&gt;
 wb rc1 flx_quanta0 6500 6500 ..&lt;br /&gt;
 ..(other PID-setup commands)&lt;br /&gt;
 wb rc1 integral_clamp 6389760 &lt;br /&gt;
 wb rc1 flx_lp_init 1&lt;br /&gt;
&lt;br /&gt;
* To calculate the right integral_clamp value, the maximum valid SQ1 FB value must be converted to an equivalent maximum I-term.  Since&lt;br /&gt;
  fb = gaini * I / 4096&lt;br /&gt;
we have&lt;br /&gt;
  I_max = fb_max * 4096 / gaini&lt;br /&gt;
&lt;br /&gt;
* With flux-jumping '''enabled''', the maximum FB value can be as large as the number of allowable flux jumps (127) times the flux quantum:&lt;br /&gt;
  fb_max = 127 * flux_quantum&lt;br /&gt;
  I_max  = 127 * 4096 * flux_quantum / gaini&lt;br /&gt;
&lt;br /&gt;
* When flux jumping is '''disabled''', the maximum FB can be taken to lie within a single DAC range (+-8192):&lt;br /&gt;
  fb_max = 8192&lt;br /&gt;
  I_max  = 8192 * 4096 / gaini&lt;br /&gt;
&lt;br /&gt;
* Including a factor of 0.9 (to keep the clamp value slightly lower than the critical cut-off), and rounding, we have the rules:&lt;br /&gt;
  integral_clamp ~ I_max * 0.9&lt;br /&gt;
  &lt;br /&gt;
                   { 30,000,000 / gaini                (for flux jumping OFF)&lt;br /&gt;
                 = {&lt;br /&gt;
                   { 470,000 * flux_quantum / gaini    (for flux jumping ON)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Typical Values (Calculated in data_mode_outputs.xls)&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Telescope !! Flux Quanta !! I Coefficient &lt;br /&gt;
! integral_clamp &lt;br /&gt;
(Flux Jumping ON)&lt;br /&gt;
! integral_clamp &lt;br /&gt;
(Flux Jumping OFF)&lt;br /&gt;
|- &lt;br /&gt;
| ACT || 6500 || 480 || 6389760 || 62915 &lt;br /&gt;
|- &lt;br /&gt;
| SPIDER || 9500 || 50 || 89653248 || 603980 &lt;br /&gt;
|- &lt;br /&gt;
| SCUBA-2 || 6500 || 2024 || 1515358 || 14920 &lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Bburger</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Integral_clamp&amp;diff=4329</id>
		<title>Integral clamp</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Integral_clamp&amp;diff=4329"/>
		<updated>2011-05-03T17:54:19Z</updated>

		<summary type="html">&lt;p&gt;Bburger: /* Usage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This feature was implemented in an effort to eliminate the effects of unlocked and ramping pixels on locked pixels on an array. This feature is available in rev. 5.0.e as a beta release. (A preliminary version was introduced starting RC firmware rev. 5.0.9, but it was not yet functional as of RC firmware 5.0.d.)&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
* Typically, the dominant term in the MCE's PID-loop calculation is the accumulated integral.  When the operating environment changes, it is possible that some pixels that were locked before can no longer.  When this occurs, the integral-term in the PID-loop calculation grows linearly in time until it wraps.  Because the FSFB affects the ground-plane level, a large change in the FSFB (i.e. wrapping) causes a considerable level shift in healthy pixels as well.&lt;br /&gt;
* Often, these unlocked/ ramping pixels are caught, but only after they ruin observing data.  At that time, they are turned off manually, usually by setting p_coeff = i_coeff = d_coeff = 0.&lt;br /&gt;
* The goal of the FSFB clamping feature is to stop pixels from ramping at all by clamping them at a user-specified value.  If their absolute value exceeds this value, then they are clamped.  In this way, unlocked pixels no longer affect the rest of the array after they have reached that value. &lt;br /&gt;
&lt;br /&gt;
= Usage = &lt;br /&gt;
* The '''integral_clamp''' parameter is a 32-bit positive number per Readout Card (8x41 pixels) and is set to 0 by default, meaning no clamping is performed by default. The '''integral_clamp''' parameter is used to clamp the calculated servo integral-term (before it is multiplied by the integral coefficient aka gaini) on both positive and negative ends. This prevents unlocked pixels from wrapping continuously in lock mode. The value needs to be determined based on different parameter settings like: gaini, flux-quanta, and other experiment dependent variables. Here is a guide to calculate what the value should be set to.&lt;br /&gt;
&lt;br /&gt;
* Note that this calculation assumes that gainp = gaind = 0.&lt;br /&gt;
* No matter how large the calculated value is, it must still allow for a reasonable margin between it and the wrap-point of the I-term.  If the margin is too small, then calculated values of the I-term will wrap if the I-term value jumps from I-term &amp;lt; integral_clamp to I-term &amp;gt; I_term_max.&lt;br /&gt;
* Note also that when integral_clamp = 0 (default), this feature is disabled.&lt;br /&gt;
&lt;br /&gt;
 //Typical for ACT: &lt;br /&gt;
 wb rc1 gaini0 480 480 ..&lt;br /&gt;
 wb rc1 flx_quanta0 6500 6500 ..&lt;br /&gt;
 ..(other PID-setup commands)&lt;br /&gt;
 wb rc1 integral_clamp 6389760 &lt;br /&gt;
 wb rc1 flx_lp_init 1&lt;br /&gt;
&lt;br /&gt;
* To calculate the right integral_clamp value, the maximum valid SQ1 FB value must be converted to an equivalent maximum I-term.  Since&lt;br /&gt;
  fb = gaini * I / 4096&lt;br /&gt;
we have&lt;br /&gt;
  I_max = fb_max * 4096 / gaini&lt;br /&gt;
&lt;br /&gt;
* With flux-jumping '''enabled''', the maximum FB value can be as large as the number of allowable flux jumps (127) times the flux quantum:&lt;br /&gt;
  fb_max = 127 * flux_quantum&lt;br /&gt;
  I_max  = 127 * 4096 * flux_quantum / gaini&lt;br /&gt;
&lt;br /&gt;
* When flux jumping is '''disabled''', the maximum FB can be taken to lie within a single DAC range (+-8192):&lt;br /&gt;
  fb_max = 8192&lt;br /&gt;
  I_max  = 8192 * 4096 / gaini&lt;br /&gt;
&lt;br /&gt;
* Including a factor of 0.9 (to keep the clamp value slightly lower than the critical cut-off), and rounding, we have the rules:&lt;br /&gt;
  integral_clamp ~ I_max * 0.9&lt;br /&gt;
  &lt;br /&gt;
                   { 30,000,000 / gaini                 (for flux jumping OFF)&lt;br /&gt;
                 = {&lt;br /&gt;
                   { 470,000 * flux_quantum / gaini    (for flux jumping ON)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Typical Values (Calculated in data_mode_outputs.xls)&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Telescope !! Flux Quanta !! I Coefficient &lt;br /&gt;
! integral_clamp &lt;br /&gt;
(Flux Jumping ON)&lt;br /&gt;
! integral_clamp &lt;br /&gt;
(Flux Jumping OFF)&lt;br /&gt;
|- &lt;br /&gt;
| ACT || 6500 || 480 || 6389760 || 62915 &lt;br /&gt;
|- &lt;br /&gt;
| SPIDER || 9500 || 50 || 89653248 || 603980 &lt;br /&gt;
|- &lt;br /&gt;
| SCUBA-2 || 6500 || 2024 || 1515358 || 14920 &lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Bburger</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Integral_clamp&amp;diff=4328</id>
		<title>Integral clamp</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Integral_clamp&amp;diff=4328"/>
		<updated>2011-05-03T17:52:43Z</updated>

		<summary type="html">&lt;p&gt;Bburger: /* Usage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This feature was implemented in an effort to eliminate the effects of unlocked and ramping pixels on locked pixels on an array. This feature is available in rev. 5.0.e as a beta release. (A preliminary version was introduced starting RC firmware rev. 5.0.9, but it was not yet functional as of RC firmware 5.0.d.)&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
* Typically, the dominant term in the MCE's PID-loop calculation is the accumulated integral.  When the operating environment changes, it is possible that some pixels that were locked before can no longer.  When this occurs, the integral-term in the PID-loop calculation grows linearly in time until it wraps.  Because the FSFB affects the ground-plane level, a large change in the FSFB (i.e. wrapping) causes a considerable level shift in healthy pixels as well.&lt;br /&gt;
* Often, these unlocked/ ramping pixels are caught, but only after they ruin observing data.  At that time, they are turned off manually, usually by setting p_coeff = i_coeff = d_coeff = 0.&lt;br /&gt;
* The goal of the FSFB clamping feature is to stop pixels from ramping at all by clamping them at a user-specified value.  If their absolute value exceeds this value, then they are clamped.  In this way, unlocked pixels no longer affect the rest of the array after they have reached that value. &lt;br /&gt;
&lt;br /&gt;
= Usage = &lt;br /&gt;
* The '''integral_clamp''' parameter is a 32-bit positive number per Readout Card (8x41 pixels) and is set to 0 by default, meaning no clamping is performed by default. The '''integral_clamp''' parameter is used to clamp the calculated servo integral-term (before it is multiplied by the integral coefficient aka gaini) on both positive and negative ends. This prevents unlocked pixels from wrapping continuously in lock mode. The value needs to be determined based on different parameter settings like: gaini, flux-quanta, and other experiment dependent variables. Here is a guide to calculate what the value should be set to.&lt;br /&gt;
&lt;br /&gt;
* Note that this calculation assumes that gainp = gaind = 0.&lt;br /&gt;
* No matter how large the calculated value is, it must still allow for a reasonable margin between it and the wrap-point of the I-term.  If the margin is too small, then calculated values of the I-term will wrap if the I-term value jumps from I-term &amp;lt; integral_clamp to I-term &amp;gt; I_term_max.&lt;br /&gt;
* Note also that when integral_clamp = 0 (default), this feature is disabled.&lt;br /&gt;
&lt;br /&gt;
 //Typical for ACT: &lt;br /&gt;
 wb rc1 gaini0 480 480 ..&lt;br /&gt;
 wb rc1 flx_quanta0 6500 6500 ..&lt;br /&gt;
 ..(other PID-setup commands)&lt;br /&gt;
 wb rc1 integral_clamp 6389760 &lt;br /&gt;
 wb rc1 flx_lp_init 1&lt;br /&gt;
&lt;br /&gt;
* To calculate the right integral_clamp value, the maximum valid SQ1 FB value must be converted to an equivalent maximum I-term.  Since&lt;br /&gt;
  fb = gaini * I / 4096&lt;br /&gt;
we have&lt;br /&gt;
  I_max = fb_max * 4096 / gaini&lt;br /&gt;
&lt;br /&gt;
* With flux-jumping '''enabled''', the maximum FB value can be as large as the number of allowable flux jumps (127) times the flux quantum:&lt;br /&gt;
  fb_max = 127 * flux_quantum&lt;br /&gt;
  I_max  = 127 * 4096 * flux_quantum / gaini&lt;br /&gt;
&lt;br /&gt;
* When flux jumping is '''disabled''', the maximum FB can be taken to lie within a single DAC range (+-8192):&lt;br /&gt;
  fb_max = 8192&lt;br /&gt;
  I_max  = 8192 * 4096 / gaini&lt;br /&gt;
&lt;br /&gt;
* Including a factor of 0.9 (to keep the clamp value slightly lower than the critical cut-off), and rounding, we have the rules:&lt;br /&gt;
  integral_clamp ~ I_max * 0.9&lt;br /&gt;
  &lt;br /&gt;
                   { 30000000 / gaini                 (for flux jumping OFF)&lt;br /&gt;
                 = {&lt;br /&gt;
                   { 470000 * flux_quantum / gaini    (for flux jumping ON)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Typical Values (Calculated in data_mode_outputs.xls)&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Telescope !! Flux Quanta !! I Coefficient &lt;br /&gt;
! integral_clamp &lt;br /&gt;
(Flux Jumping ON)&lt;br /&gt;
! integral_clamp &lt;br /&gt;
(Flux Jumping OFF)&lt;br /&gt;
|- &lt;br /&gt;
| ACT || 6500 || 480 || 6389760 || 62915 &lt;br /&gt;
|- &lt;br /&gt;
| SPIDER || 9500 || 50 || 89653248 || 603980 &lt;br /&gt;
|- &lt;br /&gt;
| SCUBA-2 || 6500 || 2024 || 1515358 || 14920 &lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Bburger</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Integral_clamp&amp;diff=4327</id>
		<title>Integral clamp</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Integral_clamp&amp;diff=4327"/>
		<updated>2011-05-03T17:52:14Z</updated>

		<summary type="html">&lt;p&gt;Bburger: /* Usage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This feature was implemented in an effort to eliminate the effects of unlocked and ramping pixels on locked pixels on an array. This feature is available in rev. 5.0.e as a beta release. (A preliminary version was introduced starting RC firmware rev. 5.0.9, but it was not yet functional as of RC firmware 5.0.d.)&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
* Typically, the dominant term in the MCE's PID-loop calculation is the accumulated integral.  When the operating environment changes, it is possible that some pixels that were locked before can no longer.  When this occurs, the integral-term in the PID-loop calculation grows linearly in time until it wraps.  Because the FSFB affects the ground-plane level, a large change in the FSFB (i.e. wrapping) causes a considerable level shift in healthy pixels as well.&lt;br /&gt;
* Often, these unlocked/ ramping pixels are caught, but only after they ruin observing data.  At that time, they are turned off manually, usually by setting p_coeff = i_coeff = d_coeff = 0.&lt;br /&gt;
* The goal of the FSFB clamping feature is to stop pixels from ramping at all by clamping them at a user-specified value.  If their absolute value exceeds this value, then they are clamped.  In this way, unlocked pixels no longer affect the rest of the array after they have reached that value. &lt;br /&gt;
&lt;br /&gt;
= Usage = &lt;br /&gt;
* The '''integral_clamp''' parameter is a 32-bit positive number per Readout Card (8x41 pixels) and is set to 0 by default, meaning no clamping is performed by default. The '''integral_clamp''' parameter is used to clamp the calculated servo integral-term (before it is multiplied by the integral coefficient aka gaini) on both positive and negative ends. This prevents unlocked pixels from wrapping continuously in lock mode. The value needs to be determined based on different parameter settings like: gaini, flux-quanta, and other experiment dependent variables. Here is a guide to calculate what the value should be set to.&lt;br /&gt;
&lt;br /&gt;
* Note that this calculation assumes that gainp = gaind = 0.&lt;br /&gt;
* No matter how large the calculated value is, it must still allow for a reasonable margin between it and the wrap-point of the I-term.  If the margin is too small, then calculated values of the I-term will wrap if the I-term value jumps from I-term &amp;lt; integral_clamp to I-term &amp;gt; I_term_max.&lt;br /&gt;
* Note also that when integral_clamp = 0 (default), this feature is disabled.&lt;br /&gt;
&lt;br /&gt;
 //Typical for ACT: &lt;br /&gt;
 wb rc1 gaini0 480 480 ..&lt;br /&gt;
 wb rc1 flx_quanta0 6500 6500 ..&lt;br /&gt;
 ..(other PID-setup commands)&lt;br /&gt;
 wb rc1 integral_clamp 6389760 &lt;br /&gt;
 wb rc1 flx_lp_init 1&lt;br /&gt;
&lt;br /&gt;
* To calculate the right integral_clamp value, the maximum valid SQ1 FB value must be converted to an equivalent maximum I-term.  Since&lt;br /&gt;
  fb = gaini * I / 4096&lt;br /&gt;
we have&lt;br /&gt;
  I_max = fb_max * 4096 / gaini&lt;br /&gt;
&lt;br /&gt;
* With flux-jumping '''enabled''', the maximum FB value can be as large as the number of allowable flux jumps (127) time the flux quantum:&lt;br /&gt;
  fb_max = 127 * flux_quantum&lt;br /&gt;
  I_max  = 127 * 4096 * flux_quantum / gaini&lt;br /&gt;
&lt;br /&gt;
* When flux jumping is '''disabled''', the maximum FB can be taken to lie within a single DAC range (+-8192):&lt;br /&gt;
  fb_max = 8192&lt;br /&gt;
  I_max  = 8192 * 4096 / gaini&lt;br /&gt;
&lt;br /&gt;
* Including a factor of 0.9 (to keep the clamp value slightly lower than the critical cut-off), and rounding, we have the rules:&lt;br /&gt;
  integral_clamp ~ I_max * 0.9&lt;br /&gt;
  &lt;br /&gt;
                   { 30000000 / gaini                 (for flux jumping OFF)&lt;br /&gt;
                 = {&lt;br /&gt;
                   { 470000 * flux_quantum / gaini    (for flux jumping ON)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Typical Values (Calculated in data_mode_outputs.xls)&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Telescope !! Flux Quanta !! I Coefficient &lt;br /&gt;
! integral_clamp &lt;br /&gt;
(Flux Jumping ON)&lt;br /&gt;
! integral_clamp &lt;br /&gt;
(Flux Jumping OFF)&lt;br /&gt;
|- &lt;br /&gt;
| ACT || 6500 || 480 || 6389760 || 62915 &lt;br /&gt;
|- &lt;br /&gt;
| SPIDER || 9500 || 50 || 89653248 || 603980 &lt;br /&gt;
|- &lt;br /&gt;
| SCUBA-2 || 6500 || 2024 || 1515358 || 14920 &lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Bburger</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Integral_clamp&amp;diff=4326</id>
		<title>Integral clamp</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Integral_clamp&amp;diff=4326"/>
		<updated>2011-05-03T17:50:34Z</updated>

		<summary type="html">&lt;p&gt;Bburger: /* Usage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This feature was implemented in an effort to eliminate the effects of unlocked and ramping pixels on locked pixels on an array. This feature is available in rev. 5.0.e as a beta release. (A preliminary version was introduced starting RC firmware rev. 5.0.9, but it was not yet functional as of RC firmware 5.0.d.)&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
* Typically, the dominant term in the MCE's PID-loop calculation is the accumulated integral.  When the operating environment changes, it is possible that some pixels that were locked before can no longer.  When this occurs, the integral-term in the PID-loop calculation grows linearly in time until it wraps.  Because the FSFB affects the ground-plane level, a large change in the FSFB (i.e. wrapping) causes a considerable level shift in healthy pixels as well.&lt;br /&gt;
* Often, these unlocked/ ramping pixels are caught, but only after they ruin observing data.  At that time, they are turned off manually, usually by setting p_coeff = i_coeff = d_coeff = 0.&lt;br /&gt;
* The goal of the FSFB clamping feature is to stop pixels from ramping at all by clamping them at a user-specified value.  If their absolute value exceeds this value, then they are clamped.  In this way, unlocked pixels no longer affect the rest of the array after they have reached that value. &lt;br /&gt;
&lt;br /&gt;
= Usage = &lt;br /&gt;
* The '''integral_clamp''' parameter is a 32-bit positive number per Readout Card (8x41 pixels) and is set to 0 by default, meaning no clamping is performed by default. The '''integral_clamp''' parameter is used to clamp the calculated servo integral-term (before it is multiplied by the integral coefficient aka gaini) on both positive and negative ends. This prevents unlocked pixels from wrapping continuously in lock mode. The value needs to be determined based on different parameter settings like: gaini, flux-quanta, and other experiment dependent variables. Here is a guide to calculate what the value should be set to.&lt;br /&gt;
&lt;br /&gt;
* Note that this calculation assumes that gainp = gaind = 0.&lt;br /&gt;
* No matter how large the calculated value is, it must still allow for a reasonable margin between it and the wrap-point of the I-term.  If the margin is too small, then calculated values of the I-term will wrap if the I-term value jumps from I-term &amp;lt; integral_clamp to I-term &amp;gt; I_term_max.&lt;br /&gt;
* Note also that when integral_clamp = 0 (default), this feature is disabled.&lt;br /&gt;
&lt;br /&gt;
 //Typical for ACT: &lt;br /&gt;
 wb rc1 gaini0 480 480 ..&lt;br /&gt;
 wb rc1 flx_quanta0 6500 6500 ..&lt;br /&gt;
 ..(other PID-setup commands)&lt;br /&gt;
 wb rc1 integral_clamp 6389760 &lt;br /&gt;
 wb rc1 flx_lp_init 1&lt;br /&gt;
&lt;br /&gt;
* To calculate the right integral_clamp value, the maximum valid SQ1 FB value must be converted to an equivalent maximum I-term.  Since&lt;br /&gt;
  fb = gaini * I / 4096&lt;br /&gt;
we have&lt;br /&gt;
  I_max = fb_max * 4096 / gaini&lt;br /&gt;
&lt;br /&gt;
* With flux-jumping enabled, the maximum FB value can be as large as the number of allowable flux jumps (127) time the flux quantum:&lt;br /&gt;
  fb_max = 127 * flux_quantum&lt;br /&gt;
  I_max  = 127 * 4096 * flux_quantum / gaini&lt;br /&gt;
&lt;br /&gt;
* When flux jumping is disabled, the maximum FB can be taken to lie within a single DAC range (+-8192):&lt;br /&gt;
  fb_max = 8192&lt;br /&gt;
  I_max  = 8192 * 4096 / gaini&lt;br /&gt;
&lt;br /&gt;
* Including a factor of 0.9 (to keep the clamp value slightly lower than the critical cut-off), and rounding, we have the rules:&lt;br /&gt;
  integral_clamp ~ I_max * 0.9&lt;br /&gt;
  &lt;br /&gt;
                   { 30000000 / gaini                 (for flux jumping OFF)&lt;br /&gt;
                 = {&lt;br /&gt;
                   { 470000 * flux_quantum / gaini    (for flux jumping ON)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Typical Values (Calculated in data_mode_outputs.xls)&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Telescope !! Flux Quanta !! I Coefficient &lt;br /&gt;
! integral_clamp &lt;br /&gt;
(Flux Jumping ON)&lt;br /&gt;
! integral_clamp &lt;br /&gt;
(Flux Jumping OFF)&lt;br /&gt;
|- &lt;br /&gt;
| ACT || 6500 || 480 || 6389760 || 62915 &lt;br /&gt;
|- &lt;br /&gt;
| SPIDER || 9500 || 50 || 89653248 || 603980 &lt;br /&gt;
|- &lt;br /&gt;
| SCUBA-2 || 6500 || 2024 || 1515358 || 14920 &lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Bburger</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Readout_Card_firmware&amp;diff=4316</id>
		<title>Readout Card firmware</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Readout_Card_firmware&amp;diff=4316"/>
		<updated>2011-04-21T18:52:46Z</updated>

		<summary type="html">&lt;p&gt;Bburger: /* Revision 5.0.0 (Filter Only, 2 LVDS) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Synthesis Reminders (for firmware developers)&lt;br /&gt;
** quartus.ini is not needed anymore (Fixed as of Q7, Altera SR10783580 2010-10-24)&lt;br /&gt;
** Remember that readout_card/fsfb_clac/source/rtl/ram_40x64.vhd must be initialized with the ram_40x64.hex file in the same directory.&lt;br /&gt;
= Revision 5.1.2 =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010002_18jan2011.sof (for Rev. E cards) &lt;br /&gt;
** rc_stratix3_v05010002_18jan2011.jic (for Rev. E cards) &lt;br /&gt;
** rc_v05010002_03feb2011.sof (for Rev. B cards) &lt;br /&gt;
** rc_v05010002_03feb2011.pof (for Rev. B cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.1 with k1 and k2 (filter params) limited to k1&amp;lt;16 and k2&amp;lt;32 in order to resolve the timing when compiling for smaller Stratix FPGA on RC Rev. B.&lt;br /&gt;
&lt;br /&gt;
* '''Bug fix:'''&lt;br /&gt;
** the 2-rows-off filtered data readout introduced with configurable filter in rev. 5.1.0 and 5.1.1 is fixed now.&lt;br /&gt;
 &lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** none so far.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage and Timing Report''' (readout_card.fit.rpt and readout_card.tan.rpt): TO BE UPDATED LATER&lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.1 (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05010001_01dec2010.sof (for Rev. B cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.0, but k1 and k2 (filter params) are now limited to k1&amp;lt;16 and k2&amp;lt;32 in order to resolve the timing failures of compiling 5.1.0 for smaller Stratix FPGA on RC Rev. B.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** filter mode data is off by 2 rows. &lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.0 (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010000_01nov2010.sof  (for Rev. E cards)&lt;br /&gt;
** rc_v05010000_01nov2010.sof (for Rev. B cards) has timing failures '''do not use!!!'''&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** added configurable filter parameters specified by ''fltr_coeff'', default is the f&amp;lt;sub&amp;gt;cutoff&amp;lt;/sub&amp;gt;/f&amp;lt;sub&amp;gt;sampl&amp;lt;/sub&amp;gt;=122Hz/15kHz. see [[ Digital 4-pole Butterworth Low-pass filter ]]. &lt;br /&gt;
** ''fltr_type'' is set to 255 to indicate configurable filter parameters.&lt;br /&gt;
** see [http://www.phas.ubc.ca/~mce/mcedocs/software/SC2_ELE_S580_515_mce_command_description.pdf MCE command description]&lt;br /&gt;
** development notes: &lt;br /&gt;
*** It is built on Quartus10.1. &lt;br /&gt;
*** tcl files had to be updated as cmp syntax is not supported in Q10 anymore.&lt;br /&gt;
*** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** rc_v05010000_01nov2010.sof has timing failures that were overlooked, do not use this firmware for Rev.B cards. &lt;br /&gt;
** '''filter mode data is off by 2 rows.''' &lt;br /&gt;
&lt;br /&gt;
* '''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&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.f  =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000f_22oct2010.sof (for Rev. B cards)&lt;br /&gt;
** rc_stratix3_v0500000f_22oct2010.sof  (for Rev. E cards)&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
**  Bugfix: integral clamp should work now. only positive integral_clamp values are valid!&lt;br /&gt;
&lt;br /&gt;
* '''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.&lt;br /&gt;
** available for both Rev. E and Rev. B cards, the upper byte of card_type parameter now reports the pcb revision.&lt;br /&gt;
** development note: It is built on Quartus10.1. &lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
**none yet!&lt;br /&gt;
&lt;br /&gt;
* '''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&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.e (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000e_06oct2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''  &lt;br /&gt;
** 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!&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.d =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000d_04aug2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
**  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.&lt;br /&gt;
&lt;br /&gt;
* '''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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** '''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 [[http://e-mode.phas.ubc.ca/mcewiki/index.php/Image:Clamp_unstable.png scope snapshot]] used slow_fb_ramp.py script for testing.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage and Timing Report''' (readout_card.fit.rpt and readout_card.tan.rpt): no change compared to 5.0.a/b/c&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.c (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000c_16jun2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.b&lt;br /&gt;
** Re-introduced flux-jump counter clamping to maintain continuity in behavior from past versions of firmware in the field.&lt;br /&gt;
** '''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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** '''flux-jump is broken'''. flux-jumping block misbehaves at the first jump in the negative range.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt): [[rc_5.0.c_fit_rpt]]&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): [[rc_5.0.c_tan_rpt]]&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.b (not recommended) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000b_03jun2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.a&lt;br /&gt;
** 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.&lt;br /&gt;
** 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&lt;br /&gt;
** A sticky bit that only affected servo_mode=0,1,2 was also removed from the flux-jumping block.&lt;br /&gt;
** flx_lp_init commands now also clear the flux-jumping block as well.&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** flux-jump does not work when jumping to negative values.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt): [[rc_5.0.b_fit_rpt]]&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): [[rc_5.0.b_tan_rpt]]&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.a =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000a_12mar2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on the merger of rev. 5.0.8 and 5.0.9.&lt;br /&gt;
** '''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.&lt;br /&gt;
** The low pass filter has 20-bit input and f_3dB/f_samp = 122Hz/15kHz .&lt;br /&gt;
** The flux-jump clamping that was removed in 5.0.9 is included once again here, as we decided this is safer for now.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** &amp;quot;lock_dat_left&amp;quot; parameter that was removed in 5.0.9 is now implemented as &amp;quot;lock_dat_lsb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** flx_lp_init does not reinitialize the flux-jump block&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
** tag name: rc_v0500000a_12mar2009! years were mixed up!&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.9 (buggy) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000009_13nov2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** Removes a sticky bit in pid calculation result storage -- in fsfb_processor.&lt;br /&gt;
** Adds a command to clamp the growth of the I-term to prevent wrapping and track down the source of Caltech's FSFB jumps.&lt;br /&gt;
** Removed the unused lock_dat_left parameter.  The ability to shift left was moved to the fsfb_corr block some time ago.&lt;br /&gt;
** Fixed a sign extension bug acting on the flux quanta, which limited the value to 8191.  Changed the extension from signed to unsigned.&lt;br /&gt;
** Removed ineffective clamping in the flux-jump calculation block.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** integral_clamp read/write command does not work. &lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,960 / 41,250 ( 68 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.825 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.878 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 14.397 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.8 (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000008_09oct2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** type 1 low-pass filter: f&amp;lt;sub&amp;gt;3dB&amp;lt;/sub&amp;gt;=122Hz for f&amp;lt;sub&amp;gt;sample&amp;lt;/sub&amp;gt;=15kHz&lt;br /&gt;
** Filter-input-width changed from 18b to 20b with no sticky bits!&lt;br /&gt;
** removed sticky bits in internal arithmetic of the filter.&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.7 (type-2 filter) =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000007_09oct2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** type-2 low-pass-filter: f&amp;lt;sub&amp;gt;3dB&amp;lt;/sub&amp;gt;=75Hz for f&amp;lt;sub&amp;gt;sample&amp;lt;/sub&amp;gt;=30000.&lt;br /&gt;
** Filter-input-width changed from 18b to 20b with no sticky bits!&lt;br /&gt;
** inter-biquad-gain-scaling for the filter is 2^14&lt;br /&gt;
** filter results are scaled down by 2^3 in the output of the filter.&lt;br /&gt;
** removed sticky bits in internal arithmetics&lt;br /&gt;
** _correction_ disabled in fsfb_proc_pidz&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** quartus.ini file was '''not''' present in synth directory.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** none to report&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
== Revision 5.0.6  (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05000006_15sep2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Only Valid for Rev. C/D Cards&lt;br /&gt;
** Based on rev. 5.0.3&lt;br /&gt;
** tcl file updated for Rev. D and aligned with top-level and qsf (project file). &lt;br /&gt;
** flux loop commented, just to try sampling the ADC. &lt;br /&gt;
** compiled with Q9.1&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.5 (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000005_04sep2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** changed the low-pass-filter to f(3db)=75Hz for f(sample)=30000.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** quartus.ini file was '''not''' present in synth directory.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** negative inputs to the filter cause filter to have a non-flat pass-band region. may have to do with sign-handling...&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.4 =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000004_28aug2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** BUG Fix: handles 14-bit flux quanta (changed the multiplier to unsigned)&lt;br /&gt;
** BUG Fix: changed standard logic vector extension from signed to unsigned in flux-jumping slave.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,170 / 41,250 ( 63 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.541 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.612 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 15.398 ns ;&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.3  =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05000003_21aug2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** ONLY valid REV C/D RC Cards&lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** flux loop commented, just to try sampling the ADC.&lt;br /&gt;
** updated tcl file, but still need to rely on project file as well as qsf file.&lt;br /&gt;
** changed default level of adc_sclk to '1'&lt;br /&gt;
** dac_clr_n was changed from an output to an input.&lt;br /&gt;
** added 'locked' interface to rc_pll_stratix_iii&lt;br /&gt;
** renamed the adc_pll clock signals to more explanitory names&lt;br /&gt;
** added the FPGA_DEVICE_FAMILY generic to the dispatch interace for synthesis of the dc_fifo in lvds_rx&lt;br /&gt;
** uncommented DDR interface to force the syntesizer to use correct left and right PLLs (in conjunction with ADC and DDR PLLs)&lt;br /&gt;
** added test signals to test_status to see clocks on the scope.&lt;br /&gt;
== Revision 5.0.2 (buggy) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000002_test00_tagged.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.1&lt;br /&gt;
** Fixed a bug in wbs_frame_data that stored data incorrectly if reporting 1 or 2 pixels only.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,186 / 41,250 ( 63 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.755 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.979 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.067 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.1 (buggy) (Filter + Raw + Rectangle, 2 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000001_26may2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Combines features in rev. 5.0.0 (2 LVDS Lines) and rev. 4.0.e (Filtered + Raw), with the NEW rectangle mode.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** [[CVS Diff Between sys_v05000000 and rc_v05000001]]&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** Has a bug in wbs_frame_data that stored data incorrectly if reporting 1 or 2 pixels only.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,565 / 41,250 ( 64 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.656 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.861 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 14.167 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.0 (Filter Only, 2 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000000_22dec2008.sof (tagged as sys_v05000000_22dec2008)&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware v05000000+ of all other cards!!!&lt;br /&gt;
** Adds the ability to read out one column of data continuously from readout cards&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** [[CVS Diff Between rc_v0400000c and sys_v05000000]]&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,607 / 41,250 ( 65 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 406,016 / 3,423,744 ( 12 % )             ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.558 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.892 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.987 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.f (Filter + Raw, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0400000f_12feb2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on 4.0.e and in parallel with 5.0.9 (equivalent version, clamping is not included)&lt;br /&gt;
** Incorporates fixes that were done to flux-jumping between 5.0.2 - 5.0.4 - 5.0.9.  Namely:&lt;br /&gt;
*** Changes a multiplier from signed to unsigned (in fsfb_corr_multplier.vhd).&lt;br /&gt;
*** Changes sign extension from signed to unsigned (in flux_quanta_ram_admin.vhd).&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None reported yet.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,773 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 1,321,984 / 3,423,744 ( 39 % )                ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.539 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.118 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.318 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.e (Filter + Raw, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0400000e_27apr2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on 4.0.d&lt;br /&gt;
** Combines both raw- and filtered-data modes.&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are disabled.&lt;br /&gt;
** Tested by Matt Hasselfield.  &lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are disabled.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,048 / 41,250 ( 66 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,321,984 / 3,423,744 ( 39 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.675 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.907 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.728 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.d (Raw Only, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  rc_v0400000d_20090417.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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.&lt;br /&gt;
** The firmware takes a new command called readout_col_index which specifies which column to capture raw data from.&lt;br /&gt;
** Other than readout_col_index, the firmware functions the same as previous raw-data firmware, including then need to issue a capture_raw command.&lt;br /&gt;
** For more information on raw-data, see:  http://e-mode.phas.ubc.ca/mcewiki/index.php/Raw-mode_readout&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** Differences between 4.0.c and 4.0.d&lt;br /&gt;
 U system/test/source/tb/tb_cc_rcs_bcs_ac.vhd&lt;br /&gt;
 U all_cards/dispatch/source/rtl/dispatch_wishbone.vhd&lt;br /&gt;
 U library/sys_param/source/rtl/wishbone_pack.vhd&lt;br /&gt;
 U readout_card/adc_sample_coadd/source/rtl/adc_sample_coadd.vhd&lt;br /&gt;
 U readout_card/adc_sample_coadd/source/rtl/adc_sample_coadd_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop/source/rtl/flux_loop.vhd&lt;br /&gt;
 U readout_card/flux_loop/source/rtl/flux_loop_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/rtl/flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/rtl/flux_loop_ctrl_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/tb/tb1_flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/tb/tb2_flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/fsfb_calc/source/rtl/fsfb_fltr_regs.vhd&lt;br /&gt;
 U readout_card/fsfb_corr/source/rtl/fsfb_corr.vhd&lt;br /&gt;
 U readout_card/readout_card/source/rtl/readout_card.vhd&lt;br /&gt;
 U readout_card/readout_card/source/rtl/readout_card_pack.vhd&lt;br /&gt;
 U readout_card/wbs_frame_data/source/rtl/wbs_frame_data.vhd&lt;br /&gt;
 U readout_card/wbs_frame_data/source/rtl/wbs_frame_data_pack.vhd&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are not supported.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 24,554 / 41,250 ( 60 % )                 ;&lt;br /&gt;
 ; Total memory bits        ; 1,262,592 / 3,423,744 ( 37 % )           ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.991 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.864 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.052 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.4.1 ==&lt;br /&gt;
* '''Filename:'''  rc_v04040001_21nov2008&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,241 / 41,250 ( 66 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 405,504 / 3,423,744 ( 12 % )                  ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.588 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.585 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.057 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.4.0 (buggy) ==&lt;br /&gt;
* '''Filename:'''  rc_v04040000_02oct2008&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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]].&lt;br /&gt;
** Re-integrated the id_thermo and fpga_thermo block in the readout_card.vhd top level that was removed in 4.0.c.&lt;br /&gt;
** 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.&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
** Adjusted the indentation in fsfb_io_controller.vhd to make the file more readable.&lt;br /&gt;
** 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.&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** The following commands lock up the Readout Card firmware:  CARD_ID_ADDR, CARD_TEMP_ADDR, FPGA_TEMP_ADDR.&lt;br /&gt;
** 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&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,099 / 41,250 ( 66 % )                      ;&lt;br /&gt;
 ; Total memory bits        ; 406,016 / 3,423,744 ( 12 % )                  ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.372 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.052 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.066 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.c ==&lt;br /&gt;
* '''Filename:'''  rc_v0400000c_15aug2008.sof&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Only has data modes 0, 1, 4, and 10.&lt;br /&gt;
** 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).&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** Changed a counter in the dispatch block to ease timing constraints in synthesis (dispatch_wishbone.vhd)&lt;br /&gt;
** 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.&lt;br /&gt;
** '''Removed''' the fpga_termo (command:  '''fpga_temp''') and id_thermo (commands: '''card_temp, card_id''') to ease timing constraints in synthesis (readout_card.vhd)&lt;br /&gt;
** Updated the tagged version of fpga_termo.vhd to include the new 'stale bit' feature&lt;br /&gt;
** Updated the tagged version of frame_timing_core.vhd to include the new 'err_o' interface&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None reported yet&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
* '''FPGA Resource Usage:'''&lt;br /&gt;
 Total logic elements : 25,058 / 41,250 ( 61 % )&lt;br /&gt;
 Total memory bits : 400,896 / 3,423,744 ( 12 % )&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.282 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.736 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.665 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.b (buggy) ==&lt;br /&gt;
Note: This revision is on a watch list, after the bug detected 15 July 2008.  See the bug section for more details.&lt;br /&gt;
* '''Filename''' : rc_v0400000b_04aug2008.sof&lt;br /&gt;
* '''Features'''&lt;br /&gt;
** data_mode 10 is added to provide more filtfb bits (compared to data mode 9) for planet observations. filtered_dat(27 downto 3) &amp;amp; flux_cnt_dat(6 downto 0)&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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]]&lt;br /&gt;
&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.a (buggy) ==&lt;br /&gt;
Note: This revision is on a watch list, after the bug detected 15 July 2008.  See the bug section for more details.&lt;br /&gt;
* '''Filename''' : rc_v0400000a_07jul2008.sof&lt;br /&gt;
* '''Bug Fix'''&lt;br /&gt;
** mce_status and adc_offset/flx_quanta commands do not fail after power up.&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** Seems to clip out channel 0 from data reporting.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.9 (buggy) ==&lt;br /&gt;
* '''Filename''' : rc_v04000009_26jun2008.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** sa_bias and offset DACs only refreshed when new values are written. (in previous versions, DACs were refreshed every frame)&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.8 ==&lt;br /&gt;
* '''Filename''' : rc_v04000008_26jun2008.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** The gaini, gainp, gaind resolution increased to 12-bit, i.e. -2048 to 2047 (formerly 10-bit).&lt;br /&gt;
&lt;br /&gt;
* '''Bug fix'''&lt;br /&gt;
** the bug associated with gainpid read before mce_reset is fixed.&lt;br /&gt;
&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.3.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04030007_26may2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** 14-bit raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** 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.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.2.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04020007_24may2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
* '''Bug fix'''&lt;br /&gt;
** the bug associated with reading from raw-buffer is fixed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.1.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04010007_25apr2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.6 (buggy) ==&lt;br /&gt;
* '''Filename''' : rc_v04000006_15feb2008.sof or .pof       &lt;br /&gt;
* '''Features''' &lt;br /&gt;
** '''bugfix''': unreliable reset due to unsafe and incomplete state machines is fixed.&lt;br /&gt;
** '''bugfix''': flux_jump sign problem fixed, so far proved in const_mode, to be tested in servo_mode with cold setup.&lt;br /&gt;
** servo_mode=2 or ramp previously only went from 0 to ramp_amp, but now goes from -8192 to -8192+ramp_amp&lt;br /&gt;
** new commands are added: ''scratch'' and ''card_type''. Scratch takes 8 values and can be used by software to detect reset.&lt;br /&gt;
** slot_id and fw_rev are now integrated as part of all_cards.vhd&lt;br /&gt;
** lvds_tx_b=0, This will allow Clock Card to use the secondary backplane lvds line and check whether RC is plugged in.&lt;br /&gt;
** filter_coeff in misc_banks_admin commented as it is not implemented and causes timing problems.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
** slot_id is only set after a resetmce is issued. (using the latest all_cards in the next revision will fix this)&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.5 ==&lt;br /&gt;
* '''Filename''' : rc_v04000005_01nov2007.sof or .pof       &lt;br /&gt;
* '''Features''' &lt;br /&gt;
** data mode 9 (mixed filt + flux jump) with windowing readjusted compared to data mode 8&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** unreliable resetmce. Sometimes, firmware waked up non-responsive on lvds lines.&lt;br /&gt;
** In data mode 5 and 9, flux-jump counter is not reported properly due to a sign error. However, flux jumping works fine.&lt;br /&gt;
&lt;br /&gt;
== Revision 3.0.19 ==&lt;br /&gt;
* '''Filename''' : rc_v03000019_16feb2007_raw.sof (no pof as one is not likely to run with this as regular firmware)&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** data mode 3 is enabled.&lt;br /&gt;
** filter is disabled as a compromise to fit the raw-mode buffer.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** unreliable resetmce. Sometimes, firmware waked up non-responsive on lvds lines.&lt;br /&gt;
&lt;br /&gt;
== Old Firmware Revisions ==&lt;br /&gt;
* '''4.0.4''':  rc_v04000004_11oct2007.sof  data mode 8 added (mixed filt + flux jump)&lt;br /&gt;
* '''4.0.3''':  rc_v04000003_19sep2007.sof  data mode 7 bit split readjusted to 10b error being bit 4 to 14&lt;br /&gt;
* '''4.0.2''':  rc_v04000002_11sep2007.sof  pid resolution increased to 10b, data mode 7 added&lt;br /&gt;
* '''4.0.1''':  rc_v04000001_06sep2007.sof  &lt;br /&gt;
* '''4.0.0''':  rc_v04000000_29aug2007.sof  supports readout_row_index * [[ bugs ]]&lt;br /&gt;
&lt;br /&gt;
= To-Do List =&lt;br /&gt;
* the starting point for the servo is currently zero and it would be nice to have it programmable.&lt;br /&gt;
&lt;br /&gt;
= RC Synthesis Notes =&lt;br /&gt;
# 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. &lt;br /&gt;
# Timing: There is no &amp;quot;lock region&amp;quot; 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.&lt;br /&gt;
# 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%.&lt;br /&gt;
# 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.&lt;br /&gt;
# 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):&lt;br /&gt;
 lpm_file =&amp;gt; &amp;quot;C:/scuba2_repository/cards/readout_card/fsfb_calc/source/rtl/ram_40x64.hex&amp;quot;, and&lt;br /&gt;
 lpm_file    : STRING;&lt;br /&gt;
#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. &lt;br /&gt;
----&lt;br /&gt;
[http://e-mode.phas.ubc.ca/mcewiki/index.php/Main_Page  MCE Main Page]&lt;/div&gt;</summary>
		<author><name>Bburger</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Main_Page&amp;diff=4315</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Main_Page&amp;diff=4315"/>
		<updated>2011-04-21T18:51:19Z</updated>

		<summary type="html">&lt;p&gt;Bburger: /* Contact Info */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This Wiki is for users and developers of UBC's '''Multi-Channel Electronics''' (MCE), and the '''MCE Acquisition Software''' (MAS).&lt;br /&gt;
&lt;br /&gt;
* To edit this wiki you will need an account; please get in touch with UBC.&lt;br /&gt;
* To stay up-to-date with MCE changes, consider subscribing to the MCE announcement mailing list: '''&amp;lt;code&amp;gt;mce-announce@phas.ubc.ca&amp;lt;/code&amp;gt;'''.&lt;br /&gt;
&lt;br /&gt;
= =&lt;br /&gt;
* [[ MCE firmware | MCE Firmware ]] - information on firmware versions, features, and tools&lt;br /&gt;
* [[ MCE hardware | MCE Hardware ]] - information on MCE hardware&lt;br /&gt;
* [http://www.phas.ubc.ca/~mce/mcedocs MCE main website] - hardware board descriptions and schematics&lt;br /&gt;
* [[ PCI card firmware ]] - MCE-compatible firmware for the astrocam (&amp;quot;SDSU&amp;quot;) PCI card.&lt;br /&gt;
* [[ Sync Box ]]&lt;br /&gt;
&lt;br /&gt;
= =&lt;br /&gt;
* [[ MAS | MCE Acquisition Software (MAS) ]] - kernel driver and low-level tools&lt;br /&gt;
* [[ Array setup programs | Array setup Programs (mce_script) ]]&lt;br /&gt;
* [[ Unix stuff ]]&lt;br /&gt;
* [[ DAS ]] - SCUBA2's data acquisition system&lt;br /&gt;
&lt;br /&gt;
= Contact Info =&lt;br /&gt;
&lt;br /&gt;
 MCE Lab:                   604-822-2585&lt;br /&gt;
 Halpern's Lab:             604-822-6709&lt;br /&gt;
 &lt;br /&gt;
 Hardware/firmware:         mandana at phas.ubc.ca, bburger at phas.ubc.ca&lt;br /&gt;
 Software:                  mhasse at phas.ubc.ca, dvw at phas.ubc.ca&lt;br /&gt;
 Announcement Mailing List  mce-announce at phas.ubc.ca&lt;/div&gt;</summary>
		<author><name>Bburger</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Readout_Card_firmware&amp;diff=3856</id>
		<title>Readout Card firmware</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Readout_Card_firmware&amp;diff=3856"/>
		<updated>2010-08-03T18:39:23Z</updated>

		<summary type="html">&lt;p&gt;Bburger: /* Revision 5.0.c (mildly tested, but recommended!) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Recommended Firmware Revisions [http://e-mode.phas.ubc.ca/mcewiki/index.php/Compatible_Versions_(CC,RC,BC,AC) here]&lt;br /&gt;
&lt;br /&gt;
* Synthesis Reminders (for firmware developers)&lt;br /&gt;
** Make sure quartus.ini is present in synth directory&lt;br /&gt;
** Remember that readout_card/fsfb_clac/source/rtl/ram_40x64.vhd must be initialized with the ram_40x64.hex file in the same directory.&lt;br /&gt;
&lt;br /&gt;
= Revision Listing =&lt;br /&gt;
== Revision 5.0.c (buggy) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000c_16jun2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.b&lt;br /&gt;
** Re-introduced flux-jump counter clamping to maintain continuity in behavior from past versions of firmware in the field.&lt;br /&gt;
** '''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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** There is a bug in the flux-jumping block related to jumps in the negative range.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,800 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total pins               ; 358 / 616 ( 58 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 76 / 112 ( 68 % )                             ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.964 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.382 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 15.924 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.b (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000b_03jun2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.a&lt;br /&gt;
** 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.&lt;br /&gt;
** 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&lt;br /&gt;
** A sticky bit that only affected servo_mode=0,1,2 was also removed from the flux-jumping block.&lt;br /&gt;
** flx_lp_init commands now also clear the flux-jumping block as well.&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,745 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total pins               ; 358 / 616 ( 58 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 76 / 112 ( 68 % )                             ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.459 ns  &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.895 ns  &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 15.956 ns&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.a ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0500000a_12mar2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on the merger of rev. 5.0.8 and 5.0.9.&lt;br /&gt;
** 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.&lt;br /&gt;
** The low pass filter has 20-bit input and f_3dB/f_samp = 122Hz/15kHz .&lt;br /&gt;
** The flux-jump clamping that was removed in 5.0.9 is included once again here, as we decided this is safer for now.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** &amp;quot;lock_dat_left&amp;quot; parameter that was removed in 5.0.9 is now implemented as &amp;quot;lock_dat_lsb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
** tag name: rc_v0500000a_12mar2009! years were mixed up!&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.9 (buggy) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000009_13nov2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** Removes a sticky bit in pid calculation result storage -- in fsfb_processor.&lt;br /&gt;
** Adds a command to clamp the growth of the I-term to prevent wrapping and track down the source of Caltech's FSFB jumps.&lt;br /&gt;
** Removed the unused lock_dat_left parameter.  The ability to shift left was moved to the fsfb_corr block some time ago.&lt;br /&gt;
** Fixed a sign extension bug acting on the flux quanta, which limited the value to 8191.  Changed the extension from signed to unsigned.&lt;br /&gt;
** Removed ineffective clamping in the flux-jump calculation block.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** integral_clamp read/write command does not work. &lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,960 / 41,250 ( 68 % )                      ;&lt;br /&gt;
 ; Total pins               ; 358 / 616 ( 58 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 76 / 112 ( 68 % )                             ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt): &lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.825 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.878 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 14.397 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.8 (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000008_09oct2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** type 1 low-pass filter: f&amp;lt;sub&amp;gt;3dB&amp;lt;/sub&amp;gt;=122Hz for f&amp;lt;sub&amp;gt;sample&amp;lt;/sub&amp;gt;=15kHz&lt;br /&gt;
** Filter-input-width changed from 18b to 20b with no sticky bits!&lt;br /&gt;
** removed sticky bits in internal arithmetic of the filter.&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.7 (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000007_09oct2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Based on rev. 5.0.4&lt;br /&gt;
** type-2 low-pass-filter: f&amp;lt;sub&amp;gt;3dB&amp;lt;/sub&amp;gt;=75Hz for f&amp;lt;sub&amp;gt;sample&amp;lt;/sub&amp;gt;=30000.&lt;br /&gt;
** Filter-input-width changed from 18b to 20b with no sticky bits!&lt;br /&gt;
** inter-biquad-gain-scaling for the filter is 2^14&lt;br /&gt;
** filter results are scaled down by 2^3 in the output of the filter.&lt;br /&gt;
** removed sticky bits in internal arithmetics&lt;br /&gt;
** _correction_ disabled in fsfb_proc_pidz&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** quartus.ini file was '''not''' present in synth directory.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** none to report&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.5 (UBC only) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000005_04sep2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** changed the low-pass-filter to f(3db)=75Hz for f(sample)=30000.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** quartus.ini file was '''not''' present in synth directory.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** negative inputs to the filter cause filter to have a non-flat pass-band region. may have to do with sign-handling...&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.4 ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000004_28aug2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.2&lt;br /&gt;
** BUG Fix: handles 14-bit flux quanta (changed the multiplier to unsigned)&lt;br /&gt;
** BUG Fix: changed standard logic vector extension from signed to unsigned in flux-jumping slave.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,170 / 41,250 ( 63 % )                      ;&lt;br /&gt;
 ; Total pins               ; 358 / 616 ( 58 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 76 / 112 ( 68 % )                             ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.541 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.612 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 15.398 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.2 (buggy) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000002_test00_tagged.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on rev. 5.0.1&lt;br /&gt;
** Fixed a bug in wbs_frame_data that stored data incorrectly if reporting 1 or 2 pixels only.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,186 / 41,250 ( 63 % )                      ;&lt;br /&gt;
 ; Total pins               ; 358 / 616 ( 58 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )                ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 76 / 112 ( 68 % )                             ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.755 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.979 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.067 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.1 (buggy) (Filter + Raw + Rectangle, 2 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000001_26may2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Combines features in rev. 5.0.0 (2 LVDS Lines) and rev. 4.0.e (Filtered + Raw), with the NEW rectangle mode.&lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware rev. 5.0.0+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** [[CVS Diff Between sys_v05000000 and rc_v05000001]]&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** Has a bug in wbs_frame_data that stored data incorrectly if reporting 1 or 2 pixels only.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,565 / 41,250 ( 64 % )                 ;&lt;br /&gt;
 ; Total pins               ; 358 / 616 ( 58 % )                       ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                        ;&lt;br /&gt;
 ; Total memory bits        ; 1,405,440 / 3,423,744 ( 41 % )           ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 78 / 112 ( 70 % )                        ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                           ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                            ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.656 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.861 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 14.167 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.0 (Filter Only, 2 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05000000_22dec2008.sof (tagged as sys_v05000000_22dec2008)&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** IMPORTANT: Must be used in conjunction with firmware v05000000+ of all other cards!!!&lt;br /&gt;
** Adds the ability to read out one column of data continuously from readout cards&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** [[CVS Diff Between rc_v0400000c and sys_v05000000]]&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 +---------------------------------------------------------------------+&lt;br /&gt;
 ; Fitter Summary                                                      ;&lt;br /&gt;
 ; Total logic elements     ; 26,607 / 41,250 ( 65 % )                 ;&lt;br /&gt;
 ; Total pins               ; 358 / 616 ( 58 % )                       ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                        ;&lt;br /&gt;
 ; Total memory bits        ; 406,016 / 3,423,744 ( 12 % )             ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 76 / 112 ( 68 % )                        ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                           ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                            ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.558 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.892 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.987 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.f (Filter + Raw, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0400000f_12feb2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on 4.0.e and in parallel with 5.0.9 (equivalent version, clamping is not included)&lt;br /&gt;
** Incorporates fixes that were done to flux-jumping between 5.0.2 - 5.0.4 - 5.0.9.  Namely:&lt;br /&gt;
*** Changes a multiplier from signed to unsigned (in fsfb_corr_multplier.vhd).&lt;br /&gt;
*** Changes sign extension from signed to unsigned (in flux_quanta_ram_admin.vhd).&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None reported yet.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 26,773 / 41,250 ( 65 % )                      ;&lt;br /&gt;
 ; Total pins               ; 358 / 616 ( 58 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 1,321,984 / 3,423,744 ( 39 % )                ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 76 / 112 ( 68 % )                             ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.539 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.118 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.318 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.e (Filter + Raw, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0400000e_27apr2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** Based on 4.0.d&lt;br /&gt;
** Combines both raw- and filtered-data modes.&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are disabled.&lt;br /&gt;
** Tested by Matt Hasselfield.  &lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are disabled.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file '''was''' present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,048 / 41,250 ( 66 % )                 ;&lt;br /&gt;
 ; Total pins               ; 358 / 616 ( 58 % )                       ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                        ;&lt;br /&gt;
 ; Total memory bits        ; 1,321,984 / 3,423,744 ( 39 % )           ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 76 / 112 ( 68 % )                        ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                           ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                            ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.675 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.907 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.728 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.d (Raw Only, 1 LVDS) ==&lt;br /&gt;
* '''Filename:'''  rc_v0400000d_20090417.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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.&lt;br /&gt;
** The firmware takes a new command called readout_col_index which specifies which column to capture raw data from.&lt;br /&gt;
** Other than readout_col_index, the firmware functions the same as previous raw-data firmware, including then need to issue a capture_raw command.&lt;br /&gt;
** For more information on raw-data, see:  http://e-mode.phas.ubc.ca/mcewiki/index.php/Raw-mode_readout&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** Differences between 4.0.c and 4.0.d&lt;br /&gt;
 U system/test/source/tb/tb_cc_rcs_bcs_ac.vhd&lt;br /&gt;
 U all_cards/dispatch/source/rtl/dispatch_wishbone.vhd&lt;br /&gt;
 U library/sys_param/source/rtl/wishbone_pack.vhd&lt;br /&gt;
 U readout_card/adc_sample_coadd/source/rtl/adc_sample_coadd.vhd&lt;br /&gt;
 U readout_card/adc_sample_coadd/source/rtl/adc_sample_coadd_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop/source/rtl/flux_loop.vhd&lt;br /&gt;
 U readout_card/flux_loop/source/rtl/flux_loop_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/rtl/flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/rtl/flux_loop_ctrl_pack.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/tb/tb1_flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/flux_loop_ctrl/source/tb/tb2_flux_loop_ctrl.vhd&lt;br /&gt;
 U readout_card/fsfb_calc/source/rtl/fsfb_fltr_regs.vhd&lt;br /&gt;
 U readout_card/fsfb_corr/source/rtl/fsfb_corr.vhd&lt;br /&gt;
 U readout_card/readout_card/source/rtl/readout_card.vhd&lt;br /&gt;
 U readout_card/readout_card/source/rtl/readout_card_pack.vhd&lt;br /&gt;
 U readout_card/wbs_frame_data/source/rtl/wbs_frame_data.vhd&lt;br /&gt;
 U readout_card/wbs_frame_data/source/rtl/wbs_frame_data_pack.vhd&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
** fpga_temp, card_temp, card_id commands are not supported.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 24,554 / 41,250 ( 60 % )                 ;&lt;br /&gt;
 ; Total pins               ; 358 / 616 ( 58 % )                       ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                        ;&lt;br /&gt;
 ; Total memory bits        ; 1,262,592 / 3,423,744 ( 37 % )           ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 76 / 112 ( 68 % )                        ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                           ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                            ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.991 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.864 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.052 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.4.1 ==&lt;br /&gt;
* '''Filename:'''  rc_v04040001_21nov2008&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None so far.&lt;br /&gt;
&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,241 / 41,250 ( 66 % )                      ;&lt;br /&gt;
 ; Total pins               ; 358 / 616 ( 58 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 405,504 / 3,423,744 ( 12 % )                  ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 76 / 112 ( 68 % )                             ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.588 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.585 ns  ;&lt;br /&gt;
 ; Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 17.057 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.4.0 (buggy) ==&lt;br /&gt;
* '''Filename:'''  rc_v04040000_02oct2008&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** 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]].&lt;br /&gt;
** Re-integrated the id_thermo and fpga_thermo block in the readout_card.vhd top level that was removed in 4.0.c.&lt;br /&gt;
** 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.&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
** Adjusted the indentation in fsfb_io_controller.vhd to make the file more readable.&lt;br /&gt;
** 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.&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** The following commands lock up the Readout Card firmware:  CARD_ID_ADDR, CARD_TEMP_ADDR, FPGA_TEMP_ADDR.&lt;br /&gt;
** 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&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
* '''FPGA Resource Usage''' (readout_card.fit.rpt):&lt;br /&gt;
 ; Total logic elements     ; 27,099 / 41,250 ( 66 % )                      ;&lt;br /&gt;
 ; Total pins               ; 358 / 616 ( 58 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 406,016 / 3,423,744 ( 12 % )                  ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 76 / 112 ( 68 % )                             ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 2.372 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 4.052 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.066 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.c ==&lt;br /&gt;
* '''Filename:'''  rc_v0400000c_15aug2008.sof&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Only has data modes 0, 1, 4, and 10.&lt;br /&gt;
** 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).&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** Changed a counter in the dispatch block to ease timing constraints in synthesis (dispatch_wishbone.vhd)&lt;br /&gt;
** 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.&lt;br /&gt;
** '''Removed''' the fpga_termo (command:  '''fpga_temp''') and id_thermo (commands: '''card_temp, card_id''') to ease timing constraints in synthesis (readout_card.vhd)&lt;br /&gt;
** Updated the tagged version of fpga_termo.vhd to include the new 'stale bit' feature&lt;br /&gt;
** Updated the tagged version of frame_timing_core.vhd to include the new 'err_o' interface&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None reported yet&lt;br /&gt;
* '''Synthesis Notes:'''&lt;br /&gt;
** The quartus.ini file was not present in the synth directory during synthesis.&lt;br /&gt;
* '''FPGA Resource Usage:'''&lt;br /&gt;
 Total logic elements : 25,058 / 41,250 ( 61 % )&lt;br /&gt;
 Total pins : 358 / 616 ( 58 % )&lt;br /&gt;
 Total virtual pins : 0&lt;br /&gt;
 Total memory bits : 400,896 / 3,423,744 ( 12 % )&lt;br /&gt;
 DSP block 9-bit elements : 76 / 112 ( 68 % )&lt;br /&gt;
 Total PLLs : 1 / 6 ( 17 % )&lt;br /&gt;
 Total DLLs : 0 / 2 ( 0 % )&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analysis''' (readout_card.tan.rpt):&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk0' ; 1.282 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk2' ; 3.736 ns  ;&lt;br /&gt;
 Clock Setup: 'rc_pll:i_rc_pll|altpll:altpll_component|_clk3' ; 16.665 ns ;&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.b (buggy) ==&lt;br /&gt;
Note: This revision is on a watch list, after the bug detected 15 July 2008.  See the bug section for more details.&lt;br /&gt;
* '''Filename''' : rc_v0400000b_04aug2008.sof&lt;br /&gt;
* '''Features'''&lt;br /&gt;
** data_mode 10 is added to provide more filtfb bits (compared to data mode 9) for planet observations. filtered_dat(27 downto 3) &amp;amp; flux_cnt_dat(6 downto 0)&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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]]&lt;br /&gt;
&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.a (buggy) ==&lt;br /&gt;
Note: This revision is on a watch list, after the bug detected 15 July 2008.  See the bug section for more details.&lt;br /&gt;
* '''Filename''' : rc_v0400000a_07jul2008.sof&lt;br /&gt;
* '''Bug Fix'''&lt;br /&gt;
** mce_status and adc_offset/flx_quanta commands do not fail after power up.&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** Seems to clip out channel 0 from data reporting.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.9 (buggy) ==&lt;br /&gt;
* '''Filename''' : rc_v04000009_26jun2008.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** sa_bias and offset DACs only refreshed when new values are written. (in previous versions, DACs were refreshed every frame)&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.8 ==&lt;br /&gt;
* '''Filename''' : rc_v04000008_26jun2008.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** The gaini, gainp, gaind resolution increased to 12-bit, i.e. -2048 to 2047 (formerly 10-bit).&lt;br /&gt;
&lt;br /&gt;
* '''Bug fix'''&lt;br /&gt;
** the bug associated with gainpid read before mce_reset is fixed.&lt;br /&gt;
&lt;br /&gt;
* ''' Synthesis note '''&lt;br /&gt;
** Quartus.ini removed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.3.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04030007_26may2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** 14-bit raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** 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.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.2.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04020007_24may2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
* '''Bug fix'''&lt;br /&gt;
** the bug associated with reading from raw-buffer is fixed.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.1.7 ==&lt;br /&gt;
* '''Filename''' : rc_v04010007_25apr2008_raw.sof&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** raw mode enabled to buffer a snapshot of 50MHz samples for 2 frames of row_len * num_rows samples.&lt;br /&gt;
** In order to save RAM for raw mode, two memory-intensive features are disabled:&lt;br /&gt;
*** low-pass filter disabled ( mixed filtfb data modes 6, 7, 9 are also disabled)&lt;br /&gt;
*** PID (gainp0, gaini0, gaind0) readback disabled. one can still set PID values and run servo, but can not read back the values.&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.6 (buggy) ==&lt;br /&gt;
* '''Filename''' : rc_v04000006_15feb2008.sof or .pof       &lt;br /&gt;
* '''Features''' &lt;br /&gt;
** '''bugfix''': unreliable reset due to unsafe and incomplete state machines is fixed.&lt;br /&gt;
** '''bugfix''': flux_jump sign problem fixed, so far proved in const_mode, to be tested in servo_mode with cold setup.&lt;br /&gt;
** servo_mode=2 or ramp previously only went from 0 to ramp_amp, but now goes from -8192 to -8192+ramp_amp&lt;br /&gt;
** new commands are added: ''scratch'' and ''card_type''. Scratch takes 8 values and can be used by software to detect reset.&lt;br /&gt;
** slot_id and fw_rev are now integrated as part of all_cards.vhd&lt;br /&gt;
** lvds_tx_b=0, This will allow Clock Card to use the secondary backplane lvds line and check whether RC is plugged in.&lt;br /&gt;
** filter_coeff in misc_banks_admin commented as it is not implemented and causes timing problems.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** 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.&lt;br /&gt;
** slot_id is only set after a resetmce is issued. (using the latest all_cards in the next revision will fix this)&lt;br /&gt;
** 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.&lt;br /&gt;
&lt;br /&gt;
== Revision 4.0.5 ==&lt;br /&gt;
* '''Filename''' : rc_v04000005_01nov2007.sof or .pof       &lt;br /&gt;
* '''Features''' &lt;br /&gt;
** data mode 9 (mixed filt + flux jump) with windowing readjusted compared to data mode 8&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** unreliable resetmce. Sometimes, firmware waked up non-responsive on lvds lines.&lt;br /&gt;
** In data mode 5 and 9, flux-jump counter is not reported properly due to a sign error. However, flux jumping works fine.&lt;br /&gt;
&lt;br /&gt;
== Revision 3.0.19 ==&lt;br /&gt;
* '''Filename''' : rc_v03000019_16feb2007_raw.sof (no pof as one is not likely to run with this as regular firmware)&lt;br /&gt;
* '''Features''' &lt;br /&gt;
** data mode 3 is enabled.&lt;br /&gt;
** filter is disabled as a compromise to fit the raw-mode buffer.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs'''&lt;br /&gt;
** unreliable resetmce. Sometimes, firmware waked up non-responsive on lvds lines.&lt;br /&gt;
&lt;br /&gt;
== Old Firmware Revisions ==&lt;br /&gt;
* '''4.0.4''':  rc_v04000004_11oct2007.sof  data mode 8 added (mixed filt + flux jump)&lt;br /&gt;
* '''4.0.3''':  rc_v04000003_19sep2007.sof  data mode 7 bit split readjusted to 10b error being bit 4 to 14&lt;br /&gt;
* '''4.0.2''':  rc_v04000002_11sep2007.sof  pid resolution increased to 10b, data mode 7 added&lt;br /&gt;
* '''4.0.1''':  rc_v04000001_06sep2007.sof  &lt;br /&gt;
* '''4.0.0''':  rc_v04000000_29aug2007.sof  supports readout_row_index * [[ bugs ]]&lt;br /&gt;
&lt;br /&gt;
= To-Do List =&lt;br /&gt;
* Moved to the Internal Wiki.  Please do not list anything here.&lt;br /&gt;
&lt;br /&gt;
= RC Synthesis Notes =&lt;br /&gt;
# 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.  We have stopped using this file starting with rc_v04000008, although v04000009 does use it.  This file needs to be used when Quartus synthesizes out blocks of firmware.  If this occurs, the utilization drops well below 66%.  If posssible, avoid using this file, because it causes timing violations.&lt;br /&gt;
# Timing: There is no &amp;quot;lock region&amp;quot; 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.&lt;br /&gt;
# 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%.&lt;br /&gt;
# 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.&lt;br /&gt;
# 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):&lt;br /&gt;
 lpm_file =&amp;gt; &amp;quot;C:/scuba2_repository/cards/readout_card/fsfb_calc/source/rtl/ram_40x64.hex&amp;quot;, and&lt;br /&gt;
 lpm_file    : STRING;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[http://e-mode.phas.ubc.ca/mcewiki/index.php/Main_Page  MCE Main Page]&lt;/div&gt;</summary>
		<author><name>Bburger</name></author>
		
	</entry>
</feed>