<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.ice-online.com/index.php?action=history&amp;feed=atom&amp;title=ICE_Help_IOC</id>
	<title>ICE Help IOC - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.ice-online.com/index.php?action=history&amp;feed=atom&amp;title=ICE_Help_IOC"/>
	<link rel="alternate" type="text/html" href="https://wiki.ice-online.com/index.php?title=ICE_Help_IOC&amp;action=history"/>
	<updated>2026-06-13T10:21:05Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.1</generator>
	<entry>
		<id>https://wiki.ice-online.com/index.php?title=ICE_Help_IOC&amp;diff=563&amp;oldid=prev</id>
		<title>ConvertBot: Current IOC code algorithms</title>
		<link rel="alternate" type="text/html" href="https://wiki.ice-online.com/index.php?title=ICE_Help_IOC&amp;diff=563&amp;oldid=prev"/>
		<updated>2020-04-27T18:33:01Z</updated>

		<summary type="html">&lt;p&gt;Current IOC code algorithms&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;div style=&amp;quot;background-color: #eef9ff; border: 1px solid #999; padding: 10px;&amp;quot;&amp;gt;[[ICE_Help|&amp;amp;uarr; ''Go to the full list of ICE Help pages'']].&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;onlyinclude&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
'''Summary:''' Current IOC code algorithms&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This file contains a brief text description of the currently available code&lt;br /&gt;
downloads for the Altera IOC (I/O Controller) Chip.  Standard Input/Output&lt;br /&gt;
configurations handle packing/unpacking of 1|4|8|16 bit data words, gating,&lt;br /&gt;
triggering, embedded timecode, and module programming.&lt;br /&gt;
&lt;br /&gt;
The mux clock options are controlled by the MUXCLK=s flag. [[ICE_Help_FLAGS#MUXCLK|See Help on MUXCLK flag]].&lt;br /&gt;
&lt;br /&gt;
=== II - Mod1=StdInput Mod2=StdInput&amp;lt;span id=&amp;quot;II&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Standard input on modules 1 and 2 with standard input clocks.&lt;br /&gt;
&lt;br /&gt;
=== IIX - Mod1=StdInput Mod2=StdInput with mux clock&amp;lt;span id=&amp;quot;IIX&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Standard input on modules 1 and 2 with a common muxed input clock.&lt;br /&gt;
&lt;br /&gt;
=== IIR - Mod1=StdInput Mod2=StdInput with internally generated ramp&amp;lt;span id=&amp;quot;IIR&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Internally generated test ramps on input on modules 1 and 2 with a &lt;br /&gt;
common muxed input clock.&lt;br /&gt;
&lt;br /&gt;
=== IIS - Mod1=SDDSInput Mod2=SDDSInput with packet handlers&amp;lt;span id=&amp;quot;IIS&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The UDP module presents the ICE 8-byte sync.addr.port Header, SDDS Packet Header, and&lt;br /&gt;
SDDS Data, to the IOC running IIS or IOS to strip off the header, interpret timecode,&lt;br /&gt;
and unpack the data words for the proper tuner or module input.&lt;br /&gt;
&lt;br /&gt;
If the UOPT flag is included, the ICE and SDDS headers are not stripped off of the&lt;br /&gt;
module data acquired by the host.  They are always stripped off of the tuner input.&lt;br /&gt;
&lt;br /&gt;
=== IO - Mod1=StdInput Mod2=StdOutput&amp;lt;span id=&amp;quot;IO&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Standard input on module 1 with standard input clock.&lt;br /&gt;
Standard output on module 2 with muxed output clock.&lt;br /&gt;
&lt;br /&gt;
=== IOX - Mod1=StdInput Mod2=StdOutput with mux clock&amp;lt;span id=&amp;quot;IOX&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Standard input on module 1 with muxed input clock.&lt;br /&gt;
Standard output on module 2 with muxed output clock.&lt;br /&gt;
&lt;br /&gt;
=== OO - Mod1=StdOutput Mod2=StdOutput&amp;lt;span id=&amp;quot;OO&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Standard output on modules 1 and 2 with muxed output clock.&lt;br /&gt;
&lt;br /&gt;
=== OOY - Mod1=StdOutput Mod2=StdOutput with independent clocks&amp;lt;span id=&amp;quot;OOY&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== OOW - Mod1&amp;amp;2 internally generated white noise with timecode&amp;lt;span id=&amp;quot;OOW&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Standard output on modules 1 and 2 with muxed output clock.&lt;br /&gt;
The download internally generates identical white noise in both&lt;br /&gt;
channels with timecode on bit 0.  Module-1 outputs standard SDN &lt;br /&gt;
format timecode and Module-2 has double-clutch SDN timecode.&lt;br /&gt;
&lt;br /&gt;
=== T1 - Test internal loopback module 2 out to module 1 in&amp;lt;span id=&amp;quot;T1&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
=== T2 - Test internal loopback module 1 out to module 2 in&amp;lt;span id=&amp;quot;T2&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== E321 - Dual E3 to 16xE1 Demux w/ optional sync&amp;lt;span id=&amp;quot;E321&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
In E321/E1MUX mode, the IOC expects an E3 input stream.  The stream is&lt;br /&gt;
processed for E3 sync.  If found, four E2 streams are extracted.  These&lt;br /&gt;
in turn are processed for sync and four E1s extracted from each E2.  The 16&lt;br /&gt;
E1s are processed for sync and output on frame boundaries.  E1 data is copied&lt;br /&gt;
to the host buffer in 32 bit packed words, each with a channel designator.&lt;br /&gt;
The host then demultiplexes the 32 bit data words to the appropriate output.&lt;br /&gt;
 &lt;br /&gt;
=== 8E1 - Dual asynchronous 8 clock/data pairs&amp;lt;span id=&amp;quot;8E1&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
In 8E1/E1MUX mode, the IOC expects 8 E1 clock and data lines. The 8 serial&lt;br /&gt;
streams are optionally processed for sync and output on frame boundaries.&lt;br /&gt;
Data is copied to the host buffer in pairs of 32 bit packed words, oriented&lt;br /&gt;
as 32b channel number followed by 32b data word.  The host then demultiplexes&lt;br /&gt;
the 32 bit data words to multiple continuous output streams.&lt;br /&gt;
&lt;br /&gt;
To run 8E1 the IOC must be loaded with:  &lt;br /&gt;
 pic reset &amp;lt;card alias&amp;gt; &amp;quot;8e1&amp;quot;			from Midas&lt;br /&gt;
 pic_loadfile (p, &amp;quot;*_8e1&amp;quot;, FLG_IOC);		from C&lt;br /&gt;
&lt;br /&gt;
The IOPORT call must include the flag FLG_DUAL.&lt;br /&gt;
&lt;br /&gt;
The connector from LSB to MSB in 8E1 mode is defined as:&lt;br /&gt;
 dat0,clk0,dat1,clk1, ... dat7,clk7    with BIT=0 flag (default)&lt;br /&gt;
 clk0,dat0,clk1,dat1, ... clk7,dat7    with BIT=1 flag&lt;br /&gt;
&lt;br /&gt;
The KEY_IOCALG byte registers are as follows:&lt;br /&gt;
 KEY_IOCALG+0	datinv[7..0]  inverts the input data if channel bit is set&lt;br /&gt;
 KEY_IOCALG+1	clkinv[7..0]  inverts the input clock if channel bit is set&lt;br /&gt;
 KEY_IOCALG+2	usesync[7..0]  only output on frame boundaries where E1 sync found&lt;br /&gt;
 KEY_IOCALG+3	disable[7..0]  disables input if channel bit is set&lt;br /&gt;
&lt;br /&gt;
Use &lt;br /&gt;
 pic_setkey(p,dmac,KEY_IOCALG+0,datinv,1);&lt;br /&gt;
 pic_setkey(p,dmac,KEY_IOCALG+1,clkinv,1);&lt;br /&gt;
 pic_setkey(p,dmac,KEY_IOCALG+2,usesync,1);&lt;br /&gt;
 pic_setkey(p,dmac,KEY_IOCALG+3,disable,1);&lt;br /&gt;
&lt;br /&gt;
or if these four bytes are packed into 1 int_4 register,&lt;br /&gt;
 pic_setkey(p,dmac,KEY_IOCALG,&amp;amp;register,4);&lt;br /&gt;
or &lt;br /&gt;
 pic_setkeyl(p,dmac,KEY_IOCALG,register);&lt;br /&gt;
&lt;br /&gt;
=== GSM - Dual E1 channelizer/unpacker&amp;lt;span id=&amp;quot;GSM&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
In GSM mode, the IOC expects an E1 input stream.  The stream is synchronized,&lt;br /&gt;
and processed for E1 sync.  If found, blocks of 2k bits, or 8 E1 frames, are&lt;br /&gt;
restructured and packed as if 8bit, 4bit, 2bit, and 1bit data.  These four&lt;br /&gt;
blocks are copied to the host, where multiple channels with arbitrary width&lt;br /&gt;
and offset can be extracted with little CPU load.&lt;br /&gt;
 &lt;br /&gt;
=== FMDE - Handles framing of FMDE signals&amp;lt;span id=&amp;quot;FMDE&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Each sample of data and time code is packed and presented as 8 bytes.&lt;br /&gt;
Therefore, all data whether it be true data or time code is on an 8 byte&lt;br /&gt;
boundary when acquired.&lt;br /&gt;
A sample is determined to be valid if byte 4 (the 5th byte) is a non-zero value.&lt;br /&gt;
This non-zero value is the composite sync packed into 8 bits.  Bytes 0 through&lt;br /&gt;
4, in order, are NDU, DU, NSPU, SPU.&lt;br /&gt;
&lt;br /&gt;
If byte 4 is a zero, then the sample is time code.  The first 4 bytes &lt;br /&gt;
represent the time code in LSB to MSB order. This is different from an earlier&lt;br /&gt;
version that represented time code in MSB to LSB order within the 8 byte &lt;br /&gt;
time code long word. (long word = 8 bytes) &lt;br /&gt;
&lt;br /&gt;
For FMDE data (not Time Code), the Most Significant 3 Bytes contain a 24 bit &lt;br /&gt;
count-with the MSByte occurring in the MSByte of the 8 byte data long word.&lt;br /&gt;
This count represents the number of clocks from the detection of the latest &lt;br /&gt;
time code barker code.  In other words, this is the clock count from the &lt;br /&gt;
prior arriving time code.&lt;br /&gt;
&lt;br /&gt;
For FMDE time code, the Most Significant 3 Bytes contain a 24 bit count-with&lt;br /&gt;
the MSByte occurring in the MSByte of the 8 byte time code long word. This&lt;br /&gt;
represents the number of clocks from the detection of the PRECEDING time &lt;br /&gt;
code barker code.  In other words, this is the clock count from the prior &lt;br /&gt;
arriving time code.&lt;br /&gt;
 &lt;br /&gt;
In summary,&lt;br /&gt;
Byte order for 8 bytes of data,&lt;br /&gt;
1st BYTE					   8th Byte&lt;br /&gt;
NDU, DU,NSPU,SPU,CSYNC,LSB Count,MIDDLE Count,MSB Count  		     -- DATA&lt;br /&gt;
TC LSB BYTE,TC,TC,TC MSB BYTE,ZERO,LSB Count,MIDDLE Count,MSB Count  -- Time Code &lt;br /&gt;
&lt;br /&gt;
Because the ICE card interface is 16 bits the following bits are &lt;br /&gt;
assumed to contain FMDE data.&lt;br /&gt;
&lt;br /&gt;
Bit  4  Time Code&lt;br /&gt;
Bit  6  NDU  Stream&lt;br /&gt;
Bit  7  DU   Stream&lt;br /&gt;
Bit  8  NSPU Stream&lt;br /&gt;
Bit  9  SPU  Stream&lt;br /&gt;
Bit 10  CSYNC Stream&lt;br /&gt;
&lt;br /&gt;
Note-Bit 4 is the 5th bit. (Bit numbering-0,1,2,3,4,5,...,15)&lt;br /&gt;
Connecting the 10 bit FMDE cable to the 16 bit ICE transition&lt;br /&gt;
panel will yield correct bit connections.&lt;br /&gt;
&lt;br /&gt;
=== BP - Handles bit packing of 1,2,3,4,5,6,7 or 8 bit data&amp;lt;span id=&amp;quot;BP&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
In BitPack mode, the IOC expects 1 clock and 1-8 data lines. &lt;br /&gt;
Data is packed little endian into consecutive bytes.&lt;br /&gt;
&lt;br /&gt;
To run BP the IOC must be loaded with:  &lt;br /&gt;
 pic reset &amp;lt;card alias&amp;gt; &amp;quot;bp&amp;quot;			from Midas&lt;br /&gt;
 pic_loadfile (p, &amp;quot;*_bp&amp;quot;, FLG_IOC);		from C&lt;br /&gt;
&lt;br /&gt;
The connector from LSB to MSB in BP mode is:&lt;br /&gt;
 dat0, dat1 ... dat15   with BIT=0 flag (default)&lt;br /&gt;
 dat15, dat14 ... dat0  with BIT=1 flag&lt;br /&gt;
&lt;br /&gt;
Valid data bits are 0 to N-1 for N bit data.&lt;br /&gt;
&lt;br /&gt;
The KEY_IOCALG byte register is used as follows:&lt;br /&gt;
 reg.bits[2..0]  number of valid bits (1-8) minus 1&lt;br /&gt;
&lt;br /&gt;
Use pic_setkey(p,dmac,KEY_IOCALG,register,1); to set the word width.&lt;br /&gt;
&lt;br /&gt;
Setting the BIGE flag reverses the bit order of the output byte.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The Standard Input/Output configurations are loaded automatically during a&lt;br /&gt;
pic_reset according to the specified module configuration.  The non-standard&lt;br /&gt;
IOC downloads can be performed during a reset using the IOC=xxxx flag, or &lt;br /&gt;
after a reset by calling pic_loadfile.  From Midas, this is an optional &lt;br /&gt;
parameter on PICDRIVER, ie: PICD RESET PIC1 8E1&lt;br /&gt;
&lt;br /&gt;
For PIC5 and later cards, the IOC= setting is not actually a FPGA download file,&lt;br /&gt;
but a register setting in the SoC download to implement that function.&lt;br /&gt;
The specific algorithms E321 ... BP would be handled in FPGA cores loaded onto&lt;br /&gt;
processor modules or the main board in some cases.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/onlyinclude&amp;gt;&lt;br /&gt;
[[Category:ICE_Help]]&lt;/div&gt;</summary>
		<author><name>ConvertBot</name></author>
		
	</entry>
</feed>