<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://daq00.triumf.ca/DaqWiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Suz</id>
	<title>DaqWiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://daq00.triumf.ca/DaqWiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Suz"/>
	<link rel="alternate" type="text/html" href="https://daq00.triumf.ca/DaqWiki/index.php/Special:Contributions/Suz"/>
	<updated>2026-04-23T16:44:32Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.6</generator>
	<entry>
		<id>https://daq00.triumf.ca/DaqWiki/index.php?title=EBIT2_DAQ&amp;diff=7559</id>
		<title>EBIT2 DAQ</title>
		<link rel="alternate" type="text/html" href="https://daq00.triumf.ca/DaqWiki/index.php?title=EBIT2_DAQ&amp;diff=7559"/>
		<updated>2018-11-17T02:16:10Z</updated>

		<summary type="html">&lt;p&gt;Suz: New page: === EBIT2 (TITAN electron capture) DAQ Instructions === ==== To start ====  * ssh ebit2@titan01 * run mhttpd -D * go to https://titan01.triumf.ca:8444 * go to Programs page * start all pro...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== EBIT2 (TITAN electron capture) DAQ Instructions ===&lt;br /&gt;
==== To start ====&lt;br /&gt;
&lt;br /&gt;
* ssh ebit2@titan01&lt;br /&gt;
* run mhttpd -D&lt;br /&gt;
* go to https://titan01.triumf.ca:8444&lt;br /&gt;
* go to Programs page&lt;br /&gt;
* start all programs in order&lt;br /&gt;
&lt;br /&gt;
==== Port numbers on titan01 ====&lt;br /&gt;
&lt;br /&gt;
* 8444 - mhttpd https server&lt;br /&gt;
* 6061 - mserver&lt;br /&gt;
* 9091 - analyzer midas server, use roody -H titan01:9091&lt;br /&gt;
&lt;br /&gt;
==== Build ====&lt;br /&gt;
&lt;br /&gt;
To build analyzer,&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ssh ebit2@titan01&lt;br /&gt;
cd SIS3302&lt;br /&gt;
make -f Makefile_analyzer&lt;br /&gt;
ls -l analyzer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Suz</name></author>
	</entry>
	<entry>
		<id>https://daq00.triumf.ca/DaqWiki/index.php?title=ISAC_Cluster&amp;diff=4789</id>
		<title>ISAC Cluster</title>
		<link rel="alternate" type="text/html" href="https://daq00.triumf.ca/DaqWiki/index.php?title=ISAC_Cluster&amp;diff=4789"/>
		<updated>2016-06-14T20:32:38Z</updated>

		<summary type="html">&lt;p&gt;Suz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Links ==&lt;br /&gt;
&lt;br /&gt;
* http://isdaq00.triumf.ca/triumf_nodeinfo/config.html (node info)&lt;br /&gt;
* http://isdaq00.triumf.ca/quotareport/quota.html (user disk quota)&lt;br /&gt;
* http://ladd00.triumf.ca/ganglia/ (ganglia on ladd00)&lt;br /&gt;
&lt;br /&gt;
== DAQ machines ==&lt;br /&gt;
&lt;br /&gt;
* isdaq00: main file server (NIS, home directories, central services, etc - see below)&lt;br /&gt;
* isdaq01: main daq server for running ISAC low-energy experiments (BNMR/BNQR/POL/etc)&lt;br /&gt;
* isdaq02: GPS PCI CAMAC DAQ&lt;br /&gt;
* isdaq03: DRAGON terminal&lt;br /&gt;
* isdaq04: POL terminal&lt;br /&gt;
* isdaq05: GRIFFIN terminal&lt;br /&gt;
* isdaq06: SL6 test machine, ISAC low-energy secondary DAQ server&lt;br /&gt;
* isdaq07: DRAGON terminal&lt;br /&gt;
* isdaq08: GRIFFIN terminal&lt;br /&gt;
* trinatdaq: TRINAT DAQ server&lt;br /&gt;
* smaug: DRAGON DAQ server (MacOS)&lt;br /&gt;
* lxdragon01: DRAGON VME DAQ (head)&lt;br /&gt;
* lxdragon02: DRAGON VME DAQ (tail)&lt;br /&gt;
* lxtrinat: TRINAT VME DAQ&lt;br /&gt;
* lxpol: POL VME DAQ&lt;br /&gt;
* lxbnmr: BNMR VME DAQ&lt;br /&gt;
* lxbnqr: BNQR VME DAQ&lt;br /&gt;
* bnmrvw: BNMR CAMP (vxworks)&lt;br /&gt;
* polvw: BNQR CAMP (vxworks)&lt;br /&gt;
* isysfe: ISAC1 Yield station MIDAS DAQ (Peter Kunz)&lt;br /&gt;
&lt;br /&gt;
== ISDAQ00 services ==&lt;br /&gt;
&lt;br /&gt;
* NIS master (ISAC-NIS)&lt;br /&gt;
* home directories&lt;br /&gt;
* NFS for OS images of ISAC V7648/V7750 VME CPUs (lxEXPT machines)&lt;br /&gt;
* web server: http://isdaq00.triumf.ca&lt;br /&gt;
* nodeinfo for ISAC machines&lt;br /&gt;
&lt;br /&gt;
== NIS configuration ==&lt;br /&gt;
&lt;br /&gt;
* domainname ISAC-NIS&lt;br /&gt;
* master: isdaq00&lt;br /&gt;
* secondary: isdaq01, isdaq06, trinatdaq&lt;br /&gt;
* autofs/automount configuration: isdaq00:/etc files auto.master, auto.home, auto.local&lt;br /&gt;
** after editing autofs files, run:&lt;br /&gt;
** cd ~root&lt;br /&gt;
** make -C /var/yp&lt;br /&gt;
** ./all.perl service autofs reload&lt;br /&gt;
&lt;br /&gt;
== NFS configuration ==&lt;br /&gt;
&lt;br /&gt;
* /isdaq/dataNNN - shared data disks&lt;br /&gt;
* /musr/xxx - BNMR/BNQR data disks&lt;/div&gt;</summary>
		<author><name>Suz</name></author>
	</entry>
	<entry>
		<id>https://daq00.triumf.ca/DaqWiki/index.php?title=File:Web_security2.svg&amp;diff=459</id>
		<title>File:Web security2.svg</title>
		<link rel="alternate" type="text/html" href="https://daq00.triumf.ca/DaqWiki/index.php?title=File:Web_security2.svg&amp;diff=459"/>
		<updated>2015-11-05T22:48:35Z</updated>

		<summary type="html">&lt;p&gt;Suz: Suz uploaded a new version of File:Web security2.svg&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Suz</name></author>
	</entry>
	<entry>
		<id>https://daq00.triumf.ca/DaqWiki/index.php?title=VME-PPG32&amp;diff=4168</id>
		<title>VME-PPG32</title>
		<link rel="alternate" type="text/html" href="https://daq00.triumf.ca/DaqWiki/index.php?title=VME-PPG32&amp;diff=4168"/>
		<updated>2015-03-13T01:10:41Z</updated>

		<summary type="html">&lt;p&gt;Suz: /* NIM Inputs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== VME-PPG32 - pulse pattern generator VME FPGA board ==&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
&lt;br /&gt;
* [https://edev.triumf.ca/projects/edevel00022] VME-PPG32 Rev0 (REA 198) project page on edev.triumf.ca&lt;br /&gt;
* [https://edev.triumf.ca/projects/edevel00067] VME-PPG32 Rev1 (REA 198) project page on edev.triumf.ca&lt;br /&gt;
* [https://edev.triumf.ca/projects/edevel00125] VME-PPG32 Rev2 (REA 198) project page on edev.triumf.ca&lt;br /&gt;
* [https://edev.triumf.ca/documents/27] Rev0 board schematics on edev site&lt;br /&gt;
* [https://edev.triumf.ca/documents/111] Rev1 board schematics on edev site&lt;br /&gt;
* [https://edev.triumf.ca/documents/158] Rev2 board schematics on edev site&lt;br /&gt;
* [[Image:VME-PPG32 Rev1.pdf]] Rev1 board schematics, local copy&lt;br /&gt;
* [[Image:VME-PPG32 Rev2.pdf]] Rev2 board schematics, local copy&lt;br /&gt;
&lt;br /&gt;
VME-PPG32-IO32 firmware: (IO32 functions, no PPG functions)&lt;br /&gt;
* [http://ladd00.triumf.ca/viewcvs/daqsvn/trunk/VME-PPG32-Rev0] Svn repository for VME-PPG32-Rev0 initial test firmware (IO32 function only, no PPG function)&lt;br /&gt;
* [http://ladd00.triumf.ca/viewcvs/daqsvn/trunk/VME-NIMIO32/VME-NIMIO32/PPG32-Rev1] Svn repository for VME-PPG32-Rev1 firmware (IO32 function only, no PPG function)&lt;br /&gt;
&lt;br /&gt;
VME-PPG32 VME CPLD firmware: (VME address decoder)&lt;br /&gt;
* [http://ladd00.triumf.ca/viewcvs/daqsvn/trunk/VME-NIMIO32/MAX3000A_Addr_decode] Svn repository for VME-PPG32 Rev0 and Rev1 VME address decoder CPLD (Altera EPM3032)&lt;br /&gt;
&lt;br /&gt;
VME-PPG32 firmware: (PPG function)&lt;br /&gt;
* [http://daq-plone.triumf.ca/HR/VME/ppg32] Current PPG firmware Source/binary&lt;br /&gt;
&lt;br /&gt;
=== General characteristics ===&lt;br /&gt;
&lt;br /&gt;
==== Available hardware ====&lt;br /&gt;
&lt;br /&gt;
* Altera cyclone 3 FPGA: EP3C40Q240C8&lt;br /&gt;
* Serial flash for FPGA configuration: Altera EPCS16&lt;br /&gt;
* VME interface: VME-D[31..0] bidirectional, VME-A[23..0] input only, DTACK output, no BERR, no RETRY/RESP. VME-A[31..20] input only connected only to address decoder FPGA (Altera MAX-something CPLD). This permits all single-word transfer modes, 32-bit DMA (BLT32) and 2eVME DMA (only drives D-lines, but still faster than BLT32). 64-bit DMA (MBLT64) and 2eSST are impossible.&lt;br /&gt;
* 32 NIM outputs&lt;br /&gt;
* 4 NIM inputs&lt;br /&gt;
* 32 &amp;quot;NIM output&amp;quot; LEDs&lt;br /&gt;
* 4 &amp;quot;NIM input&amp;quot; LEDs&lt;br /&gt;
* 1 &amp;quot;VME access&amp;quot; LED&lt;br /&gt;
* 2 output serial DAC: AD5439YRUZ&lt;br /&gt;
* Rev1 and Rev2 boards: inputs are switchable between NIM and TTL (JMP3)&lt;br /&gt;
* Rev2 boards: outputs are switchable between NIM and TTL (SW1 micro switches)&lt;br /&gt;
&lt;br /&gt;
==== PPG characteristics ====&lt;br /&gt;
&lt;br /&gt;
   4k words (128bit words) of program memory.&lt;br /&gt;
   256 entry stack.&lt;br /&gt;
   Halt/Continue/Loop/Subroutine/Branch instructions                                     &lt;br /&gt;
   100Mhz clock (derived from either 50Mhz internal crystal or external 20Mhz clock input - see note 1)&lt;br /&gt;
   fixed 3 clk per instruction plus 32bit delay individualy programmable for each instruction&lt;br /&gt;
&lt;br /&gt;
   FPGA resource Usage : 1044 LE, 500 kbits Memory&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   Note 1 :&lt;br /&gt;
   Some modules allow an external clock frequency of 20-100MHz . Divide-downs must be programmed where external clock frequency is not 20MHz. &lt;br /&gt;
   Examples of divide-down programming is shown at end of this document.&lt;br /&gt;
&lt;br /&gt;
=== Onboard jumper settings ===&lt;br /&gt;
&lt;br /&gt;
* JMP1 - set to &amp;quot;INP&amp;quot; for input with 50 Ohm termination, set to &amp;quot;DAC&amp;quot; for DAC output&lt;br /&gt;
* JMP2 - set to &amp;quot;INP&amp;quot; same as JMP1&lt;br /&gt;
* JMP3 - set to &amp;quot;NIM&amp;quot; (pins 1-2) for NIM inputs or &amp;quot;TTL&amp;quot; (pins 2-3) for TTL inputs&lt;br /&gt;
* JMP4 - &amp;quot;MSEL1&amp;quot; jumper set to &amp;quot;ACT&amp;quot; for use with the active-serial flash&lt;br /&gt;
* IrqSel - leave open&lt;br /&gt;
* JTAG - leave open (not a jumper block!)&lt;br /&gt;
* SW1..3 - VME base address selectors (see below)&lt;br /&gt;
&lt;br /&gt;
=== Firmware update procedure ===&lt;br /&gt;
&lt;br /&gt;
(note1: right now the PPG firmware update procedure is unnecessary complicated because there is no ppg.pof file in the PPG firmware distribution version &amp;quot;1mar12&amp;quot; and the PPG firmware does not include the Altera active-serial programmer block.)&lt;br /&gt;
&lt;br /&gt;
(note2: VME-PPG32-IO32 firmware (sof file) is required to update the PPG firmware)&lt;br /&gt;
&lt;br /&gt;
* obtain the PPG firmware zip file (from http://daq-plone.triumf.ca/HR/VME/ppg32)&lt;br /&gt;
* extract the ppg.jic file&lt;br /&gt;
* obtain the VME-PPG32-IO32 sof file (VME-PPG32.sof) from https://ladd00.triumf.ca/viewvc/daqsvn/trunk/VME-NIMIO32/VME-NIMIO32/PPG32-Rev1/VME-PPG32.sof?view=log&lt;br /&gt;
&lt;br /&gt;
==== Update using USB-Blaster and jic file ====&lt;br /&gt;
&lt;br /&gt;
* use Quartus programmer to burn the jic file through the EP3 active-serial flash loader:&lt;br /&gt;
* start Quartus programmer (tools-&amp;gt;programmer)&lt;br /&gt;
* say &amp;quot;auto detect&amp;quot; - EP3, EPM1270 and EPM3032A should be detected&lt;br /&gt;
* attach VME-PPG32.sof to the EP3 part (context menu &amp;quot;change file&amp;quot;)&lt;br /&gt;
* select &amp;quot;program&amp;quot;&lt;br /&gt;
* say &amp;quot;start&amp;quot;&lt;br /&gt;
* observe that 2 &amp;quot;red&amp;quot; LEDs have turned on on the PPG board (40MHz clock on outputs 4 and 20).&lt;br /&gt;
* say &amp;quot;auto detect&amp;quot;&lt;br /&gt;
* an &amp;quot;EPCS16&amp;quot; part should show up attached to the EP3.&lt;br /&gt;
* attach ppg.jic to the EPCS16 part&lt;br /&gt;
* select &amp;quot;program&amp;quot;&lt;br /&gt;
* say &amp;quot;start&amp;quot;&lt;br /&gt;
* observe progress bar go from 0 to 100% in about 2 minutes.&lt;br /&gt;
* PPG firmware is now loaded into the board&lt;br /&gt;
* cycle the power on the board to reboot into the PPG firmware&lt;br /&gt;
* when running the PPG firmware, all LEDs are off after reboot.&lt;br /&gt;
&lt;br /&gt;
==== Update using VME flash programmer ====&lt;br /&gt;
&lt;br /&gt;
(note: VME flash programmer interface does not work in ppg firmware version &amp;quot;1mar12&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
* obtain the latest copy of srunner_vme (follow instructions here [[VME-NIMIO32#Firmware_update_procedure]]) (srunner_vme.cxx svn rev 214 or newer for jic support)&lt;br /&gt;
* ./srunner_vme_gef.exe -program -16 ppg.jic 0x100024&lt;br /&gt;
* reboot the PPG&lt;br /&gt;
&lt;br /&gt;
(note: the above does not work: b) srunner_vme treats 0x10xxxx is an A24 address, but PPG firmware does not respond to A24 addresses; c) the active serial interface does not seem to work anyway)&lt;br /&gt;
&lt;br /&gt;
(note: the reboot function is not available in the PPG firmware)&lt;br /&gt;
&lt;br /&gt;
==== Update using VME flash programmer when running VME-PPG32-IO32 firmware ====&lt;br /&gt;
&lt;br /&gt;
* ./test_VMENIMIO32_gef.exe --addr 0x100000 --read 0  ### to confirm VME-PPG32-IO32 firmware revision&lt;br /&gt;
* ./srunner_vme_gef.exe -program -16 ppg.jic 0x100020&lt;br /&gt;
* ./test_VMENIMIO32_gef.exe --addr 0x100000 --reboot ### PPG will stop responding&lt;br /&gt;
* ./test_a32.exe 0x100000 ### should read 0x00000000 (NOT 0xFFFFFFFF)&lt;br /&gt;
&lt;br /&gt;
=== VME interface ===&lt;br /&gt;
&lt;br /&gt;
VME A32/D32 access only. Rotary switches SW1, SW2 and SW3 set the upper 12 bits of the address.&lt;br /&gt;
VME registers are listed in the table below.&lt;br /&gt;
&lt;br /&gt;
==== Registers ====&lt;br /&gt;
{| cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Number || Address || Name || Access || Description&lt;br /&gt;
|-&lt;br /&gt;
|  0 || 0x00000 || CSR || RW || Control/Status Register&lt;br /&gt;
|-&lt;br /&gt;
|  1 || 0x00004 || Test || RW || Test Register&lt;br /&gt;
|-&lt;br /&gt;
|  2 || 0x00008 || Addr || RW || Program Address Register&lt;br /&gt;
|-&lt;br /&gt;
|  3 || 0x0000C || Inst_Lo || RW || Instruction Register Part 1/4&lt;br /&gt;
|-&lt;br /&gt;
|  4 || 0x00010 || Inst_Med || RW || Instruction Register Part 2/4&lt;br /&gt;
|-&lt;br /&gt;
|  5 || 0x00014 || Inst_Hi || RW || Instruction Register Part 3/4&lt;br /&gt;
|-&lt;br /&gt;
|  6 || 0x00018 || Inst_Top || RW || Instruction Register Part 4/4&lt;br /&gt;
|-&lt;br /&gt;
|  7 || 0x0001C || Inv_Mask || RW || Output Inversion Mask&lt;br /&gt;
|-&lt;br /&gt;
|  8 || 0x00020 || Version || R || Firmware Version Register&lt;br /&gt;
|-&lt;br /&gt;
|  9 || 0x00024 || Flash || RW || Serial Flash Control Register&lt;br /&gt;
|-&lt;br /&gt;
| 10 || 0x00028 || Serial || R || Serial Number Register&lt;br /&gt;
|-&lt;br /&gt;
| 11 || 0x0002C || Hardware || R || hardware Identification Register&lt;br /&gt;
|-&lt;br /&gt;
| 12 || 0x00030 || clock Control || RW || Clock Control Register&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== CSR Register (0x00000) =====&lt;br /&gt;
&lt;br /&gt;
The first 5 bits control the ppg, the remaining 26 bits provide read-only status information.&lt;br /&gt;
(writes to the 26 bits of status information are ignored, and overwritten on the next status update)&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+CSR Description&lt;br /&gt;
|-&lt;br /&gt;
!Bit || Name || Access || description&lt;br /&gt;
|-&lt;br /&gt;
|0|| Run || R/W || Run Control/Status&lt;br /&gt;
|-&lt;br /&gt;
|1|| Ext-Clk-Toggle || W || Toggles between PPG external and internal Clk&lt;br /&gt;
|-&lt;br /&gt;
|2|| Ext-Start|| R/W || 1=Ext-PPG Start, 0=Int-PPG Start&lt;br /&gt;
|-&lt;br /&gt;
|3|| PPG-Reset || R/W || 1=Reset, 0=Normal operation&lt;br /&gt;
|-&lt;br /&gt;
|4|| Test-Mode || R/W || 1=Test Mode, 0=Normal operation&lt;br /&gt;
|-&lt;br /&gt;
|16|| Ext-Clk-Sel || R || 1= External clock is selected, 0 = Internal clock selected&lt;br /&gt;
|-&lt;br /&gt;
|17|| Ext-Clk good || R || 1= External clock is connected and is &amp;quot;good&amp;quot;, 0= external clock not connected or is &amp;quot;bad&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|?-31|| Status || R || Readback of PC, SP, Current Delay Counter&lt;br /&gt;
|} 	 	 	 &lt;br /&gt;
&lt;br /&gt;
RUN bit: Writing 1 here instructs the ppg to begin executing its program, reading this bit returns 1 if the program is still running, or 0 if halted.&lt;br /&gt;
&lt;br /&gt;
Ext_Clk bit: Writing an edge here toggles the ppg logic between the internal and external CLK (connected to Nim_Input[3]). The VME interface always uses the internal clock.&lt;br /&gt;
Note that the correct divide-down must be programmed unless external clock is the same frequency (i.e. 10MHz) as internal clock.&lt;br /&gt;
&lt;br /&gt;
Ext_Start bit: Writing 1 here disables the CSR-Run-bit-start. (Reading this bit still returns the correct status), and switches control to the External Start input (NIM_INPUT[4])&lt;br /&gt;
&lt;br /&gt;
Reset bit: Set bit to Reset PPG. Stops PPG pgm even if executing a long delay. Does NOT do a full reset to power-up condition. Bit must be cleared after Reset or module will not operate.&lt;br /&gt;
&lt;br /&gt;
Test-Mode bit: Set bit to enable Test Mode. When Test Mode is enabled, inputs 1 and 2 become output the internal PPG clock and actual clock PPG is using, respectively. If internal clock is set, inputs 1 and 2 output identical clocks. If external clock is set, and the external clock is &amp;quot;good&amp;quot;, input 1 will not change, but input 2 will show the external clock frequency.   &lt;br /&gt;
If Test-Mode bit is cleared, Normal Mode is enabled, where inputs 1 and 2 act as regular inputs.&lt;br /&gt;
&lt;br /&gt;
Ext-Clk-Sel: If bit is set, external clock is selected and LED 4 will be lit.  If clear, internal clock is selected&lt;br /&gt;
&lt;br /&gt;
Ext-Clk Good: If bit set: external clock is connected to Nim_Input[3] and &amp;quot;good&amp;quot;, LED 2 will be lit.  If clear: external clock is either not connected or &amp;quot;bad&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===== Test Register (0x00004) =====&lt;br /&gt;
&lt;br /&gt;
Simple Test Register - Value Written is preserved and can be read back.&lt;br /&gt;
&lt;br /&gt;
===== Address Register (0x00008) =====&lt;br /&gt;
&lt;br /&gt;
Sets PPG Program Memory Address - next instruction will be written to this location.  Also when program is started, execution begins from this address.  Also in test-Mode, the NIM/LED outputs follow the state of this register.&lt;br /&gt;
&lt;br /&gt;
===== Instruction Registers (0x0000C - 0x00018) =====&lt;br /&gt;
&lt;br /&gt;
Registers to hold the 128bit Program Instructions.  Writing the Upper register triggers the storing of the entire 128bit instruction to the address currently in the address register.&lt;br /&gt;
&lt;br /&gt;
The instructions format is as follows ...&lt;br /&gt;
{| cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+Instruction Format&lt;br /&gt;
|-&lt;br /&gt;
!Bits 0-31 || Bits 32-63 || Bits 64-95 || Bits 96-115 || Bits 116-117 || Bits 118-127&lt;br /&gt;
|-&lt;br /&gt;
| 32 Output Set Bits || 32 Output Clear Bits || 32bit Delay Count || 20bit Data || 4bit instruction type || Ignored&lt;br /&gt;
|-&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
The 32bit delay count at 100Mhz gives maximum delay of 10 seconds per instruction.&lt;br /&gt;
&lt;br /&gt;
   The instruction types are ... &lt;br /&gt;
   0 - Halt&lt;br /&gt;
   1 - Continue&lt;br /&gt;
   2 - new Loop        ( 20 bit data used for count - i.e. maximum 1 million )&lt;br /&gt;
   3 - End Loop&lt;br /&gt;
   4 - Call Subroutine ( 20 bit data used for address )&lt;br /&gt;
   5 - Return from subroutine&lt;br /&gt;
   6 - Branch          ( 20 bit data used for address )&lt;br /&gt;
&lt;br /&gt;
===== Output Inversion Mask (0x0001C) =====&lt;br /&gt;
32 individual inversion bits (1 per output) a 1 inverts the state of that output.&lt;br /&gt;
&lt;br /&gt;
===== Firmware Version (0x00020) =====&lt;br /&gt;
Returns the 32bit unix timestamp corresponding to the date this firmware was compiled.&lt;br /&gt;
&lt;br /&gt;
===== Serial Flash Control (0x00024) =====&lt;br /&gt;
Used for reading/Writing to the Configuration Flash device (Reading/Updating firmware)&lt;br /&gt;
&lt;br /&gt;
===== Serial Number (0x00028) =====&lt;br /&gt;
Returns the module serial number, and Board revision (if set) or 0xdead&lt;br /&gt;
&lt;br /&gt;
===== hardware Type (0x0002C) =====&lt;br /&gt;
Returns a 32 bit description of this hardware - which should confirm the identity of this module as a vme-ppg32&lt;br /&gt;
&lt;br /&gt;
===== Clock Control (0x00030) =====&lt;br /&gt;
Set PLL parameters applied to external clock input.  Default parameters are for 20Mhz External Clock, and multiply this by 5 to get 100Mhz ppg clock.&lt;br /&gt;
&lt;br /&gt;
Register Contents as follows ...&lt;br /&gt;
{| cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+Instruction Format&lt;br /&gt;
|-&lt;br /&gt;
!Bits 30-28 || Bits 26-24 || Bits 23-20 || Bits 16-8 || Bit 5 || Bit 4 || Bit 3 || Bit 2 || Bit 1 || Bit 0&lt;br /&gt;
|-&lt;br /&gt;
| Phase Counter Select || Counter Parameter || Counter Type || 9 bit Data || PLL Reset || Up/Down || PhaseStep || Write Parameter || reconfigure || Control Trigger&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The Control Trigger Bit [bit 0] enables the four control signals in bits 1,2,3,5, and needs to be toggled from off to on, to apply these 4 signals.&lt;br /&gt;
&lt;br /&gt;
On rising edge of control trigger ...&lt;br /&gt;
   Phasestep=1       =&amp;gt; clock phase is adjusted by 1 unit, in the direction selected by &amp;quot;Up/Down&amp;quot; [bit 4: 1=up,0=Down]&lt;br /&gt;
   Write Parameter=1 =&amp;gt; 9bit-Data, Counter-Type and Counter-Param are written into the PLL reconfiguration registers&lt;br /&gt;
   Reconfigure=1     =&amp;gt; PLL is reconfigured with the parameters currently in its reconfiguration registers&lt;br /&gt;
   PLL-Reset=1       =&amp;gt; PLL is reset&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PhaseCounterSelect ...&lt;br /&gt;
   0 =&amp;gt; All Clocks&lt;br /&gt;
   1 =&amp;gt; M ?&lt;br /&gt;
   2-6 =&amp;gt; Clock 0-4&lt;br /&gt;
&lt;br /&gt;
phasestep is applied immediately (to clocks selected by PhaseCounterSelect), and does not require a reconfiguration or reset.&lt;br /&gt;
&lt;br /&gt;
The parameters below need to be written (with writeparameter=1), and then require a reconfiguration to be applied.&lt;br /&gt;
&lt;br /&gt;
Counter-Parameter ...&lt;br /&gt;
   0: HighCount [For VCO this parameter is: PostScale K=2 Yes/No]&lt;br /&gt;
   1: LowCount&lt;br /&gt;
   4: Bypass&lt;br /&gt;
   5: Mode Odd/Even&lt;br /&gt;
&lt;br /&gt;
Counter-Type ...&lt;br /&gt;
   0: N&lt;br /&gt;
   1: M&lt;br /&gt;
   2: Cp/LF&lt;br /&gt;
   3: VCO&lt;br /&gt;
   4-8: Clock 0-4&lt;br /&gt;
   9-D: Clock 5-9 (Stratix Only)&lt;br /&gt;
   E-F: Invalid&lt;br /&gt;
&lt;br /&gt;
Clock frequencies are defined by ...&lt;br /&gt;
   VCO Frequency = Fin * M/N&lt;br /&gt;
   The individual clock outputs [clock0-4] are given by ... VCO / C0-C4&lt;br /&gt;
&lt;br /&gt;
   Each of M,N,C0-C4 are the sum of a high and low count.&lt;br /&gt;
   Note - can get 50% duty cycle with odd count by setting mode=odd with high=low+1&lt;br /&gt;
   Each counter can be bypassed by setting bypass=1 (=&amp;gt; Scale=1)&lt;br /&gt;
&lt;br /&gt;
Limits etc ...&lt;br /&gt;
   Fin  =   5 -  472 Mhz&lt;br /&gt;
   Fvco = 600 - 1300 Mhz&lt;br /&gt;
   Lock Time &amp;lt; 1ms&lt;br /&gt;
&lt;br /&gt;
Examples ...&lt;br /&gt;
   For Fin = 20Mhz [defaults settings on pwerup]&lt;br /&gt;
   Fvco=1200,K=2 =&amp;gt; 600Mhz .. M=30, N=1(Bypassed), C0=6(3+3) Fin=20Mhz =&amp;gt; C0=100Mhz&lt;br /&gt;
&lt;br /&gt;
   For Fin=100Mhz [and M=30,N=1,C0=6] Need to Change N to 5 ...&lt;br /&gt;
   Write:   0x00000305   0  0x01000205  0  0x05000105      0    0x04000005         0  0x3          0&lt;br /&gt;
            type=0,hi=3     type=0,lo=2    type=0,mode=odd      type=0,bypass=no      Reconfigure&lt;br /&gt;
&lt;br /&gt;
   Change back from 100 to 20 - need to change N to bypassed ...&lt;br /&gt;
   write:   0x04000105        0    0x3          0&lt;br /&gt;
            type=0,bypass=no       Reconfigure&lt;br /&gt;
&lt;br /&gt;
   For Deap 62.5 Mhz (20*25/8)  Fvco=1000,k=2=&amp;gt;500 M=8 N=1 C0=5 gives 100Mhz&lt;br /&gt;
                                Fvco=1000,k=2=&amp;gt;500 M=8 N=1 C0=8 gives 62.5Mhz&lt;br /&gt;
&lt;br /&gt;
**Note - to help debug clock setting problems the internal clock can be viewed on ppg output #1 (and the 20 Mhz internal clock on output #0), if the test-mode bit is set in the CSR [bit 4].  It is then possible to check the ppg clock is locked and at the correct frequency (100Mhz), and see the relation between the external and internal clocks.&lt;br /&gt;
&lt;br /&gt;
=== Front Panel ===&lt;br /&gt;
&lt;br /&gt;
==== NIM Inputs ====&lt;br /&gt;
&lt;br /&gt;
   The Input assignments are (as labelled on front panel) ...&lt;br /&gt;
   4 - External Start - Rising Edge starts, multiple starts are (or should be) ignored.&lt;br /&gt;
   3 - External Clock (20Mhz, internally scaled - 100Mhz)&lt;br /&gt;
   2 - Unassigned&lt;br /&gt;
   1 - Unassigned&lt;br /&gt;
&lt;br /&gt;
==== Input LEDs ====&lt;br /&gt;
&lt;br /&gt;
   The Input LED assignments are (as labelled on front panel) ...&lt;br /&gt;
   4 - Clock setting (Lit =&amp;gt; External Clk)&lt;br /&gt;
   3 - NimIn[2] status&lt;br /&gt;
   2 - External Clock Good indicator (Lit =&amp;gt; Clock is good)&lt;br /&gt;
   1 - Program Running&lt;br /&gt;
&lt;br /&gt;
=== Test Software ===&lt;br /&gt;
&lt;br /&gt;
==== c-shell script to run 2 nested loops ====&lt;br /&gt;
&lt;br /&gt;
   set dec_hex=( 0x0  0x1  0x2  0x3  0x4  0x5  0x6  0x7  \&lt;br /&gt;
                 0x8  0x9  0xa  0xb  0xc  0xd  0xe  0xf  \&lt;br /&gt;
                 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 \&lt;br /&gt;
                 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f \&lt;br /&gt;
                 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 )&lt;br /&gt;
   &lt;br /&gt;
   # dly4,loop4,dly3,loop6,dly2,end,end&lt;br /&gt;
   set inst=(                                                \&lt;br /&gt;
      0xff  0x00  0x4  0x100000   0x0   0x0   0x0  0x200004  \&lt;br /&gt;
      0x1   0x1   0x3  0x100000   0x0   0x0   0x0  0x200006  \&lt;br /&gt;
      0x2   0x2   0x2  0x100000   0x0   0x0   0x0  0x300000  \&lt;br /&gt;
      0x0   0x0   0x0  0x300000   0x0   0x0   0x0  0x000000  )&lt;br /&gt;
   &lt;br /&gt;
   set i=0&lt;br /&gt;
   set j=0&lt;br /&gt;
   while( $i &amp;lt; $#inst )&lt;br /&gt;
      @ j++; vme_poke -a VME_A32UD -A 0x00100008 -d VME_D32 $dec_hex[$j]&lt;br /&gt;
      @ i++; vme_poke -a VME_A32UD -A 0x0010000c -d VME_D32 $inst[$i]&lt;br /&gt;
      @ i++; vme_poke -a VME_A32UD -A 0x00100010 -d VME_D32 $inst[$i]&lt;br /&gt;
      @ i++; vme_poke -a VME_A32UD -A 0x00100014 -d VME_D32 $inst[$i]&lt;br /&gt;
      @ i++; vme_poke -a VME_A32UD -A 0x00100018 -d VME_D32 $inst[$i]&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   # start program (from addr 0)...&lt;br /&gt;
   vme_poke -a VME_A32UD -A 0x00100008 -d VME_D32 0x0&lt;br /&gt;
   vme_poke -a VME_A32UD -A 0x00100000 -d VME_D32 0x1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== c-shell script to set divide-downs for 100MHz frequency  ====&lt;br /&gt;
&lt;br /&gt;
This would be used with an external frequency input of 100MHz&lt;br /&gt;
&lt;br /&gt;
  vme_poke -a VME_A32UD -A 0x00100030 -d VME_D32 0x0&lt;br /&gt;
  vme_poke -a VME_A32UD -A 0x00100030 -d VME_D32 0x00000305   # set hi counter to 3&lt;br /&gt;
  vme_poke -a VME_A32UD -A 0x00100030 -d VME_D32 0x0&lt;br /&gt;
  vme_poke -a VME_A32UD -A 0x00100030 -d VME_D32 0x01000205   # set lo counter to 2&lt;br /&gt;
  vme_poke -a VME_A32UD -A 0x00100030 -d VME_D32 0x0&lt;br /&gt;
  vme_poke -a VME_A32UD -A 0x00100030 -d VME_D32 0x05000105   # set mode counter to odd &lt;br /&gt;
  vme_poke -a VME_A32UD -A 0x00100030 -d VME_D32 0x0&lt;br /&gt;
  vme_poke -a VME_A32UD -A 0x00100030 -d VME_D32 0x04000005   # set counter bypass to 0&lt;br /&gt;
  vme_poke -a VME_A32UD -A 0x00100030 -d VME_D32 0x0&lt;br /&gt;
  vme_poke -a VME_A32UD -A 0x00100030 -d VME_D32 0x3&lt;br /&gt;
  vme_poke -a VME_A32UD -A 0x00100030 -d VME_D32 0x0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== c-shell script to set divide-downs for 10MHz  frequency  ====&lt;br /&gt;
&lt;br /&gt;
This would be used when returning to the internal frequency of 10MHz :&lt;br /&gt;
&lt;br /&gt;
  vme_poke -a VME_A32UD -A 0x00100030 -d VME_D32 0x04000105  # set counter bypass to 1&lt;br /&gt;
  vme_poke -a VME_A32UD -A 0x00100030 -d VME_D32 0x0         # prepare for next cmd&lt;br /&gt;
  vme_poke -a VME_A32UD -A 0x00100030 -d VME_D32 0x3         # reconfig clock&lt;br /&gt;
  vme_poke -a VME_A32UD -A 0x00100030 -d VME_D32 0x0         # prepare for next cmd&lt;br /&gt;
&lt;br /&gt;
=== Procedure for newly assembled board startup and test ===&lt;br /&gt;
&lt;br /&gt;
(note1: VME-PPG32-IO32 firmware is used to test the board)&lt;br /&gt;
&lt;br /&gt;
(note2: TTL inputs and outputs are not tested)&lt;br /&gt;
&lt;br /&gt;
(note3: DAC outputs are not tested)&lt;br /&gt;
&lt;br /&gt;
(note4: shorts between NIM outputs are not tested)&lt;br /&gt;
&lt;br /&gt;
* check the board for shorts of power to ground. Use multimeter in &amp;quot;ohm&amp;quot; mode, measure resistance between &amp;quot;gnd&amp;quot; and &amp;quot;1.2V&amp;quot;, &amp;quot;-3.3V&amp;quot;, &amp;quot;VME +12V&amp;quot;, 2.5V&amp;quot; and &amp;quot;3.3V&amp;quot;. None should measure 0 ohm.&lt;br /&gt;
* set VME address jumper A20-23 to &amp;quot;1&amp;quot;, jumpers A24-27 and A28-31 to &amp;quot;0&amp;quot;&lt;br /&gt;
* set inputs and outputs to &amp;quot;NIM&amp;quot; mode&lt;br /&gt;
* connect JTAG USB blaster&lt;br /&gt;
* power up the board (standalone or in a VME crate)&lt;br /&gt;
* start Quartus programmer&lt;br /&gt;
* select correct USB blaster&lt;br /&gt;
* run &amp;quot;auto detect&amp;quot;, 3 devices should be detected: EP3C40Q240 (Cyclone3 FPGA), EPM1270 (parallel flash loader CPLD), EPM3032AT44 (VME address decoder CPLD)&lt;br /&gt;
* flash the VME address decoder pof file into the EPM3032 part (get pof file from here: https://ladd00.triumf.ca/viewvc/daqsvn/trunk/VME-NIMIO32/MAX3000A_Addr_decode/VME_Addr_decode.pof?view=log)&lt;br /&gt;
* (do not do this) flash the CFI parallel flash loader into the EPM1270 part (get pof file where?!?)&lt;br /&gt;
* load the VME-PPG32-IO32 firmware sof file into the EP3 part (get sof file here: https://ladd00.triumf.ca/viewvc/daqsvn/trunk/VME-NIMIO32/VME-NIMIO32/PPG32-Rev1/VME-PPG32.sof?view=log)&lt;br /&gt;
* run &amp;quot;vmescan_gef.exe&amp;quot;, it should detect the IO32 board at A24 VME address 0x00100000, data should correspond to the sof file revision date code&lt;br /&gt;
* confirm VME access LED is working (flashes during vme scan).&lt;br /&gt;
* confirm VME Data bus is okey: &amp;quot;./test_VMENIMIO32_gef.exe --addr 0x100000 --testbits 4&amp;quot;&lt;br /&gt;
* (do not do this) follow the firmware update instructions to flash the firmware pof file using the VME flash programmer at [[VME-NIMIO32#Firmware_update_procedure]] (get VME-PPG32-IO32 pof file from here: https://ladd00.triumf.ca/viewvc/daqsvn/trunk/VME-NIMIO32/VME-NIMIO32/PPG32-Rev1/VME-PPG32.pof?view=log)&lt;br /&gt;
* (do not do this) confirm FPGA reboot is working - &amp;quot;./test_VMENIMIO32_gef.exe --addr 0x100000 --reboot&amp;quot; prints 0xFFFFFFFF on the second read of firmware revision&lt;br /&gt;
* test NIM inputs and LEDs: use NIM pulse generator or any NIM module inverted output, connect to each NIM input, observe that corresponding &amp;quot;green&amp;quot; LEDs is lighting up&lt;br /&gt;
* test NIM outputs and LEDs: &amp;quot;./test_VMENIMIO32_gef.exe --addr 0x100000 --nimout 3 1 --pulsenim&amp;quot;, observe all &amp;quot;red&amp;quot; LEDs are flashing, connect NIM outputs to NIM scaler, observe scaler counts at each LED flash&lt;br /&gt;
* load PPG firmware into the active serial flash (follow instructions here: [[#Update_using_VME_flash_programmer_when_running_VME-PPG32-IO32_firmware]]&lt;br /&gt;
* unplug the board from VME, wait 10 sec, plug it back in, confirm that it is detected by vmescan if running VME-PPG32-IO32 firmware or test_a32 or PPG test tools if running the PPG firmware (confirms the flash memory contents is good)&lt;br /&gt;
&lt;br /&gt;
=== VME-PPG32-IO32 firmware ===&lt;br /&gt;
&lt;br /&gt;
The VME-PPG32 board can run a special version of VME-NIMIO32 firmware (subproject &amp;quot;PPG32-Rev1&amp;quot; of the VME-NIMIO32 firmware). For instructions, please refer to the [[VME-NIMIO32]] documentation.&lt;/div&gt;</summary>
		<author><name>Suz</name></author>
	</entry>
	<entry>
		<id>https://daq00.triumf.ca/DaqWiki/index.php?title=VME-PPG32&amp;diff=4167</id>
		<title>VME-PPG32</title>
		<link rel="alternate" type="text/html" href="https://daq00.triumf.ca/DaqWiki/index.php?title=VME-PPG32&amp;diff=4167"/>
		<updated>2015-03-13T01:10:41Z</updated>

		<summary type="html">&lt;p&gt;Suz: /* NIM Inputs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== VME-PPG32 - pulse pattern generator VME FPGA board ==&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
&lt;br /&gt;
* [https://edev.triumf.ca/projects/edevel00022] VME-PPG32 Rev0 (REA 198) project page on edev.triumf.ca&lt;br /&gt;
* [https://edev.triumf.ca/projects/edevel00067] VME-PPG32 Rev1 (REA 198) project page on edev.triumf.ca&lt;br /&gt;
* [https://edev.triumf.ca/projects/edevel00125] VME-PPG32 Rev2 (REA 198) project page on edev.triumf.ca&lt;br /&gt;
* [https://edev.triumf.ca/documents/27] Rev0 board schematics on edev site&lt;br /&gt;
* [https://edev.triumf.ca/documents/111] Rev1 board schematics on edev site&lt;br /&gt;
* [https://edev.triumf.ca/documents/158] Rev2 board schematics on edev site&lt;br /&gt;
* [[Image:VME-PPG32 Rev1.pdf]] Rev1 board schematics, local copy&lt;br /&gt;
* [[Image:VME-PPG32 Rev2.pdf]] Rev2 board schematics, local copy&lt;br /&gt;
&lt;br /&gt;
VME-PPG32-IO32 firmware: (IO32 functions, no PPG functions)&lt;br /&gt;
* [http://ladd00.triumf.ca/viewcvs/daqsvn/trunk/VME-PPG32-Rev0] Svn repository for VME-PPG32-Rev0 initial test firmware (IO32 function only, no PPG function)&lt;br /&gt;
* [http://ladd00.triumf.ca/viewcvs/daqsvn/trunk/VME-NIMIO32/VME-NIMIO32/PPG32-Rev1] Svn repository for VME-PPG32-Rev1 firmware (IO32 function only, no PPG function)&lt;br /&gt;
&lt;br /&gt;
VME-PPG32 VME CPLD firmware: (VME address decoder)&lt;br /&gt;
* [http://ladd00.triumf.ca/viewcvs/daqsvn/trunk/VME-NIMIO32/MAX3000A_Addr_decode] Svn repository for VME-PPG32 Rev0 and Rev1 VME address decoder CPLD (Altera EPM3032)&lt;br /&gt;
&lt;br /&gt;
VME-PPG32 firmware: (PPG function)&lt;br /&gt;
* [http://daq-plone.triumf.ca/HR/VME/ppg32] Current PPG firmware Source/binary&lt;br /&gt;
&lt;br /&gt;
=== General characteristics ===&lt;br /&gt;
&lt;br /&gt;
==== Available hardware ====&lt;br /&gt;
&lt;br /&gt;
* Altera cyclone 3 FPGA: EP3C40Q240C8&lt;br /&gt;
* Serial flash for FPGA configuration: Altera EPCS16&lt;br /&gt;
* VME interface: VME-D[31..0] bidirectional, VME-A[23..0] input only, DTACK output, no BERR, no RETRY/RESP. VME-A[31..20] input only connected only to address decoder FPGA (Altera MAX-something CPLD). This permits all single-word transfer modes, 32-bit DMA (BLT32) and 2eVME DMA (only drives D-lines, but still faster than BLT32). 64-bit DMA (MBLT64) and 2eSST are impossible.&lt;br /&gt;
* 32 NIM outputs&lt;br /&gt;
* 4 NIM inputs&lt;br /&gt;
* 32 &amp;quot;NIM output&amp;quot; LEDs&lt;br /&gt;
* 4 &amp;quot;NIM input&amp;quot; LEDs&lt;br /&gt;
* 1 &amp;quot;VME access&amp;quot; LED&lt;br /&gt;
* 2 output serial DAC: AD5439YRUZ&lt;br /&gt;
* Rev1 and Rev2 boards: inputs are switchable between NIM and TTL (JMP3)&lt;br /&gt;
* Rev2 boards: outputs are switchable between NIM and TTL (SW1 micro switches)&lt;br /&gt;
&lt;br /&gt;
==== PPG characteristics ====&lt;br /&gt;
&lt;br /&gt;
   4k words (128bit words) of program memory.&lt;br /&gt;
   256 entry stack.&lt;br /&gt;
   Halt/Continue/Loop/Subroutine/Branch instructions                                     &lt;br /&gt;
   100Mhz clock (derived from either 50Mhz internal crystal or external 20Mhz clock input - see note 1)&lt;br /&gt;
   fixed 3 clk per instruction plus 32bit delay individualy programmable for each instruction&lt;br /&gt;
&lt;br /&gt;
   FPGA resource Usage : 1044 LE, 500 kbits Memory&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   Note 1 :&lt;br /&gt;
   Some modules allow an external clock frequency of 20-100MHz . Divide-downs must be programmed where external clock frequency is not 20MHz. &lt;br /&gt;
   Examples of divide-down programming is shown at end of this document.&lt;br /&gt;
&lt;br /&gt;
=== Onboard jumper settings ===&lt;br /&gt;
&lt;br /&gt;
* JMP1 - set to &amp;quot;INP&amp;quot; for input with 50 Ohm termination, set to &amp;quot;DAC&amp;quot; for DAC output&lt;br /&gt;
* JMP2 - set to &amp;quot;INP&amp;quot; same as JMP1&lt;br /&gt;
* JMP3 - set to &amp;quot;NIM&amp;quot; (pins 1-2) for NIM inputs or &amp;quot;TTL&amp;quot; (pins 2-3) for TTL inputs&lt;br /&gt;
* JMP4 - &amp;quot;MSEL1&amp;quot; jumper set to &amp;quot;ACT&amp;quot; for use with the active-serial flash&lt;br /&gt;
* IrqSel - leave open&lt;br /&gt;
* JTAG - leave open (not a jumper block!)&lt;br /&gt;
* SW1..3 - VME base address selectors (see below)&lt;br /&gt;
&lt;br /&gt;
=== Firmware update procedure ===&lt;br /&gt;
&lt;br /&gt;
(note1: right now the PPG firmware update procedure is unnecessary complicated because there is no ppg.pof file in the PPG firmware distribution version &amp;quot;1mar12&amp;quot; and the PPG firmware does not include the Altera active-serial programmer block.)&lt;br /&gt;
&lt;br /&gt;
(note2: VME-PPG32-IO32 firmware (sof file) is required to update the PPG firmware)&lt;br /&gt;
&lt;br /&gt;
* obtain the PPG firmware zip file (from http://daq-plone.triumf.ca/HR/VME/ppg32)&lt;br /&gt;
* extract the ppg.jic file&lt;br /&gt;
* obtain the VME-PPG32-IO32 sof file (VME-PPG32.sof) from https://ladd00.triumf.ca/viewvc/daqsvn/trunk/VME-NIMIO32/VME-NIMIO32/PPG32-Rev1/VME-PPG32.sof?view=log&lt;br /&gt;
&lt;br /&gt;
==== Update using USB-Blaster and jic file ====&lt;br /&gt;
&lt;br /&gt;
* use Quartus programmer to burn the jic file through the EP3 active-serial flash loader:&lt;br /&gt;
* start Quartus programmer (tools-&amp;gt;programmer)&lt;br /&gt;
* say &amp;quot;auto detect&amp;quot; - EP3, EPM1270 and EPM3032A should be detected&lt;br /&gt;
* attach VME-PPG32.sof to the EP3 part (context menu &amp;quot;change file&amp;quot;)&lt;br /&gt;
* select &amp;quot;program&amp;quot;&lt;br /&gt;
* say &amp;quot;start&amp;quot;&lt;br /&gt;
* observe that 2 &amp;quot;red&amp;quot; LEDs have turned on on the PPG board (40MHz clock on outputs 4 and 20).&lt;br /&gt;
* say &amp;quot;auto detect&amp;quot;&lt;br /&gt;
* an &amp;quot;EPCS16&amp;quot; part should show up attached to the EP3.&lt;br /&gt;
* attach ppg.jic to the EPCS16 part&lt;br /&gt;
* select &amp;quot;program&amp;quot;&lt;br /&gt;
* say &amp;quot;start&amp;quot;&lt;br /&gt;
* observe progress bar go from 0 to 100% in about 2 minutes.&lt;br /&gt;
* PPG firmware is now loaded into the board&lt;br /&gt;
* cycle the power on the board to reboot into the PPG firmware&lt;br /&gt;
* when running the PPG firmware, all LEDs are off after reboot.&lt;br /&gt;
&lt;br /&gt;
==== Update using VME flash programmer ====&lt;br /&gt;
&lt;br /&gt;
(note: VME flash programmer interface does not work in ppg firmware version &amp;quot;1mar12&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
* obtain the latest copy of srunner_vme (follow instructions here [[VME-NIMIO32#Firmware_update_procedure]]) (srunner_vme.cxx svn rev 214 or newer for jic support)&lt;br /&gt;
* ./srunner_vme_gef.exe -program -16 ppg.jic 0x100024&lt;br /&gt;
* reboot the PPG&lt;br /&gt;
&lt;br /&gt;
(note: the above does not work: b) srunner_vme treats 0x10xxxx is an A24 address, but PPG firmware does not respond to A24 addresses; c) the active serial interface does not seem to work anyway)&lt;br /&gt;
&lt;br /&gt;
(note: the reboot function is not available in the PPG firmware)&lt;br /&gt;
&lt;br /&gt;
==== Update using VME flash programmer when running VME-PPG32-IO32 firmware ====&lt;br /&gt;
&lt;br /&gt;
* ./test_VMENIMIO32_gef.exe --addr 0x100000 --read 0  ### to confirm VME-PPG32-IO32 firmware revision&lt;br /&gt;
* ./srunner_vme_gef.exe -program -16 ppg.jic 0x100020&lt;br /&gt;
* ./test_VMENIMIO32_gef.exe --addr 0x100000 --reboot ### PPG will stop responding&lt;br /&gt;
* ./test_a32.exe 0x100000 ### should read 0x00000000 (NOT 0xFFFFFFFF)&lt;br /&gt;
&lt;br /&gt;
=== VME interface ===&lt;br /&gt;
&lt;br /&gt;
VME A32/D32 access only. Rotary switches SW1, SW2 and SW3 set the upper 12 bits of the address.&lt;br /&gt;
VME registers are listed in the table below.&lt;br /&gt;
&lt;br /&gt;
==== Registers ====&lt;br /&gt;
{| cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Number || Address || Name || Access || Description&lt;br /&gt;
|-&lt;br /&gt;
|  0 || 0x00000 || CSR || RW || Control/Status Register&lt;br /&gt;
|-&lt;br /&gt;
|  1 || 0x00004 || Test || RW || Test Register&lt;br /&gt;
|-&lt;br /&gt;
|  2 || 0x00008 || Addr || RW || Program Address Register&lt;br /&gt;
|-&lt;br /&gt;
|  3 || 0x0000C || Inst_Lo || RW || Instruction Register Part 1/4&lt;br /&gt;
|-&lt;br /&gt;
|  4 || 0x00010 || Inst_Med || RW || Instruction Register Part 2/4&lt;br /&gt;
|-&lt;br /&gt;
|  5 || 0x00014 || Inst_Hi || RW || Instruction Register Part 3/4&lt;br /&gt;
|-&lt;br /&gt;
|  6 || 0x00018 || Inst_Top || RW || Instruction Register Part 4/4&lt;br /&gt;
|-&lt;br /&gt;
|  7 || 0x0001C || Inv_Mask || RW || Output Inversion Mask&lt;br /&gt;
|-&lt;br /&gt;
|  8 || 0x00020 || Version || R || Firmware Version Register&lt;br /&gt;
|-&lt;br /&gt;
|  9 || 0x00024 || Flash || RW || Serial Flash Control Register&lt;br /&gt;
|-&lt;br /&gt;
| 10 || 0x00028 || Serial || R || Serial Number Register&lt;br /&gt;
|-&lt;br /&gt;
| 11 || 0x0002C || Hardware || R || hardware Identification Register&lt;br /&gt;
|-&lt;br /&gt;
| 12 || 0x00030 || clock Control || RW || Clock Control Register&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== CSR Register (0x00000) =====&lt;br /&gt;
&lt;br /&gt;
The first 5 bits control the ppg, the remaining 26 bits provide read-only status information.&lt;br /&gt;
(writes to the 26 bits of status information are ignored, and overwritten on the next status update)&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+CSR Description&lt;br /&gt;
|-&lt;br /&gt;
!Bit || Name || Access || description&lt;br /&gt;
|-&lt;br /&gt;
|0|| Run || R/W || Run Control/Status&lt;br /&gt;
|-&lt;br /&gt;
|1|| Ext-Clk-Toggle || W || Toggles between PPG external and internal Clk&lt;br /&gt;
|-&lt;br /&gt;
|2|| Ext-Start|| R/W || 1=Ext-PPG Start, 0=Int-PPG Start&lt;br /&gt;
|-&lt;br /&gt;
|3|| PPG-Reset || R/W || 1=Reset, 0=Normal operation&lt;br /&gt;
|-&lt;br /&gt;
|4|| Test-Mode || R/W || 1=Test Mode, 0=Normal operation&lt;br /&gt;
|-&lt;br /&gt;
|16|| Ext-Clk-Sel || R || 1= External clock is selected, 0 = Internal clock selected&lt;br /&gt;
|-&lt;br /&gt;
|17|| Ext-Clk good || R || 1= External clock is connected and is &amp;quot;good&amp;quot;, 0= external clock not connected or is &amp;quot;bad&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|?-31|| Status || R || Readback of PC, SP, Current Delay Counter&lt;br /&gt;
|} 	 	 	 &lt;br /&gt;
&lt;br /&gt;
RUN bit: Writing 1 here instructs the ppg to begin executing its program, reading this bit returns 1 if the program is still running, or 0 if halted.&lt;br /&gt;
&lt;br /&gt;
Ext_Clk bit: Writing an edge here toggles the ppg logic between the internal and external CLK (connected to Nim_Input[3]). The VME interface always uses the internal clock.&lt;br /&gt;
Note that the correct divide-down must be programmed unless external clock is the same frequency (i.e. 10MHz) as internal clock.&lt;br /&gt;
&lt;br /&gt;
Ext_Start bit: Writing 1 here disables the CSR-Run-bit-start. (Reading this bit still returns the correct status), and switches control to the External Start input (NIM_INPUT[4])&lt;br /&gt;
&lt;br /&gt;
Reset bit: Set bit to Reset PPG. Stops PPG pgm even if executing a long delay. Does NOT do a full reset to power-up condition. Bit must be cleared after Reset or module will not operate.&lt;br /&gt;
&lt;br /&gt;
Test-Mode bit: Set bit to enable Test Mode. When Test Mode is enabled, inputs 1 and 2 become output the internal PPG clock and actual clock PPG is using, respectively. If internal clock is set, inputs 1 and 2 output identical clocks. If external clock is set, and the external clock is &amp;quot;good&amp;quot;, input 1 will not change, but input 2 will show the external clock frequency.   &lt;br /&gt;
If Test-Mode bit is cleared, Normal Mode is enabled, where inputs 1 and 2 act as regular inputs.&lt;br /&gt;
&lt;br /&gt;
Ext-Clk-Sel: If bit is set, external clock is selected and LED 4 will be lit.  If clear, internal clock is selected&lt;br /&gt;
&lt;br /&gt;
Ext-Clk Good: If bit set: external clock is connected to Nim_Input[3] and &amp;quot;good&amp;quot;, LED 2 will be lit.  If clear: external clock is either not connected or &amp;quot;bad&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===== Test Register (0x00004) =====&lt;br /&gt;
&lt;br /&gt;
Simple Test Register - Value Written is preserved and can be read back.&lt;br /&gt;
&lt;br /&gt;
===== Address Register (0x00008) =====&lt;br /&gt;
&lt;br /&gt;
Sets PPG Program Memory Address - next instruction will be written to this location.  Also when program is started, execution begins from this address.  Also in test-Mode, the NIM/LED outputs follow the state of this register.&lt;br /&gt;
&lt;br /&gt;
===== Instruction Registers (0x0000C - 0x00018) =====&lt;br /&gt;
&lt;br /&gt;
Registers to hold the 128bit Program Instructions.  Writing the Upper register triggers the storing of the entire 128bit instruction to the address currently in the address register.&lt;br /&gt;
&lt;br /&gt;
The instructions format is as follows ...&lt;br /&gt;
{| cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+Instruction Format&lt;br /&gt;
|-&lt;br /&gt;
!Bits 0-31 || Bits 32-63 || Bits 64-95 || Bits 96-115 || Bits 116-117 || Bits 118-127&lt;br /&gt;
|-&lt;br /&gt;
| 32 Output Set Bits || 32 Output Clear Bits || 32bit Delay Count || 20bit Data || 4bit instruction type || Ignored&lt;br /&gt;
|-&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
The 32bit delay count at 100Mhz gives maximum delay of 10 seconds per instruction.&lt;br /&gt;
&lt;br /&gt;
   The instruction types are ... &lt;br /&gt;
   0 - Halt&lt;br /&gt;
   1 - Continue&lt;br /&gt;
   2 - new Loop        ( 20 bit data used for count - i.e. maximum 1 million )&lt;br /&gt;
   3 - End Loop&lt;br /&gt;
   4 - Call Subroutine ( 20 bit data used for address )&lt;br /&gt;
   5 - Return from subroutine&lt;br /&gt;
   6 - Branch          ( 20 bit data used for address )&lt;br /&gt;
&lt;br /&gt;
===== Output Inversion Mask (0x0001C) =====&lt;br /&gt;
32 individual inversion bits (1 per output) a 1 inverts the state of that output.&lt;br /&gt;
&lt;br /&gt;
===== Firmware Version (0x00020) =====&lt;br /&gt;
Returns the 32bit unix timestamp corresponding to the date this firmware was compiled.&lt;br /&gt;
&lt;br /&gt;
===== Serial Flash Control (0x00024) =====&lt;br /&gt;
Used for reading/Writing to the Configuration Flash device (Reading/Updating firmware)&lt;br /&gt;
&lt;br /&gt;
===== Serial Number (0x00028) =====&lt;br /&gt;
Returns the module serial number, and Board revision (if set) or 0xdead&lt;br /&gt;
&lt;br /&gt;
===== hardware Type (0x0002C) =====&lt;br /&gt;
Returns a 32 bit description of this hardware - which should confirm the identity of this module as a vme-ppg32&lt;br /&gt;
&lt;br /&gt;
===== Clock Control (0x00030) =====&lt;br /&gt;
Set PLL parameters applied to external clock input.  Default parameters are for 20Mhz External Clock, and multiply this by 5 to get 100Mhz ppg clock.&lt;br /&gt;
&lt;br /&gt;
Register Contents as follows ...&lt;br /&gt;
{| cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+Instruction Format&lt;br /&gt;
|-&lt;br /&gt;
!Bits 30-28 || Bits 26-24 || Bits 23-20 || Bits 16-8 || Bit 5 || Bit 4 || Bit 3 || Bit 2 || Bit 1 || Bit 0&lt;br /&gt;
|-&lt;br /&gt;
| Phase Counter Select || Counter Parameter || Counter Type || 9 bit Data || PLL Reset || Up/Down || PhaseStep || Write Parameter || reconfigure || Control Trigger&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The Control Trigger Bit [bit 0] enables the four control signals in bits 1,2,3,5, and needs to be toggled from off to on, to apply these 4 signals.&lt;br /&gt;
&lt;br /&gt;
On rising edge of control trigger ...&lt;br /&gt;
   Phasestep=1       =&amp;gt; clock phase is adjusted by 1 unit, in the direction selected by &amp;quot;Up/Down&amp;quot; [bit 4: 1=up,0=Down]&lt;br /&gt;
   Write Parameter=1 =&amp;gt; 9bit-Data, Counter-Type and Counter-Param are written into the PLL reconfiguration registers&lt;br /&gt;
   Reconfigure=1     =&amp;gt; PLL is reconfigured with the parameters currently in its reconfiguration registers&lt;br /&gt;
   PLL-Reset=1       =&amp;gt; PLL is reset&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PhaseCounterSelect ...&lt;br /&gt;
   0 =&amp;gt; All Clocks&lt;br /&gt;
   1 =&amp;gt; M ?&lt;br /&gt;
   2-6 =&amp;gt; Clock 0-4&lt;br /&gt;
&lt;br /&gt;
phasestep is applied immediately (to clocks selected by PhaseCounterSelect), and does not require a reconfiguration or reset.&lt;br /&gt;
&lt;br /&gt;
The parameters below need to be written (with writeparameter=1), and then require a reconfiguration to be applied.&lt;br /&gt;
&lt;br /&gt;
Counter-Parameter ...&lt;br /&gt;
   0: HighCount [For VCO this parameter is: PostScale K=2 Yes/No]&lt;br /&gt;
   1: LowCount&lt;br /&gt;
   4: Bypass&lt;br /&gt;
   5: Mode Odd/Even&lt;br /&gt;
&lt;br /&gt;
Counter-Type ...&lt;br /&gt;
   0: N&lt;br /&gt;
   1: M&lt;br /&gt;
   2: Cp/LF&lt;br /&gt;
   3: VCO&lt;br /&gt;
   4-8: Clock 0-4&lt;br /&gt;
   9-D: Clock 5-9 (Stratix Only)&lt;br /&gt;
   E-F: Invalid&lt;br /&gt;
&lt;br /&gt;
Clock frequencies are defined by ...&lt;br /&gt;
   VCO Frequency = Fin * M/N&lt;br /&gt;
   The individual clock outputs [clock0-4] are given by ... VCO / C0-C4&lt;br /&gt;
&lt;br /&gt;
   Each of M,N,C0-C4 are the sum of a high and low count.&lt;br /&gt;
   Note - can get 50% duty cycle with odd count by setting mode=odd with high=low+1&lt;br /&gt;
   Each counter can be bypassed by setting bypass=1 (=&amp;gt; Scale=1)&lt;br /&gt;
&lt;br /&gt;
Limits etc ...&lt;br /&gt;
   Fin  =   5 -  472 Mhz&lt;br /&gt;
   Fvco = 600 - 1300 Mhz&lt;br /&gt;
   Lock Time &amp;lt; 1ms&lt;br /&gt;
&lt;br /&gt;
Examples ...&lt;br /&gt;
   For Fin = 20Mhz [defaults settings on pwerup]&lt;br /&gt;
   Fvco=1200,K=2 =&amp;gt; 600Mhz .. M=30, N=1(Bypassed), C0=6(3+3) Fin=20Mhz =&amp;gt; C0=100Mhz&lt;br /&gt;
&lt;br /&gt;
   For Fin=100Mhz [and M=30,N=1,C0=6] Need to Change N to 5 ...&lt;br /&gt;
   Write:   0x00000305   0  0x01000205  0  0x05000105      0    0x04000005         0  0x3          0&lt;br /&gt;
            type=0,hi=3     type=0,lo=2    type=0,mode=odd      type=0,bypass=no      Reconfigure&lt;br /&gt;
&lt;br /&gt;
   Change back from 100 to 20 - need to change N to bypassed ...&lt;br /&gt;
   write:   0x04000105        0    0x3          0&lt;br /&gt;
            type=0,bypass=no       Reconfigure&lt;br /&gt;
&lt;br /&gt;
   For Deap 62.5 Mhz (20*25/8)  Fvco=1000,k=2=&amp;gt;500 M=8 N=1 C0=5 gives 100Mhz&lt;br /&gt;
                                Fvco=1000,k=2=&amp;gt;500 M=8 N=1 C0=8 gives 62.5Mhz&lt;br /&gt;
&lt;br /&gt;
**Note - to help debug clock setting problems the internal clock can be viewed on ppg output #1 (and the 20 Mhz internal clock on output #0), if the test-mode bit is set in the CSR [bit 4].  It is then possible to check the ppg clock is locked and at the correct frequency (100Mhz), and see the relation between the external and internal clocks.&lt;br /&gt;
&lt;br /&gt;
=== Front Panel ===&lt;br /&gt;
&lt;br /&gt;
==== NIM Inputs ====&lt;br /&gt;
&lt;br /&gt;
   The Input assignments are (as labelled on front panel) ...&lt;br /&gt;
   4 - External Start - Rising Edge starts, multiple starts are (or should be) ignored.&lt;br /&gt;
   3 - External Clock (20Mhz, internally scaled - 100Mhz)&lt;br /&gt;
   2 - Unassigned&lt;br /&gt;
   1 - Unassigned&lt;br /&gt;
&lt;br /&gt;
==== Input LEDs ====&lt;br /&gt;
&lt;br /&gt;
   The Input LED assignments are (as labelled on front panel) ...&lt;br /&gt;
   4 - Clock setting (Lit =&amp;gt; External Clk)&lt;br /&gt;
   3 - NimIn[2] status&lt;br /&gt;
   2 - External Clock Good indicator (Lit =&amp;gt; Clock is good)&lt;br /&gt;
   1 - Program Running&lt;br /&gt;
&lt;br /&gt;
=== Test Software ===&lt;br /&gt;
&lt;br /&gt;
==== c-shell script to run 2 nested loops ====&lt;br /&gt;
&lt;br /&gt;
   set dec_hex=( 0x0  0x1  0x2  0x3  0x4  0x5  0x6  0x7  \&lt;br /&gt;
                 0x8  0x9  0xa  0xb  0xc  0xd  0xe  0xf  \&lt;br /&gt;
                 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 \&lt;br /&gt;
                 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f \&lt;br /&gt;
                 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 )&lt;br /&gt;
   &lt;br /&gt;
   # dly4,loop4,dly3,loop6,dly2,end,end&lt;br /&gt;
   set inst=(                                                \&lt;br /&gt;
      0xff  0x00  0x4  0x100000   0x0   0x0   0x0  0x200004  \&lt;br /&gt;
      0x1   0x1   0x3  0x100000   0x0   0x0   0x0  0x200006  \&lt;br /&gt;
      0x2   0x2   0x2  0x100000   0x0   0x0   0x0  0x300000  \&lt;br /&gt;
      0x0   0x0   0x0  0x300000   0x0   0x0   0x0  0x000000  )&lt;br /&gt;
   &lt;br /&gt;
   set i=0&lt;br /&gt;
   set j=0&lt;br /&gt;
   while( $i &amp;lt; $#inst )&lt;br /&gt;
      @ j++; vme_poke -a VME_A32UD -A 0x00100008 -d VME_D32 $dec_hex[$j]&lt;br /&gt;
      @ i++; vme_poke -a VME_A32UD -A 0x0010000c -d VME_D32 $inst[$i]&lt;br /&gt;
      @ i++; vme_poke -a VME_A32UD -A 0x00100010 -d VME_D32 $inst[$i]&lt;br /&gt;
      @ i++; vme_poke -a VME_A32UD -A 0x00100014 -d VME_D32 $inst[$i]&lt;br /&gt;
      @ i++; vme_poke -a VME_A32UD -A 0x00100018 -d VME_D32 $inst[$i]&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   # start program (from addr 0)...&lt;br /&gt;
   vme_poke -a VME_A32UD -A 0x00100008 -d VME_D32 0x0&lt;br /&gt;
   vme_poke -a VME_A32UD -A 0x00100000 -d VME_D32 0x1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== c-shell script to set divide-downs for 100MHz frequency  ====&lt;br /&gt;
&lt;br /&gt;
This would be used with an external frequency input of 100MHz&lt;br /&gt;
&lt;br /&gt;
  vme_poke -a VME_A32UD -A 0x00100030 -d VME_D32 0x0&lt;br /&gt;
  vme_poke -a VME_A32UD -A 0x00100030 -d VME_D32 0x00000305   # set hi counter to 3&lt;br /&gt;
  vme_poke -a VME_A32UD -A 0x00100030 -d VME_D32 0x0&lt;br /&gt;
  vme_poke -a VME_A32UD -A 0x00100030 -d VME_D32 0x01000205   # set lo counter to 2&lt;br /&gt;
  vme_poke -a VME_A32UD -A 0x00100030 -d VME_D32 0x0&lt;br /&gt;
  vme_poke -a VME_A32UD -A 0x00100030 -d VME_D32 0x05000105   # set mode counter to odd &lt;br /&gt;
  vme_poke -a VME_A32UD -A 0x00100030 -d VME_D32 0x0&lt;br /&gt;
  vme_poke -a VME_A32UD -A 0x00100030 -d VME_D32 0x04000005   # set counter bypass to 0&lt;br /&gt;
  vme_poke -a VME_A32UD -A 0x00100030 -d VME_D32 0x0&lt;br /&gt;
  vme_poke -a VME_A32UD -A 0x00100030 -d VME_D32 0x3&lt;br /&gt;
  vme_poke -a VME_A32UD -A 0x00100030 -d VME_D32 0x0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== c-shell script to set divide-downs for 10MHz  frequency  ====&lt;br /&gt;
&lt;br /&gt;
This would be used when returning to the internal frequency of 10MHz :&lt;br /&gt;
&lt;br /&gt;
  vme_poke -a VME_A32UD -A 0x00100030 -d VME_D32 0x04000105  # set counter bypass to 1&lt;br /&gt;
  vme_poke -a VME_A32UD -A 0x00100030 -d VME_D32 0x0         # prepare for next cmd&lt;br /&gt;
  vme_poke -a VME_A32UD -A 0x00100030 -d VME_D32 0x3         # reconfig clock&lt;br /&gt;
  vme_poke -a VME_A32UD -A 0x00100030 -d VME_D32 0x0         # prepare for next cmd&lt;br /&gt;
&lt;br /&gt;
=== Procedure for newly assembled board startup and test ===&lt;br /&gt;
&lt;br /&gt;
(note1: VME-PPG32-IO32 firmware is used to test the board)&lt;br /&gt;
&lt;br /&gt;
(note2: TTL inputs and outputs are not tested)&lt;br /&gt;
&lt;br /&gt;
(note3: DAC outputs are not tested)&lt;br /&gt;
&lt;br /&gt;
(note4: shorts between NIM outputs are not tested)&lt;br /&gt;
&lt;br /&gt;
* check the board for shorts of power to ground. Use multimeter in &amp;quot;ohm&amp;quot; mode, measure resistance between &amp;quot;gnd&amp;quot; and &amp;quot;1.2V&amp;quot;, &amp;quot;-3.3V&amp;quot;, &amp;quot;VME +12V&amp;quot;, 2.5V&amp;quot; and &amp;quot;3.3V&amp;quot;. None should measure 0 ohm.&lt;br /&gt;
* set VME address jumper A20-23 to &amp;quot;1&amp;quot;, jumpers A24-27 and A28-31 to &amp;quot;0&amp;quot;&lt;br /&gt;
* set inputs and outputs to &amp;quot;NIM&amp;quot; mode&lt;br /&gt;
* connect JTAG USB blaster&lt;br /&gt;
* power up the board (standalone or in a VME crate)&lt;br /&gt;
* start Quartus programmer&lt;br /&gt;
* select correct USB blaster&lt;br /&gt;
* run &amp;quot;auto detect&amp;quot;, 3 devices should be detected: EP3C40Q240 (Cyclone3 FPGA), EPM1270 (parallel flash loader CPLD), EPM3032AT44 (VME address decoder CPLD)&lt;br /&gt;
* flash the VME address decoder pof file into the EPM3032 part (get pof file from here: https://ladd00.triumf.ca/viewvc/daqsvn/trunk/VME-NIMIO32/MAX3000A_Addr_decode/VME_Addr_decode.pof?view=log)&lt;br /&gt;
* (do not do this) flash the CFI parallel flash loader into the EPM1270 part (get pof file where?!?)&lt;br /&gt;
* load the VME-PPG32-IO32 firmware sof file into the EP3 part (get sof file here: https://ladd00.triumf.ca/viewvc/daqsvn/trunk/VME-NIMIO32/VME-NIMIO32/PPG32-Rev1/VME-PPG32.sof?view=log)&lt;br /&gt;
* run &amp;quot;vmescan_gef.exe&amp;quot;, it should detect the IO32 board at A24 VME address 0x00100000, data should correspond to the sof file revision date code&lt;br /&gt;
* confirm VME access LED is working (flashes during vme scan).&lt;br /&gt;
* confirm VME Data bus is okey: &amp;quot;./test_VMENIMIO32_gef.exe --addr 0x100000 --testbits 4&amp;quot;&lt;br /&gt;
* (do not do this) follow the firmware update instructions to flash the firmware pof file using the VME flash programmer at [[VME-NIMIO32#Firmware_update_procedure]] (get VME-PPG32-IO32 pof file from here: https://ladd00.triumf.ca/viewvc/daqsvn/trunk/VME-NIMIO32/VME-NIMIO32/PPG32-Rev1/VME-PPG32.pof?view=log)&lt;br /&gt;
* (do not do this) confirm FPGA reboot is working - &amp;quot;./test_VMENIMIO32_gef.exe --addr 0x100000 --reboot&amp;quot; prints 0xFFFFFFFF on the second read of firmware revision&lt;br /&gt;
* test NIM inputs and LEDs: use NIM pulse generator or any NIM module inverted output, connect to each NIM input, observe that corresponding &amp;quot;green&amp;quot; LEDs is lighting up&lt;br /&gt;
* test NIM outputs and LEDs: &amp;quot;./test_VMENIMIO32_gef.exe --addr 0x100000 --nimout 3 1 --pulsenim&amp;quot;, observe all &amp;quot;red&amp;quot; LEDs are flashing, connect NIM outputs to NIM scaler, observe scaler counts at each LED flash&lt;br /&gt;
* load PPG firmware into the active serial flash (follow instructions here: [[#Update_using_VME_flash_programmer_when_running_VME-PPG32-IO32_firmware]]&lt;br /&gt;
* unplug the board from VME, wait 10 sec, plug it back in, confirm that it is detected by vmescan if running VME-PPG32-IO32 firmware or test_a32 or PPG test tools if running the PPG firmware (confirms the flash memory contents is good)&lt;br /&gt;
&lt;br /&gt;
=== VME-PPG32-IO32 firmware ===&lt;br /&gt;
&lt;br /&gt;
The VME-PPG32 board can run a special version of VME-NIMIO32 firmware (subproject &amp;quot;PPG32-Rev1&amp;quot; of the VME-NIMIO32 firmware). For instructions, please refer to the [[VME-NIMIO32]] documentation.&lt;/div&gt;</summary>
		<author><name>Suz</name></author>
	</entry>
</feed>