<?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=Mandana</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=Mandana"/>
	<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php/Special:Contributions/Mandana"/>
	<updated>2026-08-03T01:59:53Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.16</generator>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=MCE_firmware&amp;diff=7871</id>
		<title>MCE firmware</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=MCE_firmware&amp;diff=7871"/>
		<updated>2025-04-08T16:52:32Z</updated>

		<summary type="html">&lt;p&gt;Mandana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Related|Firmware}}&lt;br /&gt;
== Releases ==&lt;br /&gt;
Bitstream for all FPGA firmware revisions can be downloaded from [http://e-mode.phas.ubc.ca/mce/firmware/ http://e-mode.phas.ubc.ca/mce/firmware/]. &lt;br /&gt;
&lt;br /&gt;
Source code for FPGA firmware and else available here https://github.com/multi-channel-electronics/mce_firmware&lt;br /&gt;
&lt;br /&gt;
Release notes for each firmware release can be found below:&lt;br /&gt;
* [[ Clock Card firmware]]&lt;br /&gt;
* [[ Readout Card firmware]]&lt;br /&gt;
* [[ Bias Card firmware]]&lt;br /&gt;
* [[ Address Card firmware]]&lt;br /&gt;
* [[ PCI card firmware ]]&lt;br /&gt;
* [[ Sync Box Firmware ]]&lt;br /&gt;
&lt;br /&gt;
See also:&lt;br /&gt;
* [[Recommended firmware versions]]&lt;br /&gt;
&lt;br /&gt;
== Loading firmware onto cards ==&lt;br /&gt;
&lt;br /&gt;
There are two ways to load MCE firmware: &lt;br /&gt;
# [[ Remote Firmware Update | Remote firmware update over the MCE fibre interface]]&lt;br /&gt;
# Using Altera-supplied Hardware/Software and MCE Front-panel Connector&lt;br /&gt;
#* [[ USB Blaster | step-by-step instructions ]]&lt;br /&gt;
&lt;br /&gt;
Things to bear in mind:&lt;br /&gt;
* In v5+ firmware, if you update firmware on any readout card, the card doesn't reply to any command unless the Clock Card is also reprogrammed.&lt;br /&gt;
* Always cleanly reset the MCE after a power-up or a reconfiguration!  If not, MCE communication with the PC or Sync Box may not work.  On MAS prompt, type: '''''mce_reset_clean'''''&lt;br /&gt;
&lt;br /&gt;
== Implementation Details ==&lt;br /&gt;
&lt;br /&gt;
* Source on GitHub: https://github.com/multi-channel-electronics/mce_firmware&lt;br /&gt;
* [[ MCE Timing Diagram ]]&lt;br /&gt;
* [[MCE fibre protocol]] - communication between the MCE and the controlling PC over the fibre-optic link&lt;br /&gt;
* [[MCE backplane protocol]] - communication between cards within the MCE&lt;br /&gt;
* Monitoring MCE Status [[http://www.phas.ubc.ca/%7Emce/mcedocs/system/monitoring_mce_status.doc DOC]] (Nov. 9, 2006)&lt;br /&gt;
* [[MCE commands]]&lt;br /&gt;
&lt;br /&gt;
== Firmware Development Tools ==&lt;br /&gt;
* [[ Quartus II Installation ]]&lt;br /&gt;
* [[ ModelSim SE Installation ]]&lt;br /&gt;
** [[ Setting up Altera libraries in ModelSim SE ]]&lt;br /&gt;
* [[ JAM Player ]]&lt;br /&gt;
* [[ Convert sof to jic for EPCS64 Serial Configuration Device ]]&lt;br /&gt;
&lt;br /&gt;
== Development notes ==&lt;br /&gt;
* [[intmce:MCE bugs]]&lt;br /&gt;
* [[intmce:Firmware Features Under Development]]&lt;br /&gt;
* [[intmce:Closed firmware features]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Firmware]]&lt;/div&gt;</summary>
		<author><name>Mandana</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=MCE_firmware&amp;diff=7870</id>
		<title>MCE firmware</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=MCE_firmware&amp;diff=7870"/>
		<updated>2025-04-03T23:19:38Z</updated>

		<summary type="html">&lt;p&gt;Mandana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Related|Firmware}}&lt;br /&gt;
== Releases ==&lt;br /&gt;
All firmware can be downloaded from [http://e-mode.phas.ubc.ca/mce/firmware/ http://e-mode.phas.ubc.ca/mce/firmware/]. &lt;br /&gt;
Source code available here https://github.com/multi-channel-electronics/mce_firmware&lt;br /&gt;
Release notes for each firmware release can be found below:&lt;br /&gt;
* [[ Clock Card firmware]]&lt;br /&gt;
* [[ Readout Card firmware]]&lt;br /&gt;
* [[ Bias Card firmware]]&lt;br /&gt;
* [[ Address Card firmware]]&lt;br /&gt;
* [[ PCI card firmware ]]&lt;br /&gt;
* [[ Sync Box Firmware ]]&lt;br /&gt;
&lt;br /&gt;
See also:&lt;br /&gt;
* [[Recommended firmware versions]]&lt;br /&gt;
&lt;br /&gt;
== Loading firmware onto cards ==&lt;br /&gt;
&lt;br /&gt;
There are two ways to load MCE firmware: &lt;br /&gt;
# [[ Remote Firmware Update | Remote firmware update over the MCE fibre interface]]&lt;br /&gt;
# Using Altera-supplied Hardware/Software and MCE Front-panel Connector&lt;br /&gt;
#* [[ USB Blaster | step-by-step instructions ]]&lt;br /&gt;
&lt;br /&gt;
Things to bear in mind:&lt;br /&gt;
* In v5+ firmware, if you update firmware on any readout card, the card doesn't reply to any command unless the Clock Card is also reprogrammed.&lt;br /&gt;
* Always cleanly reset the MCE after a power-up or a reconfiguration!  If not, MCE communication with the PC or Sync Box may not work.  On MAS prompt, type: '''''mce_reset_clean'''''&lt;br /&gt;
&lt;br /&gt;
== Implementation Details ==&lt;br /&gt;
&lt;br /&gt;
* Source on GitHub: https://github.com/multi-channel-electronics/mce_firmware&lt;br /&gt;
* [[ MCE Timing Diagram ]]&lt;br /&gt;
* [[MCE fibre protocol]] - communication between the MCE and the controlling PC over the fibre-optic link&lt;br /&gt;
* [[MCE backplane protocol]] - communication between cards within the MCE&lt;br /&gt;
* Monitoring MCE Status [[http://www.phas.ubc.ca/%7Emce/mcedocs/system/monitoring_mce_status.doc DOC]] (Nov. 9, 2006)&lt;br /&gt;
* [[MCE commands]]&lt;br /&gt;
&lt;br /&gt;
== Firmware Development Tools ==&lt;br /&gt;
* [[ Quartus II Installation ]]&lt;br /&gt;
* [[ ModelSim SE Installation ]]&lt;br /&gt;
** [[ Setting up Altera libraries in ModelSim SE ]]&lt;br /&gt;
* [[ JAM Player ]]&lt;br /&gt;
* [[ Convert sof to jic for EPCS64 Serial Configuration Device ]]&lt;br /&gt;
&lt;br /&gt;
== Development notes ==&lt;br /&gt;
* [[intmce:MCE bugs]]&lt;br /&gt;
* [[intmce:Firmware Features Under Development]]&lt;br /&gt;
* [[intmce:Closed firmware features]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Firmware]]&lt;/div&gt;</summary>
		<author><name>Mandana</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=DoubleMCE&amp;diff=7165</id>
		<title>DoubleMCE</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=DoubleMCE&amp;diff=7165"/>
		<updated>2025-02-13T01:13:04Z</updated>

		<summary type="html">&lt;p&gt;Mandana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A Double MCE is a 2 x 72-HP subrack containing 10 MDM connectors and eight read-out cards. &lt;br /&gt;
Functionally, one Double MCE behaves exactly like two single 72-HP MCEs. In this version, the MDM connectors have been rotated of 90 degrees with respect to the previous orientation. (filter box is redesigned).&lt;br /&gt;
Double MCEs have been designed to meet the mechanical constraints of the Bicep Array 150GHz Receiver.&lt;br /&gt;
&lt;br /&gt;
* [https://drive.google.com/drive/folders/1OhS9kcsLWslnPfeDhU6YB-EDDkGrySsb?usp=sharing First prototype - pictures and videos ]&lt;br /&gt;
&lt;br /&gt;
Double MCEs are equipped with [[Instrument backplane]] rev. C0 and [[Bus Backplane]] Rev E.&lt;/div&gt;</summary>
		<author><name>Mandana</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Tips_on_running_the_IB_Tester&amp;diff=7163</id>
		<title>Tips on running the IB Tester</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Tips_on_running_the_IB_Tester&amp;diff=7163"/>
		<updated>2024-08-28T23:20:05Z</updated>

		<summary type="html">&lt;p&gt;Mandana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[IB Tester]]&lt;br /&gt;
# When you run the program, make sure the GPIB address is correctly set to 2 on multimeter.&lt;br /&gt;
# Make sure the right driver is installed for the GPIB controller that you are using to connect to the PC.&lt;br /&gt;
# Make sure the card is IB-tester card is fully inserted in the rack. (or you will get GPIB not responding)&lt;br /&gt;
# When the test is running successfully, you see the display on multimeter is flashing with numbers&lt;br /&gt;
# Make sure output of IB-tester card ((HI and LO on front panel) are connected to ohm-meter input of multimeter HP34401A. (If you have connected to wrong input, then you hear click click noise)&lt;br /&gt;
&lt;br /&gt;
[[Category:Testing]]&lt;/div&gt;</summary>
		<author><name>Mandana</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Readout_Card_firmware&amp;diff=7162</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=7162"/>
		<updated>2022-10-11T19:32:12Z</updated>

		<summary type="html">&lt;p&gt;Mandana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Related|Readout Card Firmware}}&lt;br /&gt;
An overview of the firmware implemented in Readout card is described here: [[http://www.phas.ubc.ca/%7Emce/mcedocs/hardware/tech_description/SC2_ELE_S582_501_readout_card_description.pdf PDF]]&lt;br /&gt;
* Synthesis Reminders (for firmware developers)&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 6.0.3 =&lt;br /&gt;
* '''Filename:'''&lt;br /&gt;
** [http://e-mode.phas.ubc.ca/mce/firmware/rc_stratix3_v06000003_20160601.sof rc_stratix3_v06000003_20160601.sof] &lt;br /&gt;
* ''' Features:'''&lt;br /&gt;
** 6.0.2 was built based on a version that had an unsuccessful attempt to fix the filter dynamic-range issue.  This version reverts back to 5.2.1 for fsfb_calc implementation.&lt;br /&gt;
* '''bugs'''&lt;br /&gt;
** per-pixel servo reset doesn't also reset the filter&lt;br /&gt;
** resetting any pixel with per-pixel reset also resets all the pixels in the last row (as specified by {{param|sys|num_rows}}, ignoring {{param|ac|row_order}})&lt;br /&gt;
&lt;br /&gt;
= Revision 6.0.2 (TEST!) =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** [http://e-mode.phas.ubc.ca/mce/firmware/rc_stratix3_v06000002_20160509.sof 	rc_stratix3_v06000002_20160509.sof]&lt;br /&gt;
** [http://e-mode.phas.ubc.ca/mce/firmware/rc_stratix3_v06000002_20160509.jic 	rc_stratix3_v06000002_20160509.jic]&lt;br /&gt;
&lt;br /&gt;
* '''Features'''&lt;br /&gt;
**built based on 5.2.2&lt;br /&gt;
**added support of upper 32 word needs an additional wait cycle for ack_read&lt;br /&gt;
** delay wishbone readback by one clock cycle for reading back flx_quanta and adc_offset, &lt;br /&gt;
** there seem to be a filter gain of factor of 2 added&lt;br /&gt;
&lt;br /&gt;
* '''bugs'''&lt;br /&gt;
** per-pixel servo reset doesn't also reset the filter&lt;br /&gt;
** resetting any pixel with per-pixel reset also resets all the pixels in the last row (as specified by {{param|sys|num_rows}}, ignoring {{param|ac|row_order}})&lt;br /&gt;
** it seems to have a different filter gain&lt;br /&gt;
&lt;br /&gt;
= Revision 5.2.2 (TEST!) =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** [http://e-mode.phas.ubc.ca/mce/firmware/rc_stratix3_v050200002_17oct2014.sof rc_stratix3_v050200002_17oct2014.sof]&lt;br /&gt;
&lt;br /&gt;
* '''bugfix or enhancement?'''  &lt;br /&gt;
** fixes a dynamic-range issue with the filter by applying a 20-bit window to the output of stage 1 filter (with lsb being configurable) before passing it on the next stage.&lt;br /&gt;
* '''bugs'''&lt;br /&gt;
** per-pixel servo reset doesn't also reset the filter&lt;br /&gt;
** resetting any pixel with per-pixel reset also resets all the pixels in the last row (as specified by {{param|sys|num_rows}}, ignoring {{param|ac|row_order}})&lt;br /&gt;
&lt;br /&gt;
= Revision 5.2.1 (recommended!) =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratixIII_v05020001_05jun2014.sof &lt;br /&gt;
&lt;br /&gt;
* '''bugfix'''  &lt;br /&gt;
** {{param|rc|servo_rst_col0|servo_rst_col''#''}} now works for all columns! (bug reported in 5.2.0)&lt;br /&gt;
* '''bugs'''&lt;br /&gt;
** per-pixel servo reset doesn't also reset the filter&lt;br /&gt;
** resetting any pixel with per-pixel reset also resets all the pixels in the last row (as specified by {{param|sys|num_rows}}, ignoring {{param|ac|row_order}})&lt;br /&gt;
&lt;br /&gt;
= Revision 5.2.0 =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratixIII_v05020000_28may2013.sof &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** added the ability to reset the flux-loop servo on per-detector basis by adding {{param|rc|servo_rst_arm}} and {{param|rc|servo_rst_col0|servo_rst_col''#''}} parameters. This will reset the integral_term, the integral_clamp, anf flux-jump counter.&lt;br /&gt;
&lt;br /&gt;
* '''bug:'''  &lt;br /&gt;
** {{param|rc|servo_rst_col0|servo_rst_col''#''}} works for col 0 and 1, but not for col2 to 7! This is fixed in 5.2.1&lt;br /&gt;
** per-pixel servo reset doesn't also reset the filter&lt;br /&gt;
** resetting any pixel with per-pixel reset also resets all the pixels in the last row (as specified by {{param|sys|num_rows}}, ignoring {{param|ac|row_order}})&lt;br /&gt;
&lt;br /&gt;
= Revision 5.1.d =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratixIII_v0501000d_30oct2012.sof &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** flux-jump routine is revamped to minimize the additional delay for applying sq1fb when flux-jump is enabled. In this version sq1fb DAC is refreshed at clock cycle 10 of each row visit when flux-jump is enabled and at clock cycle 7 when flux-jump is disabled.&lt;br /&gt;
** extended dynamic range of the filter by increasing the width of filter-delay terms from 29 to 32 bits &lt;br /&gt;
** lower power consumption (maybe?)&lt;br /&gt;
&lt;br /&gt;
* '''Details'''&lt;br /&gt;
** DDR2 module not instantiated (chips not installed) and on-chip termination resistors not in effect which can potentially save power.&lt;br /&gt;
&lt;br /&gt;
=== Revision 5.1.c (Test) ===&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratixIII_v0501000c_31aug2012.sof &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** extended dynamic range of the filter by increasing the width of filter-delay terms from 29 to 32 bits &lt;br /&gt;
** based on 5.1.a&lt;br /&gt;
** lower power consumption (maybe?)&lt;br /&gt;
** {{param|rc|data_mode}}=4 reports fb(29 downto 12) instead of fb(31) &amp;amp; fb(28 downto 12)! no sticky bit.&lt;br /&gt;
&lt;br /&gt;
* '''Details'''&lt;br /&gt;
** DDR2 module not instantiated (chips not installed) and on-chip termination resistors not in effect which can potentially save power.&lt;br /&gt;
&lt;br /&gt;
= Revision 5.1.b (Stable '''Rev.B''' Cards) =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0501000b_23mar2012.sof (Rev. B cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.8 (used Q11SP1)&lt;br /&gt;
** added intergral_term fix from 5.1.9 &lt;br /&gt;
&lt;br /&gt;
* '''Details'''&lt;br /&gt;
** qterm (or filtered-p) implementation is not included, because the design doesn't fit on the FPGA on Rev. B cards anymore.&lt;br /&gt;
&lt;br /&gt;
= Revision 5.1.a (Stable) =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v0501000a_24jan2012.sof (Rev. E cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.9 (used Q10SP1)&lt;br /&gt;
** {{param|rc|pterm_decay_bits}} (par_id = 0x64) is now '''programmable''' and is initially set to 0 to have pure p-term and be compatible with older firmware. (p-term implemented as q(n) = er(n) + b*q(n-1) where b=(1-1/2^k)with k={{param|rc|pterm_decay_bits}})&lt;br /&gt;
** see bugfix in 5.1.9&lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.9 (test) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010009_23jan2012.sof (for Rev. E cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.8 (used Q10SP1)&lt;br /&gt;
** first implementation of decayed-p-term in sq1fb calculation. The p-term is now implemented as q(n) = er(n) + b*q(n-1) where b=(1-1/2^k) and '''k=3 hardcoded'''. &lt;br /&gt;
** added {{param|rc|pterm_decay_bits}} (par_id=0x64) as a register set to 3, but not tied to k in pterm calculation yet.&lt;br /&gt;
&lt;br /&gt;
* ''' Bugfix:'''&lt;br /&gt;
** This version fixes the bug introduced starting 5.0.e, the integral-term used to calculate sq1fb was calculated based on coadded value of (sample_num-1) samples and then the integral term stored for next round included sample_num-2. This is almost like having a p-term..&lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.8 (s1fb_dly=7) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010008_11jan2012.sof (for Rev. E cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.7 (used Q10SP1)&lt;br /&gt;
** reverts back to applying S1fb after 7 clock cycles when flux-jump is off, and after 18 clock cycles when flux-jump is on.&lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.7 (rectangle-mode bugfix) ==&lt;br /&gt;
[[File:RC516 vs RC517 hash.jpeg|thumb|Reduction in high-frequency noise due to rectangle-mode bugfix]]&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010007_17nov2011.sof (for Rev. E cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.6 (used Q10SP1)&lt;br /&gt;
&lt;br /&gt;
* ''' Bugfix:'''&lt;br /&gt;
** In all RC firmware prior to 5.1.7, the read pointer in the rectangle-mode data was being refreshed at ARZ even if it was in the middle of a long readout (large frame readout). This resulted in seeing '''duplicate data in high-data-rate rectangle-mode readout''' only when the following condition was _NOT_ true: (230 + 2*{{param|cc|num_rows_reported|cc&amp;amp;nbsp;num_rows_reported}}*{{param|cc|num_cols_reported|cc&amp;amp;nbsp;num_cols_reported}}) &amp;lt; ({{param|sys|num_rows}}*{{param|sys|row_len}}). This is fixed in 5.1.7.&lt;br /&gt;
&lt;br /&gt;
= Revision 5.1.6 (Stable) =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010006_27oct2011.sof (for Rev. E cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.5 (used Q10SP1)&lt;br /&gt;
** coadd window and feedback-calculation blocks are adjusted for ADC latency of readout card Rev. E&lt;br /&gt;
&lt;br /&gt;
* ''' Bugfix:'''&lt;br /&gt;
** {{param|rc|sample_dly}} + {{param|rc|sample_num}} = {{param|sys|row_len}} should work now.&lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.5 (test)==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010005_15sep2011.sof (for Rev. E cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.2&lt;br /&gt;
** reverts back to applying SQ1FB after 18 clock cycles whether flux-jumping is on or off&lt;br /&gt;
&lt;br /&gt;
* ''' Bugfix:'''&lt;br /&gt;
** All stratixiii firmware revisions prior to this version adjusted the co-add window for an ADC latency of 4 instead of 11. (Rev. E RC has serial ADC installed with 11 clock cycle latency.) The coadd window is now adjusted properly.&lt;br /&gt;
&lt;br /&gt;
*'''Bug:'''&lt;br /&gt;
** The last row samples can not be used in {{param|rc|servo_mode}}=3. For proper operation: {{param|rc|sample_dly}} + {{param|rc|sample_num}} needs to be &amp;lt; {{param|sys|row_len}} - 7 (I think). Although, the coadd window was adjusted in this version, but the calculation block latches data before coadd is done (coadd_done_o signal).&lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.4 (Scuba2) ==&lt;br /&gt;
&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05010004_01jun2011.sof (for Rev. B cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.3&lt;br /&gt;
** sq1_fb applied after 7 clock cycles when flux-jump off, and after 18 when flux-jump is on.&lt;br /&gt;
* ''' bugfix:'''&lt;br /&gt;
** fixed bug with fsfb_corr when reverting back to applying sq1fb after 7 clk cycles when fj is off&lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.3 (Scuba2) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05010003_01jun2011.sof (for Rev. B cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.2&lt;br /&gt;
** reverts back to applying SQ1FB after 7 clock cyclces when flux-jumping is off, and after 18 clock cycles when flux-jumping is on.&lt;br /&gt;
** k1 of filter params is now limited to k1&amp;lt;8. After generating coeffs for many filters, it is certain that this range is more than what we ever need.&lt;br /&gt;
&lt;br /&gt;
= Revision 5.1.2 (Stable)=&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 (test only) ==&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 (test only) ==&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 {{param|rc|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;
** {{param|rc|fltr_type}} is set to 255 to indicate configurable filter parameters.&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 (Stable) =&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 (test only) ==&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 {{param|rc|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 (test only) ==&lt;br /&gt;
[[Image:Clamp_unstable.png|thumb|right|Scope snapshot]]&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;
** '''{{param|rc|integral_clamp}} 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 {{param|rc|integral_clamp}}=80000000, {{param|rc|flx_quanta0|flux_quanta}}=8000, {{param|rc|gaini0|gaini}}=1, flux-jump enabled, we see 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 (test only) ==&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):&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 (test 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 pixels with non-zero {{param|rc|flx_quanta0|flx_quanta}}, and being disabled on the fly on dead pixels with {{param|rc|flx_quanta0|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;
** {{param|rc|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 {{param|rc|en_fb_jump}}=1.  Before the change, this meant that constant values could be applied with or without the 11-cycle delay if {{param|rc|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):&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):&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 (test only) ==&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;
** {{param|rc|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;
** {{param|rc|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;
** {{param|rc|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 (Stable) =&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;
* '''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;
= 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;
* [[Pre-v5 firmware#Readout Card|Pre-v5 firmware]]&lt;br /&gt;
[[Category:Readout Card Firmware| ]]&lt;/div&gt;</summary>
		<author><name>Mandana</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Readout_Card&amp;diff=7161</id>
		<title>Readout Card</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Readout_Card&amp;diff=7161"/>
		<updated>2022-10-11T19:31:50Z</updated>

		<summary type="html">&lt;p&gt;Mandana: /* Background */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Related|Readout Card}}&lt;br /&gt;
The Read-out Card (RC) of the the Multi-Channel Electronics (MCE) provides the readout circuitry from an array of detectors based on transition-edge sensor (TES) bolometers and SQUID amplifiers. An RC has 8 readout channels that each controls a column of the array of detectors. Each readout circuitry consists of a preamp stage followed by a 14-bit 50MS/s video analog-to-digital converter (ADC) to sample an input signal, a 14-bit DAC to output the calculated SQ1 feedback, two 16-bit serial DACs to output the series-array (SA) bias and cable offset, respectively. The on-board FPGA firmware provides digital filtering of the signal. The input signal, the calculated feedback, the low-pass filtered feedback signal, or a combination of these data, are transmitted over the MCE backplane (2 point-to-point LVDS lines) to the clock-card (CC) where they are rearranged and transmitted to the PC that controls the MCE.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
In a SCUBA2-like array of detectors, the radiation sensitive elements are TES bolometers. When voltage-biased at their superconducting transition temperature, an incoming radiation produces a change in their resistance and consequently a change of current. Each of them is inductively coupled to a first-stage of SQUID amplifiers used as low-noise amplifiers. The SQUIDs are non-linear devices that their response to the increasing input signal is approximately a sine wave. Therefore, a feedback signal is calculated based on the measured output, i.e., the change in magnetic flux in the SQUID ammeters is countered by a first-stage feedback bias arriving from the RCs of the MCE. The feedback loop is provided by a digital proportional-integral-differential (PID) flux-locked loop that calculates the correct flux to keep the whole amplification chain in a linear regime. &lt;br /&gt;
&lt;br /&gt;
Each RC PID loop will be coupled to a column of up-to-41 first-stage SQUIDs (SQ1), but will only digitize the output of one SQ1 at a time. This will be achieved by using the [[Address Card (AC)]] to null the contributions from all SQUIDs in the column, except for the one that is to be sampled. The sampled SQUID will be actively biased by the AC, and multiple readings of its analog current, amplified by two further stages of SQUID amplification, will be digitized and co-added before the AC activates the next SQUID in each column. To read out the next SQUID, the AC will nullify the output of the present SQUID, and actively bias the next one.&lt;br /&gt;
&lt;br /&gt;
Each PID loop will be switched from pixel-to-pixel (or more precisely row-to-row) in a column, at a line rate of approximately 800kHz set by the L/R of the cryogenic cables. During each row dwell-time, the PID loop will:&lt;br /&gt;
# digitize the SQUID output (SSA_SIG),&lt;br /&gt;
# calculate the necessary PID loop feedback value,&lt;br /&gt;
# filter the result,&lt;br /&gt;
# apply the necessary (non-filtered) first-stage feedback&lt;br /&gt;
&lt;br /&gt;
For implementation details, see: [[http://www.phas.ubc.ca/%7Emce/mcedocs/hardware/tech_description/SC2_ELE_S582_501_readout_card_description.pdf Technical Description in PDF]]&lt;br /&gt;
&lt;br /&gt;
== Other Documentation ==&lt;br /&gt;
* Technical description [[http://www.phas.ubc.ca/%7Emce/mcedocs/hardware/tech_description/SC2_ELE_S582_501_readout_card_description.pdf PDF]] &lt;br /&gt;
* [[Readout Card firmware]]&lt;br /&gt;
* [[MCE commands#Readout card commands|Readout Card commands]]&lt;br /&gt;
* [[ Readout Card Preamp Chain ]]&lt;br /&gt;
* [[ ADC and DAC linearity in Readout Card]]&lt;br /&gt;
* [[Minimum Vcore for RC RevE|Minimum V&amp;lt;sub&amp;gt;core&amp;lt;/sub&amp;gt; for RC RevE]]&lt;br /&gt;
* [[Testing Readout Cards]]&lt;br /&gt;
&lt;br /&gt;
== Change History ==&lt;br /&gt;
* [[ Readout Card RevB9 to RevB10 changes]]&lt;br /&gt;
* [[Readout Card RevB to RevE changes]]&lt;br /&gt;
== Schematics ==&lt;br /&gt;
&lt;br /&gt;
* Block diagram [[http://www.phas.ubc.ca/%7Emce/mcedocs/hardware/board_block_diagram/rc_bd.pdf PDF]] (obsolete)&lt;br /&gt;
* Rev.B9 schematic [[http://www.phas.ubc.ca/%7Emce/mcedocs/hardware/schematics/Readout%20Card%20RevB/RO_S582_101BIss9_Schematic.pdf PDF]]&lt;br /&gt;
* Rev.E0 schematic [[http://www.phas.ubc.ca/%7Emce/mcedocs/hardware/schematics/Readout%20Card%20RevE/RC_C582_101E0_Schematic.pdf PDF]] (Low-power RC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Readout Card| ]]&lt;/div&gt;</summary>
		<author><name>Mandana</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Readout_Card&amp;diff=7160</id>
		<title>Readout Card</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Readout_Card&amp;diff=7160"/>
		<updated>2022-10-11T19:30:46Z</updated>

		<summary type="html">&lt;p&gt;Mandana: /* Other Documentation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Related|Readout Card}}&lt;br /&gt;
The Read-out Card (RC) of the the Multi-Channel Electronics (MCE) provides the readout circuitry from an array of detectors based on transition-edge sensor (TES) bolometers and SQUID amplifiers. An RC has 8 readout channels that each controls a column of the array of detectors. Each readout circuitry consists of a preamp stage followed by a 14-bit 50MS/s video analog-to-digital converter (ADC) to sample an input signal, a 14-bit DAC to output the calculated SQ1 feedback, two 16-bit serial DACs to output the series-array (SA) bias and cable offset, respectively. The on-board FPGA firmware provides digital filtering of the signal. The input signal, the calculated feedback, the low-pass filtered feedback signal, or a combination of these data, are transmitted over the MCE backplane (2 point-to-point LVDS lines) to the clock-card (CC) where they are rearranged and transmitted to the PC that controls the MCE.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
In a SCUBA2-like array of detectors, the radiation sensitive elements are TES bolometers. When voltage-biased at their superconducting transition temperature, an incoming radiation produces a change in their resistance and consequently a change of current. Each of them is inductively coupled to a first-stage of SQUID amplifiers used as low-noise amplifiers. The SQUIDs are non-linear devices that their response to the increasing input signal is approximately a sine wave. Therefore, a feedback signal is calculated based on the measured output, i.e., the change in magnetic flux in the SQUID ammeters is countered by a first-stage feedback bias arriving from the RCs of the MCE. The feedback loop is provided by a digital proportional-integral-differential (PID) flux-locked loop that calculates the correct flux to keep the whole amplification chain in a linear regime. &lt;br /&gt;
&lt;br /&gt;
Each RC PID loop will be coupled to a column of up-to-41 first-stage SQUIDs (SQ1), but will only digitize the output of one SQ1 at a time. This will be achieved by using the [[Address Card (AC)]] to null the contributions from all SQUIDs in the column, except for the one that is to be sampled. The sampled SQUID will be actively biased by the AC, and multiple readings of its analog current, amplified by two further stages of SQUID amplification, will be digitized and co-added before the AC activates the next SQUID in each column. To read out the next SQUID, the AC will nullify the output of the present SQUID, and actively bias the next one.&lt;br /&gt;
&lt;br /&gt;
Each PID loop will be switched from pixel-to-pixel (or more precisely row-to-row) in a column, at a line rate of approximately 800kHz set by the L/R of the cryogenic cables. During each row dwell-time, the PID loop will:&lt;br /&gt;
# digitize the SQUID output (SSA_SIG),&lt;br /&gt;
# calculate the necessary PID loop feedback value,&lt;br /&gt;
# filter the result,&lt;br /&gt;
# apply the necessary (non-filtered) first-stage feedback&lt;br /&gt;
&lt;br /&gt;
== Other Documentation ==&lt;br /&gt;
* Technical description [[http://www.phas.ubc.ca/%7Emce/mcedocs/hardware/tech_description/SC2_ELE_S582_501_readout_card_description.pdf PDF]] &lt;br /&gt;
* [[Readout Card firmware]]&lt;br /&gt;
* [[MCE commands#Readout card commands|Readout Card commands]]&lt;br /&gt;
* [[ Readout Card Preamp Chain ]]&lt;br /&gt;
* [[ ADC and DAC linearity in Readout Card]]&lt;br /&gt;
* [[Minimum Vcore for RC RevE|Minimum V&amp;lt;sub&amp;gt;core&amp;lt;/sub&amp;gt; for RC RevE]]&lt;br /&gt;
* [[Testing Readout Cards]]&lt;br /&gt;
&lt;br /&gt;
== Change History ==&lt;br /&gt;
* [[ Readout Card RevB9 to RevB10 changes]]&lt;br /&gt;
* [[Readout Card RevB to RevE changes]]&lt;br /&gt;
== Schematics ==&lt;br /&gt;
&lt;br /&gt;
* Block diagram [[http://www.phas.ubc.ca/%7Emce/mcedocs/hardware/board_block_diagram/rc_bd.pdf PDF]] (obsolete)&lt;br /&gt;
* Rev.B9 schematic [[http://www.phas.ubc.ca/%7Emce/mcedocs/hardware/schematics/Readout%20Card%20RevB/RO_S582_101BIss9_Schematic.pdf PDF]]&lt;br /&gt;
* Rev.E0 schematic [[http://www.phas.ubc.ca/%7Emce/mcedocs/hardware/schematics/Readout%20Card%20RevE/RC_C582_101E0_Schematic.pdf PDF]] (Low-power RC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Readout Card| ]]&lt;/div&gt;</summary>
		<author><name>Mandana</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Instrument_Backplane&amp;diff=7159</id>
		<title>Instrument Backplane</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Instrument_Backplane&amp;diff=7159"/>
		<updated>2022-08-26T20:22:48Z</updated>

		<summary type="html">&lt;p&gt;Mandana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Related|Backplanes}}&lt;br /&gt;
== Functional Description ==&lt;br /&gt;
The Instrument backplane (IB) board distributes the cryostat signals on the 3 or 5 MDM connectors to the circuit boards in&lt;br /&gt;
the chassis. There are series load resistors for sq1_bias, ssa_fb, sq2_bias, sq2_fb, sq1_fb on the IB card.&lt;br /&gt;
&lt;br /&gt;
There are two different types of IB cards to support 3-MDM or 5-MDM MCE crates.&lt;br /&gt;
&lt;br /&gt;
The 5-MDM circuit board contains nine 96 pin 2mm connectors.  Only eight connectors are used as the Clock Card connector has no analog signals.  The backplane has 5 gold dot areas for mating to Delphi gold dot flex circuits (MCEv1) or 5 Hirose connectors (MCEv2). The 5 flex sections or Hirose connectors go to 5 pcb-mounted 100 pin MDM connectors.  &lt;br /&gt;
&lt;br /&gt;
Some spare signals are connected between the MDM connectors and the Instrument Backplane.  These terminate at surface mount pads on the backplane.&lt;br /&gt;
&lt;br /&gt;
* [[ Instrument Backplane MCEv1(S587-101) to MCEv2 (C587-201) changes ]]&lt;br /&gt;
* [[ Instrument Backplane 3-MDM Rev B to Rev C changes ]]&lt;br /&gt;
* [[ Instrument Backplane 3-MDM Rev C to Rev D changes]]&lt;br /&gt;
* [[Instrument Backplane Tester]] (IB Tester; Continuity Checker)&lt;br /&gt;
&lt;br /&gt;
== Schematics ==&lt;br /&gt;
* MCEv2 3-MDM D0 (C587-101) [[http://www.phas.ubc.ca/%7Emce/mcedocs/hardware/schematics/mceV2_InstrumentBackplane/ELE-C587-101_RevD0_3MDM_Inst_Backplane_Schematics.PDF PDF]] (differential Bias Lines routed, accomodates one-BC subrack for mux11 configuration)&lt;br /&gt;
&lt;br /&gt;
* MCEv2 5-MDM B0 (C587-201) [[http://www.phas.ubc.ca/%7Emce/mcedocs/hardware/schematics/mceV2_InstrumentBackplane/ELE_C587-201_RevB0_Inst_Backplane_Schematics.pdf PDF]] (one detector bias per column)&lt;br /&gt;
&lt;br /&gt;
== end-of-life schematics==&lt;br /&gt;
&lt;br /&gt;
=== 3MDM ===&lt;br /&gt;
* MCEv2 3-MDM B  (C587-101) [[http://www.phas.ubc.ca/%7Emce/mcedocs/hardware/schematics/mceV2_InstrumentBackplane/ELE-C587-101_RevB_Inst_Backplane_Schematic.pdf PDF]] (BC3 DAC00 to DAC15 are routed to TES 00 to 15, not configurable)&lt;br /&gt;
* MCEv2 3-MDM C1 (C587-101) [[http://www.phas.ubc.ca/%7Emce/mcedocs/hardware/schematics/mceV2_InstrumentBackplane/ELE-C587-101_RevC1_3MDM_Inst_Backplane_Schematics.pdf PDF]] (Configurable jumpers route BC3 DAC00 to DAC15 to TES 00 to 15)&lt;br /&gt;
* MCEv2 3-MDM C2 (C587-101) [[http://www.phas.ubc.ca/%7Emce/mcedocs/hardware/schematics/mceV2_InstrumentBackplane/ELE-C587-101_RevC2_3MDM_Inst_Backplane_Schematics.pdf PDF]] (Configurable jumpers route BC2 DAC16 to DAC31 to TES 00 to 15)&lt;br /&gt;
&lt;br /&gt;
=== 5MDM ===&lt;br /&gt;
* MCEv2 5-MDM C0 (C587-201) [[http://www.phas.ubc.ca/%7Emce/mcedocs/hardware/schematics/mceV2_InstrumentBackplane/ELE_C587-201_RevC0_Inst_Backplane_Schematics.pdf PDF]] (Double MCEs)&lt;br /&gt;
* MCEv2 5-MDM B0 (C587-201) [[http://www.phas.ubc.ca/%7Emce/mcedocs/hardware/schematics/mceV2_InstrumentBackplane/ELE_C587-201_RevB0_Inst_Backplane_Schematics.pdf PDF]] (one detector bias per column)&lt;br /&gt;
* MCEv2 5-MDM A0 (C587-201) [[http://www.phas.ubc.ca/%7Emce/mcedocs/hardware/schematics/mceV2_InstrumentBackplane/ELE_C587-201_RevA0_Inst_Backplane_Schematics.pdf PDF]] (one detector bias per column)&lt;br /&gt;
* MCEv1 5-MDM C3 (S587-101) [[http://www.phas.ubc.ca/%7Emce/mcedocs/hardware/schematics/Instrument%20Backplane%20RevC/S587-101_Inst_Backplane_Schematics.pdf PDF]] (1 detector bias, 1 pixel heater, R&amp;lt;sub&amp;gt;s1fb&amp;lt;/sub&amp;gt;=2.0k)&lt;br /&gt;
* MCEv1 5-MDM C5 (S587-101) [[http://www.phas.ubc.ca/%7Emce/mcedocs/hardware/schematics/Instrument%20Backplane%20RevC/S587-101CI5_Inst_Backplane_Schematics.pdf PDF]] (3 detector bias, R&amp;lt;sub&amp;gt;s1fb&amp;lt;/sub&amp;gt;=6.8k)&lt;br /&gt;
[[Category:Backplanes]]&lt;/div&gt;</summary>
		<author><name>Mandana</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Publications&amp;diff=7158</id>
		<title>Publications</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Publications&amp;diff=7158"/>
		<updated>2022-08-04T22:45:57Z</updated>

		<summary type="html">&lt;p&gt;Mandana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A large body of scientific publications has been made possible through the use of the Multi-Channel Electronics.  This page lists some technical publications related to the MCE:&lt;br /&gt;
* Henderson, Shawn W., ''et al'', (2016)  &amp;quot;[https://arxiv.org/abs/1607.06064 Readout of two-kilopixel transition-edge sensor arrays for Advanced ACTPol]&amp;quot;, ''Proc. SPIE'' '''9914'''. [http://dx.doi.org/10.1117/12.2233895 doi:10.1117/12.2233895], [https://arxiv.org/abs/1607.06064 arXiv 1607.06064]&lt;br /&gt;
* Hasselfield, Matthew (2013). [https://circle.ubc.ca/bitstream/handle/2429/45602/ubc_2014_spring_hasselfield_matthew.pdf?sequence=3 ''Galaxy Cluster Cosmology with the Atacama Cosmology Telescope'']. PhD thesis, The University of British Columbia. (See Chapter 2)&lt;br /&gt;
* Brevik, Justus Albert (2012). [https://thesis.library.caltech.edu/7094/22/brevik_thesis_submitted.pdf ''Searching for Primordial Gravitational Waves at Degree Scales from the South Pole'']. Dissertation (Ph.D.), California Institute of Technology. doi:10.7907/E6Z2-CV94.&lt;br /&gt;
* Battistelli, Elia, ''et al.'' (2008). [http://www.phas.ubc.ca/~mce/mcedocs/auto_tune_results/Battistelli_et_al_ltd12_2007.pdf &amp;quot;Functional description of read-out electronics for time-domain multiplexed bolometers for millimeter and sub-millimeter&amp;quot;]. ''J. Low Temp. Phys.'' '''151''':908–914. [http://dx.doi.org/10.1007/s10909-008-9772-z doi:10.1007/s10909-008-9772-z]&lt;br /&gt;
* Niemack, Michael D. (2008). [http://www.princeton.edu/physics/graduate-program/theses/theses-from-2008/M.Niemackthesis.pdf ''Towards Dark Energy: Design, Development, and Preliminary Data from ACT'']. PhD thesis, Princeton University. (See Chapter 4)&lt;br /&gt;
*  Woodcraft, Adam L., ''et al.'',  (2006). [http://reference.lowtemp.org/woodcraft_spie06.pdf &amp;quot;Characterization of a prototype SCUBA-2 1280 pixel submillimetre superconducting bolometer array.&amp;quot;]. ''Proc. SPIE'', '''6275'''. [http://dx.doi.org/10.1117/12.671310 doi:10.1117/12.671310]&lt;br /&gt;
* Irwin, K. D.; Hilton, G. C. (2005), [http://venus.ifca.unican.es/~xray/XEUS/archivopapers/TESIrwinHilton.pdf &amp;quot;Transition Edge Sensors&amp;quot;], in ''Cryogenic Particle Detection'', C. Enss, ed. ''Topics Appl. Phys.'', '''99''':63–149. [http://dx.doi.org/10.1007/10933596_3 doi:10.1007/10933596_3]&lt;/div&gt;</summary>
		<author><name>Mandana</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=MCE_Power&amp;diff=7128</id>
		<title>MCE Power</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=MCE_Power&amp;diff=7128"/>
		<updated>2021-03-18T01:26:53Z</updated>

		<summary type="html">&lt;p&gt;Mandana: /* Connector &amp;amp; pinout */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Related|Power}}&lt;br /&gt;
== Power Requirements ==&lt;br /&gt;
There are two types of MCE [[subrack]]s:&lt;br /&gt;
*MCE72: contains up-to 10 cards and can read up to 32 columns.  In the past, this also contained a power supply unit (PSU)&lt;br /&gt;
*MCE48: contains up-to 7 cards and can read up to 16 columns.&lt;br /&gt;
&lt;br /&gt;
The power requirements of typical subrack configurations are given below.  To compute power and current requirements for a particular configuration, use: http://e-mode.phas.ubc.ca/mce/cgi-bin/power.cgi .&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: right&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Configuration&lt;br /&gt;
! rowspan=&amp;quot;2&amp;quot; | MCE48&amp;lt;br&amp;gt;RC_RevE&amp;lt;BR&amp;gt;BC_RevF&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&lt;br /&gt;
! rowspan=&amp;quot;2&amp;quot; | MCE72&amp;lt;br&amp;gt;RC_RevE&amp;lt;BR&amp;gt;BC_RevF&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Voltage&lt;br /&gt;
|-&lt;br /&gt;
! V&amp;lt;sub&amp;gt;core&amp;lt;/sub&amp;gt;&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;&lt;br /&gt;
|| 3.0V&lt;br /&gt;
|| 3.2A&lt;br /&gt;
|| 5.4A&lt;br /&gt;
|-&lt;br /&gt;
! V&amp;lt;sub&amp;gt;lvd&amp;lt;/sub&amp;gt;&lt;br /&gt;
|| 4.5V&lt;br /&gt;
|| 2.9A&lt;br /&gt;
|| 3.26A&lt;br /&gt;
|-&lt;br /&gt;
! V&amp;lt;sub&amp;gt;a+&amp;lt;/sub&amp;gt;&lt;br /&gt;
|| 6.2V&lt;br /&gt;
|| 3.5A&lt;br /&gt;
|| 6.4A&lt;br /&gt;
|-&lt;br /&gt;
! V&amp;lt;sub&amp;gt;a&amp;amp;minus;&amp;lt;/sub&amp;gt;&lt;br /&gt;
|| &amp;amp;minus;6.2V&lt;br /&gt;
|| 1.0A&lt;br /&gt;
|| 2.3A&lt;br /&gt;
|-&lt;br /&gt;
! V&amp;lt;sub&amp;gt;ah&amp;lt;/sub&amp;gt;&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;&lt;br /&gt;
|| 10.0V&lt;br /&gt;
|| &amp;amp;mdash;&lt;br /&gt;
|| &amp;amp;mdash;&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Total Power&lt;br /&gt;
| 50.1W&lt;br /&gt;
| 85.0W&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;: Minimum V&amp;lt;sub&amp;gt;core&amp;lt;/sub&amp;gt; supply for older version of cards can be as low as 2.5V, but newer RC and BC require minimum 3V[[Minimum Vcore for RC RevE| see note]].  The numbers in this table assume a V&amp;lt;sub&amp;gt;core&amp;lt;/sub&amp;gt; of 3V.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;: The 10V V&amp;lt;sub&amp;gt;ah&amp;lt;/sub&amp;gt; supply is only used when Readout Card Rev. B (or older) or Bias Card Rev. D (or older) are present in the subrack. V&amp;lt;sub&amp;gt;ah&amp;lt;/sub&amp;gt; was used to generate reference voltages for DACs.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;: When using mux11d squid chips, unused DACs on Address Card can be turned off and 1 Bias Card can be eliminated. This will amount to 10W of power savings.&lt;br /&gt;
&lt;br /&gt;
For card specific power requirements, see [[MCE Card Specific Power Requirements]]&lt;br /&gt;
&lt;br /&gt;
== Connector &amp;amp; pinout ==&lt;br /&gt;
The MCE uses [http://cdmelectronics.com/wp-content/uploads/2014/07/MRA_SERIES.pdf Winchester MRA-34P-G] on the front panel.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;25%&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
| width=&amp;quot;25%&amp;quot; rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background: #CCC&amp;quot; | '''A'''&amp;lt;br&amp;gt;+V&amp;lt;sub&amp;gt;ah&amp;lt;/sub&amp;gt;&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt; +10V&lt;br /&gt;
| width=&amp;quot;25%&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
| width=&amp;quot;25%&amp;quot; rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background: #444; color: white&amp;quot; | '''B'''&amp;lt;br&amp;gt;AGND&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background: #88F&amp;quot; | '''C'''&amp;lt;br&amp;gt;&amp;amp;minus;V&amp;lt;sub&amp;gt;a&amp;lt;/sub&amp;gt; &amp;amp;minus;6.2V&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background: #444; color: white&amp;quot; | '''D'''&amp;lt;br&amp;gt;AGND&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background: #FD4&amp;quot; | '''E'''&amp;lt;br&amp;gt;+V&amp;lt;sub&amp;gt;a&amp;lt;/sub&amp;gt; +6.2V&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background: #222; color: white&amp;quot; | '''F'''&amp;lt;br&amp;gt;AGND&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background: #FD4&amp;quot; | '''H'''&amp;lt;br&amp;gt;+V&amp;lt;sub&amp;gt;a&amp;lt;/sub&amp;gt; +6.2V&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background: #222; color: white&amp;quot; | '''J'''&amp;lt;br&amp;gt;AGND&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background: #FD4&amp;quot; | '''K'''&amp;lt;br&amp;gt;+V&amp;lt;sub&amp;gt;a&amp;lt;/sub&amp;gt; +6.2V&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background: #222; color: white&amp;quot; | '''L'''&amp;lt;br&amp;gt;AGND&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background: #FD4&amp;quot; | '''M'''&amp;lt;br&amp;gt;+V&amp;lt;sub&amp;gt;a&amp;lt;/sub&amp;gt; +6.2V&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background: #666; color: white&amp;quot; | '''N'''&amp;lt;br&amp;gt;DGND&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background: #F44&amp;quot; | '''P'''&amp;lt;br&amp;gt;+V&amp;lt;sub&amp;gt;lvd&amp;lt;/sub&amp;gt; +4.5V&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background: #666; color: white&amp;quot; | '''R'''&amp;lt;br&amp;gt;DGND&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background: #F44&amp;quot; | '''S'''&amp;lt;br&amp;gt;+V&amp;lt;sub&amp;gt;lvd&amp;lt;/sub&amp;gt; +4.5V&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background: #666; color: white&amp;quot; | '''T'''&amp;lt;br&amp;gt;DGND&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background: #F44&amp;quot; | '''U'''&amp;lt;br&amp;gt;+V&amp;lt;sub&amp;gt;lvd&amp;lt;/sub&amp;gt; +4.5V&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background: #444; color: white&amp;quot; | '''V'''&amp;lt;br&amp;gt;DGND&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background: #4C4&amp;quot; | '''W'''&amp;lt;br&amp;gt;+V&amp;lt;sub&amp;gt;core&amp;lt;/sub&amp;gt; +3.0V&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background: #444; color: white&amp;quot; | '''X'''&amp;lt;br&amp;gt;DGND&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background: #4C4&amp;quot; | '''Y'''&amp;lt;br&amp;gt;+V&amp;lt;sub&amp;gt;core&amp;lt;/sub&amp;gt; +3.0V&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background: #444; color: white&amp;quot; | '''Z'''&amp;lt;br&amp;gt;DGND&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background: #4C4&amp;quot; | '''a'''&amp;lt;br&amp;gt;+V&amp;lt;sub&amp;gt;core&amp;lt;/sub&amp;gt; +3.0V&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background: #444; color: white&amp;quot; | '''b'''&amp;lt;br&amp;gt;DGND&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;color: #888&amp;quot; | '''c'''&amp;lt;br&amp;gt;CC_SREQ&amp;lt;sup&amp;gt;&amp;amp;dagger;&amp;lt;/sup&amp;gt;&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;color: #888&amp;quot; | '''d'''&amp;lt;br&amp;gt;PS_MOSI&amp;lt;sup&amp;gt;&amp;amp;dagger;&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | '''f'''&amp;lt;br&amp;gt;Fan GND&amp;lt;sup&amp;gt;&amp;amp;Dagger;&amp;lt;/sup&amp;gt;&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;color: #888&amp;quot; | '''g'''&amp;lt;br&amp;gt;BRST&amp;lt;sup&amp;gt;&amp;amp;dagger;&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;color: #888&amp;quot; | '''h'''&amp;lt;br&amp;gt;CC_MISO&amp;lt;sup&amp;gt;&amp;amp;dagger;&amp;lt;/sup&amp;gt;&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;color: #888&amp;quot; | '''i'''&amp;lt;br&amp;gt;PS_SCLK&amp;lt;sup&amp;gt;&amp;amp;dagger;&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | '''j'''&amp;lt;br&amp;gt;Fan +12V&amp;lt;sup&amp;gt;&amp;amp;Dagger;&amp;lt;/sup&amp;gt;&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;color: #888&amp;quot; | '''k'''&amp;lt;br&amp;gt;PS_CS&amp;lt;sup&amp;gt;&amp;amp;dagger;&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;color: #888&amp;quot; | '''m'''&amp;lt;br&amp;gt;SIG_RET&amp;lt;sup&amp;gt;&amp;amp;dagger;&amp;lt;/sup&amp;gt;&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;color: #888&amp;quot; | '''n'''&amp;lt;br&amp;gt;SIG_RET&amp;lt;sup&amp;gt;&amp;amp;dagger;&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;nbsp;&lt;br /&gt;
| &amp;amp;nbsp;&lt;br /&gt;
|}&lt;br /&gt;
'''*''': Obsolete: V&amp;lt;sub&amp;gt;ah&amp;lt;/sub&amp;gt; is used only by revB [[Readout Card]]s and revD [[Bias Card]]s (or earlier)&amp;lt;br&amp;gt;&lt;br /&gt;
'''&amp;amp;dagger;''': Obsolete: was used to communicate with the [[PSUC]].&amp;lt;br&amp;gt;&lt;br /&gt;
'''&amp;amp;Dagger;''': Optional power lines for subrack top plate fans.&lt;br /&gt;
&lt;br /&gt;
Full details can be found under Winchester connector, here: [http://www.phas.ubc.ca/~mce/mcedocs/hardware/schematics/PLA/ELE-C585-301C_MCE48_Front_Panel_Power_Connection.pdf 48HP Front-Panel Power Connection] &lt;br /&gt;
&lt;br /&gt;
Note that the older 5-MDM SCUBA-2 style MCE had 2 Circular Amphenol connectors on the front panel of the [[linear feed card]]. Pinout is here: [http://www.phas.ubc.ca/~mce/mcedocs/hardware/schematics/PLA/Figure%206%20Rear%20View%20of%20pinout_AMPHENOL%20size%2022_RevC.xls Amphenol pinout].  The linear-feed card connects power from these circular connectors to the Winchester power connector on the back panel.&lt;br /&gt;
&lt;br /&gt;
schematics for Winchester-Winchester cable to connect MCE to a Vicor supply is listed here: [https://phas.ubc.ca/~mce/mcedocs/hardware/schematics/PowerSupplyVicor/ELE-C58X-303A_MCE_Vicor_Winchester_Cable_Revised_July13_2018.pdf]&lt;br /&gt;
&lt;br /&gt;
== Powering up an MCE==&lt;br /&gt;
There are different solutions for powering up an MCE. A straight-forward method for all ground-based experiments is to use linear supplies configured to satisfy the above requirements.&lt;br /&gt;
=== Vicor Switching Supplies (24V-in) ===&lt;br /&gt;
The MCE can alternatively be equipped with a 18&amp;amp;ndash;36Vin (24Vin nominal) switching supply designed for use in balloon-based experiments. It uses Vicor bricks. :''See [[Vicor Power Supply]]''&lt;br /&gt;
&lt;br /&gt;
=== Linear Supplies ===&lt;br /&gt;
The set of linear supplies listed below (or similar supplies) are suitable.&lt;br /&gt;
&lt;br /&gt;
==== Option 1 ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! +V&amp;lt;sub&amp;gt;core&amp;lt;/sub&amp;gt;&lt;br /&gt;
|| IHC5-6/OVP (adjustable)&lt;br /&gt;
|| 3V&lt;br /&gt;
|| 5A&lt;br /&gt;
|-&lt;br /&gt;
! +V&amp;lt;sub&amp;gt;lvd&amp;lt;/sub&amp;gt;&lt;br /&gt;
|| IHB5-3/OVP&lt;br /&gt;
|| 4.5V&lt;br /&gt;
|| 3A&lt;br /&gt;
|-&lt;br /&gt;
! +V&amp;lt;sub&amp;gt;a&amp;lt;/sub&amp;gt;&lt;br /&gt;
|| IHE5-18/OVP&lt;br /&gt;
|| 6.2V&lt;br /&gt;
|| 15A&lt;br /&gt;
|-&lt;br /&gt;
! &amp;amp;minus;V&amp;lt;sub&amp;gt;a&amp;lt;/sub&amp;gt;&lt;br /&gt;
|| IHB5-3/OVP&lt;br /&gt;
|| -6.2V&lt;br /&gt;
|| 2A&lt;br /&gt;
|-&lt;br /&gt;
! +V&amp;lt;sub&amp;gt;ah&amp;lt;/sub&amp;gt;&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;&lt;br /&gt;
|| IHA15-0.5&lt;br /&gt;
|| 10V&lt;br /&gt;
|| 0.1A&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;: +V&amp;lt;sub&amp;gt;ah&amp;lt;/sub&amp;gt; or 10V supply only used when Readout Card Rev. B or Bias Card Rev. D is present in a subrack. &lt;br /&gt;
* Open-Frame PSU [http://www.phas.ubc.ca/~mce/mcedocs/hardware/schematics/PLA/SC2-ELE-C585-500_RevB_Linear_Open_Frame_PSU_Wiring.pdf  Wiring], [http://www.phas.ubc.ca/~mce/mcedocs/hardware/schematics/PLA/SC2-ELE-C585-501A_Linear_Open_Frame_PS_BOM.pdf Bill-of-Materials], [http://www.phas.ubc.ca/~mce/mcedocs/hardware/schematics/PLA/SC2-ELE-C585-501A_Linear_Open_Frame_Assembly_Instruction.pdf  Assembly Instructions]&lt;br /&gt;
* MCE-to-PS Cable [http://www.phas.ubc.ca/~mce/mcedocs/hardware/schematics/PLA/ELE-C585-501_RevA_Cable_Linear_Open_Frame.pdf Wiring] , [http://www.phas.ubc.ca/~mce/mcedocs/hardware/schematics/PLA/ELE-C585-501_RevA_Cable_Linear_Open_Frame_BOM.pdf Bill-of-Material]&lt;br /&gt;
&lt;br /&gt;
==== Option 2 ====&lt;br /&gt;
[[File:Linear_supply_prehistory.JPG|thumb|Linear Supply Assembly - obsolete]]&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! +V&amp;lt;sub&amp;gt;core&amp;lt;/sub&amp;gt;&lt;br /&gt;
|| Kepco JQE 6-22M (adjustable)&lt;br /&gt;
|-&lt;br /&gt;
! +V&amp;lt;sub&amp;gt;lvd&amp;lt;/sub&amp;gt;&lt;br /&gt;
|| Power One HC5-6/OVP&lt;br /&gt;
|-&lt;br /&gt;
! +V&amp;lt;sub&amp;gt;a&amp;lt;/sub&amp;gt;&lt;br /&gt;
|| Kepco JQE 15-25M (adjustable)&lt;br /&gt;
|-&lt;br /&gt;
! &amp;amp;minus;V&amp;lt;sub&amp;gt;a&amp;lt;/sub&amp;gt;&lt;br /&gt;
|| Kepco JQE 15-25M (adjustable)&lt;br /&gt;
|-&lt;br /&gt;
! +V&amp;lt;sub&amp;gt;ah&amp;lt;/sub&amp;gt;&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;&lt;br /&gt;
|| Power One HAD15-0.4-A&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;: +V&amp;lt;sub&amp;gt;ah&amp;lt;/sub&amp;gt; or 10V supply only used when Readout Card Rev. B or Bias Card Rev. D is present in a subrack. &lt;br /&gt;
&lt;br /&gt;
As a slightly out-of-date example, here is how we setup our linear supplies in the lab (for 1 MCE). &lt;br /&gt;
&lt;br /&gt;
* [http://www.phas.ubc.ca/~mce/mcedocs/hardware/schematics/PLA/ELE-C58J-001_Linear_PS_Wiring.pdf  Linear_PS Wiring Diagram]&lt;br /&gt;
&lt;br /&gt;
* [http://www.phas.ubc.ca/~mce/mcedocs/hardware/schematics/PLA/ELE-C58J-501_External_Linear_PS_Manual.pdf  Linear PS Assembly Instructions ]&lt;br /&gt;
&lt;br /&gt;
=== AC-powered Switching Supplies (obsolete) ===&lt;br /&gt;
[[Image:External_PSU_Setup.JPG|thumb|A 3-MDM 48HP [[subrack]] powered by an external [[PSA]] (labelled PSU) attached to an [[ACDCU]].]]&lt;br /&gt;
&lt;br /&gt;
The MCE can be equipped with a switching supply ([[PSA]]) that is powered through a front-panel Amphenol connector that takes &amp;amp;plusmn;150V DC. The &amp;amp;plusmn;150V is generated by an external [[AC-DC Unit]] (ACDCU) that can reside far from the MCE. The ACDCU is designed and supplied by UBC.&lt;br /&gt;
&lt;br /&gt;
The PSA is equipped with a controller card ([[PSUC]]) that allows monitoring voltage/current levels of the MCE by issuing a command from the MCE control PC. See &amp;lt;tt&amp;gt;[[psc_status]]&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
This solution is obsolete and no longer in production.  Ground-based experiments should use linear supplies.  For balloon-based experiments, use the 24-V Vicor supply.&lt;br /&gt;
&lt;br /&gt;
[[Category:Power| ]]&lt;/div&gt;</summary>
		<author><name>Mandana</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=MCE_Power&amp;diff=7127</id>
		<title>MCE Power</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=MCE_Power&amp;diff=7127"/>
		<updated>2021-03-18T01:22:00Z</updated>

		<summary type="html">&lt;p&gt;Mandana: /* Powering up an MCE */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Related|Power}}&lt;br /&gt;
== Power Requirements ==&lt;br /&gt;
There are two types of MCE [[subrack]]s:&lt;br /&gt;
*MCE72: contains up-to 10 cards and can read up to 32 columns.  In the past, this also contained a power supply unit (PSU)&lt;br /&gt;
*MCE48: contains up-to 7 cards and can read up to 16 columns.&lt;br /&gt;
&lt;br /&gt;
The power requirements of typical subrack configurations are given below.  To compute power and current requirements for a particular configuration, use: http://e-mode.phas.ubc.ca/mce/cgi-bin/power.cgi .&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: right&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Configuration&lt;br /&gt;
! rowspan=&amp;quot;2&amp;quot; | MCE48&amp;lt;br&amp;gt;RC_RevE&amp;lt;BR&amp;gt;BC_RevF&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&lt;br /&gt;
! rowspan=&amp;quot;2&amp;quot; | MCE72&amp;lt;br&amp;gt;RC_RevE&amp;lt;BR&amp;gt;BC_RevF&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Voltage&lt;br /&gt;
|-&lt;br /&gt;
! V&amp;lt;sub&amp;gt;core&amp;lt;/sub&amp;gt;&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;&lt;br /&gt;
|| 3.0V&lt;br /&gt;
|| 3.2A&lt;br /&gt;
|| 5.4A&lt;br /&gt;
|-&lt;br /&gt;
! V&amp;lt;sub&amp;gt;lvd&amp;lt;/sub&amp;gt;&lt;br /&gt;
|| 4.5V&lt;br /&gt;
|| 2.9A&lt;br /&gt;
|| 3.26A&lt;br /&gt;
|-&lt;br /&gt;
! V&amp;lt;sub&amp;gt;a+&amp;lt;/sub&amp;gt;&lt;br /&gt;
|| 6.2V&lt;br /&gt;
|| 3.5A&lt;br /&gt;
|| 6.4A&lt;br /&gt;
|-&lt;br /&gt;
! V&amp;lt;sub&amp;gt;a&amp;amp;minus;&amp;lt;/sub&amp;gt;&lt;br /&gt;
|| &amp;amp;minus;6.2V&lt;br /&gt;
|| 1.0A&lt;br /&gt;
|| 2.3A&lt;br /&gt;
|-&lt;br /&gt;
! V&amp;lt;sub&amp;gt;ah&amp;lt;/sub&amp;gt;&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;&lt;br /&gt;
|| 10.0V&lt;br /&gt;
|| &amp;amp;mdash;&lt;br /&gt;
|| &amp;amp;mdash;&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Total Power&lt;br /&gt;
| 50.1W&lt;br /&gt;
| 85.0W&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;: Minimum V&amp;lt;sub&amp;gt;core&amp;lt;/sub&amp;gt; supply for older version of cards can be as low as 2.5V, but newer RC and BC require minimum 3V[[Minimum Vcore for RC RevE| see note]].  The numbers in this table assume a V&amp;lt;sub&amp;gt;core&amp;lt;/sub&amp;gt; of 3V.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;: The 10V V&amp;lt;sub&amp;gt;ah&amp;lt;/sub&amp;gt; supply is only used when Readout Card Rev. B (or older) or Bias Card Rev. D (or older) are present in the subrack. V&amp;lt;sub&amp;gt;ah&amp;lt;/sub&amp;gt; was used to generate reference voltages for DACs.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;: When using mux11d squid chips, unused DACs on Address Card can be turned off and 1 Bias Card can be eliminated. This will amount to 10W of power savings.&lt;br /&gt;
&lt;br /&gt;
For card specific power requirements, see [[MCE Card Specific Power Requirements]]&lt;br /&gt;
&lt;br /&gt;
== Connector &amp;amp; pinout ==&lt;br /&gt;
The MCE uses [http://cdmelectronics.com/wp-content/uploads/2014/07/MRA_SERIES.pdf Winchester MRA-34P-G] on the front panel.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;25%&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
| width=&amp;quot;25%&amp;quot; rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background: #CCC&amp;quot; | '''A'''&amp;lt;br&amp;gt;+V&amp;lt;sub&amp;gt;ah&amp;lt;/sub&amp;gt;&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt; +10V&lt;br /&gt;
| width=&amp;quot;25%&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
| width=&amp;quot;25%&amp;quot; rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background: #444; color: white&amp;quot; | '''B'''&amp;lt;br&amp;gt;AGND&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background: #88F&amp;quot; | '''C'''&amp;lt;br&amp;gt;&amp;amp;minus;V&amp;lt;sub&amp;gt;a&amp;lt;/sub&amp;gt; &amp;amp;minus;6.2V&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background: #444; color: white&amp;quot; | '''D'''&amp;lt;br&amp;gt;AGND&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background: #FD4&amp;quot; | '''E'''&amp;lt;br&amp;gt;+V&amp;lt;sub&amp;gt;a&amp;lt;/sub&amp;gt; +6.2V&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background: #222; color: white&amp;quot; | '''F'''&amp;lt;br&amp;gt;AGND&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background: #FD4&amp;quot; | '''H'''&amp;lt;br&amp;gt;+V&amp;lt;sub&amp;gt;a&amp;lt;/sub&amp;gt; +6.2V&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background: #222; color: white&amp;quot; | '''J'''&amp;lt;br&amp;gt;AGND&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background: #FD4&amp;quot; | '''K'''&amp;lt;br&amp;gt;+V&amp;lt;sub&amp;gt;a&amp;lt;/sub&amp;gt; +6.2V&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background: #222; color: white&amp;quot; | '''L'''&amp;lt;br&amp;gt;AGND&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background: #FD4&amp;quot; | '''M'''&amp;lt;br&amp;gt;+V&amp;lt;sub&amp;gt;a&amp;lt;/sub&amp;gt; +6.2V&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background: #666; color: white&amp;quot; | '''N'''&amp;lt;br&amp;gt;DGND&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background: #F44&amp;quot; | '''P'''&amp;lt;br&amp;gt;+V&amp;lt;sub&amp;gt;lvd&amp;lt;/sub&amp;gt; +4.5V&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background: #666; color: white&amp;quot; | '''R'''&amp;lt;br&amp;gt;DGND&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background: #F44&amp;quot; | '''S'''&amp;lt;br&amp;gt;+V&amp;lt;sub&amp;gt;lvd&amp;lt;/sub&amp;gt; +4.5V&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background: #666; color: white&amp;quot; | '''T'''&amp;lt;br&amp;gt;DGND&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background: #F44&amp;quot; | '''U'''&amp;lt;br&amp;gt;+V&amp;lt;sub&amp;gt;lvd&amp;lt;/sub&amp;gt; +4.5V&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background: #444; color: white&amp;quot; | '''V'''&amp;lt;br&amp;gt;DGND&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background: #4C4&amp;quot; | '''W'''&amp;lt;br&amp;gt;+V&amp;lt;sub&amp;gt;core&amp;lt;/sub&amp;gt; +3.0V&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background: #444; color: white&amp;quot; | '''X'''&amp;lt;br&amp;gt;DGND&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background: #4C4&amp;quot; | '''Y'''&amp;lt;br&amp;gt;+V&amp;lt;sub&amp;gt;core&amp;lt;/sub&amp;gt; +3.0V&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background: #444; color: white&amp;quot; | '''Z'''&amp;lt;br&amp;gt;DGND&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background: #4C4&amp;quot; | '''a'''&amp;lt;br&amp;gt;+V&amp;lt;sub&amp;gt;core&amp;lt;/sub&amp;gt; +3.0V&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background: #444; color: white&amp;quot; | '''b'''&amp;lt;br&amp;gt;DGND&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;color: #888&amp;quot; | '''c'''&amp;lt;br&amp;gt;CC_SREQ&amp;lt;sup&amp;gt;&amp;amp;dagger;&amp;lt;/sup&amp;gt;&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;color: #888&amp;quot; | '''d'''&amp;lt;br&amp;gt;PS_MOSI&amp;lt;sup&amp;gt;&amp;amp;dagger;&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | '''f'''&amp;lt;br&amp;gt;Fan GND&amp;lt;sup&amp;gt;&amp;amp;Dagger;&amp;lt;/sup&amp;gt;&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;color: #888&amp;quot; | '''g'''&amp;lt;br&amp;gt;BRST&amp;lt;sup&amp;gt;&amp;amp;dagger;&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;color: #888&amp;quot; | '''h'''&amp;lt;br&amp;gt;CC_MISO&amp;lt;sup&amp;gt;&amp;amp;dagger;&amp;lt;/sup&amp;gt;&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;color: #888&amp;quot; | '''i'''&amp;lt;br&amp;gt;PS_SCLK&amp;lt;sup&amp;gt;&amp;amp;dagger;&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | '''j'''&amp;lt;br&amp;gt;Fan +12V&amp;lt;sup&amp;gt;&amp;amp;Dagger;&amp;lt;/sup&amp;gt;&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;color: #888&amp;quot; | '''k'''&amp;lt;br&amp;gt;PS_CS&amp;lt;sup&amp;gt;&amp;amp;dagger;&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;color: #888&amp;quot; | '''m'''&amp;lt;br&amp;gt;SIG_RET&amp;lt;sup&amp;gt;&amp;amp;dagger;&amp;lt;/sup&amp;gt;&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;color: #888&amp;quot; | '''n'''&amp;lt;br&amp;gt;SIG_RET&amp;lt;sup&amp;gt;&amp;amp;dagger;&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;nbsp;&lt;br /&gt;
| &amp;amp;nbsp;&lt;br /&gt;
|}&lt;br /&gt;
'''*''': Obsolete: V&amp;lt;sub&amp;gt;ah&amp;lt;/sub&amp;gt; is used only by revB [[Readout Card]]s and revD [[Bias Card]]s (or earlier)&amp;lt;br&amp;gt;&lt;br /&gt;
'''&amp;amp;dagger;''': Obsolete: was used to communicate with the [[PSUC]].&amp;lt;br&amp;gt;&lt;br /&gt;
'''&amp;amp;Dagger;''': Optional power lines for subrack top plate fans.&lt;br /&gt;
&lt;br /&gt;
Full details can be found under Winchester connector, here: [http://www.phas.ubc.ca/~mce/mcedocs/hardware/schematics/PLA/ELE-C585-301C_MCE48_Front_Panel_Power_Connection.pdf 48HP Front-Panel Power Connection] &lt;br /&gt;
&lt;br /&gt;
Note that the older 5-MDM SCUBA-2 style MCE had 2 Circular Amphenol connectors on the front panel of the [[linear feed card]]. Pinout is here: [http://www.phas.ubc.ca/~mce/mcedocs/hardware/schematics/PLA/Figure%206%20Rear%20View%20of%20pinout_AMPHENOL%20size%2022_RevC.xls Amphenol pinout].  The linear-feed card connects power from these circular connectors to the Winchester power connector on the back panel.&lt;br /&gt;
&lt;br /&gt;
== Powering up an MCE==&lt;br /&gt;
There are different solutions for powering up an MCE. A straight-forward method for all ground-based experiments is to use linear supplies configured to satisfy the above requirements.&lt;br /&gt;
=== Vicor Switching Supplies (24V-in) ===&lt;br /&gt;
The MCE can alternatively be equipped with a 18&amp;amp;ndash;36Vin (24Vin nominal) switching supply designed for use in balloon-based experiments. It uses Vicor bricks. :''See [[Vicor Power Supply]]''&lt;br /&gt;
&lt;br /&gt;
=== Linear Supplies ===&lt;br /&gt;
The set of linear supplies listed below (or similar supplies) are suitable.&lt;br /&gt;
&lt;br /&gt;
==== Option 1 ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! +V&amp;lt;sub&amp;gt;core&amp;lt;/sub&amp;gt;&lt;br /&gt;
|| IHC5-6/OVP (adjustable)&lt;br /&gt;
|| 3V&lt;br /&gt;
|| 5A&lt;br /&gt;
|-&lt;br /&gt;
! +V&amp;lt;sub&amp;gt;lvd&amp;lt;/sub&amp;gt;&lt;br /&gt;
|| IHB5-3/OVP&lt;br /&gt;
|| 4.5V&lt;br /&gt;
|| 3A&lt;br /&gt;
|-&lt;br /&gt;
! +V&amp;lt;sub&amp;gt;a&amp;lt;/sub&amp;gt;&lt;br /&gt;
|| IHE5-18/OVP&lt;br /&gt;
|| 6.2V&lt;br /&gt;
|| 15A&lt;br /&gt;
|-&lt;br /&gt;
! &amp;amp;minus;V&amp;lt;sub&amp;gt;a&amp;lt;/sub&amp;gt;&lt;br /&gt;
|| IHB5-3/OVP&lt;br /&gt;
|| -6.2V&lt;br /&gt;
|| 2A&lt;br /&gt;
|-&lt;br /&gt;
! +V&amp;lt;sub&amp;gt;ah&amp;lt;/sub&amp;gt;&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;&lt;br /&gt;
|| IHA15-0.5&lt;br /&gt;
|| 10V&lt;br /&gt;
|| 0.1A&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;: +V&amp;lt;sub&amp;gt;ah&amp;lt;/sub&amp;gt; or 10V supply only used when Readout Card Rev. B or Bias Card Rev. D is present in a subrack. &lt;br /&gt;
* Open-Frame PSU [http://www.phas.ubc.ca/~mce/mcedocs/hardware/schematics/PLA/SC2-ELE-C585-500_RevB_Linear_Open_Frame_PSU_Wiring.pdf  Wiring], [http://www.phas.ubc.ca/~mce/mcedocs/hardware/schematics/PLA/SC2-ELE-C585-501A_Linear_Open_Frame_PS_BOM.pdf Bill-of-Materials], [http://www.phas.ubc.ca/~mce/mcedocs/hardware/schematics/PLA/SC2-ELE-C585-501A_Linear_Open_Frame_Assembly_Instruction.pdf  Assembly Instructions]&lt;br /&gt;
* MCE-to-PS Cable [http://www.phas.ubc.ca/~mce/mcedocs/hardware/schematics/PLA/ELE-C585-501_RevA_Cable_Linear_Open_Frame.pdf Wiring] , [http://www.phas.ubc.ca/~mce/mcedocs/hardware/schematics/PLA/ELE-C585-501_RevA_Cable_Linear_Open_Frame_BOM.pdf Bill-of-Material]&lt;br /&gt;
&lt;br /&gt;
==== Option 2 ====&lt;br /&gt;
[[File:Linear_supply_prehistory.JPG|thumb|Linear Supply Assembly - obsolete]]&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! +V&amp;lt;sub&amp;gt;core&amp;lt;/sub&amp;gt;&lt;br /&gt;
|| Kepco JQE 6-22M (adjustable)&lt;br /&gt;
|-&lt;br /&gt;
! +V&amp;lt;sub&amp;gt;lvd&amp;lt;/sub&amp;gt;&lt;br /&gt;
|| Power One HC5-6/OVP&lt;br /&gt;
|-&lt;br /&gt;
! +V&amp;lt;sub&amp;gt;a&amp;lt;/sub&amp;gt;&lt;br /&gt;
|| Kepco JQE 15-25M (adjustable)&lt;br /&gt;
|-&lt;br /&gt;
! &amp;amp;minus;V&amp;lt;sub&amp;gt;a&amp;lt;/sub&amp;gt;&lt;br /&gt;
|| Kepco JQE 15-25M (adjustable)&lt;br /&gt;
|-&lt;br /&gt;
! +V&amp;lt;sub&amp;gt;ah&amp;lt;/sub&amp;gt;&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;&lt;br /&gt;
|| Power One HAD15-0.4-A&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;: +V&amp;lt;sub&amp;gt;ah&amp;lt;/sub&amp;gt; or 10V supply only used when Readout Card Rev. B or Bias Card Rev. D is present in a subrack. &lt;br /&gt;
&lt;br /&gt;
As a slightly out-of-date example, here is how we setup our linear supplies in the lab (for 1 MCE). &lt;br /&gt;
&lt;br /&gt;
* [http://www.phas.ubc.ca/~mce/mcedocs/hardware/schematics/PLA/ELE-C58J-001_Linear_PS_Wiring.pdf  Linear_PS Wiring Diagram]&lt;br /&gt;
&lt;br /&gt;
* [http://www.phas.ubc.ca/~mce/mcedocs/hardware/schematics/PLA/ELE-C58J-501_External_Linear_PS_Manual.pdf  Linear PS Assembly Instructions ]&lt;br /&gt;
&lt;br /&gt;
=== AC-powered Switching Supplies (obsolete) ===&lt;br /&gt;
[[Image:External_PSU_Setup.JPG|thumb|A 3-MDM 48HP [[subrack]] powered by an external [[PSA]] (labelled PSU) attached to an [[ACDCU]].]]&lt;br /&gt;
&lt;br /&gt;
The MCE can be equipped with a switching supply ([[PSA]]) that is powered through a front-panel Amphenol connector that takes &amp;amp;plusmn;150V DC. The &amp;amp;plusmn;150V is generated by an external [[AC-DC Unit]] (ACDCU) that can reside far from the MCE. The ACDCU is designed and supplied by UBC.&lt;br /&gt;
&lt;br /&gt;
The PSA is equipped with a controller card ([[PSUC]]) that allows monitoring voltage/current levels of the MCE by issuing a command from the MCE control PC. See &amp;lt;tt&amp;gt;[[psc_status]]&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
This solution is obsolete and no longer in production.  Ground-based experiments should use linear supplies.  For balloon-based experiments, use the 24-V Vicor supply.&lt;br /&gt;
&lt;br /&gt;
[[Category:Power| ]]&lt;/div&gt;</summary>
		<author><name>Mandana</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=DoubleMCE&amp;diff=7123</id>
		<title>DoubleMCE</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=DoubleMCE&amp;diff=7123"/>
		<updated>2020-11-19T03:38:50Z</updated>

		<summary type="html">&lt;p&gt;Mandana: Created page with &amp;quot;development notes: https://docs.google.com/document/d/12uyFZyMLENACWyA73A2_yrVOqSSRGa_1yi7Q7wdY3pM/edit?usp=sharing&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;development notes: https://docs.google.com/document/d/12uyFZyMLENACWyA73A2_yrVOqSSRGa_1yi7Q7wdY3pM/edit?usp=sharing&lt;/div&gt;</summary>
		<author><name>Mandana</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Subrack&amp;diff=7122</id>
		<title>Subrack</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Subrack&amp;diff=7122"/>
		<updated>2020-11-19T03:37:44Z</updated>

		<summary type="html">&lt;p&gt;Mandana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Related|Subrack}}&lt;br /&gt;
Two types of MCE subracks are in production:&lt;br /&gt;
* a large (72-HP) subrack containing 5 MDM connectors and four read-out cards.&lt;br /&gt;
* a small (48-HP) subrack containing 3 MDM connectors and two read-out cards.&lt;br /&gt;
&lt;br /&gt;
''Work in Progress'': [[DoubleMCE]] is a custom two-MCE72-in-one crate being developed to satisfy the space constraints for the upcoming BICEP array. &lt;br /&gt;
&lt;br /&gt;
An intermediate sized 60-HP subrack was also prototyped but not produced in large numbers.  Functionally it is equivalent to the modern 48-HP subrack.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Horizontal_pitch (what is HP?)]&lt;br /&gt;
&lt;br /&gt;
== Components ==&lt;br /&gt;
A fully-kitted subrack contains:&lt;br /&gt;
* 1 [[clock card]]&lt;br /&gt;
* 2 (48-HP subrack) or 4 (72-HP subrack) [[readout card]]s (fewer are installed if the extra read-out capacity is not needed)&lt;br /&gt;
* 3 [[bias card]]s (in some situations one might be removed)&lt;br /&gt;
* 1 [[address card]]&lt;br /&gt;
&lt;br /&gt;
It also contains the following which are generally not &amp;quot;user-replaceable&amp;quot;:&lt;br /&gt;
* 1 [[bus backplane]]&lt;br /&gt;
* 1 [[instrument backplane]]&lt;br /&gt;
* 3 (48-HP subrack) or 5 (72-HP subrack) MDM [[filter box]]es&lt;br /&gt;
&lt;br /&gt;
;Notes:&lt;br /&gt;
* before the development of fast bias cards, in each subrack, one bias card was often replaced with a biasing [[address card]] ([[BAC]]), to allow for fast SQ2 switching.  Modern bias cards can now perform fast switching and the BAC option is now obsolete.&lt;br /&gt;
* the 72-HP subrack also has space for a [[PSA|power supply]] (PSA) or a [[Linear Feed Card]] which are both obsolete and no longer installed.  The [[Linear Feed Card]] would simply bring the power lines off the back plane out to front panel connectors.  See [[MCE Power Requirements]] for current subrack power options.&lt;br /&gt;
&lt;br /&gt;
== Dimensions and Weight ==&lt;br /&gt;
* A fully populated 3-MDM (5-MDM) MCE weighs approximately 9.5 kg (13 kg). This does not include the weight of the power supply and power cable. &lt;br /&gt;
&lt;br /&gt;
* Dimensions for a 48-HP MCE: ~ 40cm x 31cm x 34cm (depth x width x height) &lt;br /&gt;
* Dimensions for a 72-HP MCE: ~ 40cm x 43cm x 34cm (depth x width x height)&lt;br /&gt;
&lt;br /&gt;
** [http://www.phas.ubc.ca/~mce/mcedocs/overview/MEC-C580-111_48HP_Subrack_Mounting.pdf MCE 48-HP Mounting Dimensions (PDF)]&lt;br /&gt;
** [http://www.phas.ubc.ca/~mce/mcedocs/overview/MEC-C580-154_48HP_Subrack_Dimensions MCE 48-HP Dimenstions (PDF)]&lt;br /&gt;
** [http://www.phas.ubc.ca/~mce/mcedocs/overview/MEC-C580-197_72HP_Subrack_Mounting.pdf MCE 72-HP Mounting Dimensions (PDF)]&lt;br /&gt;
&lt;br /&gt;
*Note: We are currently working on '''reducing the depth''' of the subracks by ~5cm and this will reduce the weight as well.&lt;br /&gt;
** [http://www.phas.ubc.ca/~mce/mcedocs/mechanical/MCE002537_ShallowSubrack(2013-8-29).zip Solidworks model for '''shallow''' MCE72 subracks (zip)]&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Horizontal_pitch (what is HP?)]&lt;br /&gt;
&lt;br /&gt;
== Other information ==&lt;br /&gt;
* [[MCE Power Requirements]]&lt;br /&gt;
* [http://www.phas.ubc.ca/~mce/mcedocs/overview/SC2_ELE_S580_005_Rev4.0_mce_interfaces.pdf Hardware Interface Block Diagram(PDF)] (SC2_ELE_S580_005)&lt;br /&gt;
* [http://www.phas.ubc.ca/%7Emce/mcedocs/hardware/SC2_MEC-S580-504%20Subrack%20Mounting.doc Subrack Mounting Instructions (DOC)] (SC2-MEC-S580-504)&lt;br /&gt;
*[[Connector Mating System Maintenance]] Includes photos and description.&lt;br /&gt;
* [[MCE Maintenance|Hardware Maintenance notes]]&lt;br /&gt;
* [[MCE Cooling for balloon-based experiments]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Subrack| ]]&lt;/div&gt;</summary>
		<author><name>Mandana</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Subrack&amp;diff=7121</id>
		<title>Subrack</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Subrack&amp;diff=7121"/>
		<updated>2020-11-19T03:37:29Z</updated>

		<summary type="html">&lt;p&gt;Mandana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Related|Subrack}}&lt;br /&gt;
Two types of MCE subracks are in production:&lt;br /&gt;
* a large (72-HP) subrack containing 5 MDM connectors and four read-out cards.&lt;br /&gt;
* a small (48-HP) subrack containing 3 MDM connectors and two read-out cards.&lt;br /&gt;
&lt;br /&gt;
''Work in Progress'': [[DoubleMCE]] is a custom two-MCE72-in-one crate being developed to satisfy the space constraints for the upcoming BICEP array. &lt;br /&gt;
An intermediate sized 60-HP subrack was also prototyped but not produced in large numbers.  Functionally it is equivalent to the modern 48-HP subrack.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Horizontal_pitch (what is HP?)]&lt;br /&gt;
&lt;br /&gt;
== Components ==&lt;br /&gt;
A fully-kitted subrack contains:&lt;br /&gt;
* 1 [[clock card]]&lt;br /&gt;
* 2 (48-HP subrack) or 4 (72-HP subrack) [[readout card]]s (fewer are installed if the extra read-out capacity is not needed)&lt;br /&gt;
* 3 [[bias card]]s (in some situations one might be removed)&lt;br /&gt;
* 1 [[address card]]&lt;br /&gt;
&lt;br /&gt;
It also contains the following which are generally not &amp;quot;user-replaceable&amp;quot;:&lt;br /&gt;
* 1 [[bus backplane]]&lt;br /&gt;
* 1 [[instrument backplane]]&lt;br /&gt;
* 3 (48-HP subrack) or 5 (72-HP subrack) MDM [[filter box]]es&lt;br /&gt;
&lt;br /&gt;
;Notes:&lt;br /&gt;
* before the development of fast bias cards, in each subrack, one bias card was often replaced with a biasing [[address card]] ([[BAC]]), to allow for fast SQ2 switching.  Modern bias cards can now perform fast switching and the BAC option is now obsolete.&lt;br /&gt;
* the 72-HP subrack also has space for a [[PSA|power supply]] (PSA) or a [[Linear Feed Card]] which are both obsolete and no longer installed.  The [[Linear Feed Card]] would simply bring the power lines off the back plane out to front panel connectors.  See [[MCE Power Requirements]] for current subrack power options.&lt;br /&gt;
&lt;br /&gt;
== Dimensions and Weight ==&lt;br /&gt;
* A fully populated 3-MDM (5-MDM) MCE weighs approximately 9.5 kg (13 kg). This does not include the weight of the power supply and power cable. &lt;br /&gt;
&lt;br /&gt;
* Dimensions for a 48-HP MCE: ~ 40cm x 31cm x 34cm (depth x width x height) &lt;br /&gt;
* Dimensions for a 72-HP MCE: ~ 40cm x 43cm x 34cm (depth x width x height)&lt;br /&gt;
&lt;br /&gt;
** [http://www.phas.ubc.ca/~mce/mcedocs/overview/MEC-C580-111_48HP_Subrack_Mounting.pdf MCE 48-HP Mounting Dimensions (PDF)]&lt;br /&gt;
** [http://www.phas.ubc.ca/~mce/mcedocs/overview/MEC-C580-154_48HP_Subrack_Dimensions MCE 48-HP Dimenstions (PDF)]&lt;br /&gt;
** [http://www.phas.ubc.ca/~mce/mcedocs/overview/MEC-C580-197_72HP_Subrack_Mounting.pdf MCE 72-HP Mounting Dimensions (PDF)]&lt;br /&gt;
&lt;br /&gt;
*Note: We are currently working on '''reducing the depth''' of the subracks by ~5cm and this will reduce the weight as well.&lt;br /&gt;
** [http://www.phas.ubc.ca/~mce/mcedocs/mechanical/MCE002537_ShallowSubrack(2013-8-29).zip Solidworks model for '''shallow''' MCE72 subracks (zip)]&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Horizontal_pitch (what is HP?)]&lt;br /&gt;
&lt;br /&gt;
== Other information ==&lt;br /&gt;
* [[MCE Power Requirements]]&lt;br /&gt;
* [http://www.phas.ubc.ca/~mce/mcedocs/overview/SC2_ELE_S580_005_Rev4.0_mce_interfaces.pdf Hardware Interface Block Diagram(PDF)] (SC2_ELE_S580_005)&lt;br /&gt;
* [http://www.phas.ubc.ca/%7Emce/mcedocs/hardware/SC2_MEC-S580-504%20Subrack%20Mounting.doc Subrack Mounting Instructions (DOC)] (SC2-MEC-S580-504)&lt;br /&gt;
*[[Connector Mating System Maintenance]] Includes photos and description.&lt;br /&gt;
* [[MCE Maintenance|Hardware Maintenance notes]]&lt;br /&gt;
* [[MCE Cooling for balloon-based experiments]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Subrack| ]]&lt;/div&gt;</summary>
		<author><name>Mandana</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Vicor_Power_Assembly&amp;diff=7120</id>
		<title>Vicor Power Assembly</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Vicor_Power_Assembly&amp;diff=7120"/>
		<updated>2020-10-22T18:12:14Z</updated>

		<summary type="html">&lt;p&gt;Mandana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Related|Power}}&lt;br /&gt;
The MCE can be equipped with a 24V DC-in or 48V DC-in switching supply designed for use in balloon-based experiments. This unit contains a set of [http://www.vicorpower.com/dc-dc-converters-board-mount Vicor DC-DC converters] that are trimmed to accommodate losses from cables of up to 2-metres, so they can be located up to 2-m away from the actual MCE [[subrack]].&lt;br /&gt;
== Specification==&lt;br /&gt;
&lt;br /&gt;
;DC input&lt;br /&gt;
: Either:&lt;br /&gt;
:* 24V (18-36V) - Rev. C, Issues 1, 2, 5, 6&lt;br /&gt;
:* 48V (36-60V) - Rev. C, Issues 3, 4, 7&lt;br /&gt;
: 3A at 24V to power one 3-MDM MCE48 crate (6A for two)&lt;br /&gt;
&lt;br /&gt;
;DC output&lt;br /&gt;
:    V&amp;lt;sub&amp;gt;a&amp;lt;/sub&amp;gt;&amp;lt;sup&amp;gt;+&amp;lt;/sup&amp;gt;: 6.1 to 6.3 V&lt;br /&gt;
:    V&amp;lt;sub&amp;gt;a&amp;lt;/sub&amp;gt;&amp;lt;sup&amp;gt;&amp;amp;minus;&amp;lt;/sup&amp;gt;: -6.1 to -6.3 V&lt;br /&gt;
:    V&amp;lt;sub&amp;gt;lvd&amp;lt;/sub&amp;gt;: 4.4 to 4.7 V&lt;br /&gt;
:    V&amp;lt;sub&amp;gt;core&amp;lt;/sub&amp;gt;: 2.9 to 3.2 V&lt;br /&gt;
* ''Note:'' The VPA does not provide the obsolete V&amp;lt;sub&amp;gt;ah&amp;lt;/sub&amp;gt; used by rev.A and B [[Readout card]]s and rev.A through D [[Bias card]]s&lt;br /&gt;
&lt;br /&gt;
; Power:	100W&lt;br /&gt;
&lt;br /&gt;
; Regulated:	Yes&lt;br /&gt;
&lt;br /&gt;
; Efficiency:	75%&lt;br /&gt;
; Dimensions (L x W x H):	&lt;br /&gt;
: 24cm x 20cm x 5cm&lt;br /&gt;
; Weight:	&lt;br /&gt;
: &amp;lt; 2kg and a 1-m power cable is ~1kg&lt;br /&gt;
&lt;br /&gt;
== Connectors ==&lt;br /&gt;
; Input:&lt;br /&gt;
* '''Writing harness''': [http://www.phas.ubc.ca/~scuba2/sc2mce/system/power_supply_of_all_kinds/psu_Vicor/design/protel/vpa-c585-401d/ELE-S585-401C3_Schematics.PDF PDF]&lt;br /&gt;
* '''Connector''': Amphenol PTC-2A-14-5P&lt;br /&gt;
[[File:24-48Vin.png|400px]]&lt;br /&gt;
; Output:&lt;br /&gt;
* '''Wiring harness''': [http://www.phas.ubc.ca/~mce/mcedocs/hardware/schematics/PowerSupplyVicor/ELE-C584-402_RevA_Wiring_Harness.pdf PDF]&lt;br /&gt;
* '''Connector''': Winchester MRA34SG.  '''[[MCE Power#Connector &amp;amp; pinout|Pinout]]'''&lt;br /&gt;
* ''Note:'' The VPA can power one 72-HP subrack, or two 48-HP subracks.  Early revisions of the VPA had two output connectors.  Currently, all VPAs have only one Winchester connector for power output, and a wye cable is used when powering pairs of 48-HP subracks.&lt;br /&gt;
== Schematics == &lt;br /&gt;
* Vicor Power Supply Rev C2, PCB Schematics [https://phas.ubc.ca/~mce/mcedocs/hardware/schematics/PowerSupplyVicor/ELE_C585-401_RevC2_VicorPSU_Schematics.pdf]&lt;br /&gt;
* Vicor Power Supply Rev C3, PCB Schematics [https://phas.ubc.ca/~mce/mcedocs/hardware/schematics/PowerSupplyVicor/ELE_C585-401_RevC3_VicorPSU_Schematics.pdf]&lt;br /&gt;
* Wiring [https://phas.ubc.ca/~mce/mcedocs/hardware/schematics/PowerSupplyVicor/ELE-C584-402_RevA_Wiring_Harness.pdf]&lt;br /&gt;
== Mechanical Drawings ==&lt;br /&gt;
* Assembled Box: [http://www.phas.ubc.ca/~scuba2/sc2mce/system/power_supply_of_all_kinds/psu_Vicor/design/mech/Aluminum_Box/MEC-C585-416D_Enclosure.PDF MEC-C585-416D]&lt;br /&gt;
* Box Lid: [http://www.phas.ubc.ca/~scuba2/sc2mce/system/power_supply_of_all_kinds/psu_Vicor/design/mech/Aluminum_Box/MEC-C585-405D_Enclosure_Lid.PDF MEC-C585-405D]&lt;br /&gt;
* Unfolded Box: [http://www.phas.ubc.ca/~scuba2/sc2mce/system/power_supply_of_all_kinds/psu_Vicor/design/mech/Aluminum_Box/MEC-C585-404D_Enclosure_Box_Unfolded.PDF MEC-C585-404D]&lt;br /&gt;
* Mounting Flange: [http://www.phas.ubc.ca/~scuba2/sc2mce/system/power_supply_of_all_kinds/psu_Vicor/design/mech/Aluminum_Box/MEC-C585-406B_Enclosure_Flange.PDF MEC-C585-406B]&lt;br /&gt;
&lt;br /&gt;
== Cooling ==&lt;br /&gt;
For Spider, the mounting/heat extraction block is bolted to a heat exchanger through which the &amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;He blow-off from the cryostat's vapour-cooled shield is vented.&lt;br /&gt;
&lt;br /&gt;
== Photos ==&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Vicor supply 1.jpg|Vicor supply attached to a subrack&lt;br /&gt;
File:Vicor supply 2.jpg|Vicor supply top face with heat pipes&lt;br /&gt;
File:Vicor supply 3.jpg|Vicor supply attached to a subrack&lt;br /&gt;
File:Vicor in spider flingle 1.jpg|3 vicor supplies in Spider mounting bracket, connector side&lt;br /&gt;
File:Vicor in spider flingle 2.jpg|3 vicor supplies in Spider mounting bracket, mounting/cooling side&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
* [[Testing VPA]]&lt;br /&gt;
&lt;br /&gt;
== ==&lt;br /&gt;
* back to [[MCE_Power]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Accessories]]&lt;br /&gt;
[[Category:Power]]&lt;/div&gt;</summary>
		<author><name>Mandana</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Vicor_Power_Assembly&amp;diff=7119</id>
		<title>Vicor Power Assembly</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Vicor_Power_Assembly&amp;diff=7119"/>
		<updated>2020-10-22T18:11:35Z</updated>

		<summary type="html">&lt;p&gt;Mandana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Related|Power}}&lt;br /&gt;
The MCE can be equipped with a 24V DC-in or 48V DC-in switching supply designed for use in balloon-based experiments. This unit contains a set of [http://www.vicorpower.com/dc-dc-converters-board-mount Vicor DC-DC converters] that are trimmed to accommodate losses from cables of up to 2-metres, so they can be located up to 2-m away from the actual MCE [[subrack]].&lt;br /&gt;
== Specification==&lt;br /&gt;
&lt;br /&gt;
;DC input&lt;br /&gt;
: Either:&lt;br /&gt;
:* 24V (18-36V) - Rev. C, Issues 1, 2, 5, 6&lt;br /&gt;
:* 48V (36-60V) - Rev. C, Issues 3, 4, 7&lt;br /&gt;
: 3A at 24V to power one 3-MDM MCE48 crate (6A for two)&lt;br /&gt;
&lt;br /&gt;
;DC output&lt;br /&gt;
:    V&amp;lt;sub&amp;gt;a&amp;lt;/sub&amp;gt;&amp;lt;sup&amp;gt;+&amp;lt;/sup&amp;gt;: 6.1 to 6.3 V&lt;br /&gt;
:    V&amp;lt;sub&amp;gt;a&amp;lt;/sub&amp;gt;&amp;lt;sup&amp;gt;&amp;amp;minus;&amp;lt;/sup&amp;gt;: -6.1 to -6.3 V&lt;br /&gt;
:    V&amp;lt;sub&amp;gt;lvd&amp;lt;/sub&amp;gt;: 4.4 to 4.7 V&lt;br /&gt;
:    V&amp;lt;sub&amp;gt;core&amp;lt;/sub&amp;gt;: 2.9 to 3.2 V&lt;br /&gt;
* ''Note:'' The VPA does not provide the obsolete V&amp;lt;sub&amp;gt;ah&amp;lt;/sub&amp;gt; used by rev.A and B [[Readout card]]s and rev.A through D [[Bias card]]s&lt;br /&gt;
&lt;br /&gt;
; Power:	100W&lt;br /&gt;
&lt;br /&gt;
; Regulated:	Yes&lt;br /&gt;
&lt;br /&gt;
; Efficiency:	75%&lt;br /&gt;
; Dimensions (L x W x H):	&lt;br /&gt;
: 24cm x 20cm x 5cm&lt;br /&gt;
; Weight:	&lt;br /&gt;
: &amp;lt; 2kg and a 1-m power cable is ~1kg&lt;br /&gt;
&lt;br /&gt;
== Connectors ==&lt;br /&gt;
; Input:&lt;br /&gt;
* '''Writing harness''': [http://www.phas.ubc.ca/~scuba2/sc2mce/system/power_supply_of_all_kinds/psu_Vicor/design/protel/vpa-c585-401d/ELE-S585-401C3_Schematics.PDF PDF]&lt;br /&gt;
* '''Connector''': Amphenol PTC-2A-14-5P&lt;br /&gt;
[[File:24-48Vin.png|400px]]&lt;br /&gt;
; Output:&lt;br /&gt;
* '''Wiring harness''': [http://www.phas.ubc.ca/~mce/mcedocs/hardware/schematics/PowerSupplyVicor/ELE-C584-402_RevA_Wiring_Harness.pdf PDF]&lt;br /&gt;
* '''Connector''': Winchester MRA34SG.  '''[[MCE Power#Connector &amp;amp; pinout|Pinout]]'''&lt;br /&gt;
* ''Note:'' The VPA can power one 72-HP subrack, or two 48-HP subracks.  Early revisions of the VPA had two output connectors.  Currently, all VPAs have only one Winchester connector for power output, and a wye cable is used when powering pairs of 48-HP subracks.&lt;br /&gt;
== Schematics == &lt;br /&gt;
* Vicor Power Supply Rev C2, PCB Schematics [https://phas.ubc.ca/~mce/mcedocs/hardware/schematics/PowerSupplyVicor/ELE_C585-401_RevC2_VicorPSU_Schematics.pdf]&lt;br /&gt;
* Vicor Power Supply Rev C3, PCB Schematics [https://phas.ubc.ca/~mce/mcedocs/hardware/schematics/PowerSupplyVicor/ELE_C585-401_RevC3_VicorPSU_Schematics.pdf]&lt;br /&gt;
* Wiring [https://phas.ubc.ca/~mce/mcedocs/hardware/schematics/PowerSupplyVicor/ELE-C584-402_RevA_Wiring_Harness.pdf]&lt;br /&gt;
== Mechanical Drawings ==&lt;br /&gt;
* Assembled Box: [http://www.phas.ubc.ca/~scuba2/sc2mce/system/power_supply_of_all_kinds/psu_Vicor/design/mech/Aluminum_Box/MEC-C585-416D_Enclosure.PDF MEC-C585-416D]&lt;br /&gt;
* Box Lid: [http://www.phas.ubc.ca/~scuba2/sc2mce/system/power_supply_of_all_kinds/psu_Vicor/design/mech/Aluminum_Box/MEC-C585-405D_Enclosure_Lid.PDF MEC-C585-405D]&lt;br /&gt;
* Unfolded Box: [http://www.phas.ubc.ca/~scuba2/sc2mce/system/power_supply_of_all_kinds/psu_Vicor/design/mech/Aluminum_Box/MEC-C585-404D_Enclosure_Box_Unfolded.PDF MEC-C585-404D]&lt;br /&gt;
* Mounting Flange: [http://www.phas.ubc.ca/~scuba2/sc2mce/system/power_supply_of_all_kinds/psu_Vicor/design/mech/Aluminum_Box/MEC-C585-406B_Enclosure_Flange.PDF MEC-C585-406B]&lt;br /&gt;
&lt;br /&gt;
== Cooling ==&lt;br /&gt;
For Spider, the mounting/heat extraction block is bolted to a heat exchanger through which the &amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;He blow-off from the cryostat's vapour-cooled shield is vented.&lt;br /&gt;
&lt;br /&gt;
== Photos ==&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Vicor supply 1.jpg|Vicor supply attached to a subrack&lt;br /&gt;
File:Vicor supply 2.jpg|Vicor supply top face with heat pipes&lt;br /&gt;
File:Vicor supply 3.jpg|Vicor supply attached to a subrack&lt;br /&gt;
File:Vicor in spider flingle 1.jpg|3 vicor supplies in Spider mounting bracket, connector side&lt;br /&gt;
File:Vicor in spider flingle 2.jpg|3 vicor supplies in Spider mounting bracket, mounting/cooling side&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
* [[Testing VPA]]&lt;br /&gt;
&lt;br /&gt;
== ==&lt;br /&gt;
* back to [https://e-mode.phas.ubc.ca/mcewiki/index.php/MCE_Power]&lt;br /&gt;
&lt;br /&gt;
[[Category:Accessories]]&lt;br /&gt;
[[Category:Power]]&lt;/div&gt;</summary>
		<author><name>Mandana</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Sync_Box&amp;diff=7118</id>
		<title>Sync Box</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Sync_Box&amp;diff=7118"/>
		<updated>2020-10-20T22:25:56Z</updated>

		<summary type="html">&lt;p&gt;Mandana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Related|Sync Box}}&lt;br /&gt;
[[Image:Sync_Box_DC-In_Chassis.JPG|thumb| A 5VDC-in Sync Box with six of eight transmitters installed]] &lt;br /&gt;
[[Image:Sync_Box_AC-In_Rack_Mount.JPG|thumb|A rack-mount AC-in Sync Box - Back]] &lt;br /&gt;
[[Image:Sync_Box_AC-In_Rack_Mount_Front.JPG|thumb|A rack-mount AC-in Sync Box - Front]] &lt;br /&gt;
The '''Sync Box''' generates a data-valid pulse along with a sequential 32-bit number to synchronize the data-acquisition operation of up-to 8 MCE subracks and other housekeeping equipment. The 32-bit number can be used to stamp all collected data points. The Sync Box has 8 fibre outputs to connect to the MCE subracks and few TTL/RS485 outputs to be used by other housekeeping equipment.  User commands are input to the Sync Box via RS-232.  The CPLD generates a serial bit stream which is Manchester encoded with a 25MHz clock, and contains information for occurrences of &amp;lt;tt&amp;gt;address_zero&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;data_valid&amp;lt;/tt&amp;gt;, and also a frame sequence number.&lt;br /&gt;
&lt;br /&gt;
== Specifications ==&lt;br /&gt;
=== Power consumption ===&lt;br /&gt;
Excluding the fibre transmitters, the sync box consumes 1.35W.  Each fibre transmitter (Avago HFBR-1119TZ) consumes 185mA x 5V = 0.925W, so a sync box with all eight tranmitters populated consumes 8.75W.  To minimise power consumption, only the required number of transmitters should be populated.  Input power is either 5V or 24V, depending on configuration.&lt;br /&gt;
&lt;br /&gt;
=== Approximate dimensions ===&lt;br /&gt;
;Size: 5cm × 20cm × 25cm&lt;br /&gt;
;Weight: 600 grams&lt;br /&gt;
&lt;br /&gt;
The obsolete, rack-mount AC-in sync box was 2U (9cm) × 19 inches (48cm) × 21cm deep and weighed 1.9kg.&lt;br /&gt;
&lt;br /&gt;
== External connectors and I/O ==&lt;br /&gt;
:''These are the connectors and pinout for the DC-in sync box.  For the connector pinout of the obsolete AC-in sync box, see [[Sync Box AC-in Rack Mount I/O]].&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;CP1&amp;quot;&amp;gt;CP1: DC power in&amp;lt;/span&amp;gt; ===&lt;br /&gt;
Different connectors are used for 5V and 24V input.&lt;br /&gt;
;5V&lt;br /&gt;
* Box connector is an AMP 206486-1.  +5VDC on pins 1 and 2.  Return on pins 3 and 6.  Other pins not populated.  Pins 3 and 6 are connected to sync box ground.&lt;br /&gt;
:[[File:Sync box 5v in.png]]&lt;br /&gt;
* mating connector on the power brick is: AMP 206485-1&lt;br /&gt;
;24V&lt;br /&gt;
* Box connector is an Amphenol PT-2A-14-5P.  +24VDC on pins B and C.  Return on pins D and E.  Pin A is not connected.  Unlike the 5V-in sync box, the 24V-in sync box isolates pins D and E from sync box ground.&lt;br /&gt;
:[[File:small_mcc_power.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;CJ2&amp;quot;&amp;gt;CJ2: RS-232 command port&amp;lt;/span&amp;gt; ===&lt;br /&gt;
A nine pin DE-9F provides the serial command port.  See [[#RS-232 communication and commanding|RS-232 communication and commanding]] below for details.  The only lines wired through to the Atmel processor are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Pin !! Signal&lt;br /&gt;
|-&lt;br /&gt;
| 2 || TxD&lt;br /&gt;
|-&lt;br /&gt;
| 3 || RxD&lt;br /&gt;
|-&lt;br /&gt;
| 4 || DSR&lt;br /&gt;
|-&lt;br /&gt;
| 5 || GND&lt;br /&gt;
|}&lt;br /&gt;
Don't rely on &amp;lt;tt&amp;gt;DSR&amp;lt;/tt&amp;gt;.  Assume no hardware or software flow control.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;CJ3&amp;quot;&amp;gt;CJ3: Digital I/O&amp;lt;/span&amp;gt; ===&lt;br /&gt;
A twenty five pin DB-25F is used for digital I/O.  Pins 1, 2, and 14 are inputs.  All other pins are outputs.  All grounds, including pin 14, are connected in the sync box to sync box ground.&lt;br /&gt;
&lt;br /&gt;
In [[#RTS mode vs Free-run mode|RTS mode]], any falling edge of &amp;lt;tt&amp;gt;Data_Valid&amp;lt;/tt&amp;gt; will be taken as a RTS DV signal.  In Free Run mode, this input is ignored.&lt;br /&gt;
&lt;br /&gt;
There are two pairs of RS485 outputs which provide a NRZ and clock version of the DV sync word.  &amp;lt;tt&amp;gt;Data_Sync_1&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;Data_Sync_4&amp;lt;/tt&amp;gt; have the clock and &amp;lt;tt&amp;gt;Data_Sync_2&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;Data_Sync_3&amp;lt;/tt&amp;gt; have the NRZ sync word.   There are also TTL versions of &amp;lt;tt&amp;gt;Data_sync_3&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;Data_Sync_4&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Note: the output contains only the DV sync word, not the single-zero-bit ARZ occurrences between DVs.  For firmware versions before 1f, the clock rate is fixed at 5MHz.  Later versions allow changing the clock rate by setting a divisor, ''d'', with the '''&amp;lt;tt&amp;gt;ckd&amp;lt;/tt&amp;gt;''' command.  In these versions the clock rate is 50MHz &amp;amp;divide; ''d''.  The default value of ''d'' is 10 (meaning the default clock rate remains 5MHz).&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Pin || Signal !! Pin !! Signal&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #F99&amp;quot; rowspan=&amp;quot;2&amp;quot; |  1 || style=&amp;quot;background: #F99&amp;quot; rowspan=2&amp;quot; | Data_Valid RS485+ || colspan=&amp;quot;2&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #F99&amp;quot; rowspan=&amp;quot;2&amp;quot; | 14 || style=&amp;quot;background: #F99&amp;quot; rowspan=2&amp;quot; | GND&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #F99&amp;quot; rowspan=&amp;quot;2&amp;quot; |  2 || style=&amp;quot;background: #F99&amp;quot; rowspan=2&amp;quot; | Data_Valid RS485−&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #9F9&amp;quot; rowspan=&amp;quot;2&amp;quot; | 15 || style=&amp;quot;background: #9F9&amp;quot; rowspan=2&amp;quot; | Data_Sync_1 RS485+&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #9F9&amp;quot; rowspan=&amp;quot;2&amp;quot; |  3 || style=&amp;quot;background: #9F9&amp;quot; rowspan=2&amp;quot; | GND&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #9F9&amp;quot; rowspan=&amp;quot;2&amp;quot; | 16 || style=&amp;quot;background: #9F9&amp;quot; rowspan=2&amp;quot; | Data_Sync_1 RS485−&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #99F&amp;quot; rowspan=&amp;quot;2&amp;quot; |  4 || style=&amp;quot;background: #99F&amp;quot; rowspan=2&amp;quot; | Data_Sync_2 RS485+&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #99F&amp;quot; rowspan=&amp;quot;2&amp;quot; | 17 || style=&amp;quot;background: #99F&amp;quot; rowspan=2&amp;quot; | GND&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #99F&amp;quot; rowspan=&amp;quot;2&amp;quot; |  5 || style=&amp;quot;background: #99F&amp;quot; rowspan=2&amp;quot; | Data_Sync_2 RS485−&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #FF9&amp;quot; rowspan=&amp;quot;2&amp;quot; | 18 || style=&amp;quot;background: #FF9&amp;quot; rowspan=2&amp;quot; | Data_Sync_3 RS485+&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #FF9&amp;quot; rowspan=&amp;quot;2&amp;quot; |  6 || style=&amp;quot;background: #FF9&amp;quot; rowspan=2&amp;quot; | GND&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #FF9&amp;quot; rowspan=&amp;quot;2&amp;quot; | 19 || style=&amp;quot;background: #FF9&amp;quot; rowspan=2&amp;quot; | Data_Sync_3 RS485−&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #EE9&amp;quot; rowspan=&amp;quot;2&amp;quot; |  7 || style=&amp;quot;background: #EE9&amp;quot; rowspan=2&amp;quot; | Data_Sync_3 TTL&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #EE9&amp;quot; rowspan=&amp;quot;2&amp;quot; | 20 || style=&amp;quot;background: #EE9&amp;quot; rowspan=2&amp;quot; | GND&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #F9F&amp;quot; rowspan=&amp;quot;2&amp;quot; |  8 || style=&amp;quot;background: #F9F&amp;quot; rowspan=2&amp;quot; | GND&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #F9F&amp;quot; rowspan=&amp;quot;2&amp;quot; | 21 || style=&amp;quot;background: #F9F&amp;quot; rowspan=2&amp;quot; | Data_Sync_4 RS485+&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #E9E&amp;quot; rowspan=&amp;quot;2&amp;quot; |  9 || style=&amp;quot;background: #E9E&amp;quot; rowspan=2&amp;quot; | Data_Sync_4 TTL&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #F9F&amp;quot; rowspan=&amp;quot;2&amp;quot; | 22 || style=&amp;quot;background: #F9F&amp;quot; rowspan=2&amp;quot; | Data_Sync_4 RS485−&lt;br /&gt;
|-&lt;br /&gt;
|                          rowspan=&amp;quot;2&amp;quot; | 10 ||                          rowspan=2&amp;quot; | ''N/C''&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #E9E&amp;quot; rowspan=&amp;quot;2&amp;quot; | 23 || style=&amp;quot;background: #E9E&amp;quot; rowspan=2&amp;quot; | GND&lt;br /&gt;
|-&lt;br /&gt;
|                          rowspan=&amp;quot;2&amp;quot; | 11 ||                          rowspan=2&amp;quot; | ''N/C''&lt;br /&gt;
|-&lt;br /&gt;
|                          rowspan=&amp;quot;2&amp;quot; | 24 ||                          rowspan=2&amp;quot; | ''N/C''&lt;br /&gt;
|-&lt;br /&gt;
|                          rowspan=&amp;quot;2&amp;quot; | 12 ||                          rowspan=2&amp;quot; | ''N/C''&lt;br /&gt;
|-&lt;br /&gt;
|                          rowspan=&amp;quot;2&amp;quot; | 25 ||                          rowspan=2&amp;quot; | ''N/C''&lt;br /&gt;
|-&lt;br /&gt;
|                          rowspan=&amp;quot;2&amp;quot; | 13 ||                          rowspan=2&amp;quot; | ''N/C''&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;CP4&amp;quot;&amp;gt;CP4: ACDCU&amp;lt;/span&amp;gt; ===&lt;br /&gt;
:''Note: to make full use of these, firmware updates are needed.''&lt;br /&gt;
The ACDCU connector is a DB-25M.  It can be used for general purpose I/O.  Originally, these lines were used to control associated [[AC-DC Unit]]s, which are no longer in production.  In most cases, this connector is left unpopulated.  All grounds are connected in the sync box to sync box ground.  The '''&amp;lt;tt&amp;gt;ps&amp;lt;/tt&amp;gt;''' command will read these lines and report them as a hex-encoded byte:&lt;br /&gt;
 Synco&amp;gt; ps&lt;br /&gt;
        ACDCU_Status = 0X7B&lt;br /&gt;
The '''&amp;lt;tt&amp;gt;dpu&amp;lt;/tt&amp;gt;''', '''&amp;lt;tt&amp;gt;dpa&amp;lt;/tt&amp;gt;''', '''&amp;lt;tt&amp;gt;epa&amp;lt;/tt&amp;gt;''', and '''&amp;lt;tt&amp;gt;pof&amp;lt;/tt&amp;gt;''' commands can be used to control them.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Pin || Signal !! Pin !! Signal&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #FFBE99&amp;quot; rowspan=&amp;quot;2&amp;quot; |  1 || style=&amp;quot;background: #FFBE99&amp;quot; rowspan=2&amp;quot; | Aux_in_1 || colspan=&amp;quot;2&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #FFBE99&amp;quot; rowspan=&amp;quot;2&amp;quot; | 14 || style=&amp;quot;background: #FFBE99&amp;quot; rowspan=2&amp;quot; | GND&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #FFBE99&amp;quot; rowspan=&amp;quot;2&amp;quot; |  2 || style=&amp;quot;background: #FFBE99&amp;quot; rowspan=2&amp;quot; | Aux_out_1&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #99FFD8&amp;quot; rowspan=&amp;quot;2&amp;quot; | 15 || style=&amp;quot;background: #99FFD8&amp;quot; rowspan=2&amp;quot; | Aux_in_2&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #99FFD8&amp;quot; rowspan=&amp;quot;2&amp;quot; |  3 || style=&amp;quot;background: #99FFD8&amp;quot; rowspan=2&amp;quot; | GND&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #99FFD8&amp;quot; rowspan=&amp;quot;2&amp;quot; | 16 || style=&amp;quot;background: #99FFD8&amp;quot; rowspan=2&amp;quot; | Aux_out_2&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #F199FF&amp;quot; rowspan=&amp;quot;2&amp;quot; |  4 || style=&amp;quot;background: #F199FF&amp;quot; rowspan=2&amp;quot; | Aux_in_3&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #F199FF&amp;quot; rowspan=&amp;quot;2&amp;quot; | 17 || style=&amp;quot;background: #F199FF&amp;quot; rowspan=2&amp;quot; | GND&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #F199FF&amp;quot; rowspan=&amp;quot;2&amp;quot; |  5 || style=&amp;quot;background: #F199FF&amp;quot; rowspan=2&amp;quot; | Aux_out_3&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #F3FF99&amp;quot; rowspan=&amp;quot;2&amp;quot; | 18 || style=&amp;quot;background: #F3FF99&amp;quot; rowspan=2&amp;quot; | Aux_in_4&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #F3FF99&amp;quot; rowspan=&amp;quot;2&amp;quot; |  6 || style=&amp;quot;background: #F3FF99&amp;quot; rowspan=2&amp;quot; | GND&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #F3FF99&amp;quot; rowspan=&amp;quot;2&amp;quot; | 19 || style=&amp;quot;background: #F3FF99&amp;quot; rowspan=2&amp;quot; | Aux_out_4&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #99DAFF&amp;quot; rowspan=&amp;quot;2&amp;quot; |  7 || style=&amp;quot;background: #99DAFF&amp;quot; rowspan=2&amp;quot; | Aux_in_5&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #99DAFF&amp;quot; rowspan=&amp;quot;2&amp;quot; | 20 || style=&amp;quot;background: #99DAFF&amp;quot; rowspan=2&amp;quot; | GND&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #99DAFF&amp;quot; rowspan=&amp;quot;2&amp;quot; |  8 || style=&amp;quot;background: #99DAFF&amp;quot; rowspan=2&amp;quot; | Aux_out_5&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #FF99C0&amp;quot; rowspan=&amp;quot;2&amp;quot; | 21 || style=&amp;quot;background: #FF99C0&amp;quot; rowspan=2&amp;quot; | Aux_in_6&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #FF99C0&amp;quot; rowspan=&amp;quot;2&amp;quot; |  9 || style=&amp;quot;background: #FF99C0&amp;quot; rowspan=2&amp;quot; | GND&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #FF99C0&amp;quot; rowspan=&amp;quot;2&amp;quot; | 22 || style=&amp;quot;background: #FF99C0&amp;quot; rowspan=2&amp;quot; | Aux_out_6&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #A7FF99&amp;quot; rowspan=&amp;quot;2&amp;quot; | 10 || style=&amp;quot;background: #A7FF99&amp;quot; rowspan=2&amp;quot; | Aux_in_7&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #A7FF99&amp;quot; rowspan=&amp;quot;2&amp;quot; | 23 || style=&amp;quot;background: #A7FF99&amp;quot; rowspan=2&amp;quot; | GND&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #A7FF99&amp;quot; rowspan=&amp;quot;2&amp;quot; | 11 || style=&amp;quot;background: #A7FF99&amp;quot; rowspan=2&amp;quot; | Aux_out_7&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #A599FF&amp;quot; rowspan=&amp;quot;2&amp;quot; | 24 || style=&amp;quot;background: #A599FF&amp;quot; rowspan=2&amp;quot; | Aux_in_8&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #A599FF&amp;quot; rowspan=&amp;quot;2&amp;quot; | 12 || style=&amp;quot;background: #A599FF&amp;quot; rowspan=2&amp;quot; | GND&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #A599FF&amp;quot; rowspan=&amp;quot;2&amp;quot; | 25 || style=&amp;quot;background: #A599FF&amp;quot; rowspan=2&amp;quot; | Aux_out_8&lt;br /&gt;
|-&lt;br /&gt;
|                             rowspan=&amp;quot;2&amp;quot; | 13 ||                             rowspan=2&amp;quot; | ''N/C''&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== CJ5: TTL in ===&lt;br /&gt;
A female BNC used to provide an external TTL clock.  The line is 50-ohm terminated.  Ground (outer conductor) is connected to sync box ground.  ''Note: this input is currently ignored in firmware.''&lt;br /&gt;
&lt;br /&gt;
=== CJ6: TTL out ===&lt;br /&gt;
A female BNC providing a NRZ version of the [[#The Manchester output stream|output stream]].  The line is 50-ohm terminated.  Ground (outer conductor) is connected to sync box ground.&lt;br /&gt;
&lt;br /&gt;
=== MCE0 through MCE7: Fibre outputs ===&lt;br /&gt;
There are up to eight fibre-optic outputs (some which may not be populated to reduce power consumption).  These outputs are connected to MCE [[Clock Card]] sync-in connection.  The fibre-optic outputs are divided into two groups of four each, which allow the possibility for dual-rate operation.  All outputs provide the [[#The Manchester output stream|Manchester-encoded output stream]].&lt;br /&gt;
&lt;br /&gt;
=== Reset button ===&lt;br /&gt;
Pressing the reset momentary switch restarts the sync box control program and resets all parameters to their default values.&lt;br /&gt;
&lt;br /&gt;
=== Front panel LEDs ===&lt;br /&gt;
* '''Power (green)''': The power LED is on whenever the sync box is powered on. Note: because the power for this LED is teed off of the power wiring harness (see schematic above), in cases where P5 has become disconnected, with external power applied, this lamp will be lit without the sync box actually being powered.&lt;br /&gt;
* '''Free run (yellow)''': The free-run LED is on whenever the sync box is in free-run mode.&lt;br /&gt;
* '''DV error (red)''': The DV error LED is turned on whenever more than one [[#CJ3|RTS DV pulse]] is received between successive address-reutrns-to-zero (ARZs); see [[#The Manchester output stream|The Manchester output stream]] below. It is turned off at the next ARZ.  This cannot occur in free-run mode.&lt;br /&gt;
&lt;br /&gt;
== Schematics ==&lt;br /&gt;
Here is a box diagram of the 5VDC-in sync box.  The 24VDC-in sync box includes a 24-to-5V DC-DC converter module between the front panel power connector (CP1) and P5 on the sync board.  The obsolete AC-in sync box also uses the same sync board, but has different external connections.&amp;lt;br clear=&amp;quot;all&amp;quot;/&amp;gt;&lt;br /&gt;
[[File:Sync box schematic.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Documents ===&lt;br /&gt;
* [http://www.phas.ubc.ca/%7Emce/mcedocs/hardware/schematics/SyncBox/SC2-ELE-S589-101_RevA2_SyncGen_Schematics.pdf Sync Board Schematics (S589-101)]&lt;br /&gt;
* Block Diagram: &lt;br /&gt;
** [http://www.phas.ubc.ca/%7Emce/mcedocs/hardware/board_block_diagram/S589-001_Syncbox_Block_Diagram.pdf rack-mount AC-in Sync Box (S589-001)]&lt;br /&gt;
** [http://www.phas.ubc.ca/%7Emce/mcedocs/hardware/board_block_diagram/ELE-C589-111A_5VDC_Sync_Box_Block_Diagram.pdf 5V DC-in Sync Box (C589-111A)]&lt;br /&gt;
** [http://www.phas.ubc.ca/%7Emce/mcedocs/hardware/board_block_diagram/ELE-C589-121A_24VDC_Sync_Box_Block_Diagram.pdf 24V DC-in Sync Box (C589-121A)]&lt;br /&gt;
* Wiring Diagrams&lt;br /&gt;
** [http://www.phas.ubc.ca/%7Emce/mcedocs/hardware/schematics/SyncBox/ELE-C589-102_Sync_Box_Connector_Pinouts_Rev3.pdf DC-in Sync Box Wiring (C589-102)]&lt;br /&gt;
** [http://www.phas.ubc.ca/%7Emce/mcedocs/hardware/schematics/SyncBox/S589-102_SyncBox_Wiring_Diagram.pdf rack-mount AC-in Sync Box Wiring]&lt;br /&gt;
** [http://www.phas.ubc.ca/%7Emce/mcedocs/hardware/schematics/SyncBox/S589-103_SyncBox_IO_Cable_Wiring.pdf Cable connection to rack-mount Sync Box]&lt;br /&gt;
&lt;br /&gt;
== RTS mode vs Free-run mode ==&lt;br /&gt;
The sync box operates either in free-run mode (the default) or else RTS mode.  When in free-run mode, the sync box generates its own data valid (DV) triggers by down-counting occurrences of address-return-to-zero (ARZ), which occur at a rate of 25MHz &amp;amp;times; &amp;lt;tt&amp;gt;row_len&amp;lt;/tt&amp;gt; &amp;amp;times; &amp;lt;tt&amp;gt;num_rows&amp;lt;/tt&amp;gt;.  The &amp;lt;tt&amp;gt;data_rate&amp;lt;/tt&amp;gt; parameter to '''&amp;lt;tt&amp;gt;fr&amp;lt;/tt&amp;gt;''' indicates how many ARZ occurrences occur between successive DVs.&lt;br /&gt;
&lt;br /&gt;
In RTS mode, &amp;lt;tt&amp;gt;data_rate&amp;lt;/tt&amp;gt; is ignored.  Instead, the sync box waits for a falling edge on the &amp;lt;tt&amp;gt;[[#CJ3|Data_Valid]]&amp;lt;/tt&amp;gt; RS485 digital input.  When a falling edge is detected, a DV will be output on the next ARZ.  If multiple falling edges are detected before an ARZ, only a single DV will be issued.  (That is: only one external DV trigger is honoured per ARZ.)&lt;br /&gt;
&lt;br /&gt;
These days, almost everyone uses free-run mode.&lt;br /&gt;
&lt;br /&gt;
== The Manchester output stream ==&lt;br /&gt;
By default, the Manchester output bit-stream encodes simply the 25MHz clock as a series of (Manchester-encoded) one bits.  Exceptions to this are:&lt;br /&gt;
* '''Address-Return-to-Zero (ARZ)''': Occurrences of ARZ are encoded into the Manchester bit-stream as a single binary zero.  ARZ occurs at a rate of 25MHz &amp;amp;times; &amp;lt;tt&amp;gt;row_len&amp;lt;/tt&amp;gt; &amp;amp;times; &amp;lt;tt&amp;gt;num_rows&amp;lt;/tt&amp;gt;, regardless of operating mode (free-run or RTS).&lt;br /&gt;
* '''Data Valid sync word''': This is a 40-bit sequence which is output on certain ARZ occurrences.  In free-run mode, the &amp;lt;tt&amp;gt;data_rate&amp;lt;/tt&amp;gt; parameter indicates the number of ARZs between successive DV sync word output.  In [[#RTS mode vs Free-run mode|RTS mode]], it can be output on ''every'' ARZ, but only if a [[#CJ3|RTS DV pulse]] has arrived since the last ARZ.  On ARZs where the DV sync word is not output, only the ARZ bit will be zero (all other bits will be 1).&lt;br /&gt;
&lt;br /&gt;
:The 40-bit DV sync word looks like this; bit zero is sent first:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  zd-fe--- Nnnnnnnn nnnnnnnn nnnnnnnn nnnnnnnn&lt;br /&gt;
  0        0        1        2        3&lt;br /&gt;
  0        8        6        4        2&lt;br /&gt;
&lt;br /&gt;
:where:&lt;br /&gt;
&lt;br /&gt;
:* '''&amp;lt;tt&amp;gt;z&amp;lt;/tt&amp;gt;''' is the address-return-to-zero (ARZ) bit (always zero)&lt;br /&gt;
:* '''&amp;lt;tt&amp;gt;d&amp;lt;/tt&amp;gt;''' is the data valid bit (always zero)&lt;br /&gt;
:* '''&amp;lt;tt&amp;gt;-&amp;lt;/tt&amp;gt;''' are reserved (unused) sync-word status bits&lt;br /&gt;
:* '''&amp;lt;tt&amp;gt;f&amp;lt;/tt&amp;gt;''' is one when operating in free-run mode and zero when in RTS mode&lt;br /&gt;
:* '''&amp;lt;tt&amp;gt;e&amp;lt;/tt&amp;gt;''' is the &amp;lt;tt&amp;gt;dv_error&amp;lt;/tt&amp;gt; bit.  It is one if in RTS mode and more than one RTS DV pulse was received since the last ARZ.  Zero otherwise (including always zero in free-run mode).&lt;br /&gt;
:* '''&amp;lt;tt&amp;gt;Nnn...&amp;lt;/tt&amp;gt;''' is the 32-bit frame sequence number.  The most significant bit (''N'') is sent first.&lt;br /&gt;
&lt;br /&gt;
== Firmware ==&lt;br /&gt;
:''See: [[Sync Box Firmware]]''&lt;br /&gt;
The sync box program comes in two parts: a program that runs on the Atmel microcontroller, and another that runs on the CPLD.  For information on how to obtain the firmware, how to reprogram your sync box, and access to the source code, see [[Sync Box Firmware]].&lt;br /&gt;
&lt;br /&gt;
== RS-232 communication and commanding ==&lt;br /&gt;
Commands are sent to the Sync Box over a 9600 baud RS-232 link, with no hardware or software flow control, connected to an Atmel AT89C5131A-M, an 8-bit, 80C51-compatible single-chip microcontroller.  Input command variables are checked by the command processor and loaded one byte at a time into the sync generator CPLD over programmed I/O connections with eight bits for data and an eight-bit address.&lt;br /&gt;
&lt;br /&gt;
Text returned by the sync box over RS232 use carriage return for line termination.  Most Linux users will need to tell minicom (or whatever serial terminal they use) to add line feeds to avoid all output being overwritten on the same line.&lt;br /&gt;
&lt;br /&gt;
More than one command may be put on a single input command line, up to a maximum of 12 tokens (commands + arguments), and 80 characters.&lt;br /&gt;
&lt;br /&gt;
=== Command summary ===&lt;br /&gt;
The sync box responds to the following commands over the RS-232 link:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command&lt;br /&gt;
! Description&lt;br /&gt;
! Default&lt;br /&gt;
! [[Sync Box Firmware|FW]]&amp;lt;br/&amp;gt;Version&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;tt&amp;gt;h&amp;lt;/tt&amp;gt;&lt;br /&gt;
| Help: print a list of commands.&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | &amp;amp;mdash;&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | all&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;tt&amp;gt;?&amp;lt;/tt&amp;gt;&lt;br /&gt;
| Shows the [[#Status output|current sync box parameters and status]].&lt;br /&gt;
|-&lt;br /&gt;
! rowspan=&amp;quot;3&amp;quot; | &amp;lt;tt&amp;gt;rl&amp;lt;/tt&amp;gt; ''n''&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | Set &amp;lt;tt&amp;gt;row_len&amp;lt;/tt&amp;gt; to ''n'' where 1 &amp;amp;le; ''n'' &amp;amp;le; 4095&amp;lt;br/&amp;gt;&lt;br /&gt;
'''''NB:'''''  Because the sync box clock is 25MHz, this value should be ''half'' the value of the corresponding MCE {{param|sys|row_len}}. For example, to have a {{param|sys|row_len}} of 100 on the MCE, set this value to 50.  Also, &amp;lt;tt&amp;gt;row_len&amp;lt;/tt&amp;gt; &amp;amp;times; &amp;lt;tt&amp;gt;num_rows&amp;lt;/tt&amp;gt; must be &amp;amp;ge; 250.&lt;br /&gt;
| 64 &lt;br /&gt;
| &amp;amp;le; 1f&lt;br /&gt;
|-&lt;br /&gt;
| 53&lt;br /&gt;
| 20, 21&lt;br /&gt;
|-&lt;br /&gt;
| 50&lt;br /&gt;
| &amp;amp;ge; 22&lt;br /&gt;
|-&lt;br /&gt;
! rowspan=&amp;quot;2&amp;quot; | &amp;lt;tt&amp;gt;nr&amp;lt;/tt&amp;gt; ''n''&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | Set {{param|cc|num_rows}} to ''n'' where 1 &amp;amp;le; ''n'' &amp;amp;le; 63&amp;lt;br/&amp;gt;&lt;br /&gt;
Note: &amp;lt;tt&amp;gt;row_len&amp;lt;/tt&amp;gt; &amp;amp;times; &amp;lt;tt&amp;gt;num_rows&amp;lt;/tt&amp;gt; must be &amp;amp;ge; 250.&lt;br /&gt;
| 41&lt;br /&gt;
| &amp;amp;le; 1f&lt;br /&gt;
|-&lt;br /&gt;
| 33&lt;br /&gt;
| &amp;amp;ge; 20&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;tt&amp;gt;rt&amp;lt;/tt&amp;gt;&lt;br /&gt;
| Enable RTS mode (turn off free-run mode).&lt;br /&gt;
| Off&lt;br /&gt;
| all&lt;br /&gt;
|-&lt;br /&gt;
! rowspan=&amp;quot;3&amp;quot; | &amp;lt;tt&amp;gt;fr&amp;lt;/tt&amp;gt; [''n'']&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | Enable free-run mode (turn off RTS mode) and set {{param|cc|data_rate}} to ''n'' where 1 &amp;amp;le; ''n'' &amp;amp;le; 4095.  If ''n'' is omitted, the previously commanded value for &amp;lt;tt&amp;gt;data_rate&amp;lt;/tt&amp;gt; is re-used.&lt;br /&gt;
| 47&lt;br /&gt;
| &amp;amp;le; 1f&lt;br /&gt;
|-&lt;br /&gt;
| 120&lt;br /&gt;
| 20, 21&lt;br /&gt;
|-&lt;br /&gt;
| 38&lt;br /&gt;
| &amp;amp;ge; 22&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;tt&amp;gt;fn&amp;lt;/tt&amp;gt; ''n''&lt;br /&gt;
| Set frame sequence number to ''n'' where 0 &amp;amp;le; ''n'' &amp;amp;le; 2&amp;lt;sup&amp;gt;32&amp;lt;/sup&amp;gt;&amp;amp;minus;1&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| all&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;tt&amp;gt;ckd&amp;lt;/tt&amp;gt; ''n''&lt;br /&gt;
| Set the clock divisor to ''n'' where 1 &amp;amp;le; ''n'' &amp;amp;le; 255.  The NRZ output clock is 50MHz &amp;amp;divide; ''n''.  Before version 1f, the divisor is fixed at 10 (5MHz clock).&lt;br /&gt;
| 10&lt;br /&gt;
| &amp;amp;ge; 1f&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;tt&amp;gt;go&amp;lt;/tt&amp;gt;&lt;br /&gt;
| Enable Manchester and DV outputs.&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | On&lt;br /&gt;
| rowspan=&amp;quot;7&amp;quot; | all&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;tt&amp;gt;st&amp;lt;/tt&amp;gt;&lt;br /&gt;
| Disable Manchester and DV outputs.&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;tt&amp;gt;dpa&amp;lt;/tt&amp;gt;&lt;br /&gt;
| Disable all power outputs.&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | All on&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;tt&amp;gt;dpu&amp;lt;/tt&amp;gt; ''n''&lt;br /&gt;
| Disable power output ''n'' where 0 &amp;amp;le; ''n'' &amp;amp;le; 7&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;tt&amp;gt;epu&amp;lt;/tt&amp;gt; ''n''&lt;br /&gt;
| Enable power output ''n'' where 0 &amp;amp;le; ''n'' &amp;amp;le; 7&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;tt&amp;gt;pof&amp;lt;/tt&amp;gt;&lt;br /&gt;
| Get ACDCU on/off control byte&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | &amp;amp;mdash;&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;tt&amp;gt;ps&amp;lt;/tt&amp;gt;&lt;br /&gt;
| Get ACDCU status byte&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;tt&amp;gt;bank&amp;lt;/tt&amp;gt; ''n''&lt;br /&gt;
| Change target MCE bank for commands. ''n''=0 for both (unbanked); ''n''=1 for low bank (MCE1&amp;amp;ndash;4); ''n''=2 for high bank (MCE5&amp;amp;ndash;8)&lt;br /&gt;
| 0&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | &amp;amp;ge; 31&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;tt&amp;gt;eeprom&amp;lt;/tt&amp;gt;&lt;br /&gt;
| Enter [[#EEPROM manipulation mode|EEPROM manipulation mode]]&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | &amp;amp;mdash;&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;tt&amp;gt;re&amp;lt;/tt&amp;gt;&lt;br /&gt;
| Reset sync box to default state.&lt;br /&gt;
| all&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot; style=&amp;quot;text-align:center&amp;quot; | &lt;br /&gt;
=== EEPROM manipulation mode ===&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;4&amp;quot; | ''Note: this menu is activated by the ''&amp;lt;tt&amp;gt;eeprom&amp;lt;/tt&amp;gt;'' command from the main menu.''&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;tt&amp;gt;h&amp;lt;/tt&amp;gt;&lt;br /&gt;
| Help: print a list of EEPROM manipulation mode commands.&lt;br /&gt;
| rowspan=&amp;quot;5&amp;quot; | &amp;amp;mdash;&lt;br /&gt;
| rowspan=&amp;quot;7&amp;quot; | &amp;amp;ge; 31&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;tt&amp;gt;exit&amp;lt;/tt&amp;gt;&lt;br /&gt;
| Leave EEPROM manipulation mode and return to the main menu.&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;tt&amp;gt;dump&amp;lt;/tt&amp;gt;&lt;br /&gt;
| Dump the contents of the EEPROM.&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;tt&amp;gt;load&amp;lt;/tt&amp;gt;&lt;br /&gt;
| Load the Sync Box configuration saved to the EEPROM, overwriting the currently-running configuration.&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;tt&amp;gt;save&amp;lt;/tt&amp;gt;&lt;br /&gt;
| Save the currently-running Sync Box configuration to the EEPROM.&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;tt&amp;gt;enable_boot&amp;lt;/tt&amp;gt;&lt;br /&gt;
| Load the saved configuration from the EEPROM on boot.&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | Off&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;tt&amp;gt;disable_boot&amp;lt;/tt&amp;gt;&lt;br /&gt;
| Don't load the configuration saved to EEPROM on boot.  Instead, the baked-in default configuration hard-coded in the code will be used.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Status output ===&lt;br /&gt;
The '''&amp;lt;tt&amp;gt;?&amp;lt;/tt&amp;gt;''' command produces output similar to this:&lt;br /&gt;
&lt;br /&gt;
 Synco&amp;gt; ?&lt;br /&gt;
 Mancho_Enable = ON&lt;br /&gt;
 DV_Mode = FreeRun_DV&lt;br /&gt;
 Frun_Count = 47&lt;br /&gt;
 Row_len = 64&lt;br /&gt;
 Num_Row = 41&lt;br /&gt;
 ACDCU_onoff = 0X00&lt;br /&gt;
&lt;br /&gt;
=== Command error messages ===&lt;br /&gt;
Some example error messages:&lt;br /&gt;
 Synco&amp;gt; xx       WHAT? &amp;quot;xx&amp;quot;      // Unrecognised command&lt;br /&gt;
 Synco&amp;gt; rl 9999  TOO BIG &amp;quot;9999&amp;quot;  // Parameter too large&lt;br /&gt;
 Synco&amp;gt; rl 0     TOO SMALL &amp;quot;0&amp;quot;   // Parameter too small&lt;br /&gt;
 Synco&amp;gt; rl xx    WHAT? &amp;quot;xx&amp;quot;      // Parameter could not be parsed&lt;br /&gt;
&lt;br /&gt;
=== Using minicom in Linux ===&lt;br /&gt;
To issue commands to a Sync Box over an RS-232 line, you can use a Linux program called &amp;lt;tt&amp;gt;minicom&amp;lt;/tt&amp;gt;.  To install this application, do:&lt;br /&gt;
 sudo apt-get install minicom&lt;br /&gt;
To start MiniCom:&lt;br /&gt;
 sudo minicom&lt;br /&gt;
Minicom needs the following options changed for it to work properly:&lt;br /&gt;
 &amp;lt;ctrl-a&amp;gt;, &amp;lt;z&amp;gt;, &amp;lt;a&amp;gt; (to turn on line feeds)&lt;br /&gt;
 &amp;lt;ctrl-a&amp;gt;, &amp;lt;z&amp;gt;, &amp;lt;o&amp;gt;, &amp;lt;Serial port setup&amp;gt; &amp;lt;Serial Device&amp;gt; = /dev/ttyS0&lt;br /&gt;
 &amp;lt;ctrl-a&amp;gt;, &amp;lt;z&amp;gt;, &amp;lt;o&amp;gt;, &amp;lt;Serial port setup&amp;gt; &amp;lt;Bps/Par/Bits&amp;gt; = 9600 8N1&lt;br /&gt;
 &amp;lt;ctrl-a&amp;gt;, &amp;lt;z&amp;gt;, &amp;lt;o&amp;gt;, &amp;lt;Serial port setup&amp;gt; &amp;lt;Hardware Flow Control&amp;gt; = No&lt;br /&gt;
 &amp;lt;ctrl-a&amp;gt;, &amp;lt;z&amp;gt;, &amp;lt;o&amp;gt;, &amp;lt;Serial port setup&amp;gt; &amp;lt;Software Flow Control&amp;gt; = No&lt;br /&gt;
 &amp;lt;ctrl-a&amp;gt;, &amp;lt;z&amp;gt;, &amp;lt;o&amp;gt;, &amp;lt;Modem and dialing&amp;gt; &amp;lt;Modem has DCD line&amp;gt; = No&lt;br /&gt;
After you modify these settings, remember to save, exit, and restart Minicom.&lt;br /&gt;
&lt;br /&gt;
== Enabling sync box use in the MCE ==&lt;br /&gt;
To check that the sync box is connected correctly to the MCE, issue the command&lt;br /&gt;
 wb cc {{param|cc|select_clk}} 1&lt;br /&gt;
and then read back the value:&lt;br /&gt;
 rb cc {{param|cc|select_clk}}&lt;br /&gt;
 Line   0 : ok : 1&lt;br /&gt;
&lt;br /&gt;
Setting {{param|cc|select_clk}} to 1 tells the MCE to sync its internal clock with the clock signal encoded from the sync box.  If the MCE does not see the sync box, the parameter will revert to zero (internal clock) in about one second.&lt;br /&gt;
&lt;br /&gt;
To accept sync triggers and serial numbers from the sync box, two more commands are needed:&lt;br /&gt;
 wb cc {{param|cc|use_sync}} 2&lt;br /&gt;
 wb cc {{param|cc|use_dv}} 2&lt;br /&gt;
&lt;br /&gt;
These registers are configured automatically by the config system if the parameters &amp;lt;tt&amp;gt;hardware_sync=1&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;config_sync=1&amp;lt;/tt&amp;gt; in [[experiment.cfg]].  If you change the values in &amp;lt;tt&amp;gt;$MAS_DATA/experiment.cfg&amp;lt;/tt&amp;gt; instead of &amp;lt;tt&amp;gt;$MAS_CONFIG/experiment.cfg&amp;lt;/tt&amp;gt;, remember to run &amp;lt;tt&amp;gt;[[mce_make_config]]&amp;lt;/tt&amp;gt; before re-running the config script.&lt;br /&gt;
&lt;br /&gt;
Also be sure that you have the correct [[mce.cfg]] file.  A quick way to check that sync numbers are getting into the MCE frame data is to take some frames and check the data using the [[eat_packets]] tool:&lt;br /&gt;
 &lt;br /&gt;
 $  mce_run sync_test 400 s&lt;br /&gt;
 RUNFILE_NAME=/data/cryo/current_data//sync_test.run&lt;br /&gt;
 FRAME_BASENAME=/data/cryo/current_data//sync_test&lt;br /&gt;
 &lt;br /&gt;
 $ eat_packets -n 5424 -f $MAS_DATA/sync_test&lt;br /&gt;
 Forced     frame_size=1356 (5424)&lt;br /&gt;
 offset     frm_idx   frame#&lt;br /&gt;
 0000000000        0        0  surprise sync_dv 4168076, after sequence [0,0)&lt;br /&gt;
 EOF, exiting after 10000 frames + 0 bytes&lt;br /&gt;
&lt;br /&gt;
If the &amp;lt;tt&amp;gt;[[mce_run]]&amp;lt;/tt&amp;gt; does not terminate quickly, the sync box may not be properly connected to the MCE.  If &amp;lt;tt&amp;gt;eat_packets&amp;lt;/tt&amp;gt; complains only about the first frame (offset 00000000), then the sync numbers are intact and incrementing contiguously.  If &amp;lt;tt&amp;gt;eat_packets&amp;lt;/tt&amp;gt; complains about pretty much every frame, the sync numbers are not being inserted into the frame data.&lt;br /&gt;
&lt;br /&gt;
== Legacy documents ==&lt;br /&gt;
* The original &amp;quot;Sync Box User's Guide&amp;quot; is available here:&lt;br /&gt;
:http://www.phas.ubc.ca/~mce/mcedocs/hardware/tech_description/SyncBox_UserGuide_S589_502.pdf&lt;br /&gt;
:'''Please note:''' it is rather out of date (being last updated in 2007), and known to be wrong in places.  All relevant information from the guide should be available on this wiki.&lt;br /&gt;
&lt;br /&gt;
[[Category:Sync Box| ]]&lt;/div&gt;</summary>
		<author><name>Mandana</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Vicor_Power_Assembly&amp;diff=7117</id>
		<title>Vicor Power Assembly</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Vicor_Power_Assembly&amp;diff=7117"/>
		<updated>2020-10-15T05:38:25Z</updated>

		<summary type="html">&lt;p&gt;Mandana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Related|Power}}&lt;br /&gt;
The MCE can be equipped with a 24V DC-in or 48V DC-in switching supply designed for use in balloon-based experiments. This unit contains a set of [http://www.vicorpower.com/dc-dc-converters-board-mount Vicor DC-DC converters] that are trimmed to accommodate losses from cables of up to 2-metres, so they can be located up to 2-m away from the actual MCE [[subrack]].&lt;br /&gt;
== Specification==&lt;br /&gt;
&lt;br /&gt;
;DC input&lt;br /&gt;
: Either:&lt;br /&gt;
:* 24V (18-36V) - Rev. C, Issues 1, 2, 5, 6&lt;br /&gt;
:* 48V (36-60V) - Rev. C, Issues 3, 4, 7&lt;br /&gt;
: 3A at 24V to power one 3-MDM MCE48 crate (6A for two)&lt;br /&gt;
&lt;br /&gt;
;DC output&lt;br /&gt;
:    V&amp;lt;sub&amp;gt;a&amp;lt;/sub&amp;gt;&amp;lt;sup&amp;gt;+&amp;lt;/sup&amp;gt;: 6.1 to 6.3 V&lt;br /&gt;
:    V&amp;lt;sub&amp;gt;a&amp;lt;/sub&amp;gt;&amp;lt;sup&amp;gt;&amp;amp;minus;&amp;lt;/sup&amp;gt;: -6.1 to -6.3 V&lt;br /&gt;
:    V&amp;lt;sub&amp;gt;lvd&amp;lt;/sub&amp;gt;: 4.4 to 4.7 V&lt;br /&gt;
:    V&amp;lt;sub&amp;gt;core&amp;lt;/sub&amp;gt;: 2.9 to 3.2 V&lt;br /&gt;
* ''Note:'' The VPA does not provide the obsolete V&amp;lt;sub&amp;gt;ah&amp;lt;/sub&amp;gt; used by rev.A and B [[Readout card]]s and rev.A through D [[Bias card]]s&lt;br /&gt;
&lt;br /&gt;
; Power:	100W&lt;br /&gt;
&lt;br /&gt;
; Regulated:	Yes&lt;br /&gt;
&lt;br /&gt;
; Efficiency:	75%&lt;br /&gt;
; Dimensions (L x W x H):	&lt;br /&gt;
: 24cm x 20cm x 5cm&lt;br /&gt;
; Weight:	&lt;br /&gt;
: &amp;lt; 2kg and a 1-m power cable is ~1kg&lt;br /&gt;
&lt;br /&gt;
== Connectors ==&lt;br /&gt;
; Input:&lt;br /&gt;
* '''Writing harness''': [http://www.phas.ubc.ca/~scuba2/sc2mce/system/power_supply_of_all_kinds/psu_Vicor/design/protel/vpa-c585-401d/ELE-S585-401C3_Schematics.PDF PDF]&lt;br /&gt;
* '''Connector''': Amphenol PTC-2A-14-5P&lt;br /&gt;
[[File:24-48Vin.png|400px]]&lt;br /&gt;
; Output:&lt;br /&gt;
* '''Wiring harness''': [http://www.phas.ubc.ca/~mce/mcedocs/hardware/schematics/PowerSupplyVicor/ELE-C584-402_RevA_Wiring_Harness.pdf PDF]&lt;br /&gt;
* '''Connector''': Winchester MRA34SG.  '''[[MCE Power#Connector &amp;amp; pinout|Pinout]]'''&lt;br /&gt;
* ''Note:'' The VPA can power one 72-HP subrack, or two 48-HP subracks.  Early revisions of the VPA had two output connectors.  Currently, all VPAs have only one Winchester connector for power output, and a wye cable is used when powering pairs of 48-HP subracks.&lt;br /&gt;
== Schematics == &lt;br /&gt;
* Vicor Power Supply Rev C2, PCB Schematics [https://phas.ubc.ca/~mce/mcedocs/hardware/schematics/PowerSupplyVicor/ELE_C585-401_RevC2_VicorPSU_Schematics.pdf]&lt;br /&gt;
* Vicor Power Supply Rev C3, PCB Schematics [https://phas.ubc.ca/~mce/mcedocs/hardware/schematics/PowerSupplyVicor/ELE_C585-401_RevC3_VicorPSU_Schematics.pdf]&lt;br /&gt;
* Wiring [https://phas.ubc.ca/~mce/mcedocs/hardware/schematics/PowerSupplyVicor/ELE-C584-402_RevA_Wiring_Harness.pdf]&lt;br /&gt;
== Mechanical Drawings ==&lt;br /&gt;
* Assembled Box: [http://www.phas.ubc.ca/~scuba2/sc2mce/system/power_supply_of_all_kinds/psu_Vicor/design/mech/Aluminum_Box/MEC-C585-416D_Enclosure.PDF MEC-C585-416D]&lt;br /&gt;
* Box Lid: [http://www.phas.ubc.ca/~scuba2/sc2mce/system/power_supply_of_all_kinds/psu_Vicor/design/mech/Aluminum_Box/MEC-C585-405D_Enclosure_Lid.PDF MEC-C585-405D]&lt;br /&gt;
* Unfolded Box: [http://www.phas.ubc.ca/~scuba2/sc2mce/system/power_supply_of_all_kinds/psu_Vicor/design/mech/Aluminum_Box/MEC-C585-404D_Enclosure_Box_Unfolded.PDF MEC-C585-404D]&lt;br /&gt;
* Mounting Flange: [http://www.phas.ubc.ca/~scuba2/sc2mce/system/power_supply_of_all_kinds/psu_Vicor/design/mech/Aluminum_Box/MEC-C585-406B_Enclosure_Flange.PDF MEC-C585-406B]&lt;br /&gt;
&lt;br /&gt;
== Cooling ==&lt;br /&gt;
For Spider, the mounting/heat extraction block is bolted to a heat exchanger through which the &amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;He blow-off from the cryostat's vapour-cooled shield is vented.&lt;br /&gt;
&lt;br /&gt;
== Photos ==&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Vicor supply 1.jpg|Vicor supply attached to a subrack&lt;br /&gt;
File:Vicor supply 2.jpg|Vicor supply top face with heat pipes&lt;br /&gt;
File:Vicor supply 3.jpg|Vicor supply attached to a subrack&lt;br /&gt;
File:Vicor in spider flingle 1.jpg|3 vicor supplies in Spider mounting bracket, connector side&lt;br /&gt;
File:Vicor in spider flingle 2.jpg|3 vicor supplies in Spider mounting bracket, mounting/cooling side&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
* [[Testing VPA]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Accessories]]&lt;br /&gt;
[[Category:Power]]&lt;/div&gt;</summary>
		<author><name>Mandana</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=PCI_fibre_card&amp;diff=7115</id>
		<title>PCI fibre card</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=PCI_fibre_card&amp;diff=7115"/>
		<updated>2020-01-24T21:33:19Z</updated>

		<summary type="html">&lt;p&gt;Mandana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Related|PCI Fibre Card}}&lt;br /&gt;
==Ordering==&lt;br /&gt;
Users of the [[MCE Control Computer]] (MCC) should not need to order PCI fibre cards separately: they come pre-installed in the MCC.  Retrofitting existing PCI fibre cards into new MCCs requires replacement of the fibre card front panel, which can be surprisingly tricky.  If you already have fibre cards which you would like installed into your new MCC, please send them to UBC for retrofit (although it's less work for us if you just let us order them).&lt;br /&gt;
&lt;br /&gt;
For non-MCC users, the data acquisition card is an ARC-64 - 250 MHz PCI Interface Board Rev. 5E (ask for a card from the batch of those set aside for UBC) from Astronomical Research Cameras, Inc:&lt;br /&gt;
&lt;br /&gt;
:http://www.astro-cam.com/arcpage.php?txt=products.php&amp;amp;cat=Controller%20Boards#ARC-64&lt;br /&gt;
 &lt;br /&gt;
Order the cards from:&lt;br /&gt;
 Bob Leach&lt;br /&gt;
 San Diego State University&lt;br /&gt;
 Astronomical Research Cameras, Inc.&lt;br /&gt;
 2247 San Diego Ave., Ste. 135&lt;br /&gt;
 San Diego, CA  92110-2943&lt;br /&gt;
 USA&lt;br /&gt;
 1.619.278.0866&lt;br /&gt;
 1.619.278.0868 fax&lt;br /&gt;
 leach at astro-cam.com&lt;br /&gt;
&lt;br /&gt;
== Power Consumption ==&lt;br /&gt;
&lt;br /&gt;
Fibre-optic receiver/transmitter pairs consume non-negligible amounts of power.  One of these cards consumes about 5&amp;amp;nbsp;Watts.&lt;br /&gt;
Our software doesn't check / can't tell when SRAM isn't present -- but in an otherwise working system you can easily just do a read/write test:&lt;br /&gt;
&lt;br /&gt;
== Making sure SRAMs are installed ==&lt;br /&gt;
In July 2019, we found out that some PCI cards shipped as early as 2018 were missing SRAM modules and needed  to be shipped back to SDSU for repair. &lt;br /&gt;
Our software doesn't check / can't tell when SRAM isn't present -- but in an otherwise working system you can easily just do a read/write test:&lt;br /&gt;
&lt;br /&gt;
* When SRAM is installed and working:&lt;br /&gt;
 dsp_cmd -qx write y 0x800 0x112233&lt;br /&gt;
 dsp_cmd -qx read y 0x800&lt;br /&gt;
 Line   0 : ok : Y[0x800] = 0x112233&lt;br /&gt;
&lt;br /&gt;
* When SRAM is not installed:&lt;br /&gt;
 dsp_cmd -qx write y 0x800 0x11&lt;br /&gt;
 dsp_cmd -qx read y 0x800&lt;br /&gt;
 Line   0 : ok : Y[0x800] = 0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[PCI card firmware]]&lt;br /&gt;
* [[PCI card hacking]]&lt;br /&gt;
&lt;br /&gt;
[[Category:PCI Fibre Card]]&lt;/div&gt;</summary>
		<author><name>Mandana</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Sync_Box&amp;diff=7093</id>
		<title>Sync Box</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Sync_Box&amp;diff=7093"/>
		<updated>2019-07-05T06:55:17Z</updated>

		<summary type="html">&lt;p&gt;Mandana: /* RTS mode vs Free-run mode */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Related|Sync Box}}&lt;br /&gt;
[[Image:Sync_Box_DC-In_Chassis.JPG|thumb| A 5VDC-in Sync Box with six of eight transmitters installed]] &lt;br /&gt;
[[Image:Sync_Box_AC-In_Rack_Mount.JPG|thumb|A rack-mount AC-in Sync Box - Back]] &lt;br /&gt;
[[Image:Sync_Box_AC-In_Rack_Mount_Front.JPG|thumb|A rack-mount AC-in Sync Box - Front]] &lt;br /&gt;
The '''Sync Box''' generates a data-valid pulse along with a sequential 32-bit number to synchronize the data-acquisition operation of up-to 8 MCE subracks and other housekeeping equipment. The 32-bit number can be used to stamp all collected data points. The Sync Box has 8 fibre outputs to connect to the MCE subracks and few TTL/RS485 outputs to be used by other housekeeping equipment.  User commands are input to the Sync Box via RS-232.  The CPLD generates a serial bit stream which is Manchester encoded with a 25MHz clock, and contains information for occurrences of &amp;lt;tt&amp;gt;address_zero&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;data_valid&amp;lt;/tt&amp;gt;, and also a frame sequence number.&lt;br /&gt;
&lt;br /&gt;
== Specifications ==&lt;br /&gt;
=== Power consumption ===&lt;br /&gt;
Excluding the fibre transmitters, the sync box consumes 1.35W.  Each fibre transmitter (Avago HFBR-1119TZ) consumes 185mA x 5V = 0.925W, so a sync box with all eight tranmitters populated consumes 8.75W.  To minimise power consumption, only the required number of transmitters should be populated.  Input power is either 5V or 24V, depending on configuration.&lt;br /&gt;
&lt;br /&gt;
=== Approximate dimensions ===&lt;br /&gt;
;Size: 5cm × 20cm × 25cm&lt;br /&gt;
;Weight: 600 grams&lt;br /&gt;
&lt;br /&gt;
The obsolete, rack-mount AC-in sync box was 2U (9cm) × 19 inches (48cm) × 21cm deep and weighed 1.9kg.&lt;br /&gt;
&lt;br /&gt;
== External connectors and I/O ==&lt;br /&gt;
:''These are the connectors and pinout for the DC-in sync box.  For the connector pinout of the obsolete AC-in sync box, see [[Sync Box AC-in Rack Mount I/O]].&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;CP1&amp;quot;&amp;gt;CP1: DC power in&amp;lt;/span&amp;gt; ===&lt;br /&gt;
Different connectors are used for 5V and 24V input.&lt;br /&gt;
;5V&lt;br /&gt;
* Box connector is an AMP 206486-1.  +5VDC on pins 1 and 2.  Return on pins 3 and 6.  Other pins not populated.  Pins 3 and 6 are connected to sync box ground.&lt;br /&gt;
:[[File:Sync box 5v in.png]]&lt;br /&gt;
;24V&lt;br /&gt;
* Box connector is an Amphenol PTC-2A-14-5P.  +24VDC on pins B and C.  Return on pins D and E.  Pin A is not connected.  Unlike the 5V-in sync box, the 24V-in sync box isolates pins D and E from sync box ground.&lt;br /&gt;
:[[File:small_mcc_power.png]]&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;CJ2&amp;quot;&amp;gt;CJ2: RS-232 command port&amp;lt;/span&amp;gt; ===&lt;br /&gt;
A nine pin DE-9F provides the serial command port.  See [[#RS-232 communication and commanding|RS-232 communication and commanding]] below for details.  The only lines wired through to the Atmel processor are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Pin !! Signal&lt;br /&gt;
|-&lt;br /&gt;
| 2 || TxD&lt;br /&gt;
|-&lt;br /&gt;
| 3 || RxD&lt;br /&gt;
|-&lt;br /&gt;
| 4 || DSR&lt;br /&gt;
|-&lt;br /&gt;
| 5 || GND&lt;br /&gt;
|}&lt;br /&gt;
Don't rely on &amp;lt;tt&amp;gt;DSR&amp;lt;/tt&amp;gt;.  Assume no hardware or software flow control.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;CJ3&amp;quot;&amp;gt;CJ3: Digital I/O&amp;lt;/span&amp;gt; ===&lt;br /&gt;
A twenty five pin DB-25F is used for digital I/O.  Pins 1, 2, and 14 are inputs.  All other pins are outputs.  All grounds, including pin 14, are connected in the sync box to sync box ground.&lt;br /&gt;
&lt;br /&gt;
In [[#RTS mode vs Free-run mode|RTS mode]], any falling edge of &amp;lt;tt&amp;gt;Data_Valid&amp;lt;/tt&amp;gt; will be taken as a RTS DV signal.  In Free Run mode, this input is ignored.&lt;br /&gt;
&lt;br /&gt;
There are two pairs of RS485 outputs which provide a NRZ and clock version of the DV sync word.  &amp;lt;tt&amp;gt;Data_Sync_1&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;Data_Sync_4&amp;lt;/tt&amp;gt; have the clock and &amp;lt;tt&amp;gt;Data_Sync_2&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;Data_Sync_3&amp;lt;/tt&amp;gt; have the NRZ sync word.   There are also TTL versions of &amp;lt;tt&amp;gt;Data_sync_3&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;Data_Sync_4&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Note: the output contains only the DV sync word, not the single-zero-bit ARZ occurrences between DVs.  For firmware versions before 1f, the clock rate is fixed at 5MHz.  Later versions allow changing the clock rate by setting a divisor, ''d'', with the '''&amp;lt;tt&amp;gt;ckd&amp;lt;/tt&amp;gt;''' command.  In these versions the clock rate is 50MHz &amp;amp;divide; ''d''.  The default value of ''d'' is 10 (meaning the default clock rate remains 5MHz).&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Pin || Signal !! Pin !! Signal&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #F99&amp;quot; rowspan=&amp;quot;2&amp;quot; |  1 || style=&amp;quot;background: #F99&amp;quot; rowspan=2&amp;quot; | Data_Valid RS485+ || colspan=&amp;quot;2&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #F99&amp;quot; rowspan=&amp;quot;2&amp;quot; | 14 || style=&amp;quot;background: #F99&amp;quot; rowspan=2&amp;quot; | GND&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #F99&amp;quot; rowspan=&amp;quot;2&amp;quot; |  2 || style=&amp;quot;background: #F99&amp;quot; rowspan=2&amp;quot; | Data_Valid RS485−&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #9F9&amp;quot; rowspan=&amp;quot;2&amp;quot; | 15 || style=&amp;quot;background: #9F9&amp;quot; rowspan=2&amp;quot; | Data_Sync_1 RS485+&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #9F9&amp;quot; rowspan=&amp;quot;2&amp;quot; |  3 || style=&amp;quot;background: #9F9&amp;quot; rowspan=2&amp;quot; | GND&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #9F9&amp;quot; rowspan=&amp;quot;2&amp;quot; | 16 || style=&amp;quot;background: #9F9&amp;quot; rowspan=2&amp;quot; | Data_Sync_1 RS485−&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #99F&amp;quot; rowspan=&amp;quot;2&amp;quot; |  4 || style=&amp;quot;background: #99F&amp;quot; rowspan=2&amp;quot; | Data_Sync_2 RS485+&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #99F&amp;quot; rowspan=&amp;quot;2&amp;quot; | 17 || style=&amp;quot;background: #99F&amp;quot; rowspan=2&amp;quot; | GND&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #99F&amp;quot; rowspan=&amp;quot;2&amp;quot; |  5 || style=&amp;quot;background: #99F&amp;quot; rowspan=2&amp;quot; | Data_Sync_2 RS485−&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #FF9&amp;quot; rowspan=&amp;quot;2&amp;quot; | 18 || style=&amp;quot;background: #FF9&amp;quot; rowspan=2&amp;quot; | Data_Sync_3 RS485+&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #FF9&amp;quot; rowspan=&amp;quot;2&amp;quot; |  6 || style=&amp;quot;background: #FF9&amp;quot; rowspan=2&amp;quot; | GND&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #FF9&amp;quot; rowspan=&amp;quot;2&amp;quot; | 19 || style=&amp;quot;background: #FF9&amp;quot; rowspan=2&amp;quot; | Data_Sync_3 RS485−&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #EE9&amp;quot; rowspan=&amp;quot;2&amp;quot; |  7 || style=&amp;quot;background: #EE9&amp;quot; rowspan=2&amp;quot; | Data_Sync_3 TTL&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #EE9&amp;quot; rowspan=&amp;quot;2&amp;quot; | 20 || style=&amp;quot;background: #EE9&amp;quot; rowspan=2&amp;quot; | GND&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #F9F&amp;quot; rowspan=&amp;quot;2&amp;quot; |  8 || style=&amp;quot;background: #F9F&amp;quot; rowspan=2&amp;quot; | GND&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #F9F&amp;quot; rowspan=&amp;quot;2&amp;quot; | 21 || style=&amp;quot;background: #F9F&amp;quot; rowspan=2&amp;quot; | Data_Sync_4 RS485+&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #E9E&amp;quot; rowspan=&amp;quot;2&amp;quot; |  9 || style=&amp;quot;background: #E9E&amp;quot; rowspan=2&amp;quot; | Data_Sync_4 TTL&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #F9F&amp;quot; rowspan=&amp;quot;2&amp;quot; | 22 || style=&amp;quot;background: #F9F&amp;quot; rowspan=2&amp;quot; | Data_Sync_4 RS485−&lt;br /&gt;
|-&lt;br /&gt;
|                          rowspan=&amp;quot;2&amp;quot; | 10 ||                          rowspan=2&amp;quot; | ''N/C''&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #E9E&amp;quot; rowspan=&amp;quot;2&amp;quot; | 23 || style=&amp;quot;background: #E9E&amp;quot; rowspan=2&amp;quot; | GND&lt;br /&gt;
|-&lt;br /&gt;
|                          rowspan=&amp;quot;2&amp;quot; | 11 ||                          rowspan=2&amp;quot; | ''N/C''&lt;br /&gt;
|-&lt;br /&gt;
|                          rowspan=&amp;quot;2&amp;quot; | 24 ||                          rowspan=2&amp;quot; | ''N/C''&lt;br /&gt;
|-&lt;br /&gt;
|                          rowspan=&amp;quot;2&amp;quot; | 12 ||                          rowspan=2&amp;quot; | ''N/C''&lt;br /&gt;
|-&lt;br /&gt;
|                          rowspan=&amp;quot;2&amp;quot; | 25 ||                          rowspan=2&amp;quot; | ''N/C''&lt;br /&gt;
|-&lt;br /&gt;
|                          rowspan=&amp;quot;2&amp;quot; | 13 ||                          rowspan=2&amp;quot; | ''N/C''&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;CP4&amp;quot;&amp;gt;CP4: ACDCU&amp;lt;/span&amp;gt; ===&lt;br /&gt;
:''Note: to make full use of these, firmware updates are needed.''&lt;br /&gt;
The ACDCU connector is a DB-25M.  It can be used for general purpose I/O.  Originally, these lines were used to control associated [[AC-DC Unit]]s, which are no longer in production.  In most cases, this connector is left unpopulated.  All grounds are connected in the sync box to sync box ground.  The '''&amp;lt;tt&amp;gt;ps&amp;lt;/tt&amp;gt;''' command will read these lines and report them as a hex-encoded byte:&lt;br /&gt;
 Synco&amp;gt; ps&lt;br /&gt;
        ACDCU_Status = 0X7B&lt;br /&gt;
The '''&amp;lt;tt&amp;gt;dpu&amp;lt;/tt&amp;gt;''', '''&amp;lt;tt&amp;gt;dpa&amp;lt;/tt&amp;gt;''', '''&amp;lt;tt&amp;gt;epa&amp;lt;/tt&amp;gt;''', and '''&amp;lt;tt&amp;gt;pof&amp;lt;/tt&amp;gt;''' commands can be used to control them.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Pin || Signal !! Pin !! Signal&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #FFBE99&amp;quot; rowspan=&amp;quot;2&amp;quot; |  1 || style=&amp;quot;background: #FFBE99&amp;quot; rowspan=2&amp;quot; | Aux_in_1 || colspan=&amp;quot;2&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #FFBE99&amp;quot; rowspan=&amp;quot;2&amp;quot; | 14 || style=&amp;quot;background: #FFBE99&amp;quot; rowspan=2&amp;quot; | GND&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #FFBE99&amp;quot; rowspan=&amp;quot;2&amp;quot; |  2 || style=&amp;quot;background: #FFBE99&amp;quot; rowspan=2&amp;quot; | Aux_out_1&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #99FFD8&amp;quot; rowspan=&amp;quot;2&amp;quot; | 15 || style=&amp;quot;background: #99FFD8&amp;quot; rowspan=2&amp;quot; | Aux_in_2&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #99FFD8&amp;quot; rowspan=&amp;quot;2&amp;quot; |  3 || style=&amp;quot;background: #99FFD8&amp;quot; rowspan=2&amp;quot; | GND&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #99FFD8&amp;quot; rowspan=&amp;quot;2&amp;quot; | 16 || style=&amp;quot;background: #99FFD8&amp;quot; rowspan=2&amp;quot; | Aux_out_2&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #F199FF&amp;quot; rowspan=&amp;quot;2&amp;quot; |  4 || style=&amp;quot;background: #F199FF&amp;quot; rowspan=2&amp;quot; | Aux_in_3&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #F199FF&amp;quot; rowspan=&amp;quot;2&amp;quot; | 17 || style=&amp;quot;background: #F199FF&amp;quot; rowspan=2&amp;quot; | GND&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #F199FF&amp;quot; rowspan=&amp;quot;2&amp;quot; |  5 || style=&amp;quot;background: #F199FF&amp;quot; rowspan=2&amp;quot; | Aux_out_3&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #F3FF99&amp;quot; rowspan=&amp;quot;2&amp;quot; | 18 || style=&amp;quot;background: #F3FF99&amp;quot; rowspan=2&amp;quot; | Aux_in_4&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #F3FF99&amp;quot; rowspan=&amp;quot;2&amp;quot; |  6 || style=&amp;quot;background: #F3FF99&amp;quot; rowspan=2&amp;quot; | GND&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #F3FF99&amp;quot; rowspan=&amp;quot;2&amp;quot; | 19 || style=&amp;quot;background: #F3FF99&amp;quot; rowspan=2&amp;quot; | Aux_out_4&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #99DAFF&amp;quot; rowspan=&amp;quot;2&amp;quot; |  7 || style=&amp;quot;background: #99DAFF&amp;quot; rowspan=2&amp;quot; | Aux_in_5&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #99DAFF&amp;quot; rowspan=&amp;quot;2&amp;quot; | 20 || style=&amp;quot;background: #99DAFF&amp;quot; rowspan=2&amp;quot; | GND&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #99DAFF&amp;quot; rowspan=&amp;quot;2&amp;quot; |  8 || style=&amp;quot;background: #99DAFF&amp;quot; rowspan=2&amp;quot; | Aux_out_5&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #FF99C0&amp;quot; rowspan=&amp;quot;2&amp;quot; | 21 || style=&amp;quot;background: #FF99C0&amp;quot; rowspan=2&amp;quot; | Aux_in_6&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #FF99C0&amp;quot; rowspan=&amp;quot;2&amp;quot; |  9 || style=&amp;quot;background: #FF99C0&amp;quot; rowspan=2&amp;quot; | GND&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #FF99C0&amp;quot; rowspan=&amp;quot;2&amp;quot; | 22 || style=&amp;quot;background: #FF99C0&amp;quot; rowspan=2&amp;quot; | Aux_out_6&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #A7FF99&amp;quot; rowspan=&amp;quot;2&amp;quot; | 10 || style=&amp;quot;background: #A7FF99&amp;quot; rowspan=2&amp;quot; | Aux_in_7&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #A7FF99&amp;quot; rowspan=&amp;quot;2&amp;quot; | 23 || style=&amp;quot;background: #A7FF99&amp;quot; rowspan=2&amp;quot; | GND&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #A7FF99&amp;quot; rowspan=&amp;quot;2&amp;quot; | 11 || style=&amp;quot;background: #A7FF99&amp;quot; rowspan=2&amp;quot; | Aux_out_7&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #A599FF&amp;quot; rowspan=&amp;quot;2&amp;quot; | 24 || style=&amp;quot;background: #A599FF&amp;quot; rowspan=2&amp;quot; | Aux_in_8&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #A599FF&amp;quot; rowspan=&amp;quot;2&amp;quot; | 12 || style=&amp;quot;background: #A599FF&amp;quot; rowspan=2&amp;quot; | GND&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: #A599FF&amp;quot; rowspan=&amp;quot;2&amp;quot; | 25 || style=&amp;quot;background: #A599FF&amp;quot; rowspan=2&amp;quot; | Aux_out_8&lt;br /&gt;
|-&lt;br /&gt;
|                             rowspan=&amp;quot;2&amp;quot; | 13 ||                             rowspan=2&amp;quot; | ''N/C''&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== CJ5: TTL in ===&lt;br /&gt;
A female BNC used to provide an external TTL clock.  The line is 50-ohm terminated.  Ground (outer conductor) is connected to sync box ground.  ''Note: this input is currently ignored in firmware.''&lt;br /&gt;
&lt;br /&gt;
=== CJ6: TTL out ===&lt;br /&gt;
A female BNC providing a NRZ version of the [[#The Manchester output stream|output stream]].  The line is 50-ohm terminated.  Ground (outer conductor) is connected to sync box ground.&lt;br /&gt;
&lt;br /&gt;
=== MCE0 through MCE7: Fibre outputs ===&lt;br /&gt;
There are up to eight fibre-optic outputs (some which may not be populated to reduce power consumption).  These outputs are connected to MCE [[Clock Card]] sync-in connection.  The fibre-optic outputs are divided into two groups of four each, which allow the possibility for dual-rate operation.  All outputs provide the [[#The Manchester output stream|Manchester-encoded output stream]].&lt;br /&gt;
&lt;br /&gt;
=== Reset button ===&lt;br /&gt;
Pressing the reset momentary switch restarts the sync box control program and resets all parameters to their default values.&lt;br /&gt;
&lt;br /&gt;
=== Front panel LEDs ===&lt;br /&gt;
* '''Power (green)''': The power LED is on whenever the sync box is powered on. Note: because the power for this LED is teed off of the power wiring harness (see schematic above), in cases where P5 has become disconnected, with external power applied, this lamp will be lit without the sync box actually being powered.&lt;br /&gt;
* '''Free run (yellow)''': The free-run LED is on whenever the sync box is in free-run mode.&lt;br /&gt;
* '''DV error (red)''': The DV error LED is turned on whenever more than one [[#CJ3|RTS DV pulse]] is received between successive address-reutrns-to-zero (ARZs); see [[#The Manchester output stream|The Manchester output stream]] below. It is turned off at the next ARZ.  This cannot occur in free-run mode.&lt;br /&gt;
&lt;br /&gt;
== Schematics ==&lt;br /&gt;
Here is a box diagram of the 5VDC-in sync box.  The 24VDC-in sync box includes a 24-to-5V DC-DC converter module between the front panel power connector (CP1) and P5 on the sync board.  The obsolete AC-in sync box also uses the same sync board, but has different external connections.&amp;lt;br clear=&amp;quot;all&amp;quot;/&amp;gt;&lt;br /&gt;
[[File:Sync box schematic.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Documents ===&lt;br /&gt;
* [http://www.phas.ubc.ca/%7Emce/mcedocs/hardware/schematics/SyncBox/SC2-ELE-S589-101_RevA2_SyncGen_Schematics.pdf Sync Board Schematics (S589-101)]&lt;br /&gt;
* Block Diagram: &lt;br /&gt;
** [http://www.phas.ubc.ca/%7Emce/mcedocs/hardware/board_block_diagram/S589-001_Syncbox_Block_Diagram.pdf rack-mount AC-in Sync Box (S589-001)]&lt;br /&gt;
** [http://www.phas.ubc.ca/%7Emce/mcedocs/hardware/board_block_diagram/ELE-C589-111A_5VDC_Sync_Box_Block_Diagram.pdf 5V DC-in Sync Box (C589-111A)]&lt;br /&gt;
** [http://www.phas.ubc.ca/%7Emce/mcedocs/hardware/board_block_diagram/ELE-C589-121A_24VDC_Sync_Box_Block_Diagram.pdf 24V DC-in Sync Box (C589-121A)]&lt;br /&gt;
* Wiring Diagrams&lt;br /&gt;
** [http://www.phas.ubc.ca/%7Emce/mcedocs/hardware/schematics/SyncBox/ELE-C589-102_Sync_Box_Connector_Pinouts_Rev3.pdf DC-in Sync Box Wiring (C589-102)]&lt;br /&gt;
** [http://www.phas.ubc.ca/%7Emce/mcedocs/hardware/schematics/SyncBox/S589-102_SyncBox_Wiring_Diagram.pdf rack-mount AC-in Sync Box Wiring]&lt;br /&gt;
** [http://www.phas.ubc.ca/%7Emce/mcedocs/hardware/schematics/SyncBox/S589-103_SyncBox_IO_Cable_Wiring.pdf Cable connection to rack-mount Sync Box]&lt;br /&gt;
&lt;br /&gt;
== RTS mode vs Free-run mode ==&lt;br /&gt;
The sync box operates either in free-run mode (the default) or else RTS mode.  When in free-run mode, the sync box generates its own data valid (DV) triggers by down-counting occurrences of address-return-to-zero (ARZ), which occur at a rate of 25MHz &amp;amp;times; &amp;lt;tt&amp;gt;row_len&amp;lt;/tt&amp;gt; &amp;amp;times; &amp;lt;tt&amp;gt;num_rows&amp;lt;/tt&amp;gt;.  The &amp;lt;tt&amp;gt;data_rate&amp;lt;/tt&amp;gt; parameter to '''&amp;lt;tt&amp;gt;fr&amp;lt;/tt&amp;gt;''' indicates how many ARZ occurrences occur between successive DVs.&lt;br /&gt;
&lt;br /&gt;
In RTS mode, &amp;lt;tt&amp;gt;data_rate&amp;lt;/tt&amp;gt; is ignored.  Instead, the sync box waits for a falling edge on the &amp;lt;tt&amp;gt;[[#CJ3|Data_Valid]]&amp;lt;/tt&amp;gt; RS485 digital input.  When a falling edge is detected, a DV will be output on the next ARZ.  If multiple falling edges are detected before an ARZ, only a single DV will be issued.  (That is: only one external DV trigger is honoured per ARZ.)&lt;br /&gt;
&lt;br /&gt;
These days, almost everyone uses free-run mode.&lt;br /&gt;
&lt;br /&gt;
== The Manchester output stream ==&lt;br /&gt;
By default, the Manchester output bit-stream encodes simply the 25MHz clock as a series of (Manchester-encoded) one bits.  Exceptions to this are:&lt;br /&gt;
* '''Address-Return-to-Zero (ARZ)''': Occurrences of ARZ are encoded into the Manchester bit-stream as a single binary zero.  ARZ occurs at a rate of 25MHz &amp;amp;times; &amp;lt;tt&amp;gt;row_len&amp;lt;/tt&amp;gt; &amp;amp;times; &amp;lt;tt&amp;gt;num_rows&amp;lt;/tt&amp;gt;, regardless of operating mode (free-run or RTS).&lt;br /&gt;
* '''Data Valid sync word''': This is a 40-bit sequence which is output on certain ARZ occurrences.  In free-run mode, the &amp;lt;tt&amp;gt;data_rate&amp;lt;/tt&amp;gt; parameter indicates the number of ARZs between successive DV sync word output.  In [[#RTS mode vs Free-run mode|RTS mode]], it can be output on ''every'' ARZ, but only if a [[#CJ3|RTS DV pulse]] has arrived since the last ARZ.  On ARZs where the DV sync word is not output, only the ARZ bit will be zero (all other bits will be 1).&lt;br /&gt;
&lt;br /&gt;
:The 40-bit DV sync word looks like this; bit zero is sent first:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  zd-fe--- Nnnnnnnn nnnnnnnn nnnnnnnn nnnnnnnn&lt;br /&gt;
  0        0        1        2        3&lt;br /&gt;
  0        8        6        4        2&lt;br /&gt;
&lt;br /&gt;
:where:&lt;br /&gt;
&lt;br /&gt;
:* '''&amp;lt;tt&amp;gt;z&amp;lt;/tt&amp;gt;''' is the address-return-to-zero (ARZ) bit (always zero)&lt;br /&gt;
:* '''&amp;lt;tt&amp;gt;d&amp;lt;/tt&amp;gt;''' is the data valid bit (always zero)&lt;br /&gt;
:* '''&amp;lt;tt&amp;gt;-&amp;lt;/tt&amp;gt;''' are reserved (unused) sync-word status bits&lt;br /&gt;
:* '''&amp;lt;tt&amp;gt;f&amp;lt;/tt&amp;gt;''' is one when operating in free-run mode and zero when in RTS mode&lt;br /&gt;
:* '''&amp;lt;tt&amp;gt;e&amp;lt;/tt&amp;gt;''' is the &amp;lt;tt&amp;gt;dv_error&amp;lt;/tt&amp;gt; bit.  It is one if in RTS mode and more than one RTS DV pulse was received since the last ARZ.  Zero otherwise (including always zero in free-run mode).&lt;br /&gt;
:* '''&amp;lt;tt&amp;gt;Nnn...&amp;lt;/tt&amp;gt;''' is the 32-bit frame sequence number.  The most significant bit (''N'') is sent first.&lt;br /&gt;
&lt;br /&gt;
== Firmware ==&lt;br /&gt;
:''See: [[Sync Box Firmware]]''&lt;br /&gt;
The sync box program comes in two parts: a program that runs on the Atmel microcontroller, and another that runs on the CPLD.  For information on how to obtain the firmware, how to reprogram your sync box, and access to the source code, see [[Sync Box Firmware]].&lt;br /&gt;
&lt;br /&gt;
== RS-232 communication and commanding ==&lt;br /&gt;
Commands are sent to the Sync Box over a 9600 baud RS-232 link, with no hardware or software flow control, connected to an Atmel AT89C5131A-M, an 8-bit, 80C51-compatible single-chip microcontroller.  Input command variables are checked by the command processor and loaded one byte at a time into the sync generator CPLD over programmed I/O connections with eight bits for data and an eight-bit address.&lt;br /&gt;
&lt;br /&gt;
Text returned by the sync box over RS232 use carriage return for line termination.  Most Linux users will need to tell minicom (or whatever serial terminal they use) to add line feeds to avoid all output being overwritten on the same line.&lt;br /&gt;
&lt;br /&gt;
More than one command may be put on a single input command line, up to a maximum of 12 tokens (commands + arguments), and 80 characters.&lt;br /&gt;
&lt;br /&gt;
=== Command summary ===&lt;br /&gt;
The sync box responds to the following commands over the RS-232 link:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command&lt;br /&gt;
! Description&lt;br /&gt;
! Default&lt;br /&gt;
! [[Sync Box Firmware|FW]]&amp;lt;br/&amp;gt;Version&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;tt&amp;gt;h&amp;lt;/tt&amp;gt;&lt;br /&gt;
| Help: print a list of commands.&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | &amp;amp;mdash;&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | all&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;tt&amp;gt;?&amp;lt;/tt&amp;gt;&lt;br /&gt;
| Shows the [[#Status output|current sync box parameters and status]].&lt;br /&gt;
|-&lt;br /&gt;
! rowspan=&amp;quot;3&amp;quot; | &amp;lt;tt&amp;gt;rl&amp;lt;/tt&amp;gt; ''n''&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | Set &amp;lt;tt&amp;gt;row_len&amp;lt;/tt&amp;gt; to ''n'' where 1 &amp;amp;le; ''n'' &amp;amp;le; 4095&amp;lt;br/&amp;gt;&lt;br /&gt;
'''''NB:'''''  Because the sync box clock is 25MHz, this value should be ''half'' the value of the corresponding MCE {{param|sys|row_len}}. For example, to have a {{param|sys|row_len}} of 100 on the MCE, set this value to 50.  Also, &amp;lt;tt&amp;gt;row_len&amp;lt;/tt&amp;gt; &amp;amp;times; &amp;lt;tt&amp;gt;num_rows&amp;lt;/tt&amp;gt; must be &amp;amp;ge; 250.&lt;br /&gt;
| 64 &lt;br /&gt;
| &amp;amp;le; 1f&lt;br /&gt;
|-&lt;br /&gt;
| 53&lt;br /&gt;
| 20, 21&lt;br /&gt;
|-&lt;br /&gt;
| 50&lt;br /&gt;
| &amp;amp;ge; 22&lt;br /&gt;
|-&lt;br /&gt;
! rowspan=&amp;quot;2&amp;quot; | &amp;lt;tt&amp;gt;nr&amp;lt;/tt&amp;gt; ''n''&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | Set {{param|cc|num_rows}} to ''n'' where 1 &amp;amp;le; ''n'' &amp;amp;le; 63&amp;lt;br/&amp;gt;&lt;br /&gt;
Note: &amp;lt;tt&amp;gt;row_len&amp;lt;/tt&amp;gt; &amp;amp;times; &amp;lt;tt&amp;gt;num_rows&amp;lt;/tt&amp;gt; must be &amp;amp;ge; 250.&lt;br /&gt;
| 41&lt;br /&gt;
| &amp;amp;le; 1f&lt;br /&gt;
|-&lt;br /&gt;
| 33&lt;br /&gt;
| &amp;amp;ge; 20&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;tt&amp;gt;rt&amp;lt;/tt&amp;gt;&lt;br /&gt;
| Enable RTS mode (turn off free-run mode).&lt;br /&gt;
| Off&lt;br /&gt;
| all&lt;br /&gt;
|-&lt;br /&gt;
! rowspan=&amp;quot;3&amp;quot; | &amp;lt;tt&amp;gt;fr&amp;lt;/tt&amp;gt; [''n'']&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | Enable free-run mode (turn off RTS mode) and set {{param|cc|data_rate}} to ''n'' where 1 &amp;amp;le; ''n'' &amp;amp;le; 4095.  If ''n'' is omitted, the previously commanded value for &amp;lt;tt&amp;gt;data_rate&amp;lt;/tt&amp;gt; is re-used.&lt;br /&gt;
| 47&lt;br /&gt;
| &amp;amp;le; 1f&lt;br /&gt;
|-&lt;br /&gt;
| 120&lt;br /&gt;
| 20, 21&lt;br /&gt;
|-&lt;br /&gt;
| 38&lt;br /&gt;
| &amp;amp;ge; 22&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;tt&amp;gt;fn&amp;lt;/tt&amp;gt; ''n''&lt;br /&gt;
| Set frame sequence number to ''n'' where 0 &amp;amp;le; ''n'' &amp;amp;le; 2&amp;lt;sup&amp;gt;32&amp;lt;/sup&amp;gt;&amp;amp;minus;1&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| all&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;tt&amp;gt;ckd&amp;lt;/tt&amp;gt; ''n''&lt;br /&gt;
| Set the clock divisor to ''n'' where 1 &amp;amp;le; ''n'' &amp;amp;le; 255.  The NRZ output clock is 50MHz &amp;amp;divide; ''n''.  Before version 1f, the divisor is fixed at 10 (5MHz clock).&lt;br /&gt;
| 10&lt;br /&gt;
| &amp;amp;ge; 1f&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;tt&amp;gt;go&amp;lt;/tt&amp;gt;&lt;br /&gt;
| Enable Manchester and DV outputs.&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | On&lt;br /&gt;
| rowspan=&amp;quot;7&amp;quot; | all&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;tt&amp;gt;st&amp;lt;/tt&amp;gt;&lt;br /&gt;
| Disable Manchester and DV outputs.&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;tt&amp;gt;dpa&amp;lt;/tt&amp;gt;&lt;br /&gt;
| Disable all power outputs.&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | All on&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;tt&amp;gt;dpu&amp;lt;/tt&amp;gt; ''n''&lt;br /&gt;
| Disable power output ''n'' where 0 &amp;amp;le; ''n'' &amp;amp;le; 7&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;tt&amp;gt;epu&amp;lt;/tt&amp;gt; ''n''&lt;br /&gt;
| Enable power output ''n'' where 0 &amp;amp;le; ''n'' &amp;amp;le; 7&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;tt&amp;gt;pof&amp;lt;/tt&amp;gt;&lt;br /&gt;
| Get ACDCU on/off control byte&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | &amp;amp;mdash;&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;tt&amp;gt;ps&amp;lt;/tt&amp;gt;&lt;br /&gt;
| Get ACDCU status byte&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;tt&amp;gt;bank&amp;lt;/tt&amp;gt; ''n''&lt;br /&gt;
| Change target MCE bank for commands. ''n''=0 for both (unbanked); ''n''=1 for low bank (MCE1&amp;amp;ndash;4); ''n''=2 for high bank (MCE5&amp;amp;ndash;8)&lt;br /&gt;
| 0&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | &amp;amp;ge; 31&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;tt&amp;gt;eeprom&amp;lt;/tt&amp;gt;&lt;br /&gt;
| Enter [[#EEPROM manipulation mode|EEPROM manipulation mode]]&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | &amp;amp;mdash;&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;tt&amp;gt;re&amp;lt;/tt&amp;gt;&lt;br /&gt;
| Reset sync box to default state.&lt;br /&gt;
| all&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot; style=&amp;quot;text-align:center&amp;quot; | &lt;br /&gt;
=== EEPROM manipulation mode ===&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;4&amp;quot; | ''Note: this menu is activated by the ''&amp;lt;tt&amp;gt;eeprom&amp;lt;/tt&amp;gt;'' command from the main menu.''&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;tt&amp;gt;h&amp;lt;/tt&amp;gt;&lt;br /&gt;
| Help: print a list of EEPROM manipulation mode commands.&lt;br /&gt;
| rowspan=&amp;quot;5&amp;quot; | &amp;amp;mdash;&lt;br /&gt;
| rowspan=&amp;quot;7&amp;quot; | &amp;amp;ge; 31&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;tt&amp;gt;exit&amp;lt;/tt&amp;gt;&lt;br /&gt;
| Leave EEPROM manipulation mode and return to the main menu.&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;tt&amp;gt;dump&amp;lt;/tt&amp;gt;&lt;br /&gt;
| Dump the contents of the EEPROM.&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;tt&amp;gt;load&amp;lt;/tt&amp;gt;&lt;br /&gt;
| Load the Sync Box configuration saved to the EEPROM, overwriting the currently-running configuration.&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;tt&amp;gt;save&amp;lt;/tt&amp;gt;&lt;br /&gt;
| Save the currently-running Sync Box configuration to the EEPROM.&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;tt&amp;gt;enable_boot&amp;lt;/tt&amp;gt;&lt;br /&gt;
| Load the saved configuration from the EEPROM on boot.&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | Off&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;tt&amp;gt;disable_boot&amp;lt;/tt&amp;gt;&lt;br /&gt;
| Don't load the configuration saved to EEPROM on boot.  Instead, the baked-in default configuration hard-coded in the code will be used.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Status output ===&lt;br /&gt;
The '''&amp;lt;tt&amp;gt;?&amp;lt;/tt&amp;gt;''' command produces output similar to this:&lt;br /&gt;
&lt;br /&gt;
 Synco&amp;gt; ?&lt;br /&gt;
 Mancho_Enable = ON&lt;br /&gt;
 DV_Mode = FreeRun_DV&lt;br /&gt;
 Frun_Count = 47&lt;br /&gt;
 Row_len = 64&lt;br /&gt;
 Num_Row = 41&lt;br /&gt;
 ACDCU_onoff = 0X00&lt;br /&gt;
&lt;br /&gt;
=== Command error messages ===&lt;br /&gt;
Some example error messages:&lt;br /&gt;
 Synco&amp;gt; xx       WHAT? &amp;quot;xx&amp;quot;      // Unrecognised command&lt;br /&gt;
 Synco&amp;gt; rl 9999  TOO BIG &amp;quot;9999&amp;quot;  // Parameter too large&lt;br /&gt;
 Synco&amp;gt; rl 0     TOO SMALL &amp;quot;0&amp;quot;   // Parameter too small&lt;br /&gt;
 Synco&amp;gt; rl xx    WHAT? &amp;quot;xx&amp;quot;      // Parameter could not be parsed&lt;br /&gt;
&lt;br /&gt;
=== Using minicom in Linux ===&lt;br /&gt;
To issue commands to a Sync Box over an RS-232 line, you can use a Linux program called &amp;lt;tt&amp;gt;minicom&amp;lt;/tt&amp;gt;.  To install this application, do:&lt;br /&gt;
 sudo apt-get install minicom&lt;br /&gt;
To start MiniCom:&lt;br /&gt;
 sudo minicom&lt;br /&gt;
Minicom needs the following options changed for it to work properly:&lt;br /&gt;
 &amp;lt;ctrl-a&amp;gt;, &amp;lt;z&amp;gt;, &amp;lt;a&amp;gt; (to turn on line feeds)&lt;br /&gt;
 &amp;lt;ctrl-a&amp;gt;, &amp;lt;z&amp;gt;, &amp;lt;o&amp;gt;, &amp;lt;Serial port setup&amp;gt; &amp;lt;Serial Device&amp;gt; = /dev/ttyS0&lt;br /&gt;
 &amp;lt;ctrl-a&amp;gt;, &amp;lt;z&amp;gt;, &amp;lt;o&amp;gt;, &amp;lt;Serial port setup&amp;gt; &amp;lt;Bps/Par/Bits&amp;gt; = 9600 8N1&lt;br /&gt;
 &amp;lt;ctrl-a&amp;gt;, &amp;lt;z&amp;gt;, &amp;lt;o&amp;gt;, &amp;lt;Serial port setup&amp;gt; &amp;lt;Hardware Flow Control&amp;gt; = No&lt;br /&gt;
 &amp;lt;ctrl-a&amp;gt;, &amp;lt;z&amp;gt;, &amp;lt;o&amp;gt;, &amp;lt;Serial port setup&amp;gt; &amp;lt;Software Flow Control&amp;gt; = No&lt;br /&gt;
 &amp;lt;ctrl-a&amp;gt;, &amp;lt;z&amp;gt;, &amp;lt;o&amp;gt;, &amp;lt;Modem and dialing&amp;gt; &amp;lt;Modem has DCD line&amp;gt; = No&lt;br /&gt;
After you modify these settings, remember to save, exit, and restart Minicom.&lt;br /&gt;
&lt;br /&gt;
== Enabling sync box use in the MCE ==&lt;br /&gt;
To check that the sync box is connected correctly to the MCE, issue the command&lt;br /&gt;
 wb cc {{param|cc|select_clk}} 1&lt;br /&gt;
and then read back the value:&lt;br /&gt;
 rb cc {{param|cc|select_clk}}&lt;br /&gt;
 Line   0 : ok : 1&lt;br /&gt;
&lt;br /&gt;
Setting {{param|cc|select_clk}} to 1 tells the MCE to sync its internal clock with the clock signal encoded from the sync box.  If the MCE does not see the sync box, the parameter will revert to zero (internal clock) in about one second.&lt;br /&gt;
&lt;br /&gt;
To accept sync triggers and serial numbers from the sync box, two more commands are needed:&lt;br /&gt;
 wb cc {{param|cc|use_sync}} 2&lt;br /&gt;
 wb cc {{param|cc|use_dv}} 2&lt;br /&gt;
&lt;br /&gt;
These registers are configured automatically by the config system if the parameters &amp;lt;tt&amp;gt;hardware_sync=1&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;config_sync=1&amp;lt;/tt&amp;gt; in [[experiment.cfg]].  If you change the values in &amp;lt;tt&amp;gt;$MAS_DATA/experiment.cfg&amp;lt;/tt&amp;gt; instead of &amp;lt;tt&amp;gt;$MAS_CONFIG/experiment.cfg&amp;lt;/tt&amp;gt;, remember to run &amp;lt;tt&amp;gt;[[mce_make_config]]&amp;lt;/tt&amp;gt; before re-running the config script.&lt;br /&gt;
&lt;br /&gt;
Also be sure that you have the correct [[mce.cfg]] file.  A quick way to check that sync numbers are getting into the MCE frame data is to take some frames and check the data using the [[eat_packets]] tool:&lt;br /&gt;
 &lt;br /&gt;
 $  mce_run sync_test 400 s&lt;br /&gt;
 RUNFILE_NAME=/data/cryo/current_data//sync_test.run&lt;br /&gt;
 FRAME_BASENAME=/data/cryo/current_data//sync_test&lt;br /&gt;
 &lt;br /&gt;
 $ eat_packets -n 5424 -f $MAS_DATA/sync_test&lt;br /&gt;
 Forced     frame_size=1356 (5424)&lt;br /&gt;
 offset     frm_idx   frame#&lt;br /&gt;
 0000000000        0        0  surprise sync_dv 4168076, after sequence [0,0)&lt;br /&gt;
 EOF, exiting after 10000 frames + 0 bytes&lt;br /&gt;
&lt;br /&gt;
If the &amp;lt;tt&amp;gt;[[mce_run]]&amp;lt;/tt&amp;gt; does not terminate quickly, the sync box may not be properly connected to the MCE.  If &amp;lt;tt&amp;gt;eat_packets&amp;lt;/tt&amp;gt; complains only about the first frame (offset 00000000), then the sync numbers are intact and incrementing contiguously.  If &amp;lt;tt&amp;gt;eat_packets&amp;lt;/tt&amp;gt; complains about pretty much every frame, the sync numbers are not being inserted into the frame data.&lt;br /&gt;
&lt;br /&gt;
== Legacy documents ==&lt;br /&gt;
* The original &amp;quot;Sync Box User's Guide&amp;quot; is available here:&lt;br /&gt;
:http://www.phas.ubc.ca/~mce/mcedocs/hardware/tech_description/SyncBox_UserGuide_S589_502.pdf&lt;br /&gt;
:'''Please note:''' it is rather out of date (being last updated in 2007), and known to be wrong in places.  All relevant information from the guide should be available on this wiki.&lt;br /&gt;
&lt;br /&gt;
[[Category:Sync Box| ]]&lt;/div&gt;</summary>
		<author><name>Mandana</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Multicard_MAS&amp;diff=7092</id>
		<title>Multicard MAS</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Multicard_MAS&amp;diff=7092"/>
		<updated>2019-06-06T22:12:52Z</updated>

		<summary type="html">&lt;p&gt;Mandana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Most of MAS is agnostic about the number of fibre cards in the system.  By default, MAS only supports one fibre card.  Support for multiple cards (''&amp;quot;Multicard MAS&amp;quot;'') can be turned on, however, when building MAS.  This page outlines specific procedures and caveats when using Multicard MAS.&lt;br /&gt;
&lt;br /&gt;
Care has been taken to make Multicard MAS backwards compatible with the old, single card system, to permit use of legacy scripts and applications (albeit, perhaps restricted to one of the fibre cards in the system).&lt;br /&gt;
&lt;br /&gt;
== Building MAS ==&lt;br /&gt;
&lt;br /&gt;
:''For generic build instructions, see: [[MAS OS setup]]''&lt;br /&gt;
&lt;br /&gt;
To enable Multicard MAS, pass --enable-multicard to configure before building MAS:&lt;br /&gt;
&lt;br /&gt;
  ./configure --enable-multicard[=N]&lt;br /&gt;
&lt;br /&gt;
where ''&amp;lt;code&amp;gt;N&amp;lt;/code&amp;gt;'' is the maximum number of cards you want MAS to support.  If omitted, ''&amp;lt;code&amp;gt;N&amp;lt;/code&amp;gt;'' defaults to 2.  Specifiying &amp;lt;code&amp;gt;''N''&amp;lt;=1&amp;lt;/code&amp;gt;, is the same as not specifying this option at all (''i.e.'': multicard support is turned off). This results in both a multicard capable driver and MAS library/applications.&lt;br /&gt;
&lt;br /&gt;
Because the subracks attached to each fibre card may be different, instead of a single [[mce.cfg]] file, Multicard MAS requires one mce.cfg file for each fibre card supported, called /etc/mce/mce0.cfg, /etc/mce/mce1.cfg, /etc/mce/mce2.cfg, &amp;amp;c.  As a result, instead of making a mce.cin template file, you must make mce0.cin, mce1.cin, mce2.cin, &amp;amp;c.&lt;br /&gt;
&lt;br /&gt;
Running make and make install should proceed as usual.  (See [[MAS OS setup#make|MAS OS setup]].)&lt;br /&gt;
&lt;br /&gt;
== Card numbering ==&lt;br /&gt;
&lt;br /&gt;
The kernel driver assigns sequential physical numbers to cards in the order in which they're passed in by the kernel at boot time.  Because there is no guarantee that this procedure results in the same physical card enumeration each time, MAS abstracts physical card numbers to logical card numbers, which ''are'' fixed to a given physical card.  Although the cards are indistinguishable themselves, MAS uses the PCI slot address to break the degeneracy.&lt;br /&gt;
&lt;br /&gt;
After the kernel boots, and the kernel driver has assigned physical cards, udev runs mas_mknodes for each card it finds, passing this script the PCI slot address of the card.  mas_mknodes then consults &amp;lt;code&amp;gt;[[/proc/mce_dsp]]&amp;lt;/code&amp;gt; to determine the card's physical number and a the file /etc/mce/mce_card_id (if present) to determine it logical card number.  It then makes nodes &amp;lt;code&amp;gt;/dev/mce_cmd&amp;amp;lt;l&amp;amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/dev/mce_cmd&amp;amp;lt;l&amp;amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/dev/mce_cmd&amp;amp;lt;l&amp;amp;gt;&amp;lt;/code&amp;gt; pointing to the appropriate physical card, where ''&amp;lt;code&amp;gt;l&amp;lt;/code&amp;gt;'' is the logical card number.  (See the udev ruleset in scripts/91-mas.rules and &amp;quot;mas_mknodes --help&amp;quot; for more details.)&lt;br /&gt;
&lt;br /&gt;
=== Generating /etc/mce/mce_card_id ===&lt;br /&gt;
The /etc/mce/mce_card_id file is a simple text file with two columns, and one row for each fibre card supported.  For a given card, the first column contains its PCI slot address, and the second column it's logical card number.  The file may also contain&lt;br /&gt;
comment lines whose first character is a hash mark (#).  A typical file might look like:&lt;br /&gt;
&lt;br /&gt;
 # PCI_SLOT_ID   LOGICAL_CARD_NUM&lt;br /&gt;
 0000:02:0c.0        0&lt;br /&gt;
 0000:02:0d.0        1&lt;br /&gt;
&lt;br /&gt;
The file can be created by hand, but it is typically made by running the mas_make_card_id script.  This script examines the system as it is currently configured and creates a /etc/mce/mce_card_id which will result in the same configuration on subsequent boots.  This script obtains logical card numbers by searching for /dev/mce_cmd# devices, and physical card numbers from &amp;lt;code&amp;gt;[[/proc/mce_dsp]]&amp;lt;/code&amp;gt;.  It ignores /dev/mce_cmd# devices which do not point to a valid physical card.  It will also ignore physical cards which do not have a corresponding /dev/mce_cmd# (ie. no logical card number assigned), unless the '-a' option is passed to the script, in which case, it will automatically assign logical card numbers to unenumerated physical cards.&lt;br /&gt;
&lt;br /&gt;
As a result, a /etc/mce/mce_card_id file can be created for a brand new system with no cards configured by running:&lt;br /&gt;
&lt;br /&gt;
 mas_make_card_id -a&lt;br /&gt;
&lt;br /&gt;
If /etc/mce/mce_card_id doesn't exist, mas_mknodes simply uses physical card numbers for logical card numbers.  If the file does exist, but the specified PCI slot address isn't in the file, mas_mknodes will fail.&lt;br /&gt;
&lt;br /&gt;
== Using Multicard MAS ==&lt;br /&gt;
:'''''Note:''' The following assumes a basic familiarity with the use of MAS and MCE script with a single fibre card.  See [[MAS]] and [[MCE script]] for further details.''&lt;br /&gt;
&lt;br /&gt;
When multiple fibre cards are present in a system, both MAS and MCE script need facilities to select and distinguish between them.  Multicard MAS complicates the MAS/MCE script ecology by requiring paths previously specified by environmental variables, most notably $MAS_DATA, to change based on which fibre card is being used.&lt;br /&gt;
&lt;br /&gt;
=== Summary ===&lt;br /&gt;
&lt;br /&gt;
The following is a quick summary of how to use multiple fibre cards when doing stuff on the command line for people familiar with single-card MAS: &lt;br /&gt;
&lt;br /&gt;
* Don't explicitly set any environmental variables&lt;br /&gt;
* Instead of the old mas_env.bash, add to your .bashrc:&lt;br /&gt;
  eval `/usr/mce/bin/mas_var -e -s`&lt;br /&gt;
:(NB: those are back-ticks).  This will insert all sorts of useful MAS_... variables into your environment.&lt;br /&gt;
* Card #0 is selected by default.&lt;br /&gt;
* To change to card ''N'', execute:&lt;br /&gt;
  $ eval `mas_var -n ''N'' -e -s`&lt;br /&gt;
* The two MCEs need different mce.cfg (called mce0.cfg, mce1.cfg, ...)  MAS will make these for you.&lt;br /&gt;
* The two MCEs need different configuration data.  Configuration is distinguished via the array_id file.&lt;br /&gt;
&lt;br /&gt;
The following sections go into more detail about how multicard MAS works and why it's done that way.&lt;br /&gt;
&lt;br /&gt;
=== Explicit card selection with MAS applications ===&lt;br /&gt;
&lt;br /&gt;
Most MAS application programs have a &amp;lt;tt&amp;gt;-n&amp;lt;/tt&amp;gt; switch which allows specifying explicitly which logical card to operate on:&lt;br /&gt;
 $ mce_cmd -n 0 -qx rb cc card_id&lt;br /&gt;
 Line   0 : ok : 0xb5ccf7&lt;br /&gt;
 $ mce_cmd -n 1 -qx rb cc card_id&lt;br /&gt;
 Line   0 : ok : 0x20f373d&lt;br /&gt;
&lt;br /&gt;
This is fine for simple operations, but can get tedious with repeated use, and doesn't work with many MCE scripts (which don't pass -n when spawning MAS applications like [[mce_cmd]]).&lt;br /&gt;
&lt;br /&gt;
=== Card selection via the environment ===&lt;br /&gt;
&lt;br /&gt;
If no explicit card is passed to a MAS application with -n, they will consult the environmental variable $[[MAS_MCE_DEV]] to determine the current logical card number:&lt;br /&gt;
&lt;br /&gt;
 $ export MAS_MCE_DEV=0&lt;br /&gt;
 $ mce_cmd -qx rb cc card_id&lt;br /&gt;
 Line   0 : ok : 0xb5ccf7&lt;br /&gt;
 $ export MAS_MCE_DEV=1&lt;br /&gt;
 $ mce_cmd -qx rb cc card_id&lt;br /&gt;
 Line   0 : ok : 0x20f373d&lt;br /&gt;
&lt;br /&gt;
This is better, and such card numbers specified in this way will even be honoured by MCE scripts.  For backwards compatibility, if neither -n is specified nor $MAS_MCE_DEV is available, card zero is used as a default.&lt;br /&gt;
&lt;br /&gt;
=== Card-dependent paths and mas_var ===&lt;br /&gt;
&lt;br /&gt;
While $MAS_MCE_DEV solves the card selection problem, the problem of distinguishing the data output from the two cards still remains.  Writing configuration and data from more than one card to the same data directory will confuse much of MCE script.  The minimum solution requires changing ''at least'' $[[MAS_DATA]] and $[[MAS_DATA_ROOT]] when switching fibre cards to get MCE script to work:&lt;br /&gt;
&lt;br /&gt;
 $ export MAS_MCE_DEV=0&lt;br /&gt;
 $ export MAS_DATA_ROOT=/data/mce0&lt;br /&gt;
 $ export MAS_DATA=/data/mce0/current_data&lt;br /&gt;
 $ mce_run test_data 100000 s&lt;br /&gt;
 $ export MAS_MCE_DEV=1&lt;br /&gt;
 $ export MAS_DATA_ROOT=/data/mce1&lt;br /&gt;
 $ export MAS_DATA=/data/mce1/current_data&lt;br /&gt;
 $ mce_run test_data 100000 s&lt;br /&gt;
&lt;br /&gt;
That's a bit of a pain.  So [[MCE script]] has been overhauled and now they never explicitly reference environmental variables.  Instead a new MAS application has been written called [[mas_var]], which the MCE scripts use to calculate paths for the current fibre card:&lt;br /&gt;
&lt;br /&gt;
 $ export MAS_MCE_DEV=0&lt;br /&gt;
 $ mas_var --data-dir&lt;br /&gt;
 /data/mce0/current_data&lt;br /&gt;
 $ export MAS_MCE_DEV=1&lt;br /&gt;
 $ mas_var --data-dir&lt;br /&gt;
 /data/mce1/current_data&lt;br /&gt;
&lt;br /&gt;
And now we're back to:&lt;br /&gt;
&lt;br /&gt;
 $ export MAS_MCE_DEV=0&lt;br /&gt;
 $ mce_run test_data 100000 s&lt;br /&gt;
 $ export MAS_MCE_DEV=1&lt;br /&gt;
 $ mce_run test_data 100000 s&lt;br /&gt;
&lt;br /&gt;
(where mce_run contains calls to mas_var) with data written to either /data/mce0/current_data/test_data or /data/mce1/current_data/test_data as appropriate.  So standard operating procedure should now be to not define any MAS_* environmental variables except for $MAS_MCE_DEV.&lt;br /&gt;
&lt;br /&gt;
[[mas_var]] calculates its paths based on information in [[mas.cfg]] which was, in turn, generated by information passed to MAS's ./configure script.  Use of the [[mas_var]] program is explained on its own page, which you might want to read.&lt;br /&gt;
&lt;br /&gt;
=== Usability problems without an environment ===&lt;br /&gt;
&lt;br /&gt;
In addition to specifying paths to the MCE scripts, the $MAS_* environmental variables were also handy when working interactively with an MCE.  If no paths are provided in the environment, it's no longer possible to do something convenient like:&lt;br /&gt;
&lt;br /&gt;
 $ cd $MAS_DATA&lt;br /&gt;
&lt;br /&gt;
To get around this, [[mas_var]], has a mode where it prints out bash (or C-shell) commands to set-up all the environment which can be piped back into the currently running shell using the shell built-in command &amp;lt;tt&amp;gt;eval&amp;lt;/tt&amp;gt; and a pair of back-ticks (`):&lt;br /&gt;
&lt;br /&gt;
 $ echo $MAS_DATA&lt;br /&gt;
 &lt;br /&gt;
 $ eval `mas_var -s`&lt;br /&gt;
 $ echo $MAS_DATA&lt;br /&gt;
 /data/mce0/current_data&lt;br /&gt;
&lt;br /&gt;
(See the [[mas_var]] page for more information on -s and -c.)&lt;br /&gt;
&lt;br /&gt;
=== Environmental overrides ===&lt;br /&gt;
&lt;br /&gt;
Another feature this environment-less operation removes from the legacy operation of MCE script: if scripts always use [[mas_var]] to determine paths, and mas_var just generates them from the information given to it in [[mas.cfg]], then it's no longer possible to override MAS paths, which we could do previously by just changing the appropriate $MAS_* variable.&lt;br /&gt;
&lt;br /&gt;
In the past we could do:&lt;br /&gt;
 $ mce_raw_acq 1&lt;br /&gt;
 Acquiring raw data to /data/cryo/current_data/1350606349_raw&lt;br /&gt;
 $ export MAS_DATA=/tmp&lt;br /&gt;
 $ mce_raw_acq 1&lt;br /&gt;
 Acquiring raw data to /tmp/1350606363_raw&lt;br /&gt;
&lt;br /&gt;
In order to recover this behaviour, if asking [[mas_var]] for a path which has a corresponding environmental variable (like &amp;quot;mas_var --data-dir&amp;quot; is associated with $MAS_DATA), mas_var will just repeat the value of that environmental variable if it has been set:&lt;br /&gt;
&lt;br /&gt;
 $ mas_var --data-dir&lt;br /&gt;
 /data/mce0/current_data&lt;br /&gt;
 $ mce_raw_acq 1&lt;br /&gt;
 Acquiring raw data to /data/mce0/current_data/1350606349_raw&lt;br /&gt;
 $ export MAS_DATA=/tmp&lt;br /&gt;
 $ mas_var --data-dir&lt;br /&gt;
 /tmp&lt;br /&gt;
 $ mce_raw_acq 1&lt;br /&gt;
 Acquiring raw data to /tmp/1350606363_raw&lt;br /&gt;
&lt;br /&gt;
so environmental overrides are once again possible.&lt;br /&gt;
&lt;br /&gt;
=== Sticky overrides ===&lt;br /&gt;
&lt;br /&gt;
Introducing environmental override capability to [[mas_var]] gives us ''another'' problem: it can have serious unexpected results on a multicard system since the overrides defeat the card-specific path solution that mas_var originally gave us:&lt;br /&gt;
&lt;br /&gt;
 $ export MAS_MCE_DEV=0&lt;br /&gt;
 $ mas_var --data-dir&lt;br /&gt;
 /data/mce0/current_data&lt;br /&gt;
 $ export MAS_DATA=/data/mce0/current_data&lt;br /&gt;
 $ mas_var --data-dir&lt;br /&gt;
 /data/mce0/current_data&lt;br /&gt;
 $ export MAS_MCE_DEV=1&lt;br /&gt;
 $ mas_var --data-dir&lt;br /&gt;
 /data/mce0/current_data&lt;br /&gt;
&lt;br /&gt;
(ie. environmental variables are &amp;quot;sticky&amp;quot;: they don't change when the card changes, which happens to be the very problem we were trying to solve with mas_var in the first place).&lt;br /&gt;
&lt;br /&gt;
There's a -e switch to mas_var which forces it to ignore the current environment and reset everything to the defaults contained in [[mas.cfg]].  That solves the problem here:&lt;br /&gt;
&lt;br /&gt;
 $ export MAS_MCE_DEV=0&lt;br /&gt;
 $ mas_var --data-dir&lt;br /&gt;
 /data/mce0/current_data&lt;br /&gt;
 $ export MAS_DATA=/data/mce0/current_data&lt;br /&gt;
 $ mas_var --data-dir&lt;br /&gt;
 /data/mce0/current_data&lt;br /&gt;
 $ export MAS_MCE_DEV=1&lt;br /&gt;
 $ eval `mas_var -e -s`&lt;br /&gt;
 $ mas_var --data-dir&lt;br /&gt;
 /data/mce1/current_data&lt;br /&gt;
&lt;br /&gt;
Actually, since mas_var is a regular MAS application, it supports the -n switch and we can make card-selection and environment reset a one-liner:&lt;br /&gt;
&lt;br /&gt;
 $ eval `mas_var -n 0 -e -s`&lt;br /&gt;
 $ echo $MAS_MCE_DEV&lt;br /&gt;
 0&lt;br /&gt;
 $ mas_var --data-dir&lt;br /&gt;
 /data/mce0/current_data&lt;br /&gt;
 $ export MAS_DATA=/data/mce0/current_data&lt;br /&gt;
 $ mas_var --data-dir&lt;br /&gt;
 /data/mce0/current_data&lt;br /&gt;
 $ eval `mas_var -n 1 -e -s`&lt;br /&gt;
 $ echo $MAS_MCE_DEV&lt;br /&gt;
 1&lt;br /&gt;
 $ mas_var --data-dir&lt;br /&gt;
 /data/mce1/current_data&lt;br /&gt;
&lt;br /&gt;
which makes things pretty useable.&lt;br /&gt;
&lt;br /&gt;
For interactive use, that's probably good enough: we can put&lt;br /&gt;
&lt;br /&gt;
 eval `mas_var -e -s`&lt;br /&gt;
&lt;br /&gt;
in our .bashrc file to intialise the MAS environment the first time when we log in and then just run:&lt;br /&gt;
&lt;br /&gt;
 $ eval `mas_var -n ''N'' -e -s`&lt;br /&gt;
&lt;br /&gt;
whenever we want to switch to card ''N''.&lt;br /&gt;
&lt;br /&gt;
=== Streamlining: the &amp;quot;minimal environment&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
If we don't care about being able to do things like &amp;quot;cd $MAS_DATA&amp;quot; we can simplify the environment even more to the point that running mas_var is no longer&lt;br /&gt;
needed to switch cards.  This is especially handy when running MAS for multiple cards semi- or non-interactively.  The minimum environment needed to run MCE scripts on any particular card is:&lt;br /&gt;
&lt;br /&gt;
* '''$MAS_MCE_DEV''' to choose the card&lt;br /&gt;
* '''$MAS_VAR''' to point the MCE scripts to [[mas_var]]&lt;br /&gt;
* modified '''$PATH''' and '''$PYTHONPATH''' to allow the shell and Python to find the MAS and MCE script elements needed to run the system.&lt;br /&gt;
&lt;br /&gt;
This minimal environment will be provided if running &amp;quot;mas_var -s&amp;quot; (or &amp;quot;mas_var -c&amp;quot; in the C Shell) including the -x option (also add -e if you want to remove any previous environmental overrides):&lt;br /&gt;
&lt;br /&gt;
 $ eval `mas_var -x -s`&lt;br /&gt;
&lt;br /&gt;
This minimal environment allows very simple card switching at the expense of losing the convenience of having the $MAS_... paths in the environment:&lt;br /&gt;
&lt;br /&gt;
 $ eval `mas_var -x -s`&lt;br /&gt;
 $ MAS_MCE_DEV=0 mce_raw_acq 1&lt;br /&gt;
 Acquiring raw data to /data/mce0/current_data/1350606349_raw&lt;br /&gt;
 $ MAS_MCE_DEV=1 mce_raw_acq 1&lt;br /&gt;
 Acquiring raw data to /data/mce1/current_data/1350606363_raw&lt;br /&gt;
&lt;br /&gt;
Similarly, automated higher level applications which control multiple fibre cards in the same program can switch cards, if launched from the minimal environment, by then just setenv(3)ing a single variable ($MAS_MCE_DEV), which has very appealing robustness benefits.&lt;br /&gt;
&lt;br /&gt;
== Writing Multicard-MAS-enabled scripts ==&lt;br /&gt;
&lt;br /&gt;
Here are some pointers for writing MCE scripts for use in multicard environments:&lt;br /&gt;
=== Bash ===&lt;br /&gt;
* never hard-code MAS or MCE paths.&lt;br /&gt;
* add to the top of your script:&lt;br /&gt;
 if [ ! -x ${MAS_VAR:=/usr/mce/bin/mas_var} ]; then&lt;br /&gt;
   echo &amp;quot;Cannot find mas_var.  Set MAS_VAR to the full path to the mas_var binary.&amp;quot; &amp;gt;&amp;amp;2&lt;br /&gt;
   exit 1&lt;br /&gt;
 else&lt;br /&gt;
   eval $(${MAS_VAR} -s)&lt;br /&gt;
 fi&lt;br /&gt;
: The above tries to find [[mas_var]] (using $MAS_VAR if set) and then uses it to set all the &amp;quot;regular&amp;quot; environmental variables.&lt;br /&gt;
* after executing the above, your script can use the regular environmental variables: $MAS_DATA, $MAS_BIN, etc.&lt;br /&gt;
=== Python ===&lt;br /&gt;
* never hard-code MAS or MCE paths.&lt;br /&gt;
* don't use environmental variables&lt;br /&gt;
* a [[Auto-setup (python)#class_util.mas_path|mas_path]] module has been created to deal with paths; it's part of the [[Auto-setup (python)|auto_setup package]]. At the top of your script, add:&lt;br /&gt;
 from auto_setup.util import mas_path&lt;br /&gt;
 mas_path = mas_path()&lt;br /&gt;
* Use mas_path to fetch directories:&lt;br /&gt;
 data_dir = mas_path.data_dir()&lt;br /&gt;
* Best practice is to use os.path.join to concatenate path elements like these:&lt;br /&gt;
 data_file = os.path.join(mas_path.data_dir(), &amp;quot;my_data_file&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
[[Category:MAS]]&lt;/div&gt;</summary>
		<author><name>Mandana</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Bias_Card_firmware&amp;diff=7088</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=7088"/>
		<updated>2018-09-08T01:12:18Z</updated>

		<summary type="html">&lt;p&gt;Mandana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Related|Bias Card Firmware}}&lt;br /&gt;
* [[Pre-v5 firmware#Bias Card|Pre-v5 firmware]]&lt;br /&gt;
&lt;br /&gt;
== Firmware download ==&lt;br /&gt;
* [http://e-mode.phas.ubc.ca/mce_firmware/ Firmware Programming Files]&lt;br /&gt;
&lt;br /&gt;
== Revision 6.0.2 ==&lt;br /&gt;
;Filename&lt;br /&gt;
: bc_v06000002_20160519.sof&lt;br /&gt;
;Features&lt;br /&gt;
: support for upper 32 words&lt;br /&gt;
: introduced {{param|bc|flux_fb_dly}} so flux_fb DACs are asserted after flux_fb_dly. New data is pre-loaded right after flux_fb_dly.&lt;br /&gt;
= Revision 5.3.5 (test) =&lt;br /&gt;
; Filename&lt;br /&gt;
: bc_v05030005_18dec2014.sof &lt;br /&gt;
; Features&lt;br /&gt;
: based on 5.3.4, introduced {{param|bc|num_rows_idle}}&lt;br /&gt;
&lt;br /&gt;
= Revision 5.3.4 (recommended) =&lt;br /&gt;
; Filename&lt;br /&gt;
: bc_v05030004_20dec2012.sof &lt;br /&gt;
; Features&lt;br /&gt;
: based on 5.3.2&lt;br /&gt;
; Bugfix&lt;br /&gt;
: {{param|bc|enbl_flux_fb_mod}} and {{param|bc|enbl_bias_mod}} can be asserted for any combination of columns&lt;br /&gt;
; Bug&lt;br /&gt;
: with row_len=90, changing ln_bias_0 parameter also changes ln_bias_1!&lt;br /&gt;
&lt;br /&gt;
= Revision 5.3.2 (Rev E cards only!) =&lt;br /&gt;
; Filename&lt;br /&gt;
: bc_v05030002_21aug2012.sof &lt;br /&gt;
; Features&lt;br /&gt;
: based on 5.3.1, compiled with RevE pin assignment.&lt;br /&gt;
; Bug&lt;br /&gt;
: {{param|bc|enbl_flux_fb_mod}} only works for channel 0.&lt;br /&gt;
: {{param|bc|enbl_bias_mod}} has an offset of 1.&lt;br /&gt;
&lt;br /&gt;
= Revision 5.3.1 (Stable) =&lt;br /&gt;
; Filename&lt;br /&gt;
: bc_v05030001_12apr2012.sof &lt;br /&gt;
; Features&lt;br /&gt;
: {{param|bc|mod_val}} is now a single value instead of 32 distinct values. &lt;br /&gt;
; Bug&lt;br /&gt;
: {{param|bc|enbl_flux_fb_mod}} only works for channel 0.&lt;br /&gt;
: {{param|bc|enbl_bias_mod}} has an offset of 1.&lt;br /&gt;
&lt;br /&gt;
== Revision 5.3.0 (Test) ==&lt;br /&gt;
; Filename&lt;br /&gt;
: bc_v05030000_26mar2012.sof &lt;br /&gt;
; Features&lt;br /&gt;
: added {{param|bc|mod_val}}, {{param|bc|enbl_flux_fb_mod}}, {{param|bc|enbl_bias_mod}} parameters. Once the modulation is enabled, values specified by {{param|bc|mod_val}} are going to be added to {{param|bc|flux_fb}} or {{param|bc|bias}}. This can be used to run an internal ramp on mod_val values and having ramps with different offsets being run on individual bias lines. &lt;br /&gt;
 &lt;br /&gt;
= Revision 5.2.0 (Stable) =&lt;br /&gt;
; Filename&lt;br /&gt;
: bc_v05020000_28nov2011.sof &lt;br /&gt;
; Features&lt;br /&gt;
: ln_bias lines wake up to 0V and an 'rb {{param|bc|bias}}' command returns the content of the RAM block used to refresh DACs from. This RAM is initilized to 0. Note that Rev. F cards have bipolar DACs and 0V corresponds to 32768 (mid range) as oppose to 0. Therefore, an initial readback from RAM does not return valid values!!! I claim that this is not confusing!&lt;br /&gt;
 &lt;br /&gt;
: {{param||critical_err_rst}} and {{param||fpga_clr}} commands are supported now. {{param||critical_err_rst}} only works if '''JP2''' jumper inserted.&lt;br /&gt;
&lt;br /&gt;
; Details&lt;br /&gt;
: When installed on Rev. D file, tes_mapping has to have offset =11 in mce.cfg, heater has to have offset=10 in mce.cfg.&lt;br /&gt;
&lt;br /&gt;
= Revision 5.1.0 (Stable) =&lt;br /&gt;
; Filename&lt;br /&gt;
: bc_v05010000_25oct2011.sof &lt;br /&gt;
; Features&lt;br /&gt;
: In multiplex mode: DACs are clocked early in the row-visit, chip-select is always low and only strobed high at clock-cycle 1 during row-visit. [[Image:bc_5.1.0_timing.png|200 px]]&lt;br /&gt;
: In non-multiplex mode: {{param|bc|flux_fb}} values are all loaded at the start of the frame. (Previous versions updated DACs row-aligned as oppose to frame-aligned and this had the undesired effect of refreshing some DACs on one row and rest of the DACs on the following row depending on which clock cycle the command was received. This only matters when running internal ramp on bias-card parameters.)&lt;br /&gt;
: ln_bias lines are only refreshed once and frame-aligned! '''a bugfix'''!&lt;br /&gt;
&lt;br /&gt;
; Bugs&lt;br /&gt;
: ln_bias lines are set to code 0 or -5V at power up and need to be cleared to 0V by issuing an exclusive command upon startup.&lt;br /&gt;
&lt;br /&gt;
; Details&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;
== Revision 5.0.a (lab use) ==&lt;br /&gt;
; Filename&lt;br /&gt;
: bc_v0500000a_24oct2011.sof &lt;br /&gt;
; Features&lt;br /&gt;
: based on 5.0.9, with fixing the incomplete ifelse in spi_dac module. Was this causing the improper chip-select?&lt;br /&gt;
&lt;br /&gt;
; Details&lt;br /&gt;
: When installed on Rev. D file, tes_mapping has to have offset =11 in mce.cfg.&lt;br /&gt;
== Revision 5.0.9 (lab use) ==&lt;br /&gt;
; Filename&lt;br /&gt;
: bc_v05000009_05oct2011.sof &lt;br /&gt;
; Features&lt;br /&gt;
: based on 5.0.5, but instead of loading a new DAC value at the start of the row, it is now 32 clock cycles after row switch.(or clocking starts at row-switch)&lt;br /&gt;
&lt;br /&gt;
; Details&lt;br /&gt;
: When installed on Rev. D board, tes_mapping has to have offset =11 in mce.cfg.&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.8 (test) ==&lt;br /&gt;
; Filename&lt;br /&gt;
: bc_v05000008_04oct2011.sof &lt;br /&gt;
; Features&lt;br /&gt;
: based on 5.0.5, but instead of loading a new DAC value at the start of the row, it is now 20 clock cycles after row switch.&lt;br /&gt;
&lt;br /&gt;
; Details&lt;br /&gt;
: When installed on Rev. D board, tes_mapping has to have offset =11 in mce.cfg.&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.7 (recommended) =&lt;br /&gt;
; Filename&lt;br /&gt;
: bc_v05000007_22jun2011.sof &lt;br /&gt;
; Features&lt;br /&gt;
: based on 5.0.5, but instead of loading a new DAC value at the start of the row, it is now 10 clock cycles after row switch.&lt;br /&gt;
&lt;br /&gt;
; Details&lt;br /&gt;
: When installed on Rev. D board, tes_mapping has to have offset =11 in mce.cfg.&lt;br /&gt;
 &lt;br /&gt;
== Revision 5.0.6 (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 {{param|bc|fb_col0|fb_col''#''}} 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 Filippini: &lt;br /&gt;
** See details here:  http://spiderwiki.princeton.edu/spider/AnalysisLogbook/TestCryostat/20110427_muxing/index.html&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;
: {{param||card_type}} parameter now includes the pcb-revision information as well as the card_type. {{param||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 (Rev. E cards) ==&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 {{param|bc|fb_col0|fb_col0&amp;lt;/tt&amp;gt; to &amp;lt;tt&amp;gt;fb_col31}} and {{param|bc|enbl_mux}} commands to accommodate row-based sq2fb switching. When {{param|bc|enbl_mux}} is asserted for a column, then the DAC is refreshed on every row visit with the value specified by {{param|bc|fb_col0|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;
: {{param||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;
: {{param||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;
= Firmware repository =&lt;br /&gt;
* http://e-mode.phas.ubc.ca/mce_firmware/&lt;br /&gt;
&lt;br /&gt;
[[Category:Bias Card Firmware| ]]&lt;/div&gt;</summary>
		<author><name>Mandana</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Testing_Clock_Cards&amp;diff=7080</id>
		<title>Testing Clock Cards</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Testing_Clock_Cards&amp;diff=7080"/>
		<updated>2018-08-01T17:21:16Z</updated>

		<summary type="html">&lt;p&gt;Mandana: /* lvds rx/tx or command/reply lines */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Setup ==&lt;br /&gt;
The following equipments are needed:&lt;br /&gt;
* mas PC: An ubuntu-based PC with ARC-64 PCI card installed an running mas software.&lt;br /&gt;
* A fully populated 5-MDM MCE subrack with Device under test (DUT) plugged into this backplane during testing.&lt;br /&gt;
* fibre-optic cable: connects mas-PC to Clock Card.&lt;br /&gt;
* set of Linear supplies to power up the cards. (3V, 4.5V, 6.2V, -6.2V)&lt;br /&gt;
* Altera USB programmer: attached to the JTAG connector in Clock card front panel.&lt;br /&gt;
* PC with Quartus installed: used to program FPGA and configuration devices on Readout Card.&lt;br /&gt;
* Sync Box with a fiber-optic cable connecting a fiber output to the sync input of the Clock Card.&lt;br /&gt;
&lt;br /&gt;
If you have all the above and '''if your DUT has already been smoke tested''', you are ready to start:&lt;br /&gt;
# Connect all the cables.&lt;br /&gt;
#unplug all cards from Subrack except Clock card unit under test, (just pull out, so they are not inserted)&lt;br /&gt;
# Power on the MCE and if the clock card is not progammed, the red led should be on. &lt;br /&gt;
&lt;br /&gt;
== Configuring Clock Card ==&lt;br /&gt;
The FPGA on clock card (U7) can be configured from one of the two on-board configuration devices (EPC16): A factory configuration device (U18) and an application configuration device (U17). The factory configuration is loaded upon power up and hard reset. The application configuration is loaded by issuing a command on the mas PC: wb cc config_app 1.&lt;br /&gt;
&lt;br /&gt;
The FPGA and the application configuration device can be programmed through the front-panel JTAG port while the factory configuration device can be programmed from the on-board connector. &lt;br /&gt;
&lt;br /&gt;
=== Programming via Front-panel JTAG connector===&lt;br /&gt;
# Load FPGA firmware using Quartus. Firmware is located at http://e-mode.phas.ubc.ca/mce_firmware/. Run auto-detect and you should see list of devices. The part at the bottom of the list corresponts to Clock card FPGA and the part above it in the list is EPC16 or the &amp;quot;application configuration device&amp;quot;. Right click on the row and choose a file to program. Load following firmware from the above directory: CC firmware 5.0.e, '''cc_v0500000e_15may2012.sof''' for FPGA and '''cc_v0500000e_15may2012.pof''' for EPC16. Then checkmark the program button for both devices and press start programming. The green LED should come up when programming is done. &lt;br /&gt;
# If the tx/rx fibers are connected right, the red LED is off and the green LED is on. If the Sync Box fiber is connected and Sync Box is on, then the amber LED is also off.&lt;br /&gt;
# Now make sure that the card communicates with the PC. &lt;br /&gt;
  mce_cmd -x rb cc fw_rev&lt;br /&gt;
&lt;br /&gt;
and you will see:&lt;br /&gt;
  Line   0 : ok : 0x500000e&lt;br /&gt;
&lt;br /&gt;
So far, '''you confirmed that FPGA is programmed successfully and the fiber interface is working.'''&lt;br /&gt;
&lt;br /&gt;
Now, proceed to programming the factory-configuration device.&lt;br /&gt;
&lt;br /&gt;
=== Programming via on-board P2 JTAG connector===&lt;br /&gt;
#Now turn off the MCE, &lt;br /&gt;
#unplug the Clock Card and move the JTAG programming cable from the front-panel to the on-board P2 connector. plug the card back in and let the cable slide through the slot. &lt;br /&gt;
# Power on the MCE.&lt;br /&gt;
# In Quartus, press on auto-detect and you should only see two devices listed. Choose the same pof file for EPC16.&lt;br /&gt;
'''cc_v0500000e_15may2012.pof'''&lt;br /&gt;
# Turn off the MCE, unplug the card and remove the JTAG cable. Then re-insert the card and power on the MCE.&lt;br /&gt;
# The green LED should come on. Ths confirms that '''factory configuraiton is loaded successfully upon power up'''.&lt;br /&gt;
&lt;br /&gt;
# Verify that the application configuration can be loaded successfuly:&lt;br /&gt;
 mce_cmd -x wb cc config_app 1&lt;br /&gt;
The Green LED should momentarily go off, the red LED should momentarily turn on and then when firmware is loaded, green LED would be on and red is off.&lt;br /&gt;
This shows that '''application configuration is loaded successfully'''.&lt;br /&gt;
&lt;br /&gt;
*'''Note 1''': Sometimes the reconfiguration time exceeds the timeout period and you get an &amp;quot;MCE timeout&amp;quot; message. Issue another command like rb cc fw_rev to verify that the FPGA was reconfigured successfully.&lt;br /&gt;
*'''Note 2''': Sometimes when you switch between external and internal clock, you get an &amp;quot;'''Unexpected interface (DSP) error'''&amp;quot; caused by an accidental character transmit on the fiber during configuration switch over, if this happens, you need to reset the PCI card by issuing: mce_cmd -x dsp_reset.&lt;br /&gt;
&lt;br /&gt;
== Testing General Features (card_all_test)==&lt;br /&gt;
The following script is used to test features that are common to all MCE cards: LED, silicon id, card_type, PCB revision, LEDs, dip switches, etc.&lt;br /&gt;
&lt;br /&gt;
On mas PC, type: &lt;br /&gt;
 card_all_test -c cc SCC-NNN&lt;br /&gt;
&lt;br /&gt;
The output should look like:&lt;br /&gt;
  ****** Check to make sure the LEDs on the target card switched status! ****&lt;br /&gt;
  Unit Under Test  :  CC&lt;br /&gt;
  Serial Number    :  SCC-069&lt;br /&gt;
  Firmware Revision:  5.0.e&lt;br /&gt;
  card_id          :  0x20be502&lt;br /&gt;
  slot_id          :  [8]&lt;br /&gt;
  card_type        :  3&lt;br /&gt;
  card_rev         :  D&lt;br /&gt;
  fpga_temp        :  34 C pass&lt;br /&gt;
  card_temp        :  28 C pass&lt;br /&gt;
  results are in   :  /data/cryo/current_data/SCC-069_1285959943_all_test&lt;br /&gt;
&lt;br /&gt;
copy the results into the test logfile and record the card_id on [[MCE CARD Serial-Number Lookup]]&lt;br /&gt;
&lt;br /&gt;
== testing communication with backplane silicon_id chip==&lt;br /&gt;
issue following commands to make sure clock card can read the silicon_id and temperature from the id chip on the backplane:&lt;br /&gt;
 mce_cmd -x rb cc box_id&lt;br /&gt;
 mce_cmd -x rb cc box_temp&lt;br /&gt;
&lt;br /&gt;
record the results in logfile&lt;br /&gt;
== lvds rx/tx or command/reply lines==&lt;br /&gt;
&lt;br /&gt;
run mce_status -s|grep fw_rev&lt;br /&gt;
and you should see all cards listed, make sure there are 9 replies.&lt;br /&gt;
cc fw_rev : 0x500000e&lt;br /&gt;
rc1 fw_rev : 0x5010005&lt;br /&gt;
rc2 fw_rev : 0x5010005&lt;br /&gt;
rc3 fw_rev : 0x5010005&lt;br /&gt;
rc4 fw_rev : 0x5010005&lt;br /&gt;
bc1 fw_rev : 0x5000000&lt;br /&gt;
bc2 fw_rev : 0x5000000&lt;br /&gt;
bc3 fw_rev : 0x5000000&lt;br /&gt;
ac fw_rev : 0x5000004&lt;br /&gt;
&lt;br /&gt;
If any of the replies is ERROR and the card is present, then check you need to debug the corresponding lvds_rx on Clock Card.&lt;br /&gt;
&lt;br /&gt;
Record the result in logfile.&lt;br /&gt;
&lt;br /&gt;
== Sync Box communication and clock circuitry ==&lt;br /&gt;
Check the amber LED and it should be on if the Sync input is not connected or if the Sync Box is off. Check to see the LED go off when the Sync Box is turned on and the fiber cable is connected to the Sync input. Now on mas PC, issue the following commands:&lt;br /&gt;
 wb cc select_clk 1&lt;br /&gt;
 wb cc use_dv 2&lt;br /&gt;
 wb cc use_sync 2&lt;br /&gt;
 rb cc select_clk &lt;br /&gt;
&lt;br /&gt;
The last command should return 1 which means the Clock Card is still running from the Sync Box clk.&lt;br /&gt;
&lt;br /&gt;
'''Note''': ''Sometimes when you switch between external and internal clock, you get an &amp;quot;'''Unexpected interface (DSP) error'''&amp;quot; caused by an accidental character transmit on the fiber, if this happens, you need to reset the PCI card by issuing'': mce_cmd -x dsp_reset.&lt;br /&gt;
&lt;br /&gt;
Take some data to verify that the manchester decoder is working:&lt;br /&gt;
 mce_run test_data_xxxx 100 1&lt;br /&gt;
&lt;br /&gt;
check to see whether the file exist and has some data.&lt;br /&gt;
Then unplug the Sync input and issue:&lt;br /&gt;
 wb cc led 7&lt;br /&gt;
&lt;br /&gt;
no reply should come back. Now issue&lt;br /&gt;
 rb cc select_clk &lt;br /&gt;
and the result should be 0 which means the clock has fallen back on the internal clock on clock card.&lt;br /&gt;
&lt;br /&gt;
== reset switch and brst line ==&lt;br /&gt;
&lt;br /&gt;
Press the switch on the front panel and you should see the green LED go off and red LED go on indicating configuration file reloaded. After few seconds, the red one should go off and green one come back on indicating that the reset switch works properly.&lt;br /&gt;
&lt;br /&gt;
To make sure brst line on Clock Card is working, toggle the LEDs from their default state and then issue a reset command and make sure the LEDs go to their default state (only Green on) which would mean the reset worked. &lt;br /&gt;
 wb rc1 led 7 &lt;br /&gt;
(red and amber LED go on, green goes off)&lt;br /&gt;
 mce_cmd -x mce_reset&lt;br /&gt;
&lt;br /&gt;
log results&lt;br /&gt;
&lt;br /&gt;
[[Category:Clock Card]]&lt;br /&gt;
[[Category:MCE Script]]&lt;br /&gt;
[[Category:Testing]]&lt;/div&gt;</summary>
		<author><name>Mandana</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Testing_Clock_Cards&amp;diff=7079</id>
		<title>Testing Clock Cards</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Testing_Clock_Cards&amp;diff=7079"/>
		<updated>2018-08-01T17:19:19Z</updated>

		<summary type="html">&lt;p&gt;Mandana: /* lvds rx/tx or command/reply lines */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Setup ==&lt;br /&gt;
The following equipments are needed:&lt;br /&gt;
* mas PC: An ubuntu-based PC with ARC-64 PCI card installed an running mas software.&lt;br /&gt;
* A fully populated 5-MDM MCE subrack with Device under test (DUT) plugged into this backplane during testing.&lt;br /&gt;
* fibre-optic cable: connects mas-PC to Clock Card.&lt;br /&gt;
* set of Linear supplies to power up the cards. (3V, 4.5V, 6.2V, -6.2V)&lt;br /&gt;
* Altera USB programmer: attached to the JTAG connector in Clock card front panel.&lt;br /&gt;
* PC with Quartus installed: used to program FPGA and configuration devices on Readout Card.&lt;br /&gt;
* Sync Box with a fiber-optic cable connecting a fiber output to the sync input of the Clock Card.&lt;br /&gt;
&lt;br /&gt;
If you have all the above and '''if your DUT has already been smoke tested''', you are ready to start:&lt;br /&gt;
# Connect all the cables.&lt;br /&gt;
#unplug all cards from Subrack except Clock card unit under test, (just pull out, so they are not inserted)&lt;br /&gt;
# Power on the MCE and if the clock card is not progammed, the red led should be on. &lt;br /&gt;
&lt;br /&gt;
== Configuring Clock Card ==&lt;br /&gt;
The FPGA on clock card (U7) can be configured from one of the two on-board configuration devices (EPC16): A factory configuration device (U18) and an application configuration device (U17). The factory configuration is loaded upon power up and hard reset. The application configuration is loaded by issuing a command on the mas PC: wb cc config_app 1.&lt;br /&gt;
&lt;br /&gt;
The FPGA and the application configuration device can be programmed through the front-panel JTAG port while the factory configuration device can be programmed from the on-board connector. &lt;br /&gt;
&lt;br /&gt;
=== Programming via Front-panel JTAG connector===&lt;br /&gt;
# Load FPGA firmware using Quartus. Firmware is located at http://e-mode.phas.ubc.ca/mce_firmware/. Run auto-detect and you should see list of devices. The part at the bottom of the list corresponts to Clock card FPGA and the part above it in the list is EPC16 or the &amp;quot;application configuration device&amp;quot;. Right click on the row and choose a file to program. Load following firmware from the above directory: CC firmware 5.0.e, '''cc_v0500000e_15may2012.sof''' for FPGA and '''cc_v0500000e_15may2012.pof''' for EPC16. Then checkmark the program button for both devices and press start programming. The green LED should come up when programming is done. &lt;br /&gt;
# If the tx/rx fibers are connected right, the red LED is off and the green LED is on. If the Sync Box fiber is connected and Sync Box is on, then the amber LED is also off.&lt;br /&gt;
# Now make sure that the card communicates with the PC. &lt;br /&gt;
  mce_cmd -x rb cc fw_rev&lt;br /&gt;
&lt;br /&gt;
and you will see:&lt;br /&gt;
  Line   0 : ok : 0x500000e&lt;br /&gt;
&lt;br /&gt;
So far, '''you confirmed that FPGA is programmed successfully and the fiber interface is working.'''&lt;br /&gt;
&lt;br /&gt;
Now, proceed to programming the factory-configuration device.&lt;br /&gt;
&lt;br /&gt;
=== Programming via on-board P2 JTAG connector===&lt;br /&gt;
#Now turn off the MCE, &lt;br /&gt;
#unplug the Clock Card and move the JTAG programming cable from the front-panel to the on-board P2 connector. plug the card back in and let the cable slide through the slot. &lt;br /&gt;
# Power on the MCE.&lt;br /&gt;
# In Quartus, press on auto-detect and you should only see two devices listed. Choose the same pof file for EPC16.&lt;br /&gt;
'''cc_v0500000e_15may2012.pof'''&lt;br /&gt;
# Turn off the MCE, unplug the card and remove the JTAG cable. Then re-insert the card and power on the MCE.&lt;br /&gt;
# The green LED should come on. Ths confirms that '''factory configuraiton is loaded successfully upon power up'''.&lt;br /&gt;
&lt;br /&gt;
# Verify that the application configuration can be loaded successfuly:&lt;br /&gt;
 mce_cmd -x wb cc config_app 1&lt;br /&gt;
The Green LED should momentarily go off, the red LED should momentarily turn on and then when firmware is loaded, green LED would be on and red is off.&lt;br /&gt;
This shows that '''application configuration is loaded successfully'''.&lt;br /&gt;
&lt;br /&gt;
*'''Note 1''': Sometimes the reconfiguration time exceeds the timeout period and you get an &amp;quot;MCE timeout&amp;quot; message. Issue another command like rb cc fw_rev to verify that the FPGA was reconfigured successfully.&lt;br /&gt;
*'''Note 2''': Sometimes when you switch between external and internal clock, you get an &amp;quot;'''Unexpected interface (DSP) error'''&amp;quot; caused by an accidental character transmit on the fiber during configuration switch over, if this happens, you need to reset the PCI card by issuing: mce_cmd -x dsp_reset.&lt;br /&gt;
&lt;br /&gt;
== Testing General Features (card_all_test)==&lt;br /&gt;
The following script is used to test features that are common to all MCE cards: LED, silicon id, card_type, PCB revision, LEDs, dip switches, etc.&lt;br /&gt;
&lt;br /&gt;
On mas PC, type: &lt;br /&gt;
 card_all_test -c cc SCC-NNN&lt;br /&gt;
&lt;br /&gt;
The output should look like:&lt;br /&gt;
  ****** Check to make sure the LEDs on the target card switched status! ****&lt;br /&gt;
  Unit Under Test  :  CC&lt;br /&gt;
  Serial Number    :  SCC-069&lt;br /&gt;
  Firmware Revision:  5.0.e&lt;br /&gt;
  card_id          :  0x20be502&lt;br /&gt;
  slot_id          :  [8]&lt;br /&gt;
  card_type        :  3&lt;br /&gt;
  card_rev         :  D&lt;br /&gt;
  fpga_temp        :  34 C pass&lt;br /&gt;
  card_temp        :  28 C pass&lt;br /&gt;
  results are in   :  /data/cryo/current_data/SCC-069_1285959943_all_test&lt;br /&gt;
&lt;br /&gt;
copy the results into the test logfile and record the card_id on [[MCE CARD Serial-Number Lookup]]&lt;br /&gt;
&lt;br /&gt;
== lvds rx/tx or command/reply lines==&lt;br /&gt;
&lt;br /&gt;
run mce_status -s|grep fw_rev&lt;br /&gt;
and you should see all cards listed, make sure there are 9 replies.&lt;br /&gt;
cc fw_rev : 0x500000e&lt;br /&gt;
rc1 fw_rev : 0x5010005&lt;br /&gt;
rc2 fw_rev : 0x5010005&lt;br /&gt;
rc3 fw_rev : 0x5010005&lt;br /&gt;
rc4 fw_rev : 0x5010005&lt;br /&gt;
bc1 fw_rev : 0x5000000&lt;br /&gt;
bc2 fw_rev : 0x5000000&lt;br /&gt;
bc3 fw_rev : 0x5000000&lt;br /&gt;
ac fw_rev : 0x5000004&lt;br /&gt;
&lt;br /&gt;
If any of the replies is ERROR and the card is present, then check you need to debug the corresponding lvds_rx on Clock Card.&lt;br /&gt;
&lt;br /&gt;
Record the result in logfile.&lt;br /&gt;
&lt;br /&gt;
== Sync Box communication and clock circuitry ==&lt;br /&gt;
Check the amber LED and it should be on if the Sync input is not connected or if the Sync Box is off. Check to see the LED go off when the Sync Box is turned on and the fiber cable is connected to the Sync input. Now on mas PC, issue the following commands:&lt;br /&gt;
 wb cc select_clk 1&lt;br /&gt;
 wb cc use_dv 2&lt;br /&gt;
 wb cc use_sync 2&lt;br /&gt;
 rb cc select_clk &lt;br /&gt;
&lt;br /&gt;
The last command should return 1 which means the Clock Card is still running from the Sync Box clk.&lt;br /&gt;
&lt;br /&gt;
'''Note''': ''Sometimes when you switch between external and internal clock, you get an &amp;quot;'''Unexpected interface (DSP) error'''&amp;quot; caused by an accidental character transmit on the fiber, if this happens, you need to reset the PCI card by issuing'': mce_cmd -x dsp_reset.&lt;br /&gt;
&lt;br /&gt;
Take some data to verify that the manchester decoder is working:&lt;br /&gt;
 mce_run test_data_xxxx 100 1&lt;br /&gt;
&lt;br /&gt;
check to see whether the file exist and has some data.&lt;br /&gt;
Then unplug the Sync input and issue:&lt;br /&gt;
 wb cc led 7&lt;br /&gt;
&lt;br /&gt;
no reply should come back. Now issue&lt;br /&gt;
 rb cc select_clk &lt;br /&gt;
and the result should be 0 which means the clock has fallen back on the internal clock on clock card.&lt;br /&gt;
&lt;br /&gt;
== reset switch and brst line ==&lt;br /&gt;
&lt;br /&gt;
Press the switch on the front panel and you should see the green LED go off and red LED go on indicating configuration file reloaded. After few seconds, the red one should go off and green one come back on indicating that the reset switch works properly.&lt;br /&gt;
&lt;br /&gt;
To make sure brst line on Clock Card is working, toggle the LEDs from their default state and then issue a reset command and make sure the LEDs go to their default state (only Green on) which would mean the reset worked. &lt;br /&gt;
 wb rc1 led 7 &lt;br /&gt;
(red and amber LED go on, green goes off)&lt;br /&gt;
 mce_cmd -x mce_reset&lt;br /&gt;
&lt;br /&gt;
log results&lt;br /&gt;
&lt;br /&gt;
[[Category:Clock Card]]&lt;br /&gt;
[[Category:MCE Script]]&lt;br /&gt;
[[Category:Testing]]&lt;/div&gt;</summary>
		<author><name>Mandana</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Testing_Clock_Cards&amp;diff=7078</id>
		<title>Testing Clock Cards</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Testing_Clock_Cards&amp;diff=7078"/>
		<updated>2018-08-01T17:19:02Z</updated>

		<summary type="html">&lt;p&gt;Mandana: /* lvds rx/tx or command/reply lines */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Setup ==&lt;br /&gt;
The following equipments are needed:&lt;br /&gt;
* mas PC: An ubuntu-based PC with ARC-64 PCI card installed an running mas software.&lt;br /&gt;
* A fully populated 5-MDM MCE subrack with Device under test (DUT) plugged into this backplane during testing.&lt;br /&gt;
* fibre-optic cable: connects mas-PC to Clock Card.&lt;br /&gt;
* set of Linear supplies to power up the cards. (3V, 4.5V, 6.2V, -6.2V)&lt;br /&gt;
* Altera USB programmer: attached to the JTAG connector in Clock card front panel.&lt;br /&gt;
* PC with Quartus installed: used to program FPGA and configuration devices on Readout Card.&lt;br /&gt;
* Sync Box with a fiber-optic cable connecting a fiber output to the sync input of the Clock Card.&lt;br /&gt;
&lt;br /&gt;
If you have all the above and '''if your DUT has already been smoke tested''', you are ready to start:&lt;br /&gt;
# Connect all the cables.&lt;br /&gt;
#unplug all cards from Subrack except Clock card unit under test, (just pull out, so they are not inserted)&lt;br /&gt;
# Power on the MCE and if the clock card is not progammed, the red led should be on. &lt;br /&gt;
&lt;br /&gt;
== Configuring Clock Card ==&lt;br /&gt;
The FPGA on clock card (U7) can be configured from one of the two on-board configuration devices (EPC16): A factory configuration device (U18) and an application configuration device (U17). The factory configuration is loaded upon power up and hard reset. The application configuration is loaded by issuing a command on the mas PC: wb cc config_app 1.&lt;br /&gt;
&lt;br /&gt;
The FPGA and the application configuration device can be programmed through the front-panel JTAG port while the factory configuration device can be programmed from the on-board connector. &lt;br /&gt;
&lt;br /&gt;
=== Programming via Front-panel JTAG connector===&lt;br /&gt;
# Load FPGA firmware using Quartus. Firmware is located at http://e-mode.phas.ubc.ca/mce_firmware/. Run auto-detect and you should see list of devices. The part at the bottom of the list corresponts to Clock card FPGA and the part above it in the list is EPC16 or the &amp;quot;application configuration device&amp;quot;. Right click on the row and choose a file to program. Load following firmware from the above directory: CC firmware 5.0.e, '''cc_v0500000e_15may2012.sof''' for FPGA and '''cc_v0500000e_15may2012.pof''' for EPC16. Then checkmark the program button for both devices and press start programming. The green LED should come up when programming is done. &lt;br /&gt;
# If the tx/rx fibers are connected right, the red LED is off and the green LED is on. If the Sync Box fiber is connected and Sync Box is on, then the amber LED is also off.&lt;br /&gt;
# Now make sure that the card communicates with the PC. &lt;br /&gt;
  mce_cmd -x rb cc fw_rev&lt;br /&gt;
&lt;br /&gt;
and you will see:&lt;br /&gt;
  Line   0 : ok : 0x500000e&lt;br /&gt;
&lt;br /&gt;
So far, '''you confirmed that FPGA is programmed successfully and the fiber interface is working.'''&lt;br /&gt;
&lt;br /&gt;
Now, proceed to programming the factory-configuration device.&lt;br /&gt;
&lt;br /&gt;
=== Programming via on-board P2 JTAG connector===&lt;br /&gt;
#Now turn off the MCE, &lt;br /&gt;
#unplug the Clock Card and move the JTAG programming cable from the front-panel to the on-board P2 connector. plug the card back in and let the cable slide through the slot. &lt;br /&gt;
# Power on the MCE.&lt;br /&gt;
# In Quartus, press on auto-detect and you should only see two devices listed. Choose the same pof file for EPC16.&lt;br /&gt;
'''cc_v0500000e_15may2012.pof'''&lt;br /&gt;
# Turn off the MCE, unplug the card and remove the JTAG cable. Then re-insert the card and power on the MCE.&lt;br /&gt;
# The green LED should come on. Ths confirms that '''factory configuraiton is loaded successfully upon power up'''.&lt;br /&gt;
&lt;br /&gt;
# Verify that the application configuration can be loaded successfuly:&lt;br /&gt;
 mce_cmd -x wb cc config_app 1&lt;br /&gt;
The Green LED should momentarily go off, the red LED should momentarily turn on and then when firmware is loaded, green LED would be on and red is off.&lt;br /&gt;
This shows that '''application configuration is loaded successfully'''.&lt;br /&gt;
&lt;br /&gt;
*'''Note 1''': Sometimes the reconfiguration time exceeds the timeout period and you get an &amp;quot;MCE timeout&amp;quot; message. Issue another command like rb cc fw_rev to verify that the FPGA was reconfigured successfully.&lt;br /&gt;
*'''Note 2''': Sometimes when you switch between external and internal clock, you get an &amp;quot;'''Unexpected interface (DSP) error'''&amp;quot; caused by an accidental character transmit on the fiber during configuration switch over, if this happens, you need to reset the PCI card by issuing: mce_cmd -x dsp_reset.&lt;br /&gt;
&lt;br /&gt;
== Testing General Features (card_all_test)==&lt;br /&gt;
The following script is used to test features that are common to all MCE cards: LED, silicon id, card_type, PCB revision, LEDs, dip switches, etc.&lt;br /&gt;
&lt;br /&gt;
On mas PC, type: &lt;br /&gt;
 card_all_test -c cc SCC-NNN&lt;br /&gt;
&lt;br /&gt;
The output should look like:&lt;br /&gt;
  ****** Check to make sure the LEDs on the target card switched status! ****&lt;br /&gt;
  Unit Under Test  :  CC&lt;br /&gt;
  Serial Number    :  SCC-069&lt;br /&gt;
  Firmware Revision:  5.0.e&lt;br /&gt;
  card_id          :  0x20be502&lt;br /&gt;
  slot_id          :  [8]&lt;br /&gt;
  card_type        :  3&lt;br /&gt;
  card_rev         :  D&lt;br /&gt;
  fpga_temp        :  34 C pass&lt;br /&gt;
  card_temp        :  28 C pass&lt;br /&gt;
  results are in   :  /data/cryo/current_data/SCC-069_1285959943_all_test&lt;br /&gt;
&lt;br /&gt;
copy the results into the test logfile and record the card_id on [[MCE CARD Serial-Number Lookup]]&lt;br /&gt;
&lt;br /&gt;
== testing backplane communication ==&lt;br /&gt;
Use following commands to read back the temperature and silicon_id of the backplane:&lt;br /&gt;
 mce_cmd -x rb cc box_id&lt;br /&gt;
 mce_cmd -x rb cc box_temp&lt;br /&gt;
&lt;br /&gt;
== lvds rx/tx or command/reply lines==&lt;br /&gt;
&lt;br /&gt;
run mce_status -s|grep fw_rev&lt;br /&gt;
and you should see all cards listed, make sure there are 9 replies.&lt;br /&gt;
cc fw_rev : 0x500000e&lt;br /&gt;
rc1 fw_rev : 0x5010005&lt;br /&gt;
rc2 fw_rev : 0x5010005&lt;br /&gt;
rc3 fw_rev : 0x5010005&lt;br /&gt;
rc4 fw_rev : 0x5010005&lt;br /&gt;
bc1 fw_rev : 0x5000000&lt;br /&gt;
bc2 fw_rev : 0x5000000&lt;br /&gt;
bc3 fw_rev : 0x5000000&lt;br /&gt;
ac fw_rev : 0x5000004&lt;br /&gt;
&lt;br /&gt;
If any of the replies is ERROR and the card is present, then check you need to debug the corresponding lvds_rx on Clock Card.&lt;br /&gt;
&lt;br /&gt;
Record the result in logfile.&lt;br /&gt;
&lt;br /&gt;
== Sync Box communication and clock circuitry ==&lt;br /&gt;
Check the amber LED and it should be on if the Sync input is not connected or if the Sync Box is off. Check to see the LED go off when the Sync Box is turned on and the fiber cable is connected to the Sync input. Now on mas PC, issue the following commands:&lt;br /&gt;
 wb cc select_clk 1&lt;br /&gt;
 wb cc use_dv 2&lt;br /&gt;
 wb cc use_sync 2&lt;br /&gt;
 rb cc select_clk &lt;br /&gt;
&lt;br /&gt;
The last command should return 1 which means the Clock Card is still running from the Sync Box clk.&lt;br /&gt;
&lt;br /&gt;
'''Note''': ''Sometimes when you switch between external and internal clock, you get an &amp;quot;'''Unexpected interface (DSP) error'''&amp;quot; caused by an accidental character transmit on the fiber, if this happens, you need to reset the PCI card by issuing'': mce_cmd -x dsp_reset.&lt;br /&gt;
&lt;br /&gt;
Take some data to verify that the manchester decoder is working:&lt;br /&gt;
 mce_run test_data_xxxx 100 1&lt;br /&gt;
&lt;br /&gt;
check to see whether the file exist and has some data.&lt;br /&gt;
Then unplug the Sync input and issue:&lt;br /&gt;
 wb cc led 7&lt;br /&gt;
&lt;br /&gt;
no reply should come back. Now issue&lt;br /&gt;
 rb cc select_clk &lt;br /&gt;
and the result should be 0 which means the clock has fallen back on the internal clock on clock card.&lt;br /&gt;
&lt;br /&gt;
== reset switch and brst line ==&lt;br /&gt;
&lt;br /&gt;
Press the switch on the front panel and you should see the green LED go off and red LED go on indicating configuration file reloaded. After few seconds, the red one should go off and green one come back on indicating that the reset switch works properly.&lt;br /&gt;
&lt;br /&gt;
To make sure brst line on Clock Card is working, toggle the LEDs from their default state and then issue a reset command and make sure the LEDs go to their default state (only Green on) which would mean the reset worked. &lt;br /&gt;
 wb rc1 led 7 &lt;br /&gt;
(red and amber LED go on, green goes off)&lt;br /&gt;
 mce_cmd -x mce_reset&lt;br /&gt;
&lt;br /&gt;
log results&lt;br /&gt;
&lt;br /&gt;
[[Category:Clock Card]]&lt;br /&gt;
[[Category:MCE Script]]&lt;br /&gt;
[[Category:Testing]]&lt;/div&gt;</summary>
		<author><name>Mandana</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Multicard_MAS&amp;diff=7073</id>
		<title>Multicard MAS</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Multicard_MAS&amp;diff=7073"/>
		<updated>2018-05-15T20:31:02Z</updated>

		<summary type="html">&lt;p&gt;Mandana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;margin: 0 auto; width: 90%; border: 1px solid #A85B39; background:#FFC0A4; padding: 1ex&amp;quot;&amp;gt;'''''Note:''''' [[PCI card firmware|PCI card firmware]] U0107 (the current release) and earlier versions contain bugs which prohibit using multiple PCI cards in one computer.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Most of MAS is agnostic about the number of fibre cards in the system.  By default, MAS only supports one fibre card.  Support for multiple cards (''&amp;quot;Multicard MAS&amp;quot;'') can be turned on, however, when building MAS.  This page outlines specific procedures and caveats when using Multicard MAS.&lt;br /&gt;
&lt;br /&gt;
Care has been taken to make Multicard MAS backwards compatible with the old, single card system, to permit use of legacy scripts and applications (albeit, perhaps restricted to one of the fibre cards in the system).&lt;br /&gt;
&lt;br /&gt;
== Building MAS ==&lt;br /&gt;
&lt;br /&gt;
:''For generic build instructions, see: [[MAS OS setup]]''&lt;br /&gt;
&lt;br /&gt;
To enable Multicard MAS, pass --enable-multicard to configure before building MAS:&lt;br /&gt;
&lt;br /&gt;
  ./configure --enable-multicard[=N]&lt;br /&gt;
&lt;br /&gt;
where ''&amp;lt;code&amp;gt;N&amp;lt;/code&amp;gt;'' is the maximum number of cards you want MAS to support.  If omitted, ''&amp;lt;code&amp;gt;N&amp;lt;/code&amp;gt;'' defaults to 2.  Specifiying &amp;lt;code&amp;gt;''N''&amp;lt;=1&amp;lt;/code&amp;gt;, is the same as not specifying this option at all (''i.e.'': multicard support is turned off). This results in both a multicard capable driver and MAS library/applications.&lt;br /&gt;
&lt;br /&gt;
Because the subracks attached to each fibre card may be different, instead of a single [[mce.cfg]] file, Multicard MAS requires one mce.cfg file for each fibre card supported, called /etc/mce/mce0.cfg, /etc/mce/mce1.cfg, /etc/mce/mce2.cfg, &amp;amp;c.  As a result, instead of making a mce.cin template file, you must make mce0.cin, mce1.cin, mce2.cin, &amp;amp;c.&lt;br /&gt;
&lt;br /&gt;
Running make and make install should proceed as usual.  (See [[MAS OS setup#make|MAS OS setup]].)&lt;br /&gt;
&lt;br /&gt;
== Card numbering ==&lt;br /&gt;
&lt;br /&gt;
The kernel driver assigns sequential physical numbers to cards in the order in which they're passed in by the kernel at boot time.  Because there is no guarantee that this procedure results in the same physical card enumeration each time, MAS abstracts physical card numbers to logical card numbers, which ''are'' fixed to a given physical card.  Although the cards are indistinguishable themselves, MAS uses the PCI slot address to break the degeneracy.&lt;br /&gt;
&lt;br /&gt;
After the kernel boots, and the kernel driver has assigned physical cards, udev runs mas_mknodes for each card it finds, passing this script the PCI slot address of the card.  mas_mknodes then consults &amp;lt;code&amp;gt;[[/proc/mce_dsp]]&amp;lt;/code&amp;gt; to determine the card's physical number and a the file /etc/mce/mce_card_id (if present) to determine it logical card number.  It then makes nodes &amp;lt;code&amp;gt;/dev/mce_cmd&amp;amp;lt;l&amp;amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/dev/mce_cmd&amp;amp;lt;l&amp;amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/dev/mce_cmd&amp;amp;lt;l&amp;amp;gt;&amp;lt;/code&amp;gt; pointing to the appropriate physical card, where ''&amp;lt;code&amp;gt;l&amp;lt;/code&amp;gt;'' is the logical card number.  (See the udev ruleset in scripts/91-mas.rules and &amp;quot;mas_mknodes --help&amp;quot; for more details.)&lt;br /&gt;
&lt;br /&gt;
=== Generating /etc/mce/mce_card_id ===&lt;br /&gt;
The /etc/mce/mce_card_id file is a simple text file with two columns, and one row for each fibre card supported.  For a given card, the first column contains its PCI slot address, and the second column it's logical card number.  The file may also contain&lt;br /&gt;
comment lines whose first character is a hash mark (#).  A typical file might look like:&lt;br /&gt;
&lt;br /&gt;
 # PCI_SLOT_ID   LOGICAL_CARD_NUM&lt;br /&gt;
 0000:02:0c.0        0&lt;br /&gt;
 0000:02:0d.0        1&lt;br /&gt;
&lt;br /&gt;
The file can be created by hand, but it is typically made by running the mas_make_card_id script.  This script examines the system as it is currently configured and creates a /etc/mce/mce_card_id which will result in the same configuration on subsequent boots.  This script obtains logical card numbers by searching for /dev/mce_cmd# devices, and physical card numbers from &amp;lt;code&amp;gt;[[/proc/mce_dsp]]&amp;lt;/code&amp;gt;.  It ignores /dev/mce_cmd# devices which do not point to a valid physical card.  It will also ignore physical cards which do not have a corresponding /dev/mce_cmd# (ie. no logical card number assigned), unless the '-a' option is passed to the script, in which case, it will automatically assign logical card numbers to unenumerated physical cards.&lt;br /&gt;
&lt;br /&gt;
As a result, a /etc/mce/mce_card_id file can be created for a brand new system with no cards configured by running:&lt;br /&gt;
&lt;br /&gt;
 mas_make_card_id -a&lt;br /&gt;
&lt;br /&gt;
If /etc/mce/mce_card_id doesn't exist, mas_mknodes simply uses physical card numbers for logical card numbers.  If the file does exist, but the specified PCI slot address isn't in the file, mas_mknodes will fail.&lt;br /&gt;
&lt;br /&gt;
== Using Multicard MAS ==&lt;br /&gt;
:'''''Note:''' The following assumes a basic familiarity with the use of MAS and MCE script with a single fibre card.  See [[MAS]] and [[MCE script]] for further details.''&lt;br /&gt;
&lt;br /&gt;
When multiple fibre cards are present in a system, both MAS and MCE script need facilities to select and distinguish between them.  Multicard MAS complicates the MAS/MCE script ecology by requiring paths previously specified by environmental variables, most notably $MAS_DATA, to change based on which fibre card is being used.&lt;br /&gt;
&lt;br /&gt;
=== Summary ===&lt;br /&gt;
&lt;br /&gt;
The following is a quick summary of how to use multiple fibre cards when doing stuff on the command line for people familiar with single-card MAS: &lt;br /&gt;
&lt;br /&gt;
* Don't explicitly set any environmental variables&lt;br /&gt;
* Instead of the old mas_env.bash, add to your .bashrc:&lt;br /&gt;
  eval `/usr/mce/bin/mas_var -e -s`&lt;br /&gt;
:(NB: those are back-ticks).  This will insert all sorts of useful MAS_... variables into your environment.&lt;br /&gt;
* Card #0 is selected by default.&lt;br /&gt;
* To change to card ''N'', execute:&lt;br /&gt;
  $ eval `mas_var -n ''N'' -e -s`&lt;br /&gt;
* The two MCEs need different mce.cfg (called mce0.cfg, mce1.cfg, ...)  MAS will make these for you.&lt;br /&gt;
* The two MCEs need different configuration data.  Configuration is distinguished via the array_id file.&lt;br /&gt;
&lt;br /&gt;
The following sections go into more detail about how multicard MAS works and why it's done that way.&lt;br /&gt;
&lt;br /&gt;
=== Explicit card selection with MAS applications ===&lt;br /&gt;
&lt;br /&gt;
Most MAS application programs have a &amp;lt;tt&amp;gt;-n&amp;lt;/tt&amp;gt; switch which allows specifying explicitly which logical card to operate on:&lt;br /&gt;
 $ mce_cmd -n 0 -qx rb cc card_id&lt;br /&gt;
 Line   0 : ok : 0xb5ccf7&lt;br /&gt;
 $ mce_cmd -n 1 -qx rb cc card_id&lt;br /&gt;
 Line   0 : ok : 0x20f373d&lt;br /&gt;
&lt;br /&gt;
This is fine for simple operations, but can get tedious with repeated use, and doesn't work with many MCE scripts (which don't pass -n when spawning MAS applications like [[mce_cmd]]).&lt;br /&gt;
&lt;br /&gt;
=== Card selection via the environment ===&lt;br /&gt;
&lt;br /&gt;
If no explicit card is passed to a MAS application with -n, they will consult the environmental variable $[[MAS_MCE_DEV]] to determine the current logical card number:&lt;br /&gt;
&lt;br /&gt;
 $ export MAS_MCE_DEV=0&lt;br /&gt;
 $ mce_cmd -qx rb cc card_id&lt;br /&gt;
 Line   0 : ok : 0xb5ccf7&lt;br /&gt;
 $ export MAS_MCE_DEV=1&lt;br /&gt;
 $ mce_cmd -qx rb cc card_id&lt;br /&gt;
 Line   0 : ok : 0x20f373d&lt;br /&gt;
&lt;br /&gt;
This is better, and such card numbers specified in this way will even be honoured by MCE scripts.  For backwards compatibility, if neither -n is specified nor $MAS_MCE_DEV is available, card zero is used as a default.&lt;br /&gt;
&lt;br /&gt;
=== Card-dependent paths and mas_var ===&lt;br /&gt;
&lt;br /&gt;
While $MAS_MCE_DEV solves the card selection problem, the problem of distinguishing the data output from the two cards still remains.  Writing configuration and data from more than one card to the same data directory will confuse much of MCE script.  The minimum solution requires changing ''at least'' $[[MAS_DATA]] and $[[MAS_DATA_ROOT]] when switching fibre cards to get MCE script to work:&lt;br /&gt;
&lt;br /&gt;
 $ export MAS_MCE_DEV=0&lt;br /&gt;
 $ export MAS_DATA_ROOT=/data/mce0&lt;br /&gt;
 $ export MAS_DATA=/data/mce0/current_data&lt;br /&gt;
 $ mce_run test_data 100000 s&lt;br /&gt;
 $ export MAS_MCE_DEV=1&lt;br /&gt;
 $ export MAS_DATA_ROOT=/data/mce1&lt;br /&gt;
 $ export MAS_DATA=/data/mce1/current_data&lt;br /&gt;
 $ mce_run test_data 100000 s&lt;br /&gt;
&lt;br /&gt;
That's a bit of a pain.  So [[MCE script]] has been overhauled and now they never explicitly reference environmental variables.  Instead a new MAS application has been written called [[mas_var]], which the MCE scripts use to calculate paths for the current fibre card:&lt;br /&gt;
&lt;br /&gt;
 $ export MAS_MCE_DEV=0&lt;br /&gt;
 $ mas_var --data-dir&lt;br /&gt;
 /data/mce0/current_data&lt;br /&gt;
 $ export MAS_MCE_DEV=1&lt;br /&gt;
 $ mas_var --data-dir&lt;br /&gt;
 /data/mce1/current_data&lt;br /&gt;
&lt;br /&gt;
And now we're back to:&lt;br /&gt;
&lt;br /&gt;
 $ export MAS_MCE_DEV=0&lt;br /&gt;
 $ mce_run test_data 100000 s&lt;br /&gt;
 $ export MAS_MCE_DEV=1&lt;br /&gt;
 $ mce_run test_data 100000 s&lt;br /&gt;
&lt;br /&gt;
(where mce_run contains calls to mas_var) with data written to either /data/mce0/current_data/test_data or /data/mce1/current_data/test_data as appropriate.  So standard operating procedure should now be to not define any MAS_* environmental variables except for $MAS_MCE_DEV.&lt;br /&gt;
&lt;br /&gt;
[[mas_var]] calculates its paths based on information in [[mas.cfg]] which was, in turn, generated by information passed to MAS's ./configure script.  Use of the [[mas_var]] program is explained on its own page, which you might want to read.&lt;br /&gt;
&lt;br /&gt;
=== Usability problems without an environment ===&lt;br /&gt;
&lt;br /&gt;
In addition to specifying paths to the MCE scripts, the $MAS_* environmental variables were also handy when working interactively with an MCE.  If no paths are provided in the environment, it's no longer possible to do something convenient like:&lt;br /&gt;
&lt;br /&gt;
 $ cd $MAS_DATA&lt;br /&gt;
&lt;br /&gt;
To get around this, [[mas_var]], has a mode where it prints out bash (or C-shell) commands to set-up all the environment which can be piped back into the currently running shell using the shell built-in command &amp;lt;tt&amp;gt;eval&amp;lt;/tt&amp;gt; and a pair of back-ticks (`):&lt;br /&gt;
&lt;br /&gt;
 $ echo $MAS_DATA&lt;br /&gt;
 &lt;br /&gt;
 $ eval `mas_var -s`&lt;br /&gt;
 $ echo $MAS_DATA&lt;br /&gt;
 /data/mce0/current_data&lt;br /&gt;
&lt;br /&gt;
(See the [[mas_var]] page for more information on -s and -c.)&lt;br /&gt;
&lt;br /&gt;
=== Environmental overrides ===&lt;br /&gt;
&lt;br /&gt;
Another feature this environment-less operation removes from the legacy operation of MCE script: if scripts always use [[mas_var]] to determine paths, and mas_var just generates them from the information given to it in [[mas.cfg]], then it's no longer possible to override MAS paths, which we could do previously by just changing the appropriate $MAS_* variable.&lt;br /&gt;
&lt;br /&gt;
In the past we could do:&lt;br /&gt;
 $ mce_raw_acq 1&lt;br /&gt;
 Acquiring raw data to /data/cryo/current_data/1350606349_raw&lt;br /&gt;
 $ export MAS_DATA=/tmp&lt;br /&gt;
 $ mce_raw_acq 1&lt;br /&gt;
 Acquiring raw data to /tmp/1350606363_raw&lt;br /&gt;
&lt;br /&gt;
In order to recover this behaviour, if asking [[mas_var]] for a path which has a corresponding environmental variable (like &amp;quot;mas_var --data-dir&amp;quot; is associated with $MAS_DATA), mas_var will just repeat the value of that environmental variable if it has been set:&lt;br /&gt;
&lt;br /&gt;
 $ mas_var --data-dir&lt;br /&gt;
 /data/mce0/current_data&lt;br /&gt;
 $ mce_raw_acq 1&lt;br /&gt;
 Acquiring raw data to /data/mce0/current_data/1350606349_raw&lt;br /&gt;
 $ export MAS_DATA=/tmp&lt;br /&gt;
 $ mas_var --data-dir&lt;br /&gt;
 /tmp&lt;br /&gt;
 $ mce_raw_acq 1&lt;br /&gt;
 Acquiring raw data to /tmp/1350606363_raw&lt;br /&gt;
&lt;br /&gt;
so environmental overrides are once again possible.&lt;br /&gt;
&lt;br /&gt;
=== Sticky overrides ===&lt;br /&gt;
&lt;br /&gt;
Introducing environmental override capability to [[mas_var]] gives us ''another'' problem: it can have serious unexpected results on a multicard system since the overrides defeat the card-specific path solution that mas_var originally gave us:&lt;br /&gt;
&lt;br /&gt;
 $ export MAS_MCE_DEV=0&lt;br /&gt;
 $ mas_var --data-dir&lt;br /&gt;
 /data/mce0/current_data&lt;br /&gt;
 $ export MAS_DATA=/data/mce0/current_data&lt;br /&gt;
 $ mas_var --data-dir&lt;br /&gt;
 /data/mce0/current_data&lt;br /&gt;
 $ export MAS_MCE_DEV=1&lt;br /&gt;
 $ mas_var --data-dir&lt;br /&gt;
 /data/mce0/current_data&lt;br /&gt;
&lt;br /&gt;
(ie. environmental variables are &amp;quot;sticky&amp;quot;: they don't change when the card changes, which happens to be the very problem we were trying to solve with mas_var in the first place).&lt;br /&gt;
&lt;br /&gt;
There's a -e switch to mas_var which forces it to ignore the current environment and reset everything to the defaults contained in [[mas.cfg]].  That solves the problem here:&lt;br /&gt;
&lt;br /&gt;
 $ export MAS_MCE_DEV=0&lt;br /&gt;
 $ mas_var --data-dir&lt;br /&gt;
 /data/mce0/current_data&lt;br /&gt;
 $ export MAS_DATA=/data/mce0/current_data&lt;br /&gt;
 $ mas_var --data-dir&lt;br /&gt;
 /data/mce0/current_data&lt;br /&gt;
 $ export MAS_MCE_DEV=1&lt;br /&gt;
 $ eval `mas_var -e -s`&lt;br /&gt;
 $ mas_var --data-dir&lt;br /&gt;
 /data/mce1/current_data&lt;br /&gt;
&lt;br /&gt;
Actually, since mas_var is a regular MAS application, it supports the -n switch and we can make card-selection and environment reset a one-liner:&lt;br /&gt;
&lt;br /&gt;
 $ eval `mas_var -n 0 -e -s`&lt;br /&gt;
 $ echo $MAS_MCE_DEV&lt;br /&gt;
 0&lt;br /&gt;
 $ mas_var --data-dir&lt;br /&gt;
 /data/mce0/current_data&lt;br /&gt;
 $ export MAS_DATA=/data/mce0/current_data&lt;br /&gt;
 $ mas_var --data-dir&lt;br /&gt;
 /data/mce0/current_data&lt;br /&gt;
 $ eval `mas_var -n 1 -e -s`&lt;br /&gt;
 $ echo $MAS_MCE_DEV&lt;br /&gt;
 1&lt;br /&gt;
 $ mas_var --data-dir&lt;br /&gt;
 /data/mce1/current_data&lt;br /&gt;
&lt;br /&gt;
which makes things pretty useable.&lt;br /&gt;
&lt;br /&gt;
For interactive use, that's probably good enough: we can put&lt;br /&gt;
&lt;br /&gt;
 eval `mas_var -e -s`&lt;br /&gt;
&lt;br /&gt;
in our .bashrc file to intialise the MAS environment the first time when we log in and then just run:&lt;br /&gt;
&lt;br /&gt;
 $ eval `mas_var -n ''N'' -e -s`&lt;br /&gt;
&lt;br /&gt;
whenever we want to switch to card ''N''.&lt;br /&gt;
&lt;br /&gt;
=== Streamlining: the &amp;quot;minimal environment&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
If we don't care about being able to do things like &amp;quot;cd $MAS_DATA&amp;quot; we can simplify the environment even more to the point that running mas_var is no longer&lt;br /&gt;
needed to switch cards.  This is especially handy when running MAS for multiple cards semi- or non-interactively.  The minimum environment needed to run MCE scripts on any particular card is:&lt;br /&gt;
&lt;br /&gt;
* '''$MAS_MCE_DEV''' to choose the card&lt;br /&gt;
* '''$MAS_VAR''' to point the MCE scripts to [[mas_var]]&lt;br /&gt;
* modified '''$PATH''' and '''$PYTHONPATH''' to allow the shell and Python to find the MAS and MCE script elements needed to run the system.&lt;br /&gt;
&lt;br /&gt;
This minimal environment will be provided if running &amp;quot;mas_var -s&amp;quot; (or &amp;quot;mas_var -c&amp;quot; in the C Shell) including the -x option (also add -e if you want to remove any previous environmental overrides):&lt;br /&gt;
&lt;br /&gt;
 $ eval `mas_var -x -s`&lt;br /&gt;
&lt;br /&gt;
This minimal environment allows very simple card switching at the expense of losing the convenience of having the $MAS_... paths in the environment:&lt;br /&gt;
&lt;br /&gt;
 $ eval `mas_var -x -s`&lt;br /&gt;
 $ MAS_MCE_DEV=0 mce_raw_acq 1&lt;br /&gt;
 Acquiring raw data to /data/mce0/current_data/1350606349_raw&lt;br /&gt;
 $ MAS_MCE_DEV=1 mce_raw_acq 1&lt;br /&gt;
 Acquiring raw data to /data/mce1/current_data/1350606363_raw&lt;br /&gt;
&lt;br /&gt;
Similarly, automated higher level applications which control multiple fibre cards in the same program can switch cards, if launched from the minimal environment, by then just setenv(3)ing a single variable ($MAS_MCE_DEV), which has very appealing robustness benefits.&lt;br /&gt;
&lt;br /&gt;
== Writing Multicard-MAS-enabled scripts ==&lt;br /&gt;
&lt;br /&gt;
Here are some pointers for writing MCE scripts for use in multicard environments:&lt;br /&gt;
=== Bash ===&lt;br /&gt;
* never hard-code MAS or MCE paths.&lt;br /&gt;
* add to the top of your script:&lt;br /&gt;
 if [ ! -x ${MAS_VAR:=/usr/mce/bin/mas_var} ]; then&lt;br /&gt;
   echo &amp;quot;Cannot find mas_var.  Set MAS_VAR to the full path to the mas_var binary.&amp;quot; &amp;gt;&amp;amp;2&lt;br /&gt;
   exit 1&lt;br /&gt;
 else&lt;br /&gt;
   eval $(${MAS_VAR} -s)&lt;br /&gt;
 fi&lt;br /&gt;
: The above tries to find [[mas_var]] (using $MAS_VAR if set) and then uses it to set all the &amp;quot;regular&amp;quot; environmental variables.&lt;br /&gt;
* after executing the above, your script can use the regular environmental variables: $MAS_DATA, $MAS_BIN, etc.&lt;br /&gt;
=== Python ===&lt;br /&gt;
* never hard-code MAS or MCE paths.&lt;br /&gt;
* don't use environmental variables&lt;br /&gt;
* a [[Auto-setup (python)#class_util.mas_path|mas_path]] module has been created to deal with paths; it's part of the [[Auto-setup (python)|auto_setup package]]. At the top of your script, add:&lt;br /&gt;
 from auto_setup.util import mas_path&lt;br /&gt;
 mas_path = mas_path()&lt;br /&gt;
* Use mas_path to fetch directories:&lt;br /&gt;
 data_dir = mas_path.data_dir()&lt;br /&gt;
* Best practice is to use os.path.join to concatenate path elements like these:&lt;br /&gt;
 data_file = os.path.join(mas_path.data_dir(), &amp;quot;my_data_file&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
[[Category:MAS]]&lt;/div&gt;</summary>
		<author><name>Mandana</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Multicard_MAS&amp;diff=7072</id>
		<title>Multicard MAS</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Multicard_MAS&amp;diff=7072"/>
		<updated>2018-05-15T20:30:46Z</updated>

		<summary type="html">&lt;p&gt;Mandana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;margin: 0 auto; width: 90%; border: 1px solid #A85B39; background:#FFC0A4; padding: 1ex&amp;quot;&amp;gt;'''''Note:''''' [[PCI card firmware|PCI card firmware]] U0108 (the current release) and earlier versions contain bugs which prohibit using multiple PCI cards in one computer.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Most of MAS is agnostic about the number of fibre cards in the system.  By default, MAS only supports one fibre card.  Support for multiple cards (''&amp;quot;Multicard MAS&amp;quot;'') can be turned on, however, when building MAS.  This page outlines specific procedures and caveats when using Multicard MAS.&lt;br /&gt;
&lt;br /&gt;
Care has been taken to make Multicard MAS backwards compatible with the old, single card system, to permit use of legacy scripts and applications (albeit, perhaps restricted to one of the fibre cards in the system).&lt;br /&gt;
&lt;br /&gt;
== Building MAS ==&lt;br /&gt;
&lt;br /&gt;
:''For generic build instructions, see: [[MAS OS setup]]''&lt;br /&gt;
&lt;br /&gt;
To enable Multicard MAS, pass --enable-multicard to configure before building MAS:&lt;br /&gt;
&lt;br /&gt;
  ./configure --enable-multicard[=N]&lt;br /&gt;
&lt;br /&gt;
where ''&amp;lt;code&amp;gt;N&amp;lt;/code&amp;gt;'' is the maximum number of cards you want MAS to support.  If omitted, ''&amp;lt;code&amp;gt;N&amp;lt;/code&amp;gt;'' defaults to 2.  Specifiying &amp;lt;code&amp;gt;''N''&amp;lt;=1&amp;lt;/code&amp;gt;, is the same as not specifying this option at all (''i.e.'': multicard support is turned off). This results in both a multicard capable driver and MAS library/applications.&lt;br /&gt;
&lt;br /&gt;
Because the subracks attached to each fibre card may be different, instead of a single [[mce.cfg]] file, Multicard MAS requires one mce.cfg file for each fibre card supported, called /etc/mce/mce0.cfg, /etc/mce/mce1.cfg, /etc/mce/mce2.cfg, &amp;amp;c.  As a result, instead of making a mce.cin template file, you must make mce0.cin, mce1.cin, mce2.cin, &amp;amp;c.&lt;br /&gt;
&lt;br /&gt;
Running make and make install should proceed as usual.  (See [[MAS OS setup#make|MAS OS setup]].)&lt;br /&gt;
&lt;br /&gt;
== Card numbering ==&lt;br /&gt;
&lt;br /&gt;
The kernel driver assigns sequential physical numbers to cards in the order in which they're passed in by the kernel at boot time.  Because there is no guarantee that this procedure results in the same physical card enumeration each time, MAS abstracts physical card numbers to logical card numbers, which ''are'' fixed to a given physical card.  Although the cards are indistinguishable themselves, MAS uses the PCI slot address to break the degeneracy.&lt;br /&gt;
&lt;br /&gt;
After the kernel boots, and the kernel driver has assigned physical cards, udev runs mas_mknodes for each card it finds, passing this script the PCI slot address of the card.  mas_mknodes then consults &amp;lt;code&amp;gt;[[/proc/mce_dsp]]&amp;lt;/code&amp;gt; to determine the card's physical number and a the file /etc/mce/mce_card_id (if present) to determine it logical card number.  It then makes nodes &amp;lt;code&amp;gt;/dev/mce_cmd&amp;amp;lt;l&amp;amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/dev/mce_cmd&amp;amp;lt;l&amp;amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/dev/mce_cmd&amp;amp;lt;l&amp;amp;gt;&amp;lt;/code&amp;gt; pointing to the appropriate physical card, where ''&amp;lt;code&amp;gt;l&amp;lt;/code&amp;gt;'' is the logical card number.  (See the udev ruleset in scripts/91-mas.rules and &amp;quot;mas_mknodes --help&amp;quot; for more details.)&lt;br /&gt;
&lt;br /&gt;
=== Generating /etc/mce/mce_card_id ===&lt;br /&gt;
The /etc/mce/mce_card_id file is a simple text file with two columns, and one row for each fibre card supported.  For a given card, the first column contains its PCI slot address, and the second column it's logical card number.  The file may also contain&lt;br /&gt;
comment lines whose first character is a hash mark (#).  A typical file might look like:&lt;br /&gt;
&lt;br /&gt;
 # PCI_SLOT_ID   LOGICAL_CARD_NUM&lt;br /&gt;
 0000:02:0c.0        0&lt;br /&gt;
 0000:02:0d.0        1&lt;br /&gt;
&lt;br /&gt;
The file can be created by hand, but it is typically made by running the mas_make_card_id script.  This script examines the system as it is currently configured and creates a /etc/mce/mce_card_id which will result in the same configuration on subsequent boots.  This script obtains logical card numbers by searching for /dev/mce_cmd# devices, and physical card numbers from &amp;lt;code&amp;gt;[[/proc/mce_dsp]]&amp;lt;/code&amp;gt;.  It ignores /dev/mce_cmd# devices which do not point to a valid physical card.  It will also ignore physical cards which do not have a corresponding /dev/mce_cmd# (ie. no logical card number assigned), unless the '-a' option is passed to the script, in which case, it will automatically assign logical card numbers to unenumerated physical cards.&lt;br /&gt;
&lt;br /&gt;
As a result, a /etc/mce/mce_card_id file can be created for a brand new system with no cards configured by running:&lt;br /&gt;
&lt;br /&gt;
 mas_make_card_id -a&lt;br /&gt;
&lt;br /&gt;
If /etc/mce/mce_card_id doesn't exist, mas_mknodes simply uses physical card numbers for logical card numbers.  If the file does exist, but the specified PCI slot address isn't in the file, mas_mknodes will fail.&lt;br /&gt;
&lt;br /&gt;
== Using Multicard MAS ==&lt;br /&gt;
:'''''Note:''' The following assumes a basic familiarity with the use of MAS and MCE script with a single fibre card.  See [[MAS]] and [[MCE script]] for further details.''&lt;br /&gt;
&lt;br /&gt;
When multiple fibre cards are present in a system, both MAS and MCE script need facilities to select and distinguish between them.  Multicard MAS complicates the MAS/MCE script ecology by requiring paths previously specified by environmental variables, most notably $MAS_DATA, to change based on which fibre card is being used.&lt;br /&gt;
&lt;br /&gt;
=== Summary ===&lt;br /&gt;
&lt;br /&gt;
The following is a quick summary of how to use multiple fibre cards when doing stuff on the command line for people familiar with single-card MAS: &lt;br /&gt;
&lt;br /&gt;
* Don't explicitly set any environmental variables&lt;br /&gt;
* Instead of the old mas_env.bash, add to your .bashrc:&lt;br /&gt;
  eval `/usr/mce/bin/mas_var -e -s`&lt;br /&gt;
:(NB: those are back-ticks).  This will insert all sorts of useful MAS_... variables into your environment.&lt;br /&gt;
* Card #0 is selected by default.&lt;br /&gt;
* To change to card ''N'', execute:&lt;br /&gt;
  $ eval `mas_var -n ''N'' -e -s`&lt;br /&gt;
* The two MCEs need different mce.cfg (called mce0.cfg, mce1.cfg, ...)  MAS will make these for you.&lt;br /&gt;
* The two MCEs need different configuration data.  Configuration is distinguished via the array_id file.&lt;br /&gt;
&lt;br /&gt;
The following sections go into more detail about how multicard MAS works and why it's done that way.&lt;br /&gt;
&lt;br /&gt;
=== Explicit card selection with MAS applications ===&lt;br /&gt;
&lt;br /&gt;
Most MAS application programs have a &amp;lt;tt&amp;gt;-n&amp;lt;/tt&amp;gt; switch which allows specifying explicitly which logical card to operate on:&lt;br /&gt;
 $ mce_cmd -n 0 -qx rb cc card_id&lt;br /&gt;
 Line   0 : ok : 0xb5ccf7&lt;br /&gt;
 $ mce_cmd -n 1 -qx rb cc card_id&lt;br /&gt;
 Line   0 : ok : 0x20f373d&lt;br /&gt;
&lt;br /&gt;
This is fine for simple operations, but can get tedious with repeated use, and doesn't work with many MCE scripts (which don't pass -n when spawning MAS applications like [[mce_cmd]]).&lt;br /&gt;
&lt;br /&gt;
=== Card selection via the environment ===&lt;br /&gt;
&lt;br /&gt;
If no explicit card is passed to a MAS application with -n, they will consult the environmental variable $[[MAS_MCE_DEV]] to determine the current logical card number:&lt;br /&gt;
&lt;br /&gt;
 $ export MAS_MCE_DEV=0&lt;br /&gt;
 $ mce_cmd -qx rb cc card_id&lt;br /&gt;
 Line   0 : ok : 0xb5ccf7&lt;br /&gt;
 $ export MAS_MCE_DEV=1&lt;br /&gt;
 $ mce_cmd -qx rb cc card_id&lt;br /&gt;
 Line   0 : ok : 0x20f373d&lt;br /&gt;
&lt;br /&gt;
This is better, and such card numbers specified in this way will even be honoured by MCE scripts.  For backwards compatibility, if neither -n is specified nor $MAS_MCE_DEV is available, card zero is used as a default.&lt;br /&gt;
&lt;br /&gt;
=== Card-dependent paths and mas_var ===&lt;br /&gt;
&lt;br /&gt;
While $MAS_MCE_DEV solves the card selection problem, the problem of distinguishing the data output from the two cards still remains.  Writing configuration and data from more than one card to the same data directory will confuse much of MCE script.  The minimum solution requires changing ''at least'' $[[MAS_DATA]] and $[[MAS_DATA_ROOT]] when switching fibre cards to get MCE script to work:&lt;br /&gt;
&lt;br /&gt;
 $ export MAS_MCE_DEV=0&lt;br /&gt;
 $ export MAS_DATA_ROOT=/data/mce0&lt;br /&gt;
 $ export MAS_DATA=/data/mce0/current_data&lt;br /&gt;
 $ mce_run test_data 100000 s&lt;br /&gt;
 $ export MAS_MCE_DEV=1&lt;br /&gt;
 $ export MAS_DATA_ROOT=/data/mce1&lt;br /&gt;
 $ export MAS_DATA=/data/mce1/current_data&lt;br /&gt;
 $ mce_run test_data 100000 s&lt;br /&gt;
&lt;br /&gt;
That's a bit of a pain.  So [[MCE script]] has been overhauled and now they never explicitly reference environmental variables.  Instead a new MAS application has been written called [[mas_var]], which the MCE scripts use to calculate paths for the current fibre card:&lt;br /&gt;
&lt;br /&gt;
 $ export MAS_MCE_DEV=0&lt;br /&gt;
 $ mas_var --data-dir&lt;br /&gt;
 /data/mce0/current_data&lt;br /&gt;
 $ export MAS_MCE_DEV=1&lt;br /&gt;
 $ mas_var --data-dir&lt;br /&gt;
 /data/mce1/current_data&lt;br /&gt;
&lt;br /&gt;
And now we're back to:&lt;br /&gt;
&lt;br /&gt;
 $ export MAS_MCE_DEV=0&lt;br /&gt;
 $ mce_run test_data 100000 s&lt;br /&gt;
 $ export MAS_MCE_DEV=1&lt;br /&gt;
 $ mce_run test_data 100000 s&lt;br /&gt;
&lt;br /&gt;
(where mce_run contains calls to mas_var) with data written to either /data/mce0/current_data/test_data or /data/mce1/current_data/test_data as appropriate.  So standard operating procedure should now be to not define any MAS_* environmental variables except for $MAS_MCE_DEV.&lt;br /&gt;
&lt;br /&gt;
[[mas_var]] calculates its paths based on information in [[mas.cfg]] which was, in turn, generated by information passed to MAS's ./configure script.  Use of the [[mas_var]] program is explained on its own page, which you might want to read.&lt;br /&gt;
&lt;br /&gt;
=== Usability problems without an environment ===&lt;br /&gt;
&lt;br /&gt;
In addition to specifying paths to the MCE scripts, the $MAS_* environmental variables were also handy when working interactively with an MCE.  If no paths are provided in the environment, it's no longer possible to do something convenient like:&lt;br /&gt;
&lt;br /&gt;
 $ cd $MAS_DATA&lt;br /&gt;
&lt;br /&gt;
To get around this, [[mas_var]], has a mode where it prints out bash (or C-shell) commands to set-up all the environment which can be piped back into the currently running shell using the shell built-in command &amp;lt;tt&amp;gt;eval&amp;lt;/tt&amp;gt; and a pair of back-ticks (`):&lt;br /&gt;
&lt;br /&gt;
 $ echo $MAS_DATA&lt;br /&gt;
 &lt;br /&gt;
 $ eval `mas_var -s`&lt;br /&gt;
 $ echo $MAS_DATA&lt;br /&gt;
 /data/mce0/current_data&lt;br /&gt;
&lt;br /&gt;
(See the [[mas_var]] page for more information on -s and -c.)&lt;br /&gt;
&lt;br /&gt;
=== Environmental overrides ===&lt;br /&gt;
&lt;br /&gt;
Another feature this environment-less operation removes from the legacy operation of MCE script: if scripts always use [[mas_var]] to determine paths, and mas_var just generates them from the information given to it in [[mas.cfg]], then it's no longer possible to override MAS paths, which we could do previously by just changing the appropriate $MAS_* variable.&lt;br /&gt;
&lt;br /&gt;
In the past we could do:&lt;br /&gt;
 $ mce_raw_acq 1&lt;br /&gt;
 Acquiring raw data to /data/cryo/current_data/1350606349_raw&lt;br /&gt;
 $ export MAS_DATA=/tmp&lt;br /&gt;
 $ mce_raw_acq 1&lt;br /&gt;
 Acquiring raw data to /tmp/1350606363_raw&lt;br /&gt;
&lt;br /&gt;
In order to recover this behaviour, if asking [[mas_var]] for a path which has a corresponding environmental variable (like &amp;quot;mas_var --data-dir&amp;quot; is associated with $MAS_DATA), mas_var will just repeat the value of that environmental variable if it has been set:&lt;br /&gt;
&lt;br /&gt;
 $ mas_var --data-dir&lt;br /&gt;
 /data/mce0/current_data&lt;br /&gt;
 $ mce_raw_acq 1&lt;br /&gt;
 Acquiring raw data to /data/mce0/current_data/1350606349_raw&lt;br /&gt;
 $ export MAS_DATA=/tmp&lt;br /&gt;
 $ mas_var --data-dir&lt;br /&gt;
 /tmp&lt;br /&gt;
 $ mce_raw_acq 1&lt;br /&gt;
 Acquiring raw data to /tmp/1350606363_raw&lt;br /&gt;
&lt;br /&gt;
so environmental overrides are once again possible.&lt;br /&gt;
&lt;br /&gt;
=== Sticky overrides ===&lt;br /&gt;
&lt;br /&gt;
Introducing environmental override capability to [[mas_var]] gives us ''another'' problem: it can have serious unexpected results on a multicard system since the overrides defeat the card-specific path solution that mas_var originally gave us:&lt;br /&gt;
&lt;br /&gt;
 $ export MAS_MCE_DEV=0&lt;br /&gt;
 $ mas_var --data-dir&lt;br /&gt;
 /data/mce0/current_data&lt;br /&gt;
 $ export MAS_DATA=/data/mce0/current_data&lt;br /&gt;
 $ mas_var --data-dir&lt;br /&gt;
 /data/mce0/current_data&lt;br /&gt;
 $ export MAS_MCE_DEV=1&lt;br /&gt;
 $ mas_var --data-dir&lt;br /&gt;
 /data/mce0/current_data&lt;br /&gt;
&lt;br /&gt;
(ie. environmental variables are &amp;quot;sticky&amp;quot;: they don't change when the card changes, which happens to be the very problem we were trying to solve with mas_var in the first place).&lt;br /&gt;
&lt;br /&gt;
There's a -e switch to mas_var which forces it to ignore the current environment and reset everything to the defaults contained in [[mas.cfg]].  That solves the problem here:&lt;br /&gt;
&lt;br /&gt;
 $ export MAS_MCE_DEV=0&lt;br /&gt;
 $ mas_var --data-dir&lt;br /&gt;
 /data/mce0/current_data&lt;br /&gt;
 $ export MAS_DATA=/data/mce0/current_data&lt;br /&gt;
 $ mas_var --data-dir&lt;br /&gt;
 /data/mce0/current_data&lt;br /&gt;
 $ export MAS_MCE_DEV=1&lt;br /&gt;
 $ eval `mas_var -e -s`&lt;br /&gt;
 $ mas_var --data-dir&lt;br /&gt;
 /data/mce1/current_data&lt;br /&gt;
&lt;br /&gt;
Actually, since mas_var is a regular MAS application, it supports the -n switch and we can make card-selection and environment reset a one-liner:&lt;br /&gt;
&lt;br /&gt;
 $ eval `mas_var -n 0 -e -s`&lt;br /&gt;
 $ echo $MAS_MCE_DEV&lt;br /&gt;
 0&lt;br /&gt;
 $ mas_var --data-dir&lt;br /&gt;
 /data/mce0/current_data&lt;br /&gt;
 $ export MAS_DATA=/data/mce0/current_data&lt;br /&gt;
 $ mas_var --data-dir&lt;br /&gt;
 /data/mce0/current_data&lt;br /&gt;
 $ eval `mas_var -n 1 -e -s`&lt;br /&gt;
 $ echo $MAS_MCE_DEV&lt;br /&gt;
 1&lt;br /&gt;
 $ mas_var --data-dir&lt;br /&gt;
 /data/mce1/current_data&lt;br /&gt;
&lt;br /&gt;
which makes things pretty useable.&lt;br /&gt;
&lt;br /&gt;
For interactive use, that's probably good enough: we can put&lt;br /&gt;
&lt;br /&gt;
 eval `mas_var -e -s`&lt;br /&gt;
&lt;br /&gt;
in our .bashrc file to intialise the MAS environment the first time when we log in and then just run:&lt;br /&gt;
&lt;br /&gt;
 $ eval `mas_var -n ''N'' -e -s`&lt;br /&gt;
&lt;br /&gt;
whenever we want to switch to card ''N''.&lt;br /&gt;
&lt;br /&gt;
=== Streamlining: the &amp;quot;minimal environment&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
If we don't care about being able to do things like &amp;quot;cd $MAS_DATA&amp;quot; we can simplify the environment even more to the point that running mas_var is no longer&lt;br /&gt;
needed to switch cards.  This is especially handy when running MAS for multiple cards semi- or non-interactively.  The minimum environment needed to run MCE scripts on any particular card is:&lt;br /&gt;
&lt;br /&gt;
* '''$MAS_MCE_DEV''' to choose the card&lt;br /&gt;
* '''$MAS_VAR''' to point the MCE scripts to [[mas_var]]&lt;br /&gt;
* modified '''$PATH''' and '''$PYTHONPATH''' to allow the shell and Python to find the MAS and MCE script elements needed to run the system.&lt;br /&gt;
&lt;br /&gt;
This minimal environment will be provided if running &amp;quot;mas_var -s&amp;quot; (or &amp;quot;mas_var -c&amp;quot; in the C Shell) including the -x option (also add -e if you want to remove any previous environmental overrides):&lt;br /&gt;
&lt;br /&gt;
 $ eval `mas_var -x -s`&lt;br /&gt;
&lt;br /&gt;
This minimal environment allows very simple card switching at the expense of losing the convenience of having the $MAS_... paths in the environment:&lt;br /&gt;
&lt;br /&gt;
 $ eval `mas_var -x -s`&lt;br /&gt;
 $ MAS_MCE_DEV=0 mce_raw_acq 1&lt;br /&gt;
 Acquiring raw data to /data/mce0/current_data/1350606349_raw&lt;br /&gt;
 $ MAS_MCE_DEV=1 mce_raw_acq 1&lt;br /&gt;
 Acquiring raw data to /data/mce1/current_data/1350606363_raw&lt;br /&gt;
&lt;br /&gt;
Similarly, automated higher level applications which control multiple fibre cards in the same program can switch cards, if launched from the minimal environment, by then just setenv(3)ing a single variable ($MAS_MCE_DEV), which has very appealing robustness benefits.&lt;br /&gt;
&lt;br /&gt;
== Writing Multicard-MAS-enabled scripts ==&lt;br /&gt;
&lt;br /&gt;
Here are some pointers for writing MCE scripts for use in multicard environments:&lt;br /&gt;
=== Bash ===&lt;br /&gt;
* never hard-code MAS or MCE paths.&lt;br /&gt;
* add to the top of your script:&lt;br /&gt;
 if [ ! -x ${MAS_VAR:=/usr/mce/bin/mas_var} ]; then&lt;br /&gt;
   echo &amp;quot;Cannot find mas_var.  Set MAS_VAR to the full path to the mas_var binary.&amp;quot; &amp;gt;&amp;amp;2&lt;br /&gt;
   exit 1&lt;br /&gt;
 else&lt;br /&gt;
   eval $(${MAS_VAR} -s)&lt;br /&gt;
 fi&lt;br /&gt;
: The above tries to find [[mas_var]] (using $MAS_VAR if set) and then uses it to set all the &amp;quot;regular&amp;quot; environmental variables.&lt;br /&gt;
* after executing the above, your script can use the regular environmental variables: $MAS_DATA, $MAS_BIN, etc.&lt;br /&gt;
=== Python ===&lt;br /&gt;
* never hard-code MAS or MCE paths.&lt;br /&gt;
* don't use environmental variables&lt;br /&gt;
* a [[Auto-setup (python)#class_util.mas_path|mas_path]] module has been created to deal with paths; it's part of the [[Auto-setup (python)|auto_setup package]]. At the top of your script, add:&lt;br /&gt;
 from auto_setup.util import mas_path&lt;br /&gt;
 mas_path = mas_path()&lt;br /&gt;
* Use mas_path to fetch directories:&lt;br /&gt;
 data_dir = mas_path.data_dir()&lt;br /&gt;
* Best practice is to use os.path.join to concatenate path elements like these:&lt;br /&gt;
 data_file = os.path.join(mas_path.data_dir(), &amp;quot;my_data_file&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
[[Category:MAS]]&lt;/div&gt;</summary>
		<author><name>Mandana</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Multicard_MAS&amp;diff=7071</id>
		<title>Multicard MAS</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Multicard_MAS&amp;diff=7071"/>
		<updated>2018-05-15T20:26:04Z</updated>

		<summary type="html">&lt;p&gt;Mandana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;margin: 0 auto; width: 90%; border: 1px solid #A85B39; background:#FFC0A4; padding: 1ex&amp;quot;&amp;gt;'''''Note:''''' [[PCI card firmware|PCI card firmware]] U0107 (the current release) and earlier versions contain bugs which prohibit using multiple PCI cards in one computer.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Most of MAS is agnostic about the number of fibre cards in the system.  By default, MAS only supports one fibre card.  Support for multiple cards (''&amp;quot;Multicard MAS&amp;quot;'') can be turned on, however, when building MAS.  This page outlines specific procedures and caveats when using Multicard MAS.&lt;br /&gt;
&lt;br /&gt;
Care has been taken to make Multicard MAS backwards compatible with the old, single card system, to permit use of legacy scripts and applications (albeit, perhaps restricted to one of the fibre cards in the system).&lt;br /&gt;
&lt;br /&gt;
== Building MAS ==&lt;br /&gt;
&lt;br /&gt;
:''For generic build instructions, see: [[MAS OS setup]]''&lt;br /&gt;
&lt;br /&gt;
To enable Multicard MAS, pass --enable-multicard to configure before building MAS:&lt;br /&gt;
&lt;br /&gt;
  ./configure --enable-multicard[=N]&lt;br /&gt;
&lt;br /&gt;
where ''&amp;lt;code&amp;gt;N&amp;lt;/code&amp;gt;'' is the maximum number of cards you want MAS to support.  If omitted, ''&amp;lt;code&amp;gt;N&amp;lt;/code&amp;gt;'' defaults to 2.  Specifiying &amp;lt;code&amp;gt;''N''&amp;lt;=1&amp;lt;/code&amp;gt;, is the same as not specifying this option at all (''i.e.'': multicard support is turned off). This results in both a multicard capable driver and MAS library/applications.&lt;br /&gt;
&lt;br /&gt;
Because the subracks attached to each fibre card may be different, instead of a single [[mce.cfg]] file, Multicard MAS requires one mce.cfg file for each fibre card supported, called /etc/mce/mce0.cfg, /etc/mce/mce1.cfg, /etc/mce/mce2.cfg, &amp;amp;c.  As a result, instead of making a mce.cin template file, you must make mce0.cin, mce1.cin, mce2.cin, &amp;amp;c.&lt;br /&gt;
&lt;br /&gt;
Running make and make install should proceed as usual.  (See [[MAS OS setup#make|MAS OS setup]].)&lt;br /&gt;
&lt;br /&gt;
== Card numbering ==&lt;br /&gt;
&lt;br /&gt;
The kernel driver assigns sequential physical numbers to cards in the order in which they're passed in by the kernel at boot time.  Because there is no guarantee that this procedure results in the same physical card enumeration each time, MAS abstracts physical card numbers to logical card numbers, which ''are'' fixed to a given physical card.  Although the cards are indistinguishable themselves, MAS uses the PCI slot address to break the degeneracy.&lt;br /&gt;
&lt;br /&gt;
After the kernel boots, and the kernel driver has assigned physical cards, udev runs mas_mknodes for each card it finds, passing this script the PCI slot address of the card.  mas_mknodes then consults &amp;lt;code&amp;gt;[[/proc/mce_dsp]]&amp;lt;/code&amp;gt; to determine the card's physical number and a the file /etc/mce/mce_card_id (if present) to determine it logical card number.  It then makes nodes &amp;lt;code&amp;gt;/dev/mce_cmd&amp;amp;lt;l&amp;amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/dev/mce_cmd&amp;amp;lt;l&amp;amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/dev/mce_cmd&amp;amp;lt;l&amp;amp;gt;&amp;lt;/code&amp;gt; pointing to the appropriate physical card, where ''&amp;lt;code&amp;gt;l&amp;lt;/code&amp;gt;'' is the logical card number.  (See the udev ruleset in scripts/91-mas.rules and &amp;quot;mas_mknodes --help&amp;quot; for more details.)&lt;br /&gt;
&lt;br /&gt;
=== Generating /etc/mce/mce_card_id ===&lt;br /&gt;
The /etc/mce/mce_card_id file is a simple text file with two columns, and one row for each fibre card supported.  For a given card, the first column contains its PCI slot address, and the second column it's logical card number.  The file may also contain&lt;br /&gt;
comment lines whose first character is a hash mark (#).  A typical file might look like:&lt;br /&gt;
&lt;br /&gt;
 # PCI_SLOT_ID   LOGICAL_CARD_NUM&lt;br /&gt;
 0000:02:0c.0        0&lt;br /&gt;
 0000:02:0d.0        1&lt;br /&gt;
&lt;br /&gt;
The file can be created by hand, but it is typically made by running the mas_make_card_id script.  This script examines the system as it is currently configured and creates a /etc/mce/mce_card_id which will result in the same configuration on subsequent boots.  This script obtains logical card numbers by searching for /dev/mce_cmd# devices, and physical card numbers from &amp;lt;code&amp;gt;[[/proc/mce_dsp]]&amp;lt;/code&amp;gt;.  It ignores /dev/mce_cmd# devices which do not point to a valid physical card.  It will also ignore physical cards which do not have a corresponding /dev/mce_cmd# (ie. no logical card number assigned), unless the '-a' option is passed to the script, in which case, it will automatically assign logical card numbers to unenumerated physical cards.&lt;br /&gt;
&lt;br /&gt;
As a result, a /etc/mce/mce_card_id file can be created for a brand new system with no cards configured by running:&lt;br /&gt;
&lt;br /&gt;
 mas_make_card_id -a&lt;br /&gt;
&lt;br /&gt;
If /etc/mce/mce_card_id doesn't exist, mas_mknodes simply uses physical card numbers for logical card numbers.  If the file does exist, but the specified PCI slot address isn't in the file, mas_mknodes will fail.&lt;br /&gt;
&lt;br /&gt;
== Using Multicard MAS ==&lt;br /&gt;
:'''''Note:''' The following assumes a basic familiarity with the use of MAS and MCE script with a single fibre card.  See [[MAS]] and [[MCE script]] for further details.''&lt;br /&gt;
&lt;br /&gt;
When multiple fibre cards are present in a system, both MAS and MCE script need facilities to select and distinguish between them.  Multicard MAS complicates the MAS/MCE script ecology by requiring paths previously specified by environmental variables, most notably $MAS_DATA, to change based on which fibre card is being used.&lt;br /&gt;
&lt;br /&gt;
=== Summary ===&lt;br /&gt;
&lt;br /&gt;
The following is a quick summary of how to use multiple fibre cards when doing stuff on the command line for people familiar with single-card MAS: &lt;br /&gt;
&lt;br /&gt;
* Don't explicitly set any environmental variables&lt;br /&gt;
* Instead of the old mas_env.bash, add to your .bashrc:&lt;br /&gt;
  eval `/usr/mce/bin/mas_var -e -s`&lt;br /&gt;
:(NB: those are back-ticks).  This will insert all sorts of useful MAS_... variables into your environment.&lt;br /&gt;
* Card #0 is selected by default.&lt;br /&gt;
* To change to card ''N'', execute:&lt;br /&gt;
  $ eval `mas_var -n ''N'' -e -s`&lt;br /&gt;
* The two MCEs need different mce.cfg (called mce0.cfg, mce1.cfg, ...)  MAS will make these for you.&lt;br /&gt;
* The two MCEs need different configuration data.  Configuration is distinguished via the array_id file.&lt;br /&gt;
&lt;br /&gt;
The following sections go into more detail about how multicard MAS works and why it's done that way.&lt;br /&gt;
&lt;br /&gt;
=== Explicit card selection with MAS applications ===&lt;br /&gt;
&lt;br /&gt;
Most MAS application programs have a &amp;lt;tt&amp;gt;-n&amp;lt;/tt&amp;gt; switch which allows specifying explicitly which logical card to operate on:&lt;br /&gt;
 $ mce_cmd -n 0 -qx rb cc card_id&lt;br /&gt;
 Line   0 : ok : 0xb5ccf7&lt;br /&gt;
 $ mce_cmd -n 1 -qx rb cc card_id&lt;br /&gt;
 Line   0 : ok : 0x20f373d&lt;br /&gt;
&lt;br /&gt;
This is fine for simple operations, but can get tedious with repeated use, and doesn't work with many MCE scripts (which don't pass -n when spawning MAS applications like [[mce_cmd]]).&lt;br /&gt;
&lt;br /&gt;
=== Card selection via the environment ===&lt;br /&gt;
&lt;br /&gt;
If no explicit card is passed to a MAS application with -n, they will consult the environmental variable $[[MAS_MCE_DEV]] to determine the current logical card number:&lt;br /&gt;
&lt;br /&gt;
 $ export MAS_MCE_DEV=0&lt;br /&gt;
 $ mce_cmd -qx rb cc card_id&lt;br /&gt;
 Line   0 : ok : 0xb5ccf7&lt;br /&gt;
 $ export MAS_MCE_DEV=1&lt;br /&gt;
 $ mce_cmd -qx rb cc card_id&lt;br /&gt;
 Line   0 : ok : 0x20f373d&lt;br /&gt;
&lt;br /&gt;
This is better, and such card numbers specified in this way will even be honoured by MCE scripts.  For backwards compatibility, if neither -n is specified nor $MAS_MCE_DEV is available, card zero is used as a default.&lt;br /&gt;
&lt;br /&gt;
=== Card-dependent paths and mas_var ===&lt;br /&gt;
&lt;br /&gt;
While $MAS_MCE_DEV solves the card selection problem, the problem of distinguishing the data output from the two cards still remains.  Writing configuration and data from more than one card to the same data directory will confuse much of MCE script.  The minimum solution requires changing ''at least'' $[[MAS_DATA]] and $[[MAS_DATA_ROOT]] when switching fibre cards to get MCE script to work:&lt;br /&gt;
&lt;br /&gt;
 $ export MAS_MCE_DEV=0&lt;br /&gt;
 $ export MAS_DATA_ROOT=/data/mce0&lt;br /&gt;
 $ export MAS_DATA=/data/mce0/current_data&lt;br /&gt;
 $ mce_run test_data 100000 s&lt;br /&gt;
 $ export MAS_MCE_DEV=1&lt;br /&gt;
 $ export MAS_DATA_ROOT=/data/mce1&lt;br /&gt;
 $ export MAS_DATA=/data/mce1/current_data&lt;br /&gt;
 $ mce_run test_data 100000 s&lt;br /&gt;
&lt;br /&gt;
That's a bit of a pain.  So [[MCE script]] has been overhauled and now they never explicitly reference environmental variables.  Instead a new MAS application has been written called [[mas_var]], which the MCE scripts use to calculate paths for the current fibre card:&lt;br /&gt;
&lt;br /&gt;
 $ export MAS_MCE_DEV=0&lt;br /&gt;
 $ mas_var --data-dir&lt;br /&gt;
 /data/mce0/current_data&lt;br /&gt;
 $ export MAS_MCE_DEV=1&lt;br /&gt;
 $ mas_var --data-dir&lt;br /&gt;
 /data/mce1/current_data&lt;br /&gt;
&lt;br /&gt;
And now we're back to:&lt;br /&gt;
&lt;br /&gt;
 $ export MAS_MCE_DEV=0&lt;br /&gt;
 $ mce_run test_data 100000 s&lt;br /&gt;
 $ export MAS_MCE_DEV=1&lt;br /&gt;
 $ mce_run test_data 100000 s&lt;br /&gt;
&lt;br /&gt;
(where mce_run contains calls to mas_var) with data written to either /data/mce0/current_data/test_data or /data/mce1/current_data/test_data as appropriate.  So standard operating procedure should now be to not define any MAS_* environmental variables except for $MAS_MCE_DEV.&lt;br /&gt;
&lt;br /&gt;
[[mas_var]] calculates its paths based on information in [[mas.cfg]] which was, in turn, generated by information passed to MAS's ./configure script.  Use of the [[mas_var]] program is explained on its own page, which you might want to read.&lt;br /&gt;
&lt;br /&gt;
=== Usability problems without an environment ===&lt;br /&gt;
&lt;br /&gt;
In addition to specifying paths to the MCE scripts, the $MAS_* environmental variables were also handy when working interactively with an MCE.  If no paths are provided in the environment, it's no longer possible to do something convenient like:&lt;br /&gt;
&lt;br /&gt;
 $ cd $MAS_DATA&lt;br /&gt;
&lt;br /&gt;
To get around this, [[mas_var]], has a mode where it prints out bash (or C-shell) commands to set-up all the environment which can be piped back into the currently running shell using the shell built-in command &amp;lt;tt&amp;gt;eval&amp;lt;/tt&amp;gt; and a pair of back-ticks (`):&lt;br /&gt;
&lt;br /&gt;
 $ echo $MAS_DATA&lt;br /&gt;
 &lt;br /&gt;
 $ eval `mas_var -s`&lt;br /&gt;
 $ echo $MAS_DATA&lt;br /&gt;
 /data/mce0/current_data&lt;br /&gt;
&lt;br /&gt;
(See the [[mas_var]] page for more information on -s and -c.)&lt;br /&gt;
&lt;br /&gt;
=== Environmental overrides ===&lt;br /&gt;
&lt;br /&gt;
Another feature this environment-less operation removes from the legacy operation of MCE script: if scripts always use [[mas_var]] to determine paths, and mas_var just generates them from the information given to it in [[mas.cfg]], then it's no longer possible to override MAS paths, which we could do previously by just changing the appropriate $MAS_* variable.&lt;br /&gt;
&lt;br /&gt;
In the past we could do:&lt;br /&gt;
 $ mce_raw_acq 1&lt;br /&gt;
 Acquiring raw data to /data/cryo/current_data/1350606349_raw&lt;br /&gt;
 $ export MAS_DATA=/tmp&lt;br /&gt;
 $ mce_raw_acq 1&lt;br /&gt;
 Acquiring raw data to /tmp/1350606363_raw&lt;br /&gt;
&lt;br /&gt;
In order to recover this behaviour, if asking [[mas_var]] for a path which has a corresponding environmental variable (like &amp;quot;mas_var --data-dir&amp;quot; is associated with $MAS_DATA), mas_var will just repeat the value of that environmental variable if it has been set:&lt;br /&gt;
&lt;br /&gt;
 $ mas_var --data-dir&lt;br /&gt;
 /data/mce0/current_data&lt;br /&gt;
 $ mce_raw_acq 1&lt;br /&gt;
 Acquiring raw data to /data/mce0/current_data/1350606349_raw&lt;br /&gt;
 $ export MAS_DATA=/tmp&lt;br /&gt;
 $ mas_var --data-dir&lt;br /&gt;
 /tmp&lt;br /&gt;
 $ mce_raw_acq 1&lt;br /&gt;
 Acquiring raw data to /tmp/1350606363_raw&lt;br /&gt;
&lt;br /&gt;
so environmental overrides are once again possible.&lt;br /&gt;
&lt;br /&gt;
=== Sticky overrides ===&lt;br /&gt;
&lt;br /&gt;
Introducing environmental override capability to [[mas_var]] gives us ''another'' problem: it can have serious unexpected results on a multicard system since the overrides defeat the card-specific path solution that mas_var originally gave us:&lt;br /&gt;
&lt;br /&gt;
 $ export MAS_MCE_DEV=0&lt;br /&gt;
 $ mas_var --data-dir&lt;br /&gt;
 /data/mce0/current_data&lt;br /&gt;
 $ export MAS_DATA=/data/mce0/current_data&lt;br /&gt;
 $ mas_var --data-dir&lt;br /&gt;
 /data/mce0/current_data&lt;br /&gt;
 $ export MAS_MCE_DEV=1&lt;br /&gt;
 $ mas_var --data-dir&lt;br /&gt;
 /data/mce0/current_data&lt;br /&gt;
&lt;br /&gt;
(ie. environmental variables are &amp;quot;sticky&amp;quot;: they don't change when the card changes, which happens to be the very problem we were trying to solve with mas_var in the first place).&lt;br /&gt;
&lt;br /&gt;
There's a -e switch to mas_var which forces it to ignore the current environment and reset everything to the defaults contained in [[mas.cfg]].  That solves the problem here:&lt;br /&gt;
&lt;br /&gt;
 $ export MAS_MCE_DEV=0&lt;br /&gt;
 $ mas_var --data-dir&lt;br /&gt;
 /data/mce0/current_data&lt;br /&gt;
 $ export MAS_DATA=/data/mce0/current_data&lt;br /&gt;
 $ mas_var --data-dir&lt;br /&gt;
 /data/mce0/current_data&lt;br /&gt;
 $ export MAS_MCE_DEV=1&lt;br /&gt;
 $ eval `mas_var -e -s`&lt;br /&gt;
 $ mas_var --data-dir&lt;br /&gt;
 /data/mce1/current_data&lt;br /&gt;
&lt;br /&gt;
Actually, since mas_var is a regular MAS application, it supports the -n switch and we can make card-selection and environment reset a one-liner:&lt;br /&gt;
&lt;br /&gt;
 $ eval `mas_var -n 0 -e -s`&lt;br /&gt;
 $ echo $MAS_MCE_DEV&lt;br /&gt;
 0&lt;br /&gt;
 $ mas_var --data-dir&lt;br /&gt;
 /data/mce0/current_data&lt;br /&gt;
 $ export MAS_DATA=/data/mce0/current_data&lt;br /&gt;
 $ mas_var --data-dir&lt;br /&gt;
 /data/mce0/current_data&lt;br /&gt;
 $ eval `mas_var -n 1 -e -s`&lt;br /&gt;
 $ echo $MAS_MCE_DEV&lt;br /&gt;
 1&lt;br /&gt;
 $ mas_var --data-dir&lt;br /&gt;
 /data/mce1/current_data&lt;br /&gt;
&lt;br /&gt;
which makes things pretty useable.&lt;br /&gt;
&lt;br /&gt;
For interactive use, that's probably good enough: we can put&lt;br /&gt;
&lt;br /&gt;
 eval `mas_var -e -s`&lt;br /&gt;
&lt;br /&gt;
in our .bashrc file to intialise the MAS environment the first time when we log in and then just run:&lt;br /&gt;
&lt;br /&gt;
 $ eval `mas_var -n ''N'' -e -s`&lt;br /&gt;
&lt;br /&gt;
whenever we want to switch to card ''N''.&lt;br /&gt;
&lt;br /&gt;
=== Streamlining: the &amp;quot;minimal environment&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
If we don't care about being able to do things like &amp;quot;cd $MAS_DATA&amp;quot; we can simplify the environment even more to the point that running mas_var is no longer&lt;br /&gt;
needed to switch cards.  This is especially handy when running MAS for multiple cards semi- or non-interactively.  The minimum environment needed to run MCE scripts on any particular card is:&lt;br /&gt;
&lt;br /&gt;
* '''$MAS_MCE_DEV''' to choose the card&lt;br /&gt;
* '''$MAS_VAR''' to point the MCE scripts to [[mas_var]]&lt;br /&gt;
* modified '''$PATH''' and '''$PYTHONPATH''' to allow the shell and Python to find the MAS and MCE script elements needed to run the system.&lt;br /&gt;
&lt;br /&gt;
This minimal environment will be provided if running &amp;quot;mas_var -s&amp;quot; (or &amp;quot;mas_var -c&amp;quot; in the C Shell) including the -x option (also add -e if you want to remove any previous environmental overrides):&lt;br /&gt;
&lt;br /&gt;
 $ eval `mas_var -x -s`&lt;br /&gt;
&lt;br /&gt;
This minimal environment allows very simple card switching at the expense of losing the convenience of having the $MAS_... paths in the environment:&lt;br /&gt;
&lt;br /&gt;
 $ eval `mas_var -x -s`&lt;br /&gt;
 $ MAS_MCE_DEV=0 mce_raw_acq 1&lt;br /&gt;
 Acquiring raw data to /data/mce0/current_data/1350606349_raw&lt;br /&gt;
 $ MAS_MCE_DEV=1 mce_raw_acq 1&lt;br /&gt;
 Acquiring raw data to /data/mce1/current_data/1350606363_raw&lt;br /&gt;
&lt;br /&gt;
Similarly, automated higher level applications which control multiple fibre cards in the same program can switch cards, if launched from the minimal environment, by then just setenv(3)ing a single variable ($MAS_MCE_DEV), which has very appealing robustness benefits.&lt;br /&gt;
&lt;br /&gt;
== Writing Multicard-MAS-enabled scripts ==&lt;br /&gt;
&lt;br /&gt;
Here are some pointers for writing MCE scripts for use in multicard environments:&lt;br /&gt;
=== Bash ===&lt;br /&gt;
* never hard-code MAS or MCE paths.&lt;br /&gt;
* add to the top of your script:&lt;br /&gt;
 if [ ! -x ${MAS_VAR:=/usr/mce/bin/mas_var} ]; then&lt;br /&gt;
   echo &amp;quot;Cannot find mas_var.  Set MAS_VAR to the full path to the mas_var binary.&amp;quot; &amp;gt;&amp;amp;2&lt;br /&gt;
   exit 1&lt;br /&gt;
 else&lt;br /&gt;
   eval $(${MAS_VAR} -s)&lt;br /&gt;
 fi&lt;br /&gt;
: The above tries to find [[mas_var]] (using $MAS_VAR if set) and then uses it to set all the &amp;quot;regular&amp;quot; environmental variables.&lt;br /&gt;
* after executing the above, your script can use the regular environmental variables: $MAS_DATA, $MAS_BIN, etc.&lt;br /&gt;
=== Python ===&lt;br /&gt;
* never hard-code MAS or MCE paths.&lt;br /&gt;
* don't use environmental variables&lt;br /&gt;
* a [[Auto-setup (python)#class_util.mas_path|mas_path]] module has been created to deal with paths; it's part of the [[Auto-setup (python)|auto_setup package]]. At the top of your script, add:&lt;br /&gt;
 from auto_setup.util import mas_path&lt;br /&gt;
 mas_path = mas_path()&lt;br /&gt;
* Use mas_path to fetch directories:&lt;br /&gt;
 data_dir = mas_path.data_dir()&lt;br /&gt;
* Best practice is to use os.path.join to concatenate path elements like these:&lt;br /&gt;
 data_file = os.path.join(mas_path.data_dir(), &amp;quot;my_data_file&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
[[Category:MAS]]&lt;/div&gt;</summary>
		<author><name>Mandana</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=PCI_fibre_card&amp;diff=7044</id>
		<title>PCI fibre card</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=PCI_fibre_card&amp;diff=7044"/>
		<updated>2018-04-01T17:35:25Z</updated>

		<summary type="html">&lt;p&gt;Mandana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Related|PCI Fibre Card}}&lt;br /&gt;
==Ordering==&lt;br /&gt;
Users of the [[MCE Control Computer]] (MCC) should not need to order PCI fibre cards separately: they come pre-installed in the MCC.  Retrofitting existing PCI fibre cards into new MCCs requires replacement of the fibre card front panel, which can be surprisingly tricky.  If you already have fibre cards which you would like installed into your new MCC, please send them to UBC for retrofit (although it's less work for us if you just let us order them).&lt;br /&gt;
&lt;br /&gt;
For non-MCC users, the data acquisition card is an ARC-64 - 250 MHz PCI Interface Board Rev. 5E (ask for a card from the batch of those set aside for UBC) from Astronomical Research Cameras, Inc:&lt;br /&gt;
&lt;br /&gt;
:http://www.astro-cam.com/arcpage.php?txt=products.php&amp;amp;cat=Controller%20Boards#ARC-64&lt;br /&gt;
 &lt;br /&gt;
Order the cards from:&lt;br /&gt;
 Bob Leach&lt;br /&gt;
 San Diego State University&lt;br /&gt;
 Astronomical Research Cameras, Inc.&lt;br /&gt;
 2247 San Diego Ave., Ste. 135&lt;br /&gt;
 San Diego, CA  92110-2943&lt;br /&gt;
 USA&lt;br /&gt;
 1.619.278.0866&lt;br /&gt;
 1.619.278.0868 fax&lt;br /&gt;
 leach at astro-cam.com&lt;br /&gt;
&lt;br /&gt;
== Power Consumption ==&lt;br /&gt;
&lt;br /&gt;
Fibre-optic receiver/transmitter pairs consume non-negligible amounts of power.  One of these cards consumes about 5&amp;amp;nbsp;Watts.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[PCI card firmware]]&lt;br /&gt;
* [[PCI card hacking]]&lt;br /&gt;
&lt;br /&gt;
[[Category:PCI Fibre Card]]&lt;/div&gt;</summary>
		<author><name>Mandana</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=MCE_script&amp;diff=6967</id>
		<title>MCE script</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=MCE_script&amp;diff=6967"/>
		<updated>2017-09-28T00:10:49Z</updated>

		<summary type="html">&lt;p&gt;Mandana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Related|MCE Script}}&lt;br /&gt;
The '''MCE script''' project is a collection of array setup tools and other utilities, built on top of [[MAS]], useful for running experiments.  MCE script is housed in a SVN repository at UBC.  See [[UBC SVN repository]] for details on downloading MCE script.&lt;br /&gt;
&lt;br /&gt;
= Tutorials =&lt;br /&gt;
&lt;br /&gt;
* [[ Basic mce_script configuration ]]&lt;br /&gt;
* [[ Series array setup ]]&lt;br /&gt;
&lt;br /&gt;
= Tool descriptions =&lt;br /&gt;
* Auto-tuning system&lt;br /&gt;
** [[ Auto-setup (python) ]] - an integrated tool set for dealing with SQUID data.&lt;br /&gt;
** [[ auto_setup_squids.pro | Auto-setup (IDL) ]] - IDL-based auto-tuning code (obsolete)&lt;br /&gt;
** [[ experiment.cfg ]] - array and auto-setup configuration data.&lt;br /&gt;
** [[ mce_config_template system ]]&lt;br /&gt;
* Other scripts&lt;br /&gt;
** [[MCE Test Scripts]]&lt;br /&gt;
** [[MCE script utilities]]&lt;br /&gt;
** [[ place_sq1.pro ]] for row selection for the purposes of sq1servo&lt;br /&gt;
** [[ IV curves ]] - acquire and analyze TES IV curves&lt;br /&gt;
** [[ special_ops.py ]]&lt;br /&gt;
** [[ measure_quanta.py ]] - Analyzes tuning data to determine SQUID phi0.&lt;br /&gt;
* Scripting tools&lt;br /&gt;
** [[ mce_internal_ramp ]] - configure and run MCE internal command ramps&lt;br /&gt;
** [[Environmental variables]]&lt;br /&gt;
&lt;br /&gt;
= Other resources =&lt;br /&gt;
&lt;br /&gt;
* Educational tools&lt;br /&gt;
** [[ Media:MAS_auto-tuning_20090529.pdf ]] - Some quick graphical depictions of auto-tuning. (Not a stand-alone presentation!)&lt;br /&gt;
** Characterization and Locking SQUIDs with Multi-Channel Electronics [[http://www.phas.ubc.ca/%7Emce/mcedocs/software/locking_squids.pdf PDF]] (Jun. 07, 2005)&lt;br /&gt;
&lt;br /&gt;
* Sample auto-tune plots:&lt;br /&gt;
** [http://www.phas.ubc.ca/%7Emce/mcedocs/auto_tune_results/biasing_ac_sq2fb_switching biasing ac sq2fb switching]&lt;br /&gt;
** [http://www.phas.ubc.ca/%7Emce/mcedocs/auto_tune_results/biasing_ac_not_switching biasing ac not switching]&lt;br /&gt;
[[Category:MCE Script| ]]&lt;/div&gt;</summary>
		<author><name>Mandana</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Readout_Card_RevB_to_RevE_changes&amp;diff=6949</id>
		<title>Readout Card RevB to RevE changes</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Readout_Card_RevB_to_RevE_changes&amp;diff=6949"/>
		<updated>2017-07-26T00:12:33Z</updated>

		<summary type="html">&lt;p&gt;Mandana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;; Lower power&lt;br /&gt;
: Rev. E cards consume about 13.4W while Rev. B cards consume about 25W. The power saving is mainly due to using a serial 8-channel serial ADC along with a Stratix III FPGA that is configured using a serial device.&lt;br /&gt;
; Preamp chain&lt;br /&gt;
: The noise bandwidth of the preamp is adjusted to be lower in Rev E cards than in Rev. B cards (exact bandwidth depends on what is connected to each channel; for example, the complex impedance of the cryogenic cables).  Rev. E uses different opamps as well as different RC poles.&lt;br /&gt;
; Minimum Vcore &lt;br /&gt;
: The minimum voltage level for Vcore is 3V for Rev. E cards while it was 2.5V for Rev. B cards.&lt;br /&gt;
; 8 in 1 serial ADC&lt;br /&gt;
: An 8-channel 14-bit 50MS/s serial ADC (AD9252BCPZ-50) is used in Rev. F cards while a single channel 14-bit 50MS/s parallel ADC (AD6644AST) is used in Rev. D cards. The serial ADC accounts for most of the power saving.&lt;br /&gt;
; Stratix III series FPGA: EP3SE50&lt;br /&gt;
: A pin compatible bigger FPGA with more resources, i.e., memory, DSP multipliers, is used in Rev. E as oppose to Stratix I series FPGA in Rev. B.&lt;br /&gt;
; FPGA configuration Device&lt;br /&gt;
: A serial configuration device (EPCS64) is used in Rev. E compare to a parallel configuration device (EPC16) in Rev. B. This accounts to some power savings.&lt;br /&gt;
: A *.jic file is needed to load permanent firmware on Rev. E cards as oppose to *.pof files for Rev. B cards.&lt;br /&gt;
; SEU tolerance&lt;br /&gt;
: The Stratix III FPGA in Rev. E has a CRC_ERROR pin that can be used to reconfigure the FPGA in case of an SEU hit on the FPGA configuration bits. This is not available on Rev. D. The option needs to yet be supported in firmware and software.&lt;br /&gt;
&lt;br /&gt;
; hard-wired pcb revision &lt;br /&gt;
: In Rev. E, 4 pins are introduced to provide the ability of reading back the pcb revision by software. These 4 bits are reported in the upper 16 bits of card_type. e.g., in a *.run file:&lt;br /&gt;
: RB rc2 card_type 00001282&lt;br /&gt;
: translates to 0x502 or rc2 card_type 2 pcb_rev 5&lt;br /&gt;
: card_type reads 00000002 for cards prior to Rev. E.&lt;br /&gt;
&lt;br /&gt;
; Silkscreen labeling of SSA_SIG and S1_FBv&lt;br /&gt;
: Signals are more accurately labeled on Rev. E PCBs. &lt;br /&gt;
&lt;br /&gt;
; Software considerations&lt;br /&gt;
: None.  The software does not need to distinguish between these hardware revisions.&lt;br /&gt;
&lt;br /&gt;
== E0 to E1 change order ==&lt;br /&gt;
Problem Description:&lt;br /&gt;
#	The output of U44 regulator is not regulated due to sense pin left unconnected.&lt;br /&gt;
#	C489 causes the output of U48 regulator to oscillate. &lt;br /&gt;
Change Description:&lt;br /&gt;
#	add a jumper wire to short pin 7 and 8 on U44. &lt;br /&gt;
#	Remove C489&lt;br /&gt;
''Note: No E0 card was ever shipped.''&lt;br /&gt;
&lt;br /&gt;
[[Category:Readout Card]]&lt;/div&gt;</summary>
		<author><name>Mandana</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Flux_jumping&amp;diff=6948</id>
		<title>Flux jumping</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Flux_jumping&amp;diff=6948"/>
		<updated>2017-06-23T19:42:10Z</updated>

		<summary type="html">&lt;p&gt;Mandana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The DAC range for sq1 feedback typically amounts to slightly more than 2 periods of the sq1 v-phi curve.  In some cases, such as extended observations or IV curve acquisition, a much larger dynamic range is desired.  The flux jumping feature uses a pre-programmed value of the v-phi period to bring out-of-range computed sq1 feedback values back into the DAC range.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
1) The DAC range of the sq1 feedback should span at least 1.2 periods of the sq1 v-phi curve.&lt;br /&gt;
&lt;br /&gt;
2) The periods of the sq1 v-phi curves must be known, on a column-by-column basis, in sq1 fb DAC units.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Side-effects ==&lt;br /&gt;
&lt;br /&gt;
The parameter &amp;quot;rc2 {{param|rc|fb_dly}}&amp;quot; determines the clock cycle in a row visit at which the sq1 feedback is applied.  When flux jumping is not enabled, the minimum value for this parameter is 7.  When flux jumping is enabled, the additional calculations push the minimum fb_dly to 3+7=10 as of RC firmware 5.1.d. (previsously 11+7=18).&lt;br /&gt;
&lt;br /&gt;
If fb_dly is set to a value smaller than the minimum, the minimum will be used.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
Each sq1 feedback is managed separately.  The implementation is as follows:&lt;br /&gt;
&lt;br /&gt;
1) For each sq1 feedback, we define&lt;br /&gt;
* x : the sq1 feedback, calculated by the PID servo loop at each servo step&lt;br /&gt;
* j : the flux jump counter, read and updated at each servo step&lt;br /&gt;
* y : the value applied to the sq1 feedback DAC, calculated at each step&lt;br /&gt;
* q : the flux quantum in sq1 fb DAC units, pre-programmed by the user.&lt;br /&gt;
&lt;br /&gt;
2) When the sq1 feedback x is calculated, the value applied to the DAC is&lt;br /&gt;
 y = x - j*q&lt;br /&gt;
&lt;br /&gt;
3) The sq1 fb value is signed and the DAC has a range of -8192 to +8191.  If the value applied to the DAC is greater than 0.95 of full positive scale (if y &amp;gt; 7800) then q is incremented by 1.  If the value applied to the DAC drops below 0.95 of full negative scale (if y &amp;lt; -7800) then j is decremented by 1.&lt;br /&gt;
&lt;br /&gt;
The effective sq1 DAC range is reduced, with the boundaries used as an overrun area.  Having somewhat more than 1.1 V-phi periods in the DAC range prevents rapid flux-jumping back and forth when signals drift near to a +/- 7800 boundary, and reduces potential noise due to inaccurate flux quantum measurements.&lt;br /&gt;
&lt;br /&gt;
4) The flux jump counter, j, is signed and has a range of -128 to +127.&lt;br /&gt;
&lt;br /&gt;
5) When flux-jump counter hits +127/-128, the DAC is set to +8191/-8192. The reported sq1-fb value, however, is still calculated based on the error signal read and is not aware of the flux-jumped value being clamped.&lt;br /&gt;
&lt;br /&gt;
== Preparation ==&lt;br /&gt;
&lt;br /&gt;
Before enabling flux jumping, it is necessary to load the flx_quanta registers with values appropriate for your setup.  Good measurements of the flux quanta are extremely valuable here.  IDL scripts are available for measuring these quickly and reliably from existing ramp_sq1_fb script output (contact UBC to have that script merged into your branch).&lt;br /&gt;
&lt;br /&gt;
The flux quantum measurements should be transcribed into the experiment.cfg configuration file; they will be written to the MCE the next time the config script is compiled and run (such as on the next auto-tuning).  The relevant parameter is:&lt;br /&gt;
&lt;br /&gt;
 ### Each entry of flux_quanta_rc# is repeated 41 times and written to&lt;br /&gt;
 ### 'rc# flx_quanta%'; a full flx_quanta array can be implemented if&lt;br /&gt;
 ### needed.&lt;br /&gt;
 &lt;br /&gt;
 flux_quanta = [ 7720, 7720, 7720, 7680, 7680, 7660, 7680, 7700,&lt;br /&gt;
                 7680, 7720, 7720, 7760, 7740, 7680, 7740, 7720,&lt;br /&gt;
                 7720, 7700, 7680, 7680, 7720, 7660, 7680, 7680,&lt;br /&gt;
                 7720, 7640, 7660, 7720, 7660, 7760, 7720, 7660 ];&lt;br /&gt;
&lt;br /&gt;
Currently the config system accepts a single flux quantum for each column, and applies it to all rows.  The MCE supports having separate flux quanta for each detector channel, and that functionality can be enabled for users, if desired.&lt;br /&gt;
&lt;br /&gt;
After modifying the flux quanta in experiment.cfg, you can write the values to the MCE by running &amp;quot;mce_make_config&amp;quot; followed by the $MAS_DATA/config_mce_auto_setup_* .&lt;br /&gt;
&lt;br /&gt;
== MCE commands ==&lt;br /&gt;
&lt;br /&gt;
The flux quanta values are exposed as 8 registers on each readout card, corresponding to the 8 columns controlled by that card.  Each register accepts 41 values, corresponding to the 41 rows for that column.  For columns 8-15, for example, the registers are:&lt;br /&gt;
 rc2 {{param|rc|flx_quanta0}}&lt;br /&gt;
 rc2 flx_quanta1&lt;br /&gt;
 rc2 flx_quanta2&lt;br /&gt;
 rc2 flx_quanta3&lt;br /&gt;
 rc2 flx_quanta4&lt;br /&gt;
 rc2 flx_quanta5&lt;br /&gt;
 rc2 flx_quanta6&lt;br /&gt;
 rc2 flx_quanta7&lt;br /&gt;
&lt;br /&gt;
The register {{param|rc|en_fb_jump}} on each readout card controls whether flux jumping is enabled.  To enable flux jumping for all readout cards, use the shorthand&lt;br /&gt;
 wb rca en_fb_jump 1&lt;br /&gt;
&lt;br /&gt;
To disable flux jumping, issue&lt;br /&gt;
 wb rca en_fb_jump 0&lt;br /&gt;
&lt;br /&gt;
The {{param|rc|en_fb_jump}} register can be read back to determine whether flux jumping is enabled.&lt;br /&gt;
&lt;br /&gt;
== Readout ==&lt;br /&gt;
&lt;br /&gt;
Data modes that report &amp;quot;feedback&amp;quot; or &amp;quot;filtered feedback&amp;quot; will report the full, computed feedback (i.e. y) or filtered feedback signal; they do not report the DAC value applied.  In modes that also report the flux jump counter (such as 5 and 9), the number reported is the 8 bit signed integer (j) corresponding to the number of flux quanta subtracted from the sq1 fb to obtain the DAC output value.&lt;br /&gt;
&lt;br /&gt;
When both the feedback and jump counter are reported, it is possible to determine the DAC value applied using the equation above.  Note however that there may be a delay of 1 frame between a change in the flux jump counter and its appearance in the data stream.  (UBC: clarify, is this exactly one internal frame, always, or what?)&lt;br /&gt;
&lt;br /&gt;
[[Category:Readout Card Firmware]]&lt;/div&gt;</summary>
		<author><name>Mandana</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Arbitrary_Waveform_Generator&amp;diff=6947</id>
		<title>Arbitrary Waveform Generator</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Arbitrary_Waveform_Generator&amp;diff=6947"/>
		<updated>2017-06-23T19:41:37Z</updated>

		<summary type="html">&lt;p&gt;Mandana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;For running simple parameter ramps on the MCE using internal commanding, see [[ Ramp Generator ]].&lt;br /&gt;
&lt;br /&gt;
* The Arbitrary Waveform Generator (AWG) permits users to configure a sequence of values which will be written at regular intervals to some MCE register.  The AWG is an MCE firmware feature.&lt;br /&gt;
* A RAM block has been allocated in the Clock Card FPGA to store arbitrary waveform values.&lt;br /&gt;
* Commands have been implemented to read to and write from the RAM (awg_data, awg_addr).  &lt;br /&gt;
* A FSM has been implemented that can apply a set number of values (awg_sequence_length) from the RAM block to any internal register (ramp_card_addr, ramp_param_id, ramp_step_data_num) in the MCE at a certain rate (ramp_step_period).  &lt;br /&gt;
&lt;br /&gt;
= Script-level support: mce_awg =&lt;br /&gt;
&lt;br /&gt;
The script '''&amp;lt;tt&amp;gt;mce_awg&amp;lt;/tt&amp;gt;''', in combination with &amp;lt;tt&amp;gt;[[mce_internal_ramp]]&amp;lt;/tt&amp;gt;, may be used to control the AWG features of the MCE.&lt;br /&gt;
* mce_awg is used to load the AWG data into CC RAM, and to start and stop the AWG loop.&lt;br /&gt;
* mce_internal_ramp is used to set the timing parameters and the target register for the AWG loop.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
The following commands will load a triangle wave into a 400 sample buffer, and try to run it with 50 Hz updating (so an 1/8 Hz repeat frequency) on tes bias[0]:&lt;br /&gt;
&lt;br /&gt;
 mce_awg stop&lt;br /&gt;
 mce_internal_ramp setup --target tes bias --count=1 --range 0 0 1 --step-frequency=50.&lt;br /&gt;
 mce_awg setup --triangle 8000 100 --count 400&lt;br /&gt;
 mce_awg start&lt;br /&gt;
&lt;br /&gt;
== Disabling the AWG loop ==&lt;br /&gt;
&lt;br /&gt;
To disable the AWG, run either of&lt;br /&gt;
 mce_awg stop&lt;br /&gt;
 mce_internal_ramp stop&lt;br /&gt;
&lt;br /&gt;
== Setting timing parameters and target register ==&lt;br /&gt;
&lt;br /&gt;
The timing parameters and target register are set using mce_internal_ramp.  See [[mce_internal_ramp]], or run &amp;lt;tt&amp;gt;mce_internal_ramp -h&amp;lt;/tt&amp;gt; for more details.&lt;br /&gt;
 mce_internal_ramp --stage=sa_bias --count=8 --offset 8 --step-frequency 100  --range 0 0 1  setup&lt;br /&gt;
&lt;br /&gt;
Note that the &amp;lt;tt&amp;gt;--range&amp;lt;/tt&amp;gt; option is a dummy parameter here, as it is our intention to run an AWG loop, not an internal ramp.&lt;br /&gt;
&lt;br /&gt;
== Loading a waveform ==&lt;br /&gt;
&lt;br /&gt;
The waveform may be taken from an ascii file, read from stdin, or generated automatically.  Examples:&lt;br /&gt;
&lt;br /&gt;
From a file:&lt;br /&gt;
 mce_awg setup --filename my_weird_wave.txt &lt;br /&gt;
&lt;br /&gt;
From stdin:&lt;br /&gt;
 cat my_weird_wave.txt | mce_awg setup --stdin&lt;br /&gt;
&lt;br /&gt;
(For multi-column ascii data, from either a file or stdin, pass --column=&amp;lt;int&amp;gt; to specify the source column.  In both cases, blank lines and lines beginning with a # are ignored.)&lt;br /&gt;
&lt;br /&gt;
A sine wave with a period of 400 steps, amplitude 1000 and offset 20000&lt;br /&gt;
 mce_awg setup --sine 20000 1000 --count 400&lt;br /&gt;
&lt;br /&gt;
A triangle wave with a period of 8192 (max, default), from 1500 to 2500 and back again:&lt;br /&gt;
 mce_awg setup --triangle 2000 500&lt;br /&gt;
&lt;br /&gt;
== Starting the AWG loop ==&lt;br /&gt;
&lt;br /&gt;
 mce_awg start&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Targeting TES and heater biases with mod_val =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Low-Level MCE Parameters for AWG =&lt;br /&gt;
&lt;br /&gt;
If you are writing your own script, the following MCE parameters need to be set: &lt;br /&gt;
* {{param|cc|internal_cmd_mode}}, {{param|cc|awg_sequence_length}}, {{param|cc|awg_addr}}, {{param|cc|ramp_step_period}}, {{param|cc|ramp_param_id}}, {{param|cc|ramp_card_addr}}, {{param|cc|ramp_step_data_num}}, {{param|cc|ramp_step_phase}} (optional). &lt;br /&gt;
&lt;br /&gt;
* Refer to [[MCE commands]] for details.&lt;br /&gt;
* Refer to [[MCE Timing Diagram#Timing_of_Internal_command|Timing of Internal Commands]].&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 wb cc {{param|cc|ramp_step_period}} 10    &lt;br /&gt;
 wb cc {{param|cc|ramp_param_id}} 153      //LED, for example&lt;br /&gt;
 wb cc {{param|cc|ramp_card_addr}} 2       //Clock Card, for example&lt;br /&gt;
 wb cc {{param|cc|ramp_step_data_num}} 1&lt;br /&gt;
 wb cc {{param|cc|awg_sequence_length}} 8192  //Currently the maximum size of the AWG RAM block&lt;br /&gt;
 &lt;br /&gt;
 wb cc {{param|cc|internal_cmd_mode}} 0    //Disable internal AWG commands BEFORE writing the data!!!&lt;br /&gt;
 wb cc {{param|cc|awg_addr}} 0             //Set the AWG RAM address to zero before writing new values&lt;br /&gt;
 wb cc {{param|cc|awg_data}} 1 2 1 2 ...   //Write AWG values&lt;br /&gt;
 wb cc {{param|cc|awg_data}} 1 2 1 2 ...   //Write more AWG values, appended to the end of the first set of values&lt;br /&gt;
 ...&lt;br /&gt;
 wb cc {{param|cc|awg_data}} 1 2 1 2 ...   //Write the last few AWG values, which must number as many as specified by awg_sequence_length above&lt;br /&gt;
 &lt;br /&gt;
 wb cc {{param|cc|awg_addr}} 0             //Set the AWG RAM address to zero before reading values&lt;br /&gt;
 rb cc {{param|cc|awg_data}}               //Read AWG values&lt;br /&gt;
 rb cc {{param|cc|awg_data}}   &lt;br /&gt;
 ...&lt;br /&gt;
 rb cc {{param|cc|awg_data}}&lt;br /&gt;
 &lt;br /&gt;
 wb cc {{param|cc|awg_addr}} 0             //Set the AWG RAM address to zero before changing the internal command mode&lt;br /&gt;
 wb cc {{param|cc|internal_cmd_mode}} 3    //Enable internal AWG commands AFTER writing the data!!!&lt;br /&gt;
 &lt;br /&gt;
 wb cc {{param|cc|data_rate}} 10&lt;br /&gt;
 acq_config awg_test rcs&lt;br /&gt;
 acq_go 1000&lt;br /&gt;
&lt;br /&gt;
*Note 1: The awg_addr register and awg_data are readable when internal-commanding is turned off.&lt;br /&gt;
*Note 2: You need to set awg_addr to 0 to read the awg_data sequence in full.&lt;br /&gt;
&lt;br /&gt;
[[Category:Clock Card Firmware]]&lt;br /&gt;
[[Category:MCE Script]]&lt;/div&gt;</summary>
		<author><name>Mandana</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Publications&amp;diff=6885</id>
		<title>Publications</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Publications&amp;diff=6885"/>
		<updated>2017-03-04T01:51:36Z</updated>

		<summary type="html">&lt;p&gt;Mandana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A large body of scientific publications has been made possible through the use of the Multi-Channel Electronics.  This page lists some technical publications related to the MCE:&lt;br /&gt;
* Henderson, Shawn, ''et al'', (2016)  [https://arxiv.org/pdf/1607.06064.pdf ''Readout of two-kilopixel transition-edge sensor arrays for Advanced ACTPol''], Proc. SPIE 9914, Millimeter, Submillimeter, and Far-Infrared Detectors and Instrumentation for Astronomy VIII, 99141G (July 19, 2016); doi:10.1117/12.2233895&lt;br /&gt;
* Hasselfield, Matthew (2013). [https://circle.ubc.ca/bitstream/handle/2429/45602/ubc_2014_spring_hasselfield_matthew.pdf?sequence=3 ''Galaxy Cluster Cosmology with the Atacama Cosmology Telescope'']. PhD thesis, The University of British Columbia. (See Chapter 2)&lt;br /&gt;
* Battistelli, Elia, ''et al.'' (2008). [http://www.phas.ubc.ca/~mce/mcedocs/auto_tune_results/Battistelli_et_al_ltd12_2007.pdf &amp;quot;Functional description of read-out electronics for time-domain multiplexed bolometers for millimeter and sub-millimeter&amp;quot;]. ''J. Low Temp. Phys.'' '''151''':908–914. [http://dx.doi.org/10.1007/s10909-008-9772-z doi:10.1007/s10909-008-9772-z]&lt;br /&gt;
* Niemack, Michael D. (2008). [http://www.princeton.edu/physics/graduate-program/theses/theses-from-2008/M.Niemackthesis.pdf ''Towards Dark Energy: Design, Development, and Preliminary Data from ACT'']. PhD thesis, Princeton University. (See Chapter 4)&lt;br /&gt;
*  Woodcraft, Adam L., ''et al.'',  (2006). [http://reference.lowtemp.org/woodcraft_spie06.pdf &amp;quot;Characterization of a prototype SCUBA-2 1280 pixel submillimetre superconducting bolometer array.&amp;quot;]. ''Proc. SPIE'', '''6275'''. [http://dx.doi.org/10.1117/12.671310 doi:10.1117/12.671310]&lt;br /&gt;
* Irwin, K. D.; Hilton, G. C. (2005), [http://venus.ifca.unican.es/~xray/XEUS/archivopapers/TESIrwinHilton.pdf &amp;quot;Transition Edge Sensors&amp;quot;], in ''Cryogenic Particle Detection'', C. Enss, ed. ''Topics Appl. Phys.'', '''99''':63–149. [http://dx.doi.org/10.1007/10933596_3 doi:10.1007/10933596_3]&lt;/div&gt;</summary>
		<author><name>Mandana</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Main_Page&amp;diff=6882</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=6882"/>
		<updated>2017-01-27T16:54:06Z</updated>

		<summary type="html">&lt;p&gt;Mandana: /* MCE Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This Wiki is for users of UBC's '''Multi-Channel Electronics''' (MCE), including the '''MCE Acquisition Software''' (MAS).&lt;br /&gt;
__NOTOC__&lt;br /&gt;
== MCE Overview ==&lt;br /&gt;
The MCE described here borrows heavily from the designs used at [http://www.nist.gov/pml/ NIST]. Changes have been made to upgrade components, achieve higher integration, and match to the specific experimental configurations.&lt;br /&gt;
&lt;br /&gt;
In basic operation, one MCE [[subrack]] controls the SQUID amplifiers and multiplexer, and reads signals from one 32×41 pixel or 16×41 pixel sub-array. The system hardware is completely modular at the sub-array level. Each sub-array is connected via woven cryogenic cables to a single MCE subrack through 3 or 5 MDM connectors. Each MCE subrack is, in turn, connected by an optical fibre to a single data-acquisition PC running Linux and data-acquisition software ([[MAS]]) developed at UBC.&lt;br /&gt;
 &lt;br /&gt;
Each MCE consists of hybrid analog/digital hardware and firmware developed for [https://www.altera.com/ Altera] [https://www.altera.com/products/fpga/stratix-series.html Stratix FPGAs]. A subrack has up to nine cards: including 2 or 4 [[Readout card]]s each of which reads 8 output columns through 14-bit 50MHz ADCs; 1 [[address card]] to multiplex the first-stage SQUIDs biases at around 20kHz; 1 [[clock card]] to interpret commands and to synchronize all the cards using a 25MHz clock; 2 or 3 [[bias card]]s to control the SQUID series-array feedback, the second-stage SQUID bias and feedback as well as the bolometer bias and heater. During [[auto_setup|detector setup]], the MCE is used to calculate the optimal operating points for the bolometers and the SQUID amplifiers by measuring their characteristics using open and closed feedback loops. During observation, MCE uses a running PID-calculation to determine the first-stage SQUID feedback necessary to keep the whole amplification chain in a linear regime.&lt;br /&gt;
&lt;br /&gt;
In conjunction with the MCEs, a [[Sync Box]] supplies data-valid pulses with serial numbers to all MCE subracks and to the telescope pointing system. This allows synchronization between the data acquisition, the pointing system, and the telescope housekeeping.&lt;br /&gt;
&lt;br /&gt;
== Documentation ==&lt;br /&gt;
&lt;br /&gt;
* [[ MCE hardware | MCE Hardware ]] - information on MCE hardware (and accessories)&lt;br /&gt;
* [[ MCE firmware | MCE Firmware ]] - firmware versions, features, and tools (including sync box and PCI card firmware)&lt;br /&gt;
* [[ MAS ]] - the MCE Acquisition Software - kernel driver and low-level tools&lt;br /&gt;
* [[ MCE script ]] - SQUID array setup programs&lt;br /&gt;
* [[ MCE usage ]] - practical usage and reference documents&lt;br /&gt;
* [[Publications]] - technical publications relating to the Multi-Channel Electronics&lt;br /&gt;
&lt;br /&gt;
== Contact Info ==&lt;br /&gt;
&lt;br /&gt;
The '''&amp;lt;code&amp;gt;[[mce-announce]]&amp;lt;/code&amp;gt;''' e-mail list is used to communicate important firmware and software updates to the MCE user community.  See the [[mce-announce]] page for details on how to subscribe.&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:         mandana at phas.ubc.ca, halpern at phas.ubc.ca&lt;br /&gt;
 Firmware:         mandana at phas.ubc.ca&lt;br /&gt;
 Software:         mhasse at psu.edu, dvw at phas.ubc.ca&lt;br /&gt;
  &lt;br /&gt;
 Department of Physics &amp;amp; Astronomy &lt;br /&gt;
 University of British Columbia&lt;br /&gt;
 6224 Agricultural Rd, Room 204&lt;br /&gt;
 Vancouver, BC V6T 1Z1 &lt;br /&gt;
 Canada&lt;/div&gt;</summary>
		<author><name>Mandana</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Clock_Card&amp;diff=6856</id>
		<title>Clock Card</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Clock_Card&amp;diff=6856"/>
		<updated>2016-11-17T00:11:03Z</updated>

		<summary type="html">&lt;p&gt;Mandana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Related|Clock Card}}&lt;br /&gt;
== Functional Description ==&lt;br /&gt;
Each MCE is equipped with only one Clock Card. There Clock Card is responsible for the following tasks:&lt;br /&gt;
* communicate to the outside world:&lt;br /&gt;
** a pair of [[Fiber Cable |fibre optical links]] connected to a PC that controls the MCE subrack. ([http://www.cypress.com/?docID=31689 Cypress Hotlink] protocol is used.)&lt;br /&gt;
** a manchester-encoded [[Fiber Cable |fibre link]] to a Sync Box.&lt;br /&gt;
** a non-manchester-encoded [[Fiber Cable |fibre link]] input (U23 only populated prior to RevD)&lt;br /&gt;
* packet assembly/disassembly&lt;br /&gt;
* dispatch incoming commands to other cards in the MCE rack over the backplane&lt;br /&gt;
* Clock generation and distribution&lt;br /&gt;
* coordinate operation among MCE cards&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
* [[Clock Card firmware]]&lt;br /&gt;
* [[MCE commands#Clock card commands|Clock Card commands]]&lt;br /&gt;
* Block diagram [[http://www.phas.ubc.ca/%7Emce/mcedocs/hardware/board_block_diagram/cc_bd.pdf PDF]] (obsolete)&lt;br /&gt;
* [[Clock Card Rev B5 to Rev B6 changes]]&lt;br /&gt;
* [[Clock Card Rev B to Rev C changes]]&lt;br /&gt;
* [[MCE backplane protocol]]&lt;br /&gt;
* [[MCE fibre protocol]]&lt;br /&gt;
&lt;br /&gt;
== Schematics ==&lt;br /&gt;
* Rev. B5 schematic [[http://www.phas.ubc.ca/%7Emce/mcedocs/hardware/schematics/Clock_Card_RevB/SC2-ELE-S581-101_RevB5_CC_Schematics.pdf PDF]]&lt;br /&gt;
* Rev. B6 schematic [[http://www.phas.ubc.ca/%7Emce/mcedocs/hardware/schematics/Clock_Card_RevB/SC2-ELE-S581-101_RevB6_CC_Schematics.pdf PDF]]&lt;br /&gt;
* Rev. C0 schematic [[http://www.phas.ubc.ca/%7Emce/mcedocs/hardware/schematics/Clock_Card_RevC/ELE-C581-101_RevC0_CC_Schematics.pdf PDF]]&lt;br /&gt;
* Rev. D1 schematic [[http://www.phas.ubc.ca/%7Emce/mcedocs/hardware/schematics/Clock_Card_RevD/ELE-C581-101_RevD1_CC_Schematics.PDF PDF]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Clock Card| ]]&lt;/div&gt;</summary>
		<author><name>Mandana</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Clock_Card&amp;diff=6855</id>
		<title>Clock Card</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Clock_Card&amp;diff=6855"/>
		<updated>2016-11-17T00:08:26Z</updated>

		<summary type="html">&lt;p&gt;Mandana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Related|Clock Card}}&lt;br /&gt;
== Functional Description ==&lt;br /&gt;
Each MCE is equipped with only one Clock Card. There Clock Card is responsible for the following tasks:&lt;br /&gt;
* communicate to the outside world:&lt;br /&gt;
** a pair of [[Fiber Cable |fibre optical links]] connected to a PC that controls the MCE subrack. ([http://www.cypress.com/?docID=31689 Cypress Hotlink] protocol is used.)&lt;br /&gt;
** a manchester-encoded [[Fiber Cable |fibre link]] to a Sync Box.&lt;br /&gt;
** a non-manchester-encoded [[Fiber Cable |fibre link]] input (U23 only populated prior to RevD)&lt;br /&gt;
* packet assembly/disassembly&lt;br /&gt;
* dispatch incoming commands to other cards in the MCE rack over the backplane&lt;br /&gt;
* Clock generation and distribution&lt;br /&gt;
* coordinate operation among MCE cards&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
* [[Clock Card firmware]]&lt;br /&gt;
* [[MCE commands#Clock card commands|Clock Card commands]]&lt;br /&gt;
* Block diagram [[http://www.phas.ubc.ca/%7Emce/mcedocs/hardware/board_block_diagram/cc_bd.pdf PDF]] (obsolete)&lt;br /&gt;
* [[Clock Card Rev B5 to Rev B6 changes]]&lt;br /&gt;
* [[Clock Card Rev B to Rev C changes]]&lt;br /&gt;
* [[MCE backplane protocol]]&lt;br /&gt;
* [[MCE fibre protocol]]&lt;br /&gt;
&lt;br /&gt;
== Schematics ==&lt;br /&gt;
* Rev. B5 schematic [[http://www.phas.ubc.ca/%7Emce/mcedocs/hardware/schematics/Clock%20Card%20RevB/SC2-ELE-S581-101_RevB5_CC_Schematics.pdf PDF]]&lt;br /&gt;
* Rev. B6 schematic [[http://www.phas.ubc.ca/%7Emce/mcedocs/hardware/schematics/Clock%20Card%20RevB/SC2-ELE-S581-101_RevB6_CC_Schematics.pdf PDF]]&lt;br /&gt;
* Rev. C0 schematic [[http://www.phas.ubc.ca/%7Emce/mcedocs/hardware/schematics/Clock%20Card%20RevC/ELE-C581-101_RevC0_CC_Schematics.pdf PDF]]&lt;br /&gt;
* Rev. D1 schematic [[http://www.phas.ubc.ca/%7Emce/mcedocs/hardware/schematics/Clock%20Card%20RevD/ELE-C581-101_RevD1_CC_Schematics.PDF PDF]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Clock Card| ]]&lt;/div&gt;</summary>
		<author><name>Mandana</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Clock_Card&amp;diff=6854</id>
		<title>Clock Card</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Clock_Card&amp;diff=6854"/>
		<updated>2016-11-17T00:07:20Z</updated>

		<summary type="html">&lt;p&gt;Mandana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Related|Clock Card}}&lt;br /&gt;
== Functional Description ==&lt;br /&gt;
Each MCE is equipped with only one Clock Card. There Clock Card is responsible for the following tasks:&lt;br /&gt;
* communicate to the outside world:&lt;br /&gt;
** a pair of [[Fiber Cable |fibre optical links]] connected to a PC that controls the MCE subrack. ([http://www.cypress.com/?docID=31689 Cypress Hotlink] protocol is used.)&lt;br /&gt;
** a manchester-encoded [[Fiber Cable |fibre link]] to a Sync Box.&lt;br /&gt;
** a non-manchester-encoded [[Fiber Cable |fibre link]] input (U23 only populated prior to RevD)&lt;br /&gt;
* packet assembly/disassembly&lt;br /&gt;
* dispatch incoming commands to other cards in the MCE rack over the backplane&lt;br /&gt;
* Clock generation and distribution&lt;br /&gt;
* coordinate operation among MCE cards&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
* [[Clock Card firmware]]&lt;br /&gt;
* [[MCE commands#Clock card commands|Clock Card commands]]&lt;br /&gt;
* Block diagram [[http://www.phas.ubc.ca/%7Emce/mcedocs/hardware/board_block_diagram/cc_bd.pdf PDF]] (obsolete)&lt;br /&gt;
* [[Clock Card Rev B5 to Rev B6 changes]]&lt;br /&gt;
* [[Clock Card Rev B to Rev C changes]]&lt;br /&gt;
* [[MCE backplane protocol]]&lt;br /&gt;
* [[MCE fibre protocol]]&lt;br /&gt;
&lt;br /&gt;
== Schematics ==&lt;br /&gt;
* Rev. B5 schematic [[http://www.phas.ubc.ca/%7Emce/mcedocs/hardware/schematics/Clock%20Card%20RevB/SC2-ELE-S581-101_RevB5_CC_Schematics.pdf PDF]]&lt;br /&gt;
* Rev. B6 schematic [[http://www.phas.ubc.ca/%7Emce/mcedocs/hardware/schematics/Clock%20Card%20RevB/SC2-ELE-S581-101_RevB6_CC_Schematics.pdf PDF]]&lt;br /&gt;
* Rev. C0 schematic [[http://www.phas.ubc.ca/%7Emce/mcedocs/hardware/schematics/Clock%20Card%20RevC/ELE-C581-101_RevC0_CC_Schematics.pdf PDF]]&lt;br /&gt;
* Rev. D1 schematic [[http://www.phas.ubc.ca/%7Emce/mcedocs/hardware/schematics/Clock%20Card%20RevD/Clock_Card_ELE-C581-101_RevD1_Schematics.PDF PDF]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Clock Card| ]]&lt;/div&gt;</summary>
		<author><name>Mandana</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Tips_on_running_the_IB_Tester&amp;diff=6258</id>
		<title>Tips on running the IB Tester</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Tips_on_running_the_IB_Tester&amp;diff=6258"/>
		<updated>2016-07-14T22:44:55Z</updated>

		<summary type="html">&lt;p&gt;Mandana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;# When you run the program, make sure the GPIB address is correctly set to 2 on multimeter.&lt;br /&gt;
# Make sure the right driver is installed for the GPIB controller that you are using to connect to the PC.&lt;br /&gt;
# When the test is running successfully, you see the display on multimeter is flashing with numbers&lt;br /&gt;
# Make sure output of IB-tester card ((HI and LO on front panel) are connected to ohm-meter input of multimeter HP34401A. (If you have connected to wrong input, then you hear click click noise)&lt;/div&gt;</summary>
		<author><name>Mandana</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Tips_on_running_the_IB_Tester&amp;diff=6257</id>
		<title>Tips on running the IB Tester</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Tips_on_running_the_IB_Tester&amp;diff=6257"/>
		<updated>2016-07-14T22:44:32Z</updated>

		<summary type="html">&lt;p&gt;Mandana: Created page with &amp;quot;# When you run the program, make sure the GPIB address is correctly set to 2 on multimeter. # Make sure the right driver is installed for the GPIB controller that you are using t…&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;# When you run the program, make sure the GPIB address is correctly set to 2 on multimeter.&lt;br /&gt;
# Make sure the right driver is installed for the GPIB controller that you are using to connect to the PC.&lt;br /&gt;
# When the test is running successfully, you see the display on multimeter is flashing with numbers&lt;br /&gt;
# Make sure output of IB-tester card ((HI and LO on front panel) are connected to ohm-meter input of multimeter HP34401A. (If you have connected to wrong input, then you hear click click noise)&lt;br /&gt;
&lt;br /&gt;
@&lt;/div&gt;</summary>
		<author><name>Mandana</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=IB_Tester&amp;diff=6256</id>
		<title>IB Tester</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=IB_Tester&amp;diff=6256"/>
		<updated>2016-07-14T22:34:29Z</updated>

		<summary type="html">&lt;p&gt;Mandana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Hierarchy header}}&lt;br /&gt;
The Instrument Backplane GPIB Tester card has the same footprint as all plug-in MCE cards and can be used to measure impedances of the cryostat interface and identify shorts and opens in the cryostat and/or the MCE. The test setup relies on running a Labview script.&lt;br /&gt;
&lt;br /&gt;
* [http://www.phas.ubc.ca/%7Emce/mcedocs/hardware/tech_description/sc2-ele-s58e-502_gpib_ib_tester_description.pdf IB Tester Functional Description]&lt;br /&gt;
* [http://www.phas.ubc.ca/%7Emce/mcedocs/hardware/schematics/IB%20Tester/ELE-S58E-101C_GPIB_IB_Tester_Schmatics.pdf IB Tester Schematics]&lt;br /&gt;
** [[IB Tester Errata]]&lt;br /&gt;
* [http://www.phas.ubc.ca/%7Emce/mcedocs/hardware/InstrumentBackplaneTestScripts/GPIB_IB_Tester_Users_Manual_Rev3.pdf IB Tester User's Manual]&lt;br /&gt;
&lt;br /&gt;
== Additional Software ==&lt;br /&gt;
=== Labview solution===&lt;br /&gt;
* IB Tester Labview Scripts for Windows Platform [[http://www.phas.ubc.ca/%7Emce/mcedocs/hardware/InstrumentBackplaneTestScripts/GPIB%20IB%20tester_ver-b.vi script1] [http://www.phas.ubc.ca/%7Emce/mcedocs/hardware/InstrumentBackplaneTestScripts/measure%20and%20write.vi script 2]]&lt;br /&gt;
* IB Tester Templates [[http://www.phas.ubc.ca/%7Emce/mcedocs/hardware/InstrumentBackplaneTestScripts/ib_terster_templates.zip ZIP]]&lt;br /&gt;
&lt;br /&gt;
* [http://www.ni.com/labview/ LabView, Version 8, National Instruments]&lt;br /&gt;
&lt;br /&gt;
* For Windows Platform, Labview Report Generation Software, Version 1.1.1, National Instruments, [http://sine.ni.com/nips/cds/view/p/lang/en/nid/5769 here]&lt;br /&gt;
* [[tips on running mce ib-tester]]&lt;br /&gt;
=== python solution ===&lt;br /&gt;
Eric S. from GSFC has rewritten the code in pyton: &lt;br /&gt;
&lt;br /&gt;
''&amp;quot;The excel channel MUX spreadsheet is exported to .txt. This uses a [http://prologix.biz/gpib-usb-controller.html Prologix GPIB/USB] interface rather than National Instruments. The Prologix communicates as a serial device over pyserial. National instruments will work in python, too, but as far as I can tell only through installing pyvisa, which takes more setup than pyserial. Feel free to use and extend!&amp;quot;'' &lt;br /&gt;
&lt;br /&gt;
* [http://www.phas.ubc.ca/%7Emce/mcedocs/software/ib-tester/gpib_chat.py gpib_chat.py]&lt;br /&gt;
* [http://www.phas.ubc.ca/%7Emce/mcedocs/software/ib-tester/mce_continuity.py mce_continuity.py]&lt;br /&gt;
* [http://www.phas.ubc.ca/%7Emce/mcedocs/software/ib-tester/5MDM_ib_continuity_test_template.txt test template]&lt;br /&gt;
&lt;br /&gt;
== Additional Hardware ==&lt;br /&gt;
* GPIB to USB Adaptor: &lt;br /&gt;
** National Instruments, [http://sine.ni.com/nips/cds/view/p/lang/en/nid/201586 GPIB-USB-HS] OR [http://www.ni.com/pdf/products/us/4gpib675-676.pdf  GPIB-USB-B (discontinued) ]&lt;br /&gt;
** [http://prologix.biz/gpib-usb-controller.html Prologix GPIB/USB]&lt;br /&gt;
* GPIB Cable: [http://sine.ni.com/nips/cds/view/p/lang/en/nid/1281 here]&lt;br /&gt;
* Digital Multi-Meter: [http://www.home.agilent.com/agilent/product.jspx?pn=34401A Agilent 34401A]&lt;br /&gt;
&lt;br /&gt;
[[Category:Hardware]]&lt;/div&gt;</summary>
		<author><name>Mandana</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=IB_Tester&amp;diff=6255</id>
		<title>IB Tester</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=IB_Tester&amp;diff=6255"/>
		<updated>2016-07-14T22:33:53Z</updated>

		<summary type="html">&lt;p&gt;Mandana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Hierarchy header}}&lt;br /&gt;
The Instrument Backplane GPIB Tester card has the same footprint as all plug-in MCE cards and can be used to measure impedances of the cryostat interface and identify shorts and opens in the cryostat and/or the MCE. The test setup relies on running a Labview script.&lt;br /&gt;
&lt;br /&gt;
* [http://www.phas.ubc.ca/%7Emce/mcedocs/hardware/tech_description/sc2-ele-s58e-502_gpib_ib_tester_description.pdf IB Tester Functional Description]&lt;br /&gt;
* [http://www.phas.ubc.ca/%7Emce/mcedocs/hardware/schematics/IB%20Tester/ELE-S58E-101C_GPIB_IB_Tester_Schmatics.pdf IB Tester Schematics]&lt;br /&gt;
** [[IB Tester Errata]]&lt;br /&gt;
* [http://www.phas.ubc.ca/%7Emce/mcedocs/hardware/InstrumentBackplaneTestScripts/GPIB_IB_Tester_Users_Manual_Rev3.pdf IB Tester User's Manual]&lt;br /&gt;
* [[tips on running mce ib-tester]]&lt;br /&gt;
== Additional Software ==&lt;br /&gt;
=== Labview solution===&lt;br /&gt;
* IB Tester Labview Scripts for Windows Platform [[http://www.phas.ubc.ca/%7Emce/mcedocs/hardware/InstrumentBackplaneTestScripts/GPIB%20IB%20tester_ver-b.vi script1] [http://www.phas.ubc.ca/%7Emce/mcedocs/hardware/InstrumentBackplaneTestScripts/measure%20and%20write.vi script 2]]&lt;br /&gt;
* IB Tester Templates [[http://www.phas.ubc.ca/%7Emce/mcedocs/hardware/InstrumentBackplaneTestScripts/ib_terster_templates.zip ZIP]]&lt;br /&gt;
&lt;br /&gt;
* [http://www.ni.com/labview/ LabView, Version 8, National Instruments]&lt;br /&gt;
&lt;br /&gt;
* For Windows Platform, Labview Report Generation Software, Version 1.1.1, National Instruments, [http://sine.ni.com/nips/cds/view/p/lang/en/nid/5769 here]&lt;br /&gt;
&lt;br /&gt;
=== python solution ===&lt;br /&gt;
Eric S. from GSFC has rewritten the code in pyton: &lt;br /&gt;
&lt;br /&gt;
''&amp;quot;The excel channel MUX spreadsheet is exported to .txt. This uses a [http://prologix.biz/gpib-usb-controller.html Prologix GPIB/USB] interface rather than National Instruments. The Prologix communicates as a serial device over pyserial. National instruments will work in python, too, but as far as I can tell only through installing pyvisa, which takes more setup than pyserial. Feel free to use and extend!&amp;quot;'' &lt;br /&gt;
&lt;br /&gt;
* [http://www.phas.ubc.ca/%7Emce/mcedocs/software/ib-tester/gpib_chat.py gpib_chat.py]&lt;br /&gt;
* [http://www.phas.ubc.ca/%7Emce/mcedocs/software/ib-tester/mce_continuity.py mce_continuity.py]&lt;br /&gt;
* [http://www.phas.ubc.ca/%7Emce/mcedocs/software/ib-tester/5MDM_ib_continuity_test_template.txt test template]&lt;br /&gt;
&lt;br /&gt;
== Additional Hardware ==&lt;br /&gt;
* GPIB to USB Adaptor: &lt;br /&gt;
** National Instruments, [http://sine.ni.com/nips/cds/view/p/lang/en/nid/201586 GPIB-USB-HS] OR [http://www.ni.com/pdf/products/us/4gpib675-676.pdf  GPIB-USB-B (discontinued) ]&lt;br /&gt;
** [http://prologix.biz/gpib-usb-controller.html Prologix GPIB/USB]&lt;br /&gt;
* GPIB Cable: [http://sine.ni.com/nips/cds/view/p/lang/en/nid/1281 here]&lt;br /&gt;
* Digital Multi-Meter: [http://www.home.agilent.com/agilent/product.jspx?pn=34401A Agilent 34401A]&lt;br /&gt;
&lt;br /&gt;
[[Category:Hardware]]&lt;/div&gt;</summary>
		<author><name>Mandana</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Readout_Card_firmware&amp;diff=6229</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=6229"/>
		<updated>2016-06-02T01:47:42Z</updated>

		<summary type="html">&lt;p&gt;Mandana: /* Revision 6.0.3 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Hierarchy header}}&lt;br /&gt;
* Synthesis Reminders (for firmware developers)&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 6.0.3 =&lt;br /&gt;
* '''Filename:'''&lt;br /&gt;
** [http://e-mode.phas.ubc.ca/mce/firmware/rc_stratix3_v06000003_20160601.sof rc_stratix3_v06000003_20160601.sof] &lt;br /&gt;
* ''' Features:'''&lt;br /&gt;
** 6.0.2 was built based on a version that had an unsuccessful attempt to fix the filter dynamic-range issue.  This version reverts back to 5.2.1 for fsfb_calc implementation.&lt;br /&gt;
&lt;br /&gt;
= Revision 6.0.2 (TEST!) =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** [http://e-mode.phas.ubc.ca/mce/firmware/rc_stratix3_v06000002_20160509.sof 	rc_stratix3_v06000002_20160509.sof]&lt;br /&gt;
** [http://e-mode.phas.ubc.ca/mce/firmware/rc_stratix3_v06000002_20160509.jic 	rc_stratix3_v06000002_20160509.jic]&lt;br /&gt;
&lt;br /&gt;
* '''Features'''&lt;br /&gt;
**built based on 5.2.2&lt;br /&gt;
**added support of upper 32 word needs an additional wait cycle for ack_read&lt;br /&gt;
** delay wishbone readback by one clock cycle for reading back flx_quanta and adc_offset, &lt;br /&gt;
** there seem to be a filter gain of factor of 2 added&lt;br /&gt;
&lt;br /&gt;
* ''' bug'''&lt;br /&gt;
** it seems to have a different filter gain&lt;br /&gt;
&lt;br /&gt;
= Revision 5.2.2 (TEST!) =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** [http://e-mode.phas.ubc.ca/mce/firmware/rc_stratix3_v050200002_17oct2014.sof rc_stratix3_v050200002_17oct2014.sof]&lt;br /&gt;
&lt;br /&gt;
* '''bugfix or enhancement?'''  &lt;br /&gt;
** fixes a dynamic-range issue with the filter by applying a 20-bit window to the output of stage 1 filter (with lsb being configurable) before passing it on the next stage.&lt;br /&gt;
&lt;br /&gt;
= Revision 5.2.1 (recommended!) =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratixIII_v05020001_05jun2014.sof &lt;br /&gt;
&lt;br /&gt;
* '''bugfix'''  &lt;br /&gt;
** {{param|rc|servo_rst_col0|servo_rst_col''#''}} now works for all columns! (bug reported in 5.2.0)&lt;br /&gt;
&lt;br /&gt;
= Revision 5.2.0 =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratixIII_v05020000_28may2013.sof &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** added the ability to reset the flux-loop servo on per-detector basis by adding {{param|rc|servo_rst_arm}} and {{param|rc|servo_rst_col0|servo_rst_col''#''}} parameters. This will reset the integral_term, the integral_clamp, anf flux-jump counter.&lt;br /&gt;
&lt;br /&gt;
* '''bug:'''  &lt;br /&gt;
** {{param|rc|servo_rst_col0|servo_rst_col''#''}} works for col 0 and 1, but not for col2 to 7! This is fixed in 5.2.1&lt;br /&gt;
= Revision 5.1.d =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratixIII_v0501000d_30oct2012.sof &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** flux-jump routine is revamped to minimize the additional delay for applying sq1fb when flux-jump is enabled. In this version sq1fb DAC is refreshed at clock cycle 10 of each row visit when flux-jump is enabled and at clock cycle 7 when flux-jump is disabled.&lt;br /&gt;
** extended dynamic range of the filter by increasing the width of filter-delay terms from 29 to 32 bits &lt;br /&gt;
** lower power consumption (maybe?)&lt;br /&gt;
&lt;br /&gt;
* '''Details'''&lt;br /&gt;
** DDR2 module not instantiated (chips not installed) and on-chip termination resistors not in effect which can potentially save power.&lt;br /&gt;
&lt;br /&gt;
=== Revision 5.1.c (Test) ===&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratixIII_v0501000c_31aug2012.sof &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** extended dynamic range of the filter by increasing the width of filter-delay terms from 29 to 32 bits &lt;br /&gt;
** based on 5.1.a&lt;br /&gt;
** lower power consumption (maybe?)&lt;br /&gt;
** {{param|rc|data_mode}}=4 reports fb(29 downto 12) instead of fb(31) &amp;amp; fb(28 downto 12)! no sticky bit.&lt;br /&gt;
&lt;br /&gt;
* '''Details'''&lt;br /&gt;
** DDR2 module not instantiated (chips not installed) and on-chip termination resistors not in effect which can potentially save power.&lt;br /&gt;
&lt;br /&gt;
= Revision 5.1.b (Stable '''Rev.B''' Cards) =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0501000b_23mar2012.sof (Rev. B cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.8 (used Q11SP1)&lt;br /&gt;
** added intergral_term fix from 5.1.9 &lt;br /&gt;
&lt;br /&gt;
* '''Details'''&lt;br /&gt;
** qterm (or filtered-p) implementation is not included, because the design doesn't fit on the FPGA on Rev. B cards anymore.&lt;br /&gt;
&lt;br /&gt;
= Revision 5.1.a (Stable) =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v0501000a_24jan2012.sof (Rev. E cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.9 (used Q10SP1)&lt;br /&gt;
** {{param|rc|pterm_decay_bits}} (par_id = 0x64) is now '''programmable''' and is initially set to 0 to have pure p-term and be compatible with older firmware. (p-term implemented as q(n) = er(n) + b*q(n-1) where b=(1-1/2^k)with k={{param|rc|pterm_decay_bits}})&lt;br /&gt;
** see bugfix in 5.1.9&lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.9 (test) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010009_23jan2012.sof (for Rev. E cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.8 (used Q10SP1)&lt;br /&gt;
** first implementation of decayed-p-term in sq1fb calculation. The p-term is now implemented as q(n) = er(n) + b*q(n-1) where b=(1-1/2^k) and '''k=3 hardcoded'''. &lt;br /&gt;
** added {{param|rc|pterm_decay_bits}} (par_id=0x64) as a register set to 3, but not tied to k in pterm calculation yet.&lt;br /&gt;
&lt;br /&gt;
* ''' Bugfix:'''&lt;br /&gt;
** This version fixes the bug introduced starting 5.0.e, the integral-term used to calculate sq1fb was calculated based on coadded value of (sample_num-1) samples and then the integral term stored for next round included sample_num-2. This is almost like having a p-term..&lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.8 (s1fb_dly=7) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010008_11jan2012.sof (for Rev. E cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.7 (used Q10SP1)&lt;br /&gt;
** reverts back to applying S1fb after 7 clock cycles when flux-jump is off, and after 18 clock cycles when flux-jump is on.&lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.7 (rectangle-mode bugfix) ==&lt;br /&gt;
[[File:RC516 vs RC517 hash.jpeg|thumb|Reduction in high-frequency noise due to rectangle-mode bugfix]]&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010007_17nov2011.sof (for Rev. E cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.6 (used Q10SP1)&lt;br /&gt;
&lt;br /&gt;
* ''' Bugfix:'''&lt;br /&gt;
** In all RC firmware prior to 5.1.7, the read pointer in the rectangle-mode data was being refreshed at ARZ even if it was in the middle of a long readout (large frame readout). This resulted in seeing '''duplicate data in high-data-rate rectangle-mode readout''' only when the following condition was _NOT_ true: (230 + 2*{{param|cc|num_rows_reported|cc&amp;amp;nbsp;num_rows_reported}}*{{param|cc|num_cols_reported|cc&amp;amp;nbsp;num_cols_reported}}) &amp;lt; ({{param|sys|num_rows}}*{{param|sys|row_len}}). This is fixed in 5.1.7.&lt;br /&gt;
&lt;br /&gt;
= Revision 5.1.6 (Stable) =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010006_27oct2011.sof (for Rev. E cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.5 (used Q10SP1)&lt;br /&gt;
** coadd window and feedback-calculation blocks are adjusted for ADC latency of readout card Rev. E&lt;br /&gt;
&lt;br /&gt;
* ''' Bugfix:'''&lt;br /&gt;
** {{param|rc|sample_dly}} + {{param|rc|sample_num}} = {{param|sys|row_len}} should work now.&lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.5 (test)==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010005_15sep2011.sof (for Rev. E cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.2&lt;br /&gt;
** reverts back to applying SQ1FB after 18 clock cycles whether flux-jumping is on or off&lt;br /&gt;
&lt;br /&gt;
* ''' Bugfix:'''&lt;br /&gt;
** All stratixiii firmware revisions prior to this version adjusted the co-add window for an ADC latency of 4 instead of 11. (Rev. E RC has serial ADC installed with 11 clock cycle latency.) The coadd window is now adjusted properly.&lt;br /&gt;
&lt;br /&gt;
*'''Bug:'''&lt;br /&gt;
** The last row samples can not be used in {{param|rc|servo_mode}}=3. For proper operation: {{param|rc|sample_dly}} + {{param|rc|sample_num}} needs to be &amp;lt; {{param|sys|row_len}} - 7 (I think). Although, the coadd window was adjusted in this version, but the calculation block latches data before coadd is done (coadd_done_o signal).&lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.4 (Scuba2) ==&lt;br /&gt;
&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05010004_01jun2011.sof (for Rev. B cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.3&lt;br /&gt;
** sq1_fb applied after 7 clock cycles when flux-jump off, and after 18 when flux-jump is on.&lt;br /&gt;
* ''' bugfix:'''&lt;br /&gt;
** fixed bug with fsfb_corr when reverting back to applying sq1fb after 7 clk cycles when fj is off&lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.3 (Scuba2) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05010003_01jun2011.sof (for Rev. B cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.2&lt;br /&gt;
** reverts back to applying SQ1FB after 7 clock cyclces when flux-jumping is off, and after 18 clock cycles when flux-jumping is on.&lt;br /&gt;
** k1 of filter params is now limited to k1&amp;lt;8. After generating coeffs for many filters, it is certain that this range is more than what we ever need.&lt;br /&gt;
&lt;br /&gt;
= Revision 5.1.2 (Stable)=&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 (test only) ==&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 (test only) ==&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 {{param|rc|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;
** {{param|rc|fltr_type}} is set to 255 to indicate configurable filter parameters.&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 (Stable) =&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 (test only) ==&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 {{param|rc|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 (test only) ==&lt;br /&gt;
[[Image:Clamp_unstable.png|thumb|right|Scope snapshot]]&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;
** '''{{param|rc|integral_clamp}} 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 {{param|rc|integral_clamp}}=80000000, {{param|rc|flx_quanta0|flux_quanta}}=8000, {{param|rc|gaini0|gaini}}=1, flux-jump enabled, we see 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 (test only) ==&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):&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 (test 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 pixels with non-zero {{param|rc|flx_quanta0|flx_quanta}}, and being disabled on the fly on dead pixels with {{param|rc|flx_quanta0|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;
** {{param|rc|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 {{param|rc|en_fb_jump}}=1.  Before the change, this meant that constant values could be applied with or without the 11-cycle delay if {{param|rc|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):&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):&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 (test only) ==&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;
** {{param|rc|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;
** {{param|rc|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;
** {{param|rc|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 (Stable) =&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;
* '''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;
= 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;
* [[Pre-v5 firmware#Readout Card|Pre-v5 firmware]]&lt;br /&gt;
[[Category:Firmware]]&lt;/div&gt;</summary>
		<author><name>Mandana</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Readout_Card_firmware&amp;diff=6228</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=6228"/>
		<updated>2016-06-02T01:47:29Z</updated>

		<summary type="html">&lt;p&gt;Mandana: /* Revision 6.0.3 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Hierarchy header}}&lt;br /&gt;
* Synthesis Reminders (for firmware developers)&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 6.0.3 =&lt;br /&gt;
* '''Filename:'''&lt;br /&gt;
** [ http://e-mode.phas.ubc.ca/mce/firmware/rc_stratix3_v06000003_20160601.sof rc_stratix3_v06000003_20160601.sof] &lt;br /&gt;
* ''' Features:'''&lt;br /&gt;
** 6.0.2 was built based on a version that had an unsuccessful attempt to fix the filter dynamic-range issue.  This version reverts back to 5.2.1 for fsfb_calc implementation.&lt;br /&gt;
&lt;br /&gt;
= Revision 6.0.2 (TEST!) =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** [http://e-mode.phas.ubc.ca/mce/firmware/rc_stratix3_v06000002_20160509.sof 	rc_stratix3_v06000002_20160509.sof]&lt;br /&gt;
** [http://e-mode.phas.ubc.ca/mce/firmware/rc_stratix3_v06000002_20160509.jic 	rc_stratix3_v06000002_20160509.jic]&lt;br /&gt;
&lt;br /&gt;
* '''Features'''&lt;br /&gt;
**built based on 5.2.2&lt;br /&gt;
**added support of upper 32 word needs an additional wait cycle for ack_read&lt;br /&gt;
** delay wishbone readback by one clock cycle for reading back flx_quanta and adc_offset, &lt;br /&gt;
** there seem to be a filter gain of factor of 2 added&lt;br /&gt;
&lt;br /&gt;
* ''' bug'''&lt;br /&gt;
** it seems to have a different filter gain&lt;br /&gt;
&lt;br /&gt;
= Revision 5.2.2 (TEST!) =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** [http://e-mode.phas.ubc.ca/mce/firmware/rc_stratix3_v050200002_17oct2014.sof rc_stratix3_v050200002_17oct2014.sof]&lt;br /&gt;
&lt;br /&gt;
* '''bugfix or enhancement?'''  &lt;br /&gt;
** fixes a dynamic-range issue with the filter by applying a 20-bit window to the output of stage 1 filter (with lsb being configurable) before passing it on the next stage.&lt;br /&gt;
&lt;br /&gt;
= Revision 5.2.1 (recommended!) =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratixIII_v05020001_05jun2014.sof &lt;br /&gt;
&lt;br /&gt;
* '''bugfix'''  &lt;br /&gt;
** {{param|rc|servo_rst_col0|servo_rst_col''#''}} now works for all columns! (bug reported in 5.2.0)&lt;br /&gt;
&lt;br /&gt;
= Revision 5.2.0 =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratixIII_v05020000_28may2013.sof &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** added the ability to reset the flux-loop servo on per-detector basis by adding {{param|rc|servo_rst_arm}} and {{param|rc|servo_rst_col0|servo_rst_col''#''}} parameters. This will reset the integral_term, the integral_clamp, anf flux-jump counter.&lt;br /&gt;
&lt;br /&gt;
* '''bug:'''  &lt;br /&gt;
** {{param|rc|servo_rst_col0|servo_rst_col''#''}} works for col 0 and 1, but not for col2 to 7! This is fixed in 5.2.1&lt;br /&gt;
= Revision 5.1.d =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratixIII_v0501000d_30oct2012.sof &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** flux-jump routine is revamped to minimize the additional delay for applying sq1fb when flux-jump is enabled. In this version sq1fb DAC is refreshed at clock cycle 10 of each row visit when flux-jump is enabled and at clock cycle 7 when flux-jump is disabled.&lt;br /&gt;
** extended dynamic range of the filter by increasing the width of filter-delay terms from 29 to 32 bits &lt;br /&gt;
** lower power consumption (maybe?)&lt;br /&gt;
&lt;br /&gt;
* '''Details'''&lt;br /&gt;
** DDR2 module not instantiated (chips not installed) and on-chip termination resistors not in effect which can potentially save power.&lt;br /&gt;
&lt;br /&gt;
=== Revision 5.1.c (Test) ===&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratixIII_v0501000c_31aug2012.sof &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** extended dynamic range of the filter by increasing the width of filter-delay terms from 29 to 32 bits &lt;br /&gt;
** based on 5.1.a&lt;br /&gt;
** lower power consumption (maybe?)&lt;br /&gt;
** {{param|rc|data_mode}}=4 reports fb(29 downto 12) instead of fb(31) &amp;amp; fb(28 downto 12)! no sticky bit.&lt;br /&gt;
&lt;br /&gt;
* '''Details'''&lt;br /&gt;
** DDR2 module not instantiated (chips not installed) and on-chip termination resistors not in effect which can potentially save power.&lt;br /&gt;
&lt;br /&gt;
= Revision 5.1.b (Stable '''Rev.B''' Cards) =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0501000b_23mar2012.sof (Rev. B cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.8 (used Q11SP1)&lt;br /&gt;
** added intergral_term fix from 5.1.9 &lt;br /&gt;
&lt;br /&gt;
* '''Details'''&lt;br /&gt;
** qterm (or filtered-p) implementation is not included, because the design doesn't fit on the FPGA on Rev. B cards anymore.&lt;br /&gt;
&lt;br /&gt;
= Revision 5.1.a (Stable) =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v0501000a_24jan2012.sof (Rev. E cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.9 (used Q10SP1)&lt;br /&gt;
** {{param|rc|pterm_decay_bits}} (par_id = 0x64) is now '''programmable''' and is initially set to 0 to have pure p-term and be compatible with older firmware. (p-term implemented as q(n) = er(n) + b*q(n-1) where b=(1-1/2^k)with k={{param|rc|pterm_decay_bits}})&lt;br /&gt;
** see bugfix in 5.1.9&lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.9 (test) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010009_23jan2012.sof (for Rev. E cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.8 (used Q10SP1)&lt;br /&gt;
** first implementation of decayed-p-term in sq1fb calculation. The p-term is now implemented as q(n) = er(n) + b*q(n-1) where b=(1-1/2^k) and '''k=3 hardcoded'''. &lt;br /&gt;
** added {{param|rc|pterm_decay_bits}} (par_id=0x64) as a register set to 3, but not tied to k in pterm calculation yet.&lt;br /&gt;
&lt;br /&gt;
* ''' Bugfix:'''&lt;br /&gt;
** This version fixes the bug introduced starting 5.0.e, the integral-term used to calculate sq1fb was calculated based on coadded value of (sample_num-1) samples and then the integral term stored for next round included sample_num-2. This is almost like having a p-term..&lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.8 (s1fb_dly=7) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010008_11jan2012.sof (for Rev. E cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.7 (used Q10SP1)&lt;br /&gt;
** reverts back to applying S1fb after 7 clock cycles when flux-jump is off, and after 18 clock cycles when flux-jump is on.&lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.7 (rectangle-mode bugfix) ==&lt;br /&gt;
[[File:RC516 vs RC517 hash.jpeg|thumb|Reduction in high-frequency noise due to rectangle-mode bugfix]]&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010007_17nov2011.sof (for Rev. E cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.6 (used Q10SP1)&lt;br /&gt;
&lt;br /&gt;
* ''' Bugfix:'''&lt;br /&gt;
** In all RC firmware prior to 5.1.7, the read pointer in the rectangle-mode data was being refreshed at ARZ even if it was in the middle of a long readout (large frame readout). This resulted in seeing '''duplicate data in high-data-rate rectangle-mode readout''' only when the following condition was _NOT_ true: (230 + 2*{{param|cc|num_rows_reported|cc&amp;amp;nbsp;num_rows_reported}}*{{param|cc|num_cols_reported|cc&amp;amp;nbsp;num_cols_reported}}) &amp;lt; ({{param|sys|num_rows}}*{{param|sys|row_len}}). This is fixed in 5.1.7.&lt;br /&gt;
&lt;br /&gt;
= Revision 5.1.6 (Stable) =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010006_27oct2011.sof (for Rev. E cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.5 (used Q10SP1)&lt;br /&gt;
** coadd window and feedback-calculation blocks are adjusted for ADC latency of readout card Rev. E&lt;br /&gt;
&lt;br /&gt;
* ''' Bugfix:'''&lt;br /&gt;
** {{param|rc|sample_dly}} + {{param|rc|sample_num}} = {{param|sys|row_len}} should work now.&lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.5 (test)==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010005_15sep2011.sof (for Rev. E cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.2&lt;br /&gt;
** reverts back to applying SQ1FB after 18 clock cycles whether flux-jumping is on or off&lt;br /&gt;
&lt;br /&gt;
* ''' Bugfix:'''&lt;br /&gt;
** All stratixiii firmware revisions prior to this version adjusted the co-add window for an ADC latency of 4 instead of 11. (Rev. E RC has serial ADC installed with 11 clock cycle latency.) The coadd window is now adjusted properly.&lt;br /&gt;
&lt;br /&gt;
*'''Bug:'''&lt;br /&gt;
** The last row samples can not be used in {{param|rc|servo_mode}}=3. For proper operation: {{param|rc|sample_dly}} + {{param|rc|sample_num}} needs to be &amp;lt; {{param|sys|row_len}} - 7 (I think). Although, the coadd window was adjusted in this version, but the calculation block latches data before coadd is done (coadd_done_o signal).&lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.4 (Scuba2) ==&lt;br /&gt;
&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05010004_01jun2011.sof (for Rev. B cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.3&lt;br /&gt;
** sq1_fb applied after 7 clock cycles when flux-jump off, and after 18 when flux-jump is on.&lt;br /&gt;
* ''' bugfix:'''&lt;br /&gt;
** fixed bug with fsfb_corr when reverting back to applying sq1fb after 7 clk cycles when fj is off&lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.3 (Scuba2) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05010003_01jun2011.sof (for Rev. B cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.2&lt;br /&gt;
** reverts back to applying SQ1FB after 7 clock cyclces when flux-jumping is off, and after 18 clock cycles when flux-jumping is on.&lt;br /&gt;
** k1 of filter params is now limited to k1&amp;lt;8. After generating coeffs for many filters, it is certain that this range is more than what we ever need.&lt;br /&gt;
&lt;br /&gt;
= Revision 5.1.2 (Stable)=&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 (test only) ==&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 (test only) ==&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 {{param|rc|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;
** {{param|rc|fltr_type}} is set to 255 to indicate configurable filter parameters.&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 (Stable) =&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 (test only) ==&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 {{param|rc|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 (test only) ==&lt;br /&gt;
[[Image:Clamp_unstable.png|thumb|right|Scope snapshot]]&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;
** '''{{param|rc|integral_clamp}} 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 {{param|rc|integral_clamp}}=80000000, {{param|rc|flx_quanta0|flux_quanta}}=8000, {{param|rc|gaini0|gaini}}=1, flux-jump enabled, we see 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 (test only) ==&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):&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 (test 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 pixels with non-zero {{param|rc|flx_quanta0|flx_quanta}}, and being disabled on the fly on dead pixels with {{param|rc|flx_quanta0|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;
** {{param|rc|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 {{param|rc|en_fb_jump}}=1.  Before the change, this meant that constant values could be applied with or without the 11-cycle delay if {{param|rc|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):&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):&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 (test only) ==&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;
** {{param|rc|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;
** {{param|rc|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;
** {{param|rc|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 (Stable) =&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;
* '''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;
= 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;
* [[Pre-v5 firmware#Readout Card|Pre-v5 firmware]]&lt;br /&gt;
[[Category:Firmware]]&lt;/div&gt;</summary>
		<author><name>Mandana</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Readout_Card_firmware&amp;diff=6227</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=6227"/>
		<updated>2016-06-02T00:42:57Z</updated>

		<summary type="html">&lt;p&gt;Mandana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Hierarchy header}}&lt;br /&gt;
* Synthesis Reminders (for firmware developers)&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 6.0.3 =&lt;br /&gt;
* '''Filename:'''&lt;br /&gt;
** &lt;br /&gt;
* ''' Features:'''&lt;br /&gt;
** 6.0.2 was built based on a version that had an unsuccessful attempt to fix the filter dynamic-range issue.  This version reverts back to 5.2.1 for fsfb_calc implementation.&lt;br /&gt;
= Revision 6.0.2 (TEST!) =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** [http://e-mode.phas.ubc.ca/mce/firmware/rc_stratix3_v06000002_20160509.sof 	rc_stratix3_v06000002_20160509.sof]&lt;br /&gt;
** [http://e-mode.phas.ubc.ca/mce/firmware/rc_stratix3_v06000002_20160509.jic 	rc_stratix3_v06000002_20160509.jic]&lt;br /&gt;
&lt;br /&gt;
* '''Features'''&lt;br /&gt;
**built based on 5.2.2&lt;br /&gt;
**added support of upper 32 word needs an additional wait cycle for ack_read&lt;br /&gt;
** delay wishbone readback by one clock cycle for reading back flx_quanta and adc_offset, &lt;br /&gt;
** there seem to be a filter gain of factor of 2 added&lt;br /&gt;
&lt;br /&gt;
* ''' bug'''&lt;br /&gt;
** it seems to have a different filter gain&lt;br /&gt;
&lt;br /&gt;
= Revision 5.2.2 (TEST!) =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** [http://e-mode.phas.ubc.ca/mce/firmware/rc_stratix3_v050200002_17oct2014.sof rc_stratix3_v050200002_17oct2014.sof]&lt;br /&gt;
&lt;br /&gt;
* '''bugfix or enhancement?'''  &lt;br /&gt;
** fixes a dynamic-range issue with the filter by applying a 20-bit window to the output of stage 1 filter (with lsb being configurable) before passing it on the next stage.&lt;br /&gt;
&lt;br /&gt;
= Revision 5.2.1 (recommended!) =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratixIII_v05020001_05jun2014.sof &lt;br /&gt;
&lt;br /&gt;
* '''bugfix'''  &lt;br /&gt;
** {{param|rc|servo_rst_col0|servo_rst_col''#''}} now works for all columns! (bug reported in 5.2.0)&lt;br /&gt;
&lt;br /&gt;
= Revision 5.2.0 =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratixIII_v05020000_28may2013.sof &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** added the ability to reset the flux-loop servo on per-detector basis by adding {{param|rc|servo_rst_arm}} and {{param|rc|servo_rst_col0|servo_rst_col''#''}} parameters. This will reset the integral_term, the integral_clamp, anf flux-jump counter.&lt;br /&gt;
&lt;br /&gt;
* '''bug:'''  &lt;br /&gt;
** {{param|rc|servo_rst_col0|servo_rst_col''#''}} works for col 0 and 1, but not for col2 to 7! This is fixed in 5.2.1&lt;br /&gt;
= Revision 5.1.d =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratixIII_v0501000d_30oct2012.sof &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** flux-jump routine is revamped to minimize the additional delay for applying sq1fb when flux-jump is enabled. In this version sq1fb DAC is refreshed at clock cycle 10 of each row visit when flux-jump is enabled and at clock cycle 7 when flux-jump is disabled.&lt;br /&gt;
** extended dynamic range of the filter by increasing the width of filter-delay terms from 29 to 32 bits &lt;br /&gt;
** lower power consumption (maybe?)&lt;br /&gt;
&lt;br /&gt;
* '''Details'''&lt;br /&gt;
** DDR2 module not instantiated (chips not installed) and on-chip termination resistors not in effect which can potentially save power.&lt;br /&gt;
&lt;br /&gt;
=== Revision 5.1.c (Test) ===&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratixIII_v0501000c_31aug2012.sof &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** extended dynamic range of the filter by increasing the width of filter-delay terms from 29 to 32 bits &lt;br /&gt;
** based on 5.1.a&lt;br /&gt;
** lower power consumption (maybe?)&lt;br /&gt;
** {{param|rc|data_mode}}=4 reports fb(29 downto 12) instead of fb(31) &amp;amp; fb(28 downto 12)! no sticky bit.&lt;br /&gt;
&lt;br /&gt;
* '''Details'''&lt;br /&gt;
** DDR2 module not instantiated (chips not installed) and on-chip termination resistors not in effect which can potentially save power.&lt;br /&gt;
&lt;br /&gt;
= Revision 5.1.b (Stable '''Rev.B''' Cards) =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0501000b_23mar2012.sof (Rev. B cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.8 (used Q11SP1)&lt;br /&gt;
** added intergral_term fix from 5.1.9 &lt;br /&gt;
&lt;br /&gt;
* '''Details'''&lt;br /&gt;
** qterm (or filtered-p) implementation is not included, because the design doesn't fit on the FPGA on Rev. B cards anymore.&lt;br /&gt;
&lt;br /&gt;
= Revision 5.1.a (Stable) =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v0501000a_24jan2012.sof (Rev. E cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.9 (used Q10SP1)&lt;br /&gt;
** {{param|rc|pterm_decay_bits}} (par_id = 0x64) is now '''programmable''' and is initially set to 0 to have pure p-term and be compatible with older firmware. (p-term implemented as q(n) = er(n) + b*q(n-1) where b=(1-1/2^k)with k={{param|rc|pterm_decay_bits}})&lt;br /&gt;
** see bugfix in 5.1.9&lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.9 (test) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010009_23jan2012.sof (for Rev. E cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.8 (used Q10SP1)&lt;br /&gt;
** first implementation of decayed-p-term in sq1fb calculation. The p-term is now implemented as q(n) = er(n) + b*q(n-1) where b=(1-1/2^k) and '''k=3 hardcoded'''. &lt;br /&gt;
** added {{param|rc|pterm_decay_bits}} (par_id=0x64) as a register set to 3, but not tied to k in pterm calculation yet.&lt;br /&gt;
&lt;br /&gt;
* ''' Bugfix:'''&lt;br /&gt;
** This version fixes the bug introduced starting 5.0.e, the integral-term used to calculate sq1fb was calculated based on coadded value of (sample_num-1) samples and then the integral term stored for next round included sample_num-2. This is almost like having a p-term..&lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.8 (s1fb_dly=7) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010008_11jan2012.sof (for Rev. E cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.7 (used Q10SP1)&lt;br /&gt;
** reverts back to applying S1fb after 7 clock cycles when flux-jump is off, and after 18 clock cycles when flux-jump is on.&lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.7 (rectangle-mode bugfix) ==&lt;br /&gt;
[[File:RC516 vs RC517 hash.jpeg|thumb|Reduction in high-frequency noise due to rectangle-mode bugfix]]&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010007_17nov2011.sof (for Rev. E cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.6 (used Q10SP1)&lt;br /&gt;
&lt;br /&gt;
* ''' Bugfix:'''&lt;br /&gt;
** In all RC firmware prior to 5.1.7, the read pointer in the rectangle-mode data was being refreshed at ARZ even if it was in the middle of a long readout (large frame readout). This resulted in seeing '''duplicate data in high-data-rate rectangle-mode readout''' only when the following condition was _NOT_ true: (230 + 2*{{param|cc|num_rows_reported|cc&amp;amp;nbsp;num_rows_reported}}*{{param|cc|num_cols_reported|cc&amp;amp;nbsp;num_cols_reported}}) &amp;lt; ({{param|sys|num_rows}}*{{param|sys|row_len}}). This is fixed in 5.1.7.&lt;br /&gt;
&lt;br /&gt;
= Revision 5.1.6 (Stable) =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010006_27oct2011.sof (for Rev. E cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.5 (used Q10SP1)&lt;br /&gt;
** coadd window and feedback-calculation blocks are adjusted for ADC latency of readout card Rev. E&lt;br /&gt;
&lt;br /&gt;
* ''' Bugfix:'''&lt;br /&gt;
** {{param|rc|sample_dly}} + {{param|rc|sample_num}} = {{param|sys|row_len}} should work now.&lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.5 (test)==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010005_15sep2011.sof (for Rev. E cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.2&lt;br /&gt;
** reverts back to applying SQ1FB after 18 clock cycles whether flux-jumping is on or off&lt;br /&gt;
&lt;br /&gt;
* ''' Bugfix:'''&lt;br /&gt;
** All stratixiii firmware revisions prior to this version adjusted the co-add window for an ADC latency of 4 instead of 11. (Rev. E RC has serial ADC installed with 11 clock cycle latency.) The coadd window is now adjusted properly.&lt;br /&gt;
&lt;br /&gt;
*'''Bug:'''&lt;br /&gt;
** The last row samples can not be used in {{param|rc|servo_mode}}=3. For proper operation: {{param|rc|sample_dly}} + {{param|rc|sample_num}} needs to be &amp;lt; {{param|sys|row_len}} - 7 (I think). Although, the coadd window was adjusted in this version, but the calculation block latches data before coadd is done (coadd_done_o signal).&lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.4 (Scuba2) ==&lt;br /&gt;
&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05010004_01jun2011.sof (for Rev. B cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.3&lt;br /&gt;
** sq1_fb applied after 7 clock cycles when flux-jump off, and after 18 when flux-jump is on.&lt;br /&gt;
* ''' bugfix:'''&lt;br /&gt;
** fixed bug with fsfb_corr when reverting back to applying sq1fb after 7 clk cycles when fj is off&lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.3 (Scuba2) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05010003_01jun2011.sof (for Rev. B cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.2&lt;br /&gt;
** reverts back to applying SQ1FB after 7 clock cyclces when flux-jumping is off, and after 18 clock cycles when flux-jumping is on.&lt;br /&gt;
** k1 of filter params is now limited to k1&amp;lt;8. After generating coeffs for many filters, it is certain that this range is more than what we ever need.&lt;br /&gt;
&lt;br /&gt;
= Revision 5.1.2 (Stable)=&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 (test only) ==&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 (test only) ==&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 {{param|rc|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;
** {{param|rc|fltr_type}} is set to 255 to indicate configurable filter parameters.&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 (Stable) =&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 (test only) ==&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 {{param|rc|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 (test only) ==&lt;br /&gt;
[[Image:Clamp_unstable.png|thumb|right|Scope snapshot]]&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;
** '''{{param|rc|integral_clamp}} 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 {{param|rc|integral_clamp}}=80000000, {{param|rc|flx_quanta0|flux_quanta}}=8000, {{param|rc|gaini0|gaini}}=1, flux-jump enabled, we see 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 (test only) ==&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):&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 (test 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 pixels with non-zero {{param|rc|flx_quanta0|flx_quanta}}, and being disabled on the fly on dead pixels with {{param|rc|flx_quanta0|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;
** {{param|rc|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 {{param|rc|en_fb_jump}}=1.  Before the change, this meant that constant values could be applied with or without the 11-cycle delay if {{param|rc|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):&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):&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 (test only) ==&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;
** {{param|rc|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;
** {{param|rc|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;
** {{param|rc|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 (Stable) =&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;
* '''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;
= 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;
* [[Pre-v5 firmware#Readout Card|Pre-v5 firmware]]&lt;br /&gt;
[[Category:Firmware]]&lt;/div&gt;</summary>
		<author><name>Mandana</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Readout_Card_firmware&amp;diff=6226</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=6226"/>
		<updated>2016-06-01T23:50:59Z</updated>

		<summary type="html">&lt;p&gt;Mandana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Hierarchy header}}&lt;br /&gt;
* Synthesis Reminders (for firmware developers)&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 6.0.2 (TEST!) =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** [http://e-mode.phas.ubc.ca/mce/firmware/rc_stratix3_v06000002_20160509.sof 	rc_stratix3_v06000002_20160509.sof]&lt;br /&gt;
** [http://e-mode.phas.ubc.ca/mce/firmware/rc_stratix3_v06000002_20160509.jic 	rc_stratix3_v06000002_20160509.jic]&lt;br /&gt;
&lt;br /&gt;
* '''Features'''&lt;br /&gt;
**built based on 5.2.2&lt;br /&gt;
**added support of upper 32 word needs an additional wait cycle for ack_read&lt;br /&gt;
** delay wishbone readback by one clock cycle for reading back flx_quanta and adc_offset, &lt;br /&gt;
** there seem to be a filter gain of factor of 2 added&lt;br /&gt;
&lt;br /&gt;
= Revision 5.2.2 (TEST!) =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** [http://e-mode.phas.ubc.ca/mce/firmware/rc_stratix3_v050200002_17oct2014.sof rc_stratix3_v050200002_17oct2014.sof]&lt;br /&gt;
&lt;br /&gt;
* '''bugfix or enhancement?'''  &lt;br /&gt;
** fixes a dynamic-range issue with the filter by applying a 20-bit window to the output of stage 1 filter (with lsb being configurable) before passing it on the next stage.&lt;br /&gt;
&lt;br /&gt;
= Revision 5.2.1 (recommended!) =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratixIII_v05020001_05jun2014.sof &lt;br /&gt;
&lt;br /&gt;
* '''bugfix'''  &lt;br /&gt;
** {{param|rc|servo_rst_col0|servo_rst_col''#''}} now works for all columns! (bug reported in 5.2.0)&lt;br /&gt;
&lt;br /&gt;
= Revision 5.2.0 =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratixIII_v05020000_28may2013.sof &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** added the ability to reset the flux-loop servo on per-detector basis by adding {{param|rc|servo_rst_arm}} and {{param|rc|servo_rst_col0|servo_rst_col''#''}} parameters. This will reset the integral_term, the integral_clamp, anf flux-jump counter.&lt;br /&gt;
&lt;br /&gt;
* '''bug:'''  &lt;br /&gt;
** {{param|rc|servo_rst_col0|servo_rst_col''#''}} works for col 0 and 1, but not for col2 to 7! This is fixed in 5.2.1&lt;br /&gt;
= Revision 5.1.d =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratixIII_v0501000d_30oct2012.sof &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** flux-jump routine is revamped to minimize the additional delay for applying sq1fb when flux-jump is enabled. In this version sq1fb DAC is refreshed at clock cycle 10 of each row visit when flux-jump is enabled and at clock cycle 7 when flux-jump is disabled.&lt;br /&gt;
** extended dynamic range of the filter by increasing the width of filter-delay terms from 29 to 32 bits &lt;br /&gt;
** lower power consumption (maybe?)&lt;br /&gt;
&lt;br /&gt;
* '''Details'''&lt;br /&gt;
** DDR2 module not instantiated (chips not installed) and on-chip termination resistors not in effect which can potentially save power.&lt;br /&gt;
&lt;br /&gt;
=== Revision 5.1.c (Test) ===&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratixIII_v0501000c_31aug2012.sof &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** extended dynamic range of the filter by increasing the width of filter-delay terms from 29 to 32 bits &lt;br /&gt;
** based on 5.1.a&lt;br /&gt;
** lower power consumption (maybe?)&lt;br /&gt;
** {{param|rc|data_mode}}=4 reports fb(29 downto 12) instead of fb(31) &amp;amp; fb(28 downto 12)! no sticky bit.&lt;br /&gt;
&lt;br /&gt;
* '''Details'''&lt;br /&gt;
** DDR2 module not instantiated (chips not installed) and on-chip termination resistors not in effect which can potentially save power.&lt;br /&gt;
&lt;br /&gt;
= Revision 5.1.b (Stable '''Rev.B''' Cards) =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v0501000b_23mar2012.sof (Rev. B cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.8 (used Q11SP1)&lt;br /&gt;
** added intergral_term fix from 5.1.9 &lt;br /&gt;
&lt;br /&gt;
* '''Details'''&lt;br /&gt;
** qterm (or filtered-p) implementation is not included, because the design doesn't fit on the FPGA on Rev. B cards anymore.&lt;br /&gt;
&lt;br /&gt;
= Revision 5.1.a (Stable) =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v0501000a_24jan2012.sof (Rev. E cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.9 (used Q10SP1)&lt;br /&gt;
** {{param|rc|pterm_decay_bits}} (par_id = 0x64) is now '''programmable''' and is initially set to 0 to have pure p-term and be compatible with older firmware. (p-term implemented as q(n) = er(n) + b*q(n-1) where b=(1-1/2^k)with k={{param|rc|pterm_decay_bits}})&lt;br /&gt;
** see bugfix in 5.1.9&lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.9 (test) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010009_23jan2012.sof (for Rev. E cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.8 (used Q10SP1)&lt;br /&gt;
** first implementation of decayed-p-term in sq1fb calculation. The p-term is now implemented as q(n) = er(n) + b*q(n-1) where b=(1-1/2^k) and '''k=3 hardcoded'''. &lt;br /&gt;
** added {{param|rc|pterm_decay_bits}} (par_id=0x64) as a register set to 3, but not tied to k in pterm calculation yet.&lt;br /&gt;
&lt;br /&gt;
* ''' Bugfix:'''&lt;br /&gt;
** This version fixes the bug introduced starting 5.0.e, the integral-term used to calculate sq1fb was calculated based on coadded value of (sample_num-1) samples and then the integral term stored for next round included sample_num-2. This is almost like having a p-term..&lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.8 (s1fb_dly=7) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010008_11jan2012.sof (for Rev. E cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.7 (used Q10SP1)&lt;br /&gt;
** reverts back to applying S1fb after 7 clock cycles when flux-jump is off, and after 18 clock cycles when flux-jump is on.&lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.7 (rectangle-mode bugfix) ==&lt;br /&gt;
[[File:RC516 vs RC517 hash.jpeg|thumb|Reduction in high-frequency noise due to rectangle-mode bugfix]]&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010007_17nov2011.sof (for Rev. E cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.6 (used Q10SP1)&lt;br /&gt;
&lt;br /&gt;
* ''' Bugfix:'''&lt;br /&gt;
** In all RC firmware prior to 5.1.7, the read pointer in the rectangle-mode data was being refreshed at ARZ even if it was in the middle of a long readout (large frame readout). This resulted in seeing '''duplicate data in high-data-rate rectangle-mode readout''' only when the following condition was _NOT_ true: (230 + 2*{{param|cc|num_rows_reported|cc&amp;amp;nbsp;num_rows_reported}}*{{param|cc|num_cols_reported|cc&amp;amp;nbsp;num_cols_reported}}) &amp;lt; ({{param|sys|num_rows}}*{{param|sys|row_len}}). This is fixed in 5.1.7.&lt;br /&gt;
&lt;br /&gt;
= Revision 5.1.6 (Stable) =&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010006_27oct2011.sof (for Rev. E cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.5 (used Q10SP1)&lt;br /&gt;
** coadd window and feedback-calculation blocks are adjusted for ADC latency of readout card Rev. E&lt;br /&gt;
&lt;br /&gt;
* ''' Bugfix:'''&lt;br /&gt;
** {{param|rc|sample_dly}} + {{param|rc|sample_num}} = {{param|sys|row_len}} should work now.&lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.5 (test)==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_stratix3_v05010005_15sep2011.sof (for Rev. E cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.2&lt;br /&gt;
** reverts back to applying SQ1FB after 18 clock cycles whether flux-jumping is on or off&lt;br /&gt;
&lt;br /&gt;
* ''' Bugfix:'''&lt;br /&gt;
** All stratixiii firmware revisions prior to this version adjusted the co-add window for an ADC latency of 4 instead of 11. (Rev. E RC has serial ADC installed with 11 clock cycle latency.) The coadd window is now adjusted properly.&lt;br /&gt;
&lt;br /&gt;
*'''Bug:'''&lt;br /&gt;
** The last row samples can not be used in {{param|rc|servo_mode}}=3. For proper operation: {{param|rc|sample_dly}} + {{param|rc|sample_num}} needs to be &amp;lt; {{param|sys|row_len}} - 7 (I think). Although, the coadd window was adjusted in this version, but the calculation block latches data before coadd is done (coadd_done_o signal).&lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.4 (Scuba2) ==&lt;br /&gt;
&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05010004_01jun2011.sof (for Rev. B cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.3&lt;br /&gt;
** sq1_fb applied after 7 clock cycles when flux-jump off, and after 18 when flux-jump is on.&lt;br /&gt;
* ''' bugfix:'''&lt;br /&gt;
** fixed bug with fsfb_corr when reverting back to applying sq1fb after 7 clk cycles when fj is off&lt;br /&gt;
&lt;br /&gt;
== Revision 5.1.3 (Scuba2) ==&lt;br /&gt;
* '''Filename:'''  &lt;br /&gt;
** rc_v05010003_01jun2011.sof (for Rev. B cards) &lt;br /&gt;
&lt;br /&gt;
* '''Features:'''  &lt;br /&gt;
** based on 5.1.2&lt;br /&gt;
** reverts back to applying SQ1FB after 7 clock cyclces when flux-jumping is off, and after 18 clock cycles when flux-jumping is on.&lt;br /&gt;
** k1 of filter params is now limited to k1&amp;lt;8. After generating coeffs for many filters, it is certain that this range is more than what we ever need.&lt;br /&gt;
&lt;br /&gt;
= Revision 5.1.2 (Stable)=&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 (test only) ==&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 (test only) ==&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 {{param|rc|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;
** {{param|rc|fltr_type}} is set to 255 to indicate configurable filter parameters.&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 (Stable) =&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 (test only) ==&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 {{param|rc|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 (test only) ==&lt;br /&gt;
[[Image:Clamp_unstable.png|thumb|right|Scope snapshot]]&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;
** '''{{param|rc|integral_clamp}} 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 {{param|rc|integral_clamp}}=80000000, {{param|rc|flx_quanta0|flux_quanta}}=8000, {{param|rc|gaini0|gaini}}=1, flux-jump enabled, we see 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 (test only) ==&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):&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 (test 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 pixels with non-zero {{param|rc|flx_quanta0|flx_quanta}}, and being disabled on the fly on dead pixels with {{param|rc|flx_quanta0|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;
** {{param|rc|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 {{param|rc|en_fb_jump}}=1.  Before the change, this meant that constant values could be applied with or without the 11-cycle delay if {{param|rc|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):&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):&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 (test only) ==&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;
** {{param|rc|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;
** {{param|rc|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;
** {{param|rc|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 (Stable) =&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;
* '''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;
= 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;
* [[Pre-v5 firmware#Readout Card|Pre-v5 firmware]]&lt;br /&gt;
[[Category:Firmware]]&lt;/div&gt;</summary>
		<author><name>Mandana</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Bias_Card_firmware&amp;diff=6223</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=6223"/>
		<updated>2016-05-31T00:35:11Z</updated>

		<summary type="html">&lt;p&gt;Mandana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Hierarchy header}}&lt;br /&gt;
* [[Compatible_Versions_(CC,RC,BC,AC)|Recommended Firmware Revisions]]&lt;br /&gt;
* [[Pre-v5 firmware#Bias Card|Pre-v5 firmware]]&lt;br /&gt;
&lt;br /&gt;
== Firmware download ==&lt;br /&gt;
* [http://e-mode.phas.ubc.ca/mce_firmware/ Firmware Programming Files]&lt;br /&gt;
&lt;br /&gt;
== Revision 6.0.2 ==&lt;br /&gt;
;Filename&lt;br /&gt;
: bc_v06000002_20160519.sof&lt;br /&gt;
;Features&lt;br /&gt;
: support for upper 32 words&lt;br /&gt;
: introduced {{param|bc|flux_fb_dly}} so flux_fb DACs are asserted after flux_fb_dly. New data is pre-loaded right after flux_fb_dly.&lt;br /&gt;
= Revision 5.3.5 (test) =&lt;br /&gt;
; Filename&lt;br /&gt;
: bc_v05030005_18dec2014.sof &lt;br /&gt;
; Features&lt;br /&gt;
: based on 5.3.4, introduced {{param|bc|num_rows_idle}}&lt;br /&gt;
&lt;br /&gt;
= Revision 5.3.4 (recommended) =&lt;br /&gt;
; Filename&lt;br /&gt;
: bc_v05030004_20dec2012.sof &lt;br /&gt;
; Features&lt;br /&gt;
: based on 5.3.2&lt;br /&gt;
; Bugfix&lt;br /&gt;
: {{param|bc|enbl_flux_fb_mod}} and {{param|bc|enbl_bias_mod}} can be asserted for any combination of columns&lt;br /&gt;
&lt;br /&gt;
= Revision 5.3.2 (Rev E cards only!) =&lt;br /&gt;
; Filename&lt;br /&gt;
: bc_v05030002_21aug2012.sof &lt;br /&gt;
; Features&lt;br /&gt;
: based on 5.3.1, compiled with RevE pin assignment.&lt;br /&gt;
; Bug&lt;br /&gt;
: {{param|bc|enbl_flux_fb_mod}} only works for channel 0.&lt;br /&gt;
: {{param|bc|enbl_bias_mod}} has an offset of 1.&lt;br /&gt;
&lt;br /&gt;
= Revision 5.3.1 (Stable) =&lt;br /&gt;
; Filename&lt;br /&gt;
: bc_v05030001_12apr2012.sof &lt;br /&gt;
; Features&lt;br /&gt;
: {{param|bc|mod_val}} is now a single value instead of 32 distinct values. &lt;br /&gt;
; Bug&lt;br /&gt;
: {{param|bc|enbl_flux_fb_mod}} only works for channel 0.&lt;br /&gt;
: {{param|bc|enbl_bias_mod}} has an offset of 1.&lt;br /&gt;
&lt;br /&gt;
== Revision 5.3.0 (Test) ==&lt;br /&gt;
; Filename&lt;br /&gt;
: bc_v05030000_26mar2012.sof &lt;br /&gt;
; Features&lt;br /&gt;
: added {{param|bc|mod_val}}, {{param|bc|enbl_flux_fb_mod}}, {{param|bc|enbl_bias_mod}} parameters. Once the modulation is enabled, values specified by {{param|bc|mod_val}} are going to be added to {{param|bc|flux_fb}} or {{param|bc|bias}}. This can be used to run an internal ramp on mod_val values and having ramps with different offsets being run on individual bias lines. &lt;br /&gt;
 &lt;br /&gt;
= Revision 5.2.0 (Stable) =&lt;br /&gt;
; Filename&lt;br /&gt;
: bc_v05020000_28nov2011.sof &lt;br /&gt;
; Features&lt;br /&gt;
: ln_bias lines wake up to 0V and an 'rb {{param|bc|bias}}' command returns the content of the RAM block used to refresh DACs from. This RAM is initilized to 0. Note that Rev. F cards have bipolar DACs and 0V corresponds to 32768 (mid range) as oppose to 0. Therefore, an initial readback from RAM does not return valid values!!! I claim that this is not confusing!&lt;br /&gt;
 &lt;br /&gt;
: {{param||critical_err_rst}} and {{param||fpga_clr}} commands are supported now. {{param||critical_err_rst}} only works if '''JP2''' jumper inserted.&lt;br /&gt;
&lt;br /&gt;
; Details&lt;br /&gt;
: When installed on Rev. D file, tes_mapping has to have offset =11 in mce.cfg, heater has to have offset=10 in mce.cfg.&lt;br /&gt;
&lt;br /&gt;
= Revision 5.1.0 (Stable) =&lt;br /&gt;
; Filename&lt;br /&gt;
: bc_v05010000_25oct2011.sof &lt;br /&gt;
; Features&lt;br /&gt;
: In multiplex mode: DACs are clocked early in the row-visit, chip-select is always low and only strobed high at clock-cycle 1 during row-visit. [[Image:bc_5.1.0_timing.png|200 px]]&lt;br /&gt;
: In non-multiplex mode: {{param|bc|flux_fb}} values are all loaded at the start of the frame. (Previous versions updated DACs row-aligned as oppose to frame-aligned and this had the undesired effect of refreshing some DACs on one row and rest of the DACs on the following row depending on which clock cycle the command was received. This only matters when running internal ramp on bias-card parameters.)&lt;br /&gt;
: ln_bias lines are only refreshed once and frame-aligned! '''a bugfix'''!&lt;br /&gt;
&lt;br /&gt;
; Bugs&lt;br /&gt;
: ln_bias lines are set to code 0 or -5V at power up and need to be cleared to 0V by issuing an exclusive command upon startup.&lt;br /&gt;
&lt;br /&gt;
; Details&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;
== Revision 5.0.a (lab use) ==&lt;br /&gt;
; Filename&lt;br /&gt;
: bc_v0500000a_24oct2011.sof &lt;br /&gt;
; Features&lt;br /&gt;
: based on 5.0.9, with fixing the incomplete ifelse in spi_dac module. Was this causing the improper chip-select?&lt;br /&gt;
&lt;br /&gt;
; Details&lt;br /&gt;
: When installed on Rev. D file, tes_mapping has to have offset =11 in mce.cfg.&lt;br /&gt;
== Revision 5.0.9 (lab use) ==&lt;br /&gt;
; Filename&lt;br /&gt;
: bc_v05000009_05oct2011.sof &lt;br /&gt;
; Features&lt;br /&gt;
: based on 5.0.5, but instead of loading a new DAC value at the start of the row, it is now 32 clock cycles after row switch.(or clocking starts at row-switch)&lt;br /&gt;
&lt;br /&gt;
; Details&lt;br /&gt;
: When installed on Rev. D board, tes_mapping has to have offset =11 in mce.cfg.&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.8 (test) ==&lt;br /&gt;
; Filename&lt;br /&gt;
: bc_v05000008_04oct2011.sof &lt;br /&gt;
; Features&lt;br /&gt;
: based on 5.0.5, but instead of loading a new DAC value at the start of the row, it is now 20 clock cycles after row switch.&lt;br /&gt;
&lt;br /&gt;
; Details&lt;br /&gt;
: When installed on Rev. D board, tes_mapping has to have offset =11 in mce.cfg.&lt;br /&gt;
&lt;br /&gt;
= Revision 5.0.7 (recommended) =&lt;br /&gt;
; Filename&lt;br /&gt;
: bc_v05000007_22jun2011.sof &lt;br /&gt;
; Features&lt;br /&gt;
: based on 5.0.5, but instead of loading a new DAC value at the start of the row, it is now 10 clock cycles after row switch.&lt;br /&gt;
&lt;br /&gt;
; Details&lt;br /&gt;
: When installed on Rev. D board, tes_mapping has to have offset =11 in mce.cfg.&lt;br /&gt;
 &lt;br /&gt;
== Revision 5.0.6 (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 {{param|bc|fb_col0|fb_col''#''}} 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 Filippini: &lt;br /&gt;
** See details here:  http://spiderwiki.princeton.edu/spider/AnalysisLogbook/TestCryostat/20110427_muxing/index.html&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;
: {{param||card_type}} parameter now includes the pcb-revision information as well as the card_type. {{param||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 (Rev. E cards) ==&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 {{param|bc|fb_col0|fb_col0&amp;lt;/tt&amp;gt; to &amp;lt;tt&amp;gt;fb_col31}} and {{param|bc|enbl_mux}} commands to accommodate row-based sq2fb switching. When {{param|bc|enbl_mux}} is asserted for a column, then the DAC is refreshed on every row visit with the value specified by {{param|bc|fb_col0|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;
: {{param||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;
: {{param||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;
= Firmware repository =&lt;br /&gt;
* http://e-mode.phas.ubc.ca/mce_firmware/&lt;br /&gt;
&lt;br /&gt;
[[Category:Firmware]]&lt;/div&gt;</summary>
		<author><name>Mandana</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Clock_Card_firmware&amp;diff=6222</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=6222"/>
		<updated>2016-05-31T00:34:17Z</updated>

		<summary type="html">&lt;p&gt;Mandana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Hierarchy header}}&lt;br /&gt;
* [[Pre-v5 firmware#Clock Card|Pre-v5 firmware]]&lt;br /&gt;
== Firmware links ==&lt;br /&gt;
* [http://e-mode.phas.ubc.ca/mce_firmware/ Firmware Programming Files]&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;
== Firmware Revision Listing ==&lt;br /&gt;
=== Revision 6.0.2 ===&lt;br /&gt;
* '''Filename:'''  cc_v06000002_20160530.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:''' support of upper 32 word needs an additional wait cycle for ack_read&lt;br /&gt;
* '''Features:'''fpga_clr and critical_error_rst commands added&lt;br /&gt;
* Note: skip 6.0.1 due to losing track of all_cards&lt;br /&gt;
* '''bug:''' When [[STOP|stop]] command is issued, two frames are sent with both last-frame-bit and stop-bit set. This is currently benign as mas ignores the extra frame, but needs to be fixed regardless.&lt;br /&gt;
* '''bug:''' When data-timing-err bit is set, the last-frame-bit gets set but then the ret_dat counter doesn't not get reset, so when sync-dv starts coming in, clock card continues to send out frames again.&lt;br /&gt;
&lt;br /&gt;
=== Revision 5.0.e (stable) ===&lt;br /&gt;
* '''Filename:'''  cc_v0500000e_15may2012.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:''' added pcb_rev interface to be able to read pcb revision starting RevC Clock Card.&lt;br /&gt;
* '''bugfix:''' awg is now realigned with data-acquisition and the phase can be adjusted using ramp_step_phase.&lt;br /&gt;
* '''bugfix:''' A time-delay is added between assertion of epc_sel and config_n to remedy the occasional failure of {{param|cc|config_app}} and {{param|cc|config_fac}} commands. &lt;br /&gt;
* '''bug:''' When [[STOP|stop]] command is issued, two frames are sent with both last-frame-bit and stop-bit set. This is currently benign as mas ignores the extra frame, but needs to be fixed regardless.&lt;br /&gt;
* '''bug:''' When data-timing-err bit is set, the last-frame-bit gets set but then the ret_dat counter doesn't not get reset, so when sync-dv starts coming in, clock card continues to send out frames again.&lt;br /&gt;
&lt;br /&gt;
==== Revision 5.0.d (test) ====&lt;br /&gt;
* '''Filename:'''  cc_v0500000d_10may2012.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:''' Internal commands are issued at address-return-to-zero (ARZ) to provide more deterministic timing. This means the data_rate has to be at least 2, or internal commands will stop with a data_rate of 1. In previous versions, internal commands were being issued asynchronous to ARZ. The phase of the ramp or awg can be adjusted using {{param|cc|ramp_step_phase}}.&lt;br /&gt;
&lt;br /&gt;
* '''bugfix:''' [[STOP|stop]] cmd works now and sets the stop-bit and last-frame-bit properly in the frame status word of the last frame. &lt;br /&gt;
* '''bugfix:''' the ramp/awg value reported in the header is the one applied last. Previous versions reported what was going to be applied in the next iteration. If the command was not issued due to collision, then the value in the header was still being updated which was a bug.&lt;br /&gt;
&lt;br /&gt;
* '''bug:''' awg mode doesn't work properly.&lt;br /&gt;
&lt;br /&gt;
==== Revision 5.0.c (test) ====&lt;br /&gt;
* '''Filename:'''  cc_v0500000c_26mar2012.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:''' frame header revision 7 with dv_pulse_fibre_i encoded as bit 9 of the frame-status word in the header.&lt;br /&gt;
** Based on 5.0.a&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:''' stop cmd may be broken?!It works but stop bit and last-frame bits are not set and a [[mce_cmd#FAKESTOP|fakestop]] needs to be issued in mas.&lt;br /&gt;
&lt;br /&gt;
==== Revision 5.0.b (test) ====&lt;br /&gt;
* '''Filename:'''  cc_v0500000b_06feb2012.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:''' based on 5.0.a, frame header revision 7 with dv_pulse_fibre_i encoded as bit 9 of the frame-status word in the header.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:''' stop cmd may be broken?!It works but stop bit is not set and a fakestop needs to be issued in mas.&lt;br /&gt;
==== Revision 5.0.a (test) ====&lt;br /&gt;
* '''Filename:'''  cc_v0500000a_06feb2012.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:''' Based on 5.0.9&lt;br /&gt;
&lt;br /&gt;
* ''' Bugfix:''' last-frame-bit was not being set in 5.0.9 and it returns right number of frames!&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:''' stop cmd may be broken. It works but stop bit is not set.&lt;br /&gt;
&lt;br /&gt;
==== Revision 5.0.9 (test) ====&lt;br /&gt;
* '''Filename:'''  cc_v05000009_26jan2012.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** added {{param|cc|ramp_step_phase}} command (par_id=xBB) to adjust the phase of [[Ramp Generator]] or [[Arbitrary Waveform Generator]] relative to data acquisition.&lt;br /&gt;
** Based on 5.0.7&lt;br /&gt;
&lt;br /&gt;
* ''' Bugfix:'''&lt;br /&gt;
** Internal housekeeping and internal ramp/awg commands can be run as tight as possible ({{param|cc|data_rate}}=2 and {{param|cc|ramp_step_period}}=2) alongside data acquisition without affecting data timing. Previous versions would hold the ramp-value refresh till data was collected first. In this version when there is a collision between ret_dat and ramp-command, the ramp value is still increased, so the next time it is due, it would apply the right value.&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** {{param|cc|config_app}} command is broken, it works in 5.0.3, but not in this version. to be investigated.&lt;br /&gt;
** command issue/reply translator blocks are overhauled, so watch out for bugs related to stop command. None discovered yet though.&lt;br /&gt;
&lt;br /&gt;
==== Revision 5.0.8 (not issued) ====&lt;br /&gt;
* '''Filename:'''  cc_v05000008_12jul2011.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** This tag was a place holder for the final version of Clock Cards with '''Ethernet''' support (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;
&lt;br /&gt;
=== Revision 5.0.7 (stable) ===&lt;br /&gt;
* '''Filename:'''  cc_v05000007_14may2010.sof&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;
* '''Bugs:'''&lt;br /&gt;
** internal_ramp and internal_awg only refresh on readout-frame rate (data_rate). So effective {{param|cc|ramp_step_period}} is {{param|cc|data_rate}}.&lt;br /&gt;
** When both internal and data commands are scheduled to be issued on multiplexing frame N, then at ARZ, data command is issued first, followed by the internal command. This may cause problems when the internal command is not completed (too many words and {{param|sys|row_len}} x {{param|sys|num_rows}} not long enough) before next ARZ.&lt;br /&gt;
** {{param|cc|config_app}} command is broken (sometimes fails), it works in 5.0.3, but not in this version.&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;
* '''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;
* '''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: {{param|cc|upload_fw}}, {{param|cc|config_jtag}}, {{param|cc|tdo_sample_dly}}, {{param|cc|tck_half_period}}&lt;br /&gt;
** This firmware solves the TMS and TDI packing problem such that a &amp;quot;wb cc {{param|cc|upload_fw}}&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;
* '''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;
* '''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;
* '''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 {{param|cc|num_rows_reported}} and wb {{param|cc|num_cols_reported}} commands correctly.&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;
* '''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;
* '''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, {{param|cc|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;
[[Category:Firmware]]&lt;/div&gt;</summary>
		<author><name>Mandana</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Address_Card_firmware&amp;diff=6221</id>
		<title>Address Card firmware</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Address_Card_firmware&amp;diff=6221"/>
		<updated>2016-05-31T00:26:31Z</updated>

		<summary type="html">&lt;p&gt;Mandana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Hierarchy header}}&lt;br /&gt;
* [[Compatible_Versions_(CC,RC,BC,AC)|Recommended Firmware Revisions]]&lt;br /&gt;
* [[Pre-v5 firmware#Address Card|Pre-v5 firmware]]&lt;br /&gt;
&lt;br /&gt;
= Firmware Revision Listing =&lt;br /&gt;
== Revision 6.0.1 ==&lt;br /&gt;
;Filename&lt;br /&gt;
: ac_v06000001_20160408.sof&lt;br /&gt;
: ac_v06000001_20160408.pof&lt;br /&gt;
;Features&lt;br /&gt;
: added 64-element rb/wb suuport by introducing virtual card-ids. When the virtual card_id is used, a tga offset of 32 is applied when writing to a parameter id.&lt;br /&gt;
: also merged some of the changes in ac 5.0.3 to optimize logic utilization&lt;br /&gt;
== Revision 5.0.4 (Stable) ==&lt;br /&gt;
* '''Filename:'''  ac_v05000004_16feb2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Based on 5.0.0 with added support for new temperature chip (max1618) installed on Rev. D Address cards.&lt;br /&gt;
** temporary release, better apply this patch to rev. 5.0.3 after testing 5.0.3.&lt;br /&gt;
** missing scuba2 heater commands&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None yet reported&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (addr_card.fit.rpt):&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.3 (test) ==&lt;br /&gt;
* '''Filename:'''  ac_v05000003_19nov2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
** ---&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Based on both ac v5.0.2 and v2.0.a&lt;br /&gt;
** Reduces the usage of RAM and Logic Elements in the design so that there is margin for new features and space for SignalTap&lt;br /&gt;
** IMPORTANT:  Must be used in conjunction with firmware v05000000+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** Differences between ac_v5.0.2 and ac_v5.0.3&lt;br /&gt;
 addr_card.vhd&lt;br /&gt;
 ac_dac_ctrl.vhd&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** does not support new temperature chip on Rev. D address Cards. (Max1618)&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (addr_card.fit.rpt):&lt;br /&gt;
 +--------------------------------------------------------------------------+&lt;br /&gt;
 ; Fitter Summary                                                           ;&lt;br /&gt;
 +--------------------------+-----------------------------------------------+&lt;br /&gt;
 ; Fitter Status            ; Successful - Thu Nov 19 11:48:29 2009         ;&lt;br /&gt;
 ; Quartus II Version       ; 9.0 Build 235 06/17/2009 SP 2 SJ Full Version ;&lt;br /&gt;
 ; Revision Name            ; addr_card                                     ;&lt;br /&gt;
 ; Top-level Entity Name    ; addr_card                                     ;&lt;br /&gt;
 ; Family                   ; Stratix                                       ;&lt;br /&gt;
 ; Device                   ; EP1S10F780C5                                  ;&lt;br /&gt;
 ; Timing Models            ; Final                                         ;&lt;br /&gt;
 ; Total logic elements     ; 7,324 / 10,570 ( 69 % )                       ;&lt;br /&gt;
 ; Total pins               ; 279 / 427 ( 65 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 135,808 / 920,448 ( 15 % )                    ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 8 / 48 ( 17 % )                               ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
 +--------------------------+-----------------------------------------------+&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (addr_card.tan.rpt):&lt;br /&gt;
 +----------------------------------------------------------------------&lt;br /&gt;
 ; Timing Analyzer Summary                                              &lt;br /&gt;
 +----------------------------------------------------------+----------+&lt;br /&gt;
 ; Type                                                     ; Slack    ;&lt;br /&gt;
 +----------------------------------------------------------+----------+&lt;br /&gt;
 ; Worst-case tsu                                           ; N/A      ;&lt;br /&gt;
 ; Worst-case tco                                           ; N/A      ;&lt;br /&gt;
 ; Worst-case th                                            ; N/A      ;&lt;br /&gt;
 ; Clock Setup: 'ac_pll:pll0|altpll:altpll_component|_clk0' ; 2.853 ns ;&lt;br /&gt;
 ; Clock Setup: 'ac_pll:pll0|altpll:altpll_component|_clk2' ; 3.742 ns ;&lt;br /&gt;
 ; Clock Hold: 'ac_pll:pll0|altpll:altpll_component|_clk0'  ; 0.531 ns ;&lt;br /&gt;
 ; Clock Hold: 'ac_pll:pll0|altpll:altpll_component|_clk2'  ; 0.556 ns ;&lt;br /&gt;
 ; Total number of failed paths                             ;          ;&lt;br /&gt;
 +----------------------------------------------------------+----------+&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.2 ==&lt;br /&gt;
* '''Filename:'''  ac_v05000002_16oct2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
** ---&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Based on ac_v5.0.1&lt;br /&gt;
** Adds HEATER_BIAS and HEATER_BIAS_LEN parameters for Tc-flattening on SCUBA-2.&lt;br /&gt;
** IMPORTANT:  Must be used in conjunction with firmware v05000000+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None yet reported&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (addr_card.fit.rpt):&lt;br /&gt;
 +--------------------------------------------------------------------------+&lt;br /&gt;
 ; Fitter Summary                                                           ;&lt;br /&gt;
 +--------------------------+-----------------------------------------------+&lt;br /&gt;
 ; Fitter Status            ; Successful - Fri Oct 16 16:41:47 2009         ;&lt;br /&gt;
 ; Quartus II Version       ; 9.0 Build 235 06/17/2009 SP 2 SJ Full Version ;&lt;br /&gt;
 ; Revision Name            ; addr_card                                     ;&lt;br /&gt;
 ; Top-level Entity Name    ; addr_card                                     ;&lt;br /&gt;
 ; Family                   ; Stratix                                       ;&lt;br /&gt;
 ; Device                   ; EP1S10F780C5                                  ;&lt;br /&gt;
 ; Timing Models            ; Final                                         ;&lt;br /&gt;
 ; Total logic elements     ; 10,524 / 10,570 ( 100 % )                     ;&lt;br /&gt;
 ; Total pins               ; 279 / 427 ( 65 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 199,168 / 920,448 ( 22 % )                    ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 8 / 48 ( 17 % )                               ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
 +--------------------------+-----------------------------------------------+&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (addr_card.tan.rpt):&lt;br /&gt;
 +----------------------------------------------------------------------&lt;br /&gt;
 ; Timing Analyzer Summary                                              &lt;br /&gt;
 +----------------------------------------------------------+----------+&lt;br /&gt;
 ; Type                                                     ; Slack    ;&lt;br /&gt;
 +----------------------------------------------------------+----------+&lt;br /&gt;
 ; Worst-case tsu                                           ; N/A      ;&lt;br /&gt;
 ; Worst-case tco                                           ; N/A      ;&lt;br /&gt;
 ; Worst-case th                                            ; N/A      ;&lt;br /&gt;
 ; Clock Setup: 'ac_pll:pll0|altpll:altpll_component|_clk0' ; 2.267 ns ;&lt;br /&gt;
 ; Clock Setup: 'ac_pll:pll0|altpll:altpll_component|_clk2' ; 3.582 ns ;&lt;br /&gt;
 ; Clock Hold: 'ac_pll:pll0|altpll:altpll_component|_clk0'  ; 0.538 ns ;&lt;br /&gt;
 ; Clock Hold: 'ac_pll:pll0|altpll:altpll_component|_clk2'  ; 0.665 ns ;&lt;br /&gt;
 ; Total number of failed paths                             ;          ;&lt;br /&gt;
 +----------------------------------------------------------+----------+&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.1 ==&lt;br /&gt;
* '''Filename:'''  ac_v05000001_14sep2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
** ---&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** The resource usage on the AC has now reached a level where there isn't enough left to implement Signal Tap.  To enable SignalTap, comment out the largest usage of RAM/LE's: &amp;quot;ram : tpram_32bit_x_64&amp;quot; in ac_dac_ctrl.vhd.  Remember to uncomment this when running the final synthesis before committal.&lt;br /&gt;
** Based on ac_v5.0.0.&lt;br /&gt;
** Implements the bias_start command for different bias heating across rows on SCUBA2 arrays.&lt;br /&gt;
** IMPORTANT:  Must be used in conjunction with firmware v05000000+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** Differences between ac_v5.0.0 and ac_v5.0.1&lt;br /&gt;
 U system/test/source/tb/tb_cc_rcs_bcs_ac.vhd&lt;br /&gt;
 U addr_card/ac_dac_ctrl/source/rtl/ac_dac_ctrl.vhd&lt;br /&gt;
 U addr_card/ac_dac_ctrl/source/rtl/ac_dac_ctrl_pack.vhd&lt;br /&gt;
 U addr_card/addr_card/source/rtl/addr_card.vhd&lt;br /&gt;
 U addr_card/addr_card/source/rtl/addr_card_self_test.vhd&lt;br /&gt;
 U addr_card/addr_card/synth/addr_card.fit.rpt&lt;br /&gt;
 U addr_card/addr_card/synth/addr_card.fit.summary&lt;br /&gt;
 U addr_card/addr_card/synth/addr_card.map.rpt&lt;br /&gt;
 U addr_card/addr_card/synth/addr_card.qsf&lt;br /&gt;
 U addr_card/addr_card/synth/addr_card.sof&lt;br /&gt;
 U addr_card/addr_card/synth/addr_card.tan.rpt&lt;br /&gt;
 U addr_card/addr_card/synth/addr_card.tan.summary&lt;br /&gt;
 U all_cards/all_cards/source/rtl/all_cards_pack.vhd&lt;br /&gt;
 U all_cards/async/source/rtl/async_pack.vhd&lt;br /&gt;
 U all_cards/async/source/rtl/lvds_rx.vhd&lt;br /&gt;
 U all_cards/dispatch/source/rtl/dispatch.vhd&lt;br /&gt;
 U all_cards/dispatch/source/rtl/dispatch_cmd_receive.vhd&lt;br /&gt;
 U all_cards/frame_timing/source/rtl/frame_timing.vhd&lt;br /&gt;
 U all_cards/frame_timing/source/rtl/frame_timing_core.vhd&lt;br /&gt;
 U all_cards/frame_timing/source/rtl/frame_timing_pack.vhd&lt;br /&gt;
 U library/sys_param/source/rtl/data_types_pack.vhd&lt;br /&gt;
 U library/sys_param/source/rtl/wishbone_pack.vhd&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None yet reported&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (addr_card.fit.rpt):&lt;br /&gt;
 +--------------------------------------------------------------------------+&lt;br /&gt;
 ; Fitter Summary                                                           ;&lt;br /&gt;
 +--------------------------+-----------------------------------------------+&lt;br /&gt;
 ; Fitter Status            ; Successful - Mon Sep 14 13:46:41 2009         ;&lt;br /&gt;
 ; Quartus II Version       ; 9.0 Build 235 06/17/2009 SP 2 SJ Full Version ;&lt;br /&gt;
 ; Revision Name            ; addr_card                                     ;&lt;br /&gt;
 ; Top-level Entity Name    ; addr_card                                     ;&lt;br /&gt;
 ; Family                   ; Stratix                                       ;&lt;br /&gt;
 ; Device                   ; EP1S10F780C5                                  ;&lt;br /&gt;
 ; Timing Models            ; Final                                         ;&lt;br /&gt;
 ; Total logic elements     ; 9,370 / 10,570 ( 89 % )                       ;&lt;br /&gt;
 ; Total pins               ; 279 / 427 ( 65 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 199,168 / 920,448 ( 22 % )                    ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 8 / 48 ( 17 % )                               ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
 +--------------------------+-----------------------------------------------+&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (addr_card.tan.rpt):&lt;br /&gt;
 +----------------------------------------------------------------------&lt;br /&gt;
 ; Timing Analyzer Summary                                              &lt;br /&gt;
 +----------------------------------------------------------+----------+&lt;br /&gt;
 ; Type                                                     ; Slack    ;&lt;br /&gt;
 +----------------------------------------------------------+----------+&lt;br /&gt;
 ; Worst-case tsu                                           ; N/A      ;&lt;br /&gt;
 ; Worst-case tco                                           ; N/A      ;&lt;br /&gt;
 ; Worst-case th                                            ; N/A      ;&lt;br /&gt;
 ; Clock Setup: 'ac_pll:pll0|altpll:altpll_component|_clk0' ; 3.361 ns ;&lt;br /&gt;
 ; Clock Setup: 'ac_pll:pll0|altpll:altpll_component|_clk2' ; 4.142 ns ;&lt;br /&gt;
 ; Clock Hold: 'ac_pll:pll0|altpll:altpll_component|_clk0'  ; 0.528 ns ;&lt;br /&gt;
 ; Clock Hold: 'ac_pll:pll0|altpll:altpll_component|_clk2'  ; 0.562 ns ;&lt;br /&gt;
 ; Total number of failed paths                             ;          ; &lt;br /&gt;
 +----------------------------------------------------------+----------+&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.0 ==&lt;br /&gt;
* '''Filename:'''  ac_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;
** IMPORTANT:  Must be used in conjunction with firmware v05000000+ of all other cards.&lt;br /&gt;
** To increase 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;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None yet reported&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (addr_card.fit.rpt):&lt;br /&gt;
 +---------------------------------------------------------------------+&lt;br /&gt;
 ; Fitter Summary                                                      ;&lt;br /&gt;
 +--------------------------+------------------------------------------+&lt;br /&gt;
 ; Fitter Status            ; Successful - Tue Jan 13 16:19:16 2009    ;&lt;br /&gt;
 ; Quartus II Version       ; 8.1 Build 163 10/28/2008 SJ Full Version ;&lt;br /&gt;
 ; Revision Name            ; addr_card                                ;&lt;br /&gt;
 ; Top-level Entity Name    ; addr_card                                ;&lt;br /&gt;
 ; Family                   ; Stratix                                  ;&lt;br /&gt;
 ; Device                   ; EP1S10F780C5                             ;&lt;br /&gt;
 ; Timing Models            ; Final                                    ;&lt;br /&gt;
 ; Total logic elements     ; 9,383 / 10,570 ( 89 % )                  ;&lt;br /&gt;
 ; Total pins               ; 279 / 427 ( 65 % )                       ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                        ;&lt;br /&gt;
 ; Total memory bits        ; 196,096 / 920,448 ( 21 % )               ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 8 / 48 ( 17 % )                          ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                           ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                            ;&lt;br /&gt;
 +--------------------------+------------------------------------------+&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (addr_card.tan.rpt):&lt;br /&gt;
 +----------------------------------------------------------------------&lt;br /&gt;
 ; Timing Analyzer Summary                                              &lt;br /&gt;
 +----------------------------------------------------------+----------+&lt;br /&gt;
 ; Type                                                     ; Slack    ;&lt;br /&gt;
 +----------------------------------------------------------+----------+&lt;br /&gt;
 ; Worst-case tsu                                           ; N/A      ;&lt;br /&gt;
 ; Worst-case tco                                           ; N/A      ;&lt;br /&gt;
 ; Worst-case th                                            ; N/A      ;&lt;br /&gt;
 ; Clock Setup: 'ac_pll:pll0|altpll:altpll_component|_clk0' ; 2.617 ns ;&lt;br /&gt;
 ; Clock Setup: 'ac_pll:pll0|altpll:altpll_component|_clk2' ; 4.588 ns ;&lt;br /&gt;
 ; Clock Hold: 'ac_pll:pll0|altpll:altpll_component|_clk0'  ; 0.539 ns ;&lt;br /&gt;
 ; Clock Hold: 'ac_pll:pll0|altpll:altpll_component|_clk2'  ; 0.658 ns ;&lt;br /&gt;
 ; Total number of failed paths                             ;          ;&lt;br /&gt;
 +----------------------------------------------------------+----------+&lt;br /&gt;
&lt;br /&gt;
= Firmware repository =&lt;br /&gt;
* http://e-mode.phas.ubc.ca/mce_firmware/&lt;br /&gt;
&lt;br /&gt;
[[Category:Firmware]]&lt;/div&gt;</summary>
		<author><name>Mandana</name></author>
		
	</entry>
	<entry>
		<id>https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Address_Card_firmware&amp;diff=6220</id>
		<title>Address Card firmware</title>
		<link rel="alternate" type="text/html" href="https://e-mode.phas.ubc.ca/mcewiki/index.php?title=Address_Card_firmware&amp;diff=6220"/>
		<updated>2016-05-31T00:25:54Z</updated>

		<summary type="html">&lt;p&gt;Mandana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Hierarchy header}}&lt;br /&gt;
* [[Compatible_Versions_(CC,RC,BC,AC)|Recommended Firmware Revisions]]&lt;br /&gt;
* [[Pre-v5 firmware#Address Card|Pre-v5 firmware]]&lt;br /&gt;
&lt;br /&gt;
= Firmware Revision Listing =&lt;br /&gt;
== Revision 6.0.1 ==&lt;br /&gt;
;Filename&lt;br /&gt;
: ac_v06000001_20160408.sof&lt;br /&gt;
: ac_v06000001_20160408.pof&lt;br /&gt;
;Features&lt;br /&gt;
: added 64-element rb/wb suuport by introducing virtual card-ids. When the virtual card_id is used, a tga offset of 32 is applied when writing to a parameter id.&lt;br /&gt;
v6.0.1&lt;br /&gt;
: also merged some of the changes in ac 5.0.3 to optimize logic utilization&lt;br /&gt;
== Revision 5.0.4 (Stable) ==&lt;br /&gt;
* '''Filename:'''  ac_v05000004_16feb2010.sof&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Based on 5.0.0 with added support for new temperature chip (max1618) installed on Rev. D Address cards.&lt;br /&gt;
** temporary release, better apply this patch to rev. 5.0.3 after testing 5.0.3.&lt;br /&gt;
** missing scuba2 heater commands&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None yet reported&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (addr_card.fit.rpt):&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.3 (test) ==&lt;br /&gt;
* '''Filename:'''  ac_v05000003_19nov2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
** ---&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Based on both ac v5.0.2 and v2.0.a&lt;br /&gt;
** Reduces the usage of RAM and Logic Elements in the design so that there is margin for new features and space for SignalTap&lt;br /&gt;
** IMPORTANT:  Must be used in conjunction with firmware v05000000+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** Differences between ac_v5.0.2 and ac_v5.0.3&lt;br /&gt;
 addr_card.vhd&lt;br /&gt;
 ac_dac_ctrl.vhd&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** does not support new temperature chip on Rev. D address Cards. (Max1618)&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (addr_card.fit.rpt):&lt;br /&gt;
 +--------------------------------------------------------------------------+&lt;br /&gt;
 ; Fitter Summary                                                           ;&lt;br /&gt;
 +--------------------------+-----------------------------------------------+&lt;br /&gt;
 ; Fitter Status            ; Successful - Thu Nov 19 11:48:29 2009         ;&lt;br /&gt;
 ; Quartus II Version       ; 9.0 Build 235 06/17/2009 SP 2 SJ Full Version ;&lt;br /&gt;
 ; Revision Name            ; addr_card                                     ;&lt;br /&gt;
 ; Top-level Entity Name    ; addr_card                                     ;&lt;br /&gt;
 ; Family                   ; Stratix                                       ;&lt;br /&gt;
 ; Device                   ; EP1S10F780C5                                  ;&lt;br /&gt;
 ; Timing Models            ; Final                                         ;&lt;br /&gt;
 ; Total logic elements     ; 7,324 / 10,570 ( 69 % )                       ;&lt;br /&gt;
 ; Total pins               ; 279 / 427 ( 65 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 135,808 / 920,448 ( 15 % )                    ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 8 / 48 ( 17 % )                               ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
 +--------------------------+-----------------------------------------------+&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (addr_card.tan.rpt):&lt;br /&gt;
 +----------------------------------------------------------------------&lt;br /&gt;
 ; Timing Analyzer Summary                                              &lt;br /&gt;
 +----------------------------------------------------------+----------+&lt;br /&gt;
 ; Type                                                     ; Slack    ;&lt;br /&gt;
 +----------------------------------------------------------+----------+&lt;br /&gt;
 ; Worst-case tsu                                           ; N/A      ;&lt;br /&gt;
 ; Worst-case tco                                           ; N/A      ;&lt;br /&gt;
 ; Worst-case th                                            ; N/A      ;&lt;br /&gt;
 ; Clock Setup: 'ac_pll:pll0|altpll:altpll_component|_clk0' ; 2.853 ns ;&lt;br /&gt;
 ; Clock Setup: 'ac_pll:pll0|altpll:altpll_component|_clk2' ; 3.742 ns ;&lt;br /&gt;
 ; Clock Hold: 'ac_pll:pll0|altpll:altpll_component|_clk0'  ; 0.531 ns ;&lt;br /&gt;
 ; Clock Hold: 'ac_pll:pll0|altpll:altpll_component|_clk2'  ; 0.556 ns ;&lt;br /&gt;
 ; Total number of failed paths                             ;          ;&lt;br /&gt;
 +----------------------------------------------------------+----------+&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.2 ==&lt;br /&gt;
* '''Filename:'''  ac_v05000002_16oct2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
** ---&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** Based on ac_v5.0.1&lt;br /&gt;
** Adds HEATER_BIAS and HEATER_BIAS_LEN parameters for Tc-flattening on SCUBA-2.&lt;br /&gt;
** IMPORTANT:  Must be used in conjunction with firmware v05000000+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None yet reported&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (addr_card.fit.rpt):&lt;br /&gt;
 +--------------------------------------------------------------------------+&lt;br /&gt;
 ; Fitter Summary                                                           ;&lt;br /&gt;
 +--------------------------+-----------------------------------------------+&lt;br /&gt;
 ; Fitter Status            ; Successful - Fri Oct 16 16:41:47 2009         ;&lt;br /&gt;
 ; Quartus II Version       ; 9.0 Build 235 06/17/2009 SP 2 SJ Full Version ;&lt;br /&gt;
 ; Revision Name            ; addr_card                                     ;&lt;br /&gt;
 ; Top-level Entity Name    ; addr_card                                     ;&lt;br /&gt;
 ; Family                   ; Stratix                                       ;&lt;br /&gt;
 ; Device                   ; EP1S10F780C5                                  ;&lt;br /&gt;
 ; Timing Models            ; Final                                         ;&lt;br /&gt;
 ; Total logic elements     ; 10,524 / 10,570 ( 100 % )                     ;&lt;br /&gt;
 ; Total pins               ; 279 / 427 ( 65 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 199,168 / 920,448 ( 22 % )                    ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 8 / 48 ( 17 % )                               ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
 +--------------------------+-----------------------------------------------+&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (addr_card.tan.rpt):&lt;br /&gt;
 +----------------------------------------------------------------------&lt;br /&gt;
 ; Timing Analyzer Summary                                              &lt;br /&gt;
 +----------------------------------------------------------+----------+&lt;br /&gt;
 ; Type                                                     ; Slack    ;&lt;br /&gt;
 +----------------------------------------------------------+----------+&lt;br /&gt;
 ; Worst-case tsu                                           ; N/A      ;&lt;br /&gt;
 ; Worst-case tco                                           ; N/A      ;&lt;br /&gt;
 ; Worst-case th                                            ; N/A      ;&lt;br /&gt;
 ; Clock Setup: 'ac_pll:pll0|altpll:altpll_component|_clk0' ; 2.267 ns ;&lt;br /&gt;
 ; Clock Setup: 'ac_pll:pll0|altpll:altpll_component|_clk2' ; 3.582 ns ;&lt;br /&gt;
 ; Clock Hold: 'ac_pll:pll0|altpll:altpll_component|_clk0'  ; 0.538 ns ;&lt;br /&gt;
 ; Clock Hold: 'ac_pll:pll0|altpll:altpll_component|_clk2'  ; 0.665 ns ;&lt;br /&gt;
 ; Total number of failed paths                             ;          ;&lt;br /&gt;
 +----------------------------------------------------------+----------+&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.1 ==&lt;br /&gt;
* '''Filename:'''  ac_v05000001_14sep2009.sof&lt;br /&gt;
&lt;br /&gt;
* '''To Do:'''&lt;br /&gt;
** ---&lt;br /&gt;
&lt;br /&gt;
* '''Features:'''&lt;br /&gt;
** The resource usage on the AC has now reached a level where there isn't enough left to implement Signal Tap.  To enable SignalTap, comment out the largest usage of RAM/LE's: &amp;quot;ram : tpram_32bit_x_64&amp;quot; in ac_dac_ctrl.vhd.  Remember to uncomment this when running the final synthesis before committal.&lt;br /&gt;
** Based on ac_v5.0.0.&lt;br /&gt;
** Implements the bias_start command for different bias heating across rows on SCUBA2 arrays.&lt;br /&gt;
** IMPORTANT:  Must be used in conjunction with firmware v05000000+ of all other cards.&lt;br /&gt;
&lt;br /&gt;
* '''Details:'''&lt;br /&gt;
** Differences between ac_v5.0.0 and ac_v5.0.1&lt;br /&gt;
 U system/test/source/tb/tb_cc_rcs_bcs_ac.vhd&lt;br /&gt;
 U addr_card/ac_dac_ctrl/source/rtl/ac_dac_ctrl.vhd&lt;br /&gt;
 U addr_card/ac_dac_ctrl/source/rtl/ac_dac_ctrl_pack.vhd&lt;br /&gt;
 U addr_card/addr_card/source/rtl/addr_card.vhd&lt;br /&gt;
 U addr_card/addr_card/source/rtl/addr_card_self_test.vhd&lt;br /&gt;
 U addr_card/addr_card/synth/addr_card.fit.rpt&lt;br /&gt;
 U addr_card/addr_card/synth/addr_card.fit.summary&lt;br /&gt;
 U addr_card/addr_card/synth/addr_card.map.rpt&lt;br /&gt;
 U addr_card/addr_card/synth/addr_card.qsf&lt;br /&gt;
 U addr_card/addr_card/synth/addr_card.sof&lt;br /&gt;
 U addr_card/addr_card/synth/addr_card.tan.rpt&lt;br /&gt;
 U addr_card/addr_card/synth/addr_card.tan.summary&lt;br /&gt;
 U all_cards/all_cards/source/rtl/all_cards_pack.vhd&lt;br /&gt;
 U all_cards/async/source/rtl/async_pack.vhd&lt;br /&gt;
 U all_cards/async/source/rtl/lvds_rx.vhd&lt;br /&gt;
 U all_cards/dispatch/source/rtl/dispatch.vhd&lt;br /&gt;
 U all_cards/dispatch/source/rtl/dispatch_cmd_receive.vhd&lt;br /&gt;
 U all_cards/frame_timing/source/rtl/frame_timing.vhd&lt;br /&gt;
 U all_cards/frame_timing/source/rtl/frame_timing_core.vhd&lt;br /&gt;
 U all_cards/frame_timing/source/rtl/frame_timing_pack.vhd&lt;br /&gt;
 U library/sys_param/source/rtl/data_types_pack.vhd&lt;br /&gt;
 U library/sys_param/source/rtl/wishbone_pack.vhd&lt;br /&gt;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None yet reported&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (addr_card.fit.rpt):&lt;br /&gt;
 +--------------------------------------------------------------------------+&lt;br /&gt;
 ; Fitter Summary                                                           ;&lt;br /&gt;
 +--------------------------+-----------------------------------------------+&lt;br /&gt;
 ; Fitter Status            ; Successful - Mon Sep 14 13:46:41 2009         ;&lt;br /&gt;
 ; Quartus II Version       ; 9.0 Build 235 06/17/2009 SP 2 SJ Full Version ;&lt;br /&gt;
 ; Revision Name            ; addr_card                                     ;&lt;br /&gt;
 ; Top-level Entity Name    ; addr_card                                     ;&lt;br /&gt;
 ; Family                   ; Stratix                                       ;&lt;br /&gt;
 ; Device                   ; EP1S10F780C5                                  ;&lt;br /&gt;
 ; Timing Models            ; Final                                         ;&lt;br /&gt;
 ; Total logic elements     ; 9,370 / 10,570 ( 89 % )                       ;&lt;br /&gt;
 ; Total pins               ; 279 / 427 ( 65 % )                            ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                             ;&lt;br /&gt;
 ; Total memory bits        ; 199,168 / 920,448 ( 22 % )                    ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 8 / 48 ( 17 % )                               ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                                ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                                 ;&lt;br /&gt;
 +--------------------------+-----------------------------------------------+&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (addr_card.tan.rpt):&lt;br /&gt;
 +----------------------------------------------------------------------&lt;br /&gt;
 ; Timing Analyzer Summary                                              &lt;br /&gt;
 +----------------------------------------------------------+----------+&lt;br /&gt;
 ; Type                                                     ; Slack    ;&lt;br /&gt;
 +----------------------------------------------------------+----------+&lt;br /&gt;
 ; Worst-case tsu                                           ; N/A      ;&lt;br /&gt;
 ; Worst-case tco                                           ; N/A      ;&lt;br /&gt;
 ; Worst-case th                                            ; N/A      ;&lt;br /&gt;
 ; Clock Setup: 'ac_pll:pll0|altpll:altpll_component|_clk0' ; 3.361 ns ;&lt;br /&gt;
 ; Clock Setup: 'ac_pll:pll0|altpll:altpll_component|_clk2' ; 4.142 ns ;&lt;br /&gt;
 ; Clock Hold: 'ac_pll:pll0|altpll:altpll_component|_clk0'  ; 0.528 ns ;&lt;br /&gt;
 ; Clock Hold: 'ac_pll:pll0|altpll:altpll_component|_clk2'  ; 0.562 ns ;&lt;br /&gt;
 ; Total number of failed paths                             ;          ; &lt;br /&gt;
 +----------------------------------------------------------+----------+&lt;br /&gt;
&lt;br /&gt;
== Revision 5.0.0 ==&lt;br /&gt;
* '''Filename:'''  ac_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;
** IMPORTANT:  Must be used in conjunction with firmware v05000000+ of all other cards.&lt;br /&gt;
** To increase 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;
&lt;br /&gt;
* '''Bugs:'''&lt;br /&gt;
** None yet reported&lt;br /&gt;
&lt;br /&gt;
* '''FPGA Resource Usage''' (addr_card.fit.rpt):&lt;br /&gt;
 +---------------------------------------------------------------------+&lt;br /&gt;
 ; Fitter Summary                                                      ;&lt;br /&gt;
 +--------------------------+------------------------------------------+&lt;br /&gt;
 ; Fitter Status            ; Successful - Tue Jan 13 16:19:16 2009    ;&lt;br /&gt;
 ; Quartus II Version       ; 8.1 Build 163 10/28/2008 SJ Full Version ;&lt;br /&gt;
 ; Revision Name            ; addr_card                                ;&lt;br /&gt;
 ; Top-level Entity Name    ; addr_card                                ;&lt;br /&gt;
 ; Family                   ; Stratix                                  ;&lt;br /&gt;
 ; Device                   ; EP1S10F780C5                             ;&lt;br /&gt;
 ; Timing Models            ; Final                                    ;&lt;br /&gt;
 ; Total logic elements     ; 9,383 / 10,570 ( 89 % )                  ;&lt;br /&gt;
 ; Total pins               ; 279 / 427 ( 65 % )                       ;&lt;br /&gt;
 ; Total virtual pins       ; 0                                        ;&lt;br /&gt;
 ; Total memory bits        ; 196,096 / 920,448 ( 21 % )               ;&lt;br /&gt;
 ; DSP block 9-bit elements ; 8 / 48 ( 17 % )                          ;&lt;br /&gt;
 ; Total PLLs               ; 1 / 6 ( 17 % )                           ;&lt;br /&gt;
 ; Total DLLs               ; 0 / 2 ( 0 % )                            ;&lt;br /&gt;
 +--------------------------+------------------------------------------+&lt;br /&gt;
&lt;br /&gt;
* '''Timing Analyzer Summary''' (addr_card.tan.rpt):&lt;br /&gt;
 +----------------------------------------------------------------------&lt;br /&gt;
 ; Timing Analyzer Summary                                              &lt;br /&gt;
 +----------------------------------------------------------+----------+&lt;br /&gt;
 ; Type                                                     ; Slack    ;&lt;br /&gt;
 +----------------------------------------------------------+----------+&lt;br /&gt;
 ; Worst-case tsu                                           ; N/A      ;&lt;br /&gt;
 ; Worst-case tco                                           ; N/A      ;&lt;br /&gt;
 ; Worst-case th                                            ; N/A      ;&lt;br /&gt;
 ; Clock Setup: 'ac_pll:pll0|altpll:altpll_component|_clk0' ; 2.617 ns ;&lt;br /&gt;
 ; Clock Setup: 'ac_pll:pll0|altpll:altpll_component|_clk2' ; 4.588 ns ;&lt;br /&gt;
 ; Clock Hold: 'ac_pll:pll0|altpll:altpll_component|_clk0'  ; 0.539 ns ;&lt;br /&gt;
 ; Clock Hold: 'ac_pll:pll0|altpll:altpll_component|_clk2'  ; 0.658 ns ;&lt;br /&gt;
 ; Total number of failed paths                             ;          ;&lt;br /&gt;
 +----------------------------------------------------------+----------+&lt;br /&gt;
&lt;br /&gt;
= Firmware repository =&lt;br /&gt;
* http://e-mode.phas.ubc.ca/mce_firmware/&lt;br /&gt;
&lt;br /&gt;
[[Category:Firmware]]&lt;/div&gt;</summary>
		<author><name>Mandana</name></author>
		
	</entry>
</feed>