PICFUNC

From ICE Enterprises
Jump to navigation Jump to search

ICE-PIC Enhanced Functions Primitive

 
<mode>		Algorithm (GSM,E1MUX,PACK,UNPACK,etc...)
<device>	Name of PIC device or (FILE,SOCKET)
<file>		Ram file (or pipe/file) 
<in/out 1:N>	Input/Output files 1:N
 
 
This command is the interface to the ICE-PIC running enhanced functions.
The functions share enough code to justify a single jacket for better reuse. 

In GSM mode, the IOC expects an E1 input stream.  The stream is synchronized,
and processed for E1 sync.  If found, blocks of 2k bits, or 8 E1 frames, are
restructured and packed as if 8bit, 4bit, 2bit, and 1bit data.  These four 
blocks are copied to the host, where multiple channels with arbitrary width 
and offset can be extracted with little CPU load.  

In E321/E1MUX mode, the IOC expects an E3 input stream.  The stream is 
processed for E3 sync.  If found, four E2 streams are extracted.  These
in turn are processed for sync and four E1s extracted from each E2.  The 16
E1s are processed for sync and output on frame boundaries.  E1 data is copied
to the host buffer in 32 bit packed words, each with a channel designator.  
The host then demultiplexes the 32 bit data words to the appropriate output.

In 8E1/E1MUX mode, the IOC expects 8 E1 clock and data lines. The 8 serial
streams are optionally processed for sync and output on frame boundaries.  
Data is copied to the host buffer in pairs of 32 bit packed words, oriented
as 32b channel number followed by 32b data word.  The host then demultiplexes 
the 32 bit data words to multiple continuous output streams.

To run 8E1 the IOC must be loaded with:  pic reset "alias" "8e1"
The IOPORT call must include the flag FLG_DUAL.  

The connector from LSB to MSB in 8E1 mode is:   
  dat0,clk0,dat1,clk1, ... dat7,clk7    with BIT=0 flag (default)
  clk0,dat0,clk1,dat1, ... clk7,dat7    with BIT=1 flag

In PACK mode, the routine expects packetized data from multiple instances of
SOURCEPIC with the /PACKET switch.  This Channelized data can be forwarded
via an PIC device output port, Midas file/pipe or socket.

In UNPACK mode, the routine expects packetized data from SOURCEPIC and SINKPIC
packet modes.  It demultiplexes the packets and sends the packet data to the
appropriate output pipe.  The packet header is removed unless /HDRS is applied.

Switches:
  /PORT
  /FLAGS
  /TL
  /BPF
  /REPLAY
  /FMODE
  /AFN=n	Auto generate N filenames as <in/out>#
  /RENUM	Renumber packet channel numbers to match pipe index
  /HDRS		Include packet headers in UNPACK output files
 
Control widgets:
		1. M:REPLAY MODE
		2. L:CURR CYCLE
		3. L:BPC
		4. L:BCO