<?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_SRVICE</id>
	<title>ICE Help SRVICE - 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_SRVICE"/>
	<link rel="alternate" type="text/html" href="https://wiki.ice-online.com/index.php?title=ICE_Help_SRVICE&amp;action=history"/>
	<updated>2026-08-20T16:23:26Z</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_SRVICE&amp;diff=573&amp;oldid=prev</id>
		<title>ConvertBot: Script based ICE application</title>
		<link rel="alternate" type="text/html" href="https://wiki.ice-online.com/index.php?title=ICE_Help_SRVICE&amp;diff=573&amp;oldid=prev"/>
		<updated>2020-04-27T18:33:05Z</updated>

		<summary type="html">&lt;p&gt;Script based ICE application&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:''' Script based ICE application&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This file contains a text description of the application srvice.c located&lt;br /&gt;
in the test subdirectory of the ICE tree.  It is a C program that reads in&lt;br /&gt;
simple script files to control basic functions of an ICE card including&lt;br /&gt;
configuration, reset, dma, fileIO, and status.&lt;br /&gt;
&lt;br /&gt;
If the filename has the form  port=xxxx, a network socket is setup on the&lt;br /&gt;
specified port to receive command lines from a remote client.&lt;br /&gt;
&lt;br /&gt;
The script files treat any line starting with a !, /, or &amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; as a comment.&lt;br /&gt;
White space is trimmed from the front and back of each line.&lt;br /&gt;
Tokens are delimited by a white space, usually 2 or 3 per line.&lt;br /&gt;
The first token is the command followed by 1 or more arguments.  &lt;br /&gt;
Valid commands and their arguments are:&lt;br /&gt;
&lt;br /&gt;
 CARD N config		! defines configuration of card number N&lt;br /&gt;
 RESET N1 N2	 	! reset cards N1 through N2&lt;br /&gt;
 DMA M config		! defines configuration of DMA channel M&lt;br /&gt;
 CORE M config		! run the configured CORE setup parameters on DMA channel M&lt;br /&gt;
 LOADFC M file		! load the filter coefficients onto DMA channel M &lt;br /&gt;
 START M1 M2		! starts DMA channels M1 through M2&lt;br /&gt;
 PAUSE sec		! pause the indicated number of seconds&lt;br /&gt;
 WAIT M		! wait for DMA channel M to complete&lt;br /&gt;
 STOP M1 M2		! stops DMA channels M1 through M2&lt;br /&gt;
 SET M keyname value	! set run time parameter&lt;br /&gt;
 GET M keyname value	! get run time parameter&lt;br /&gt;
&lt;br /&gt;
The CARD and DMA indices N and M can be 0 or 1 based.&lt;br /&gt;
&lt;br /&gt;
The CARD config string is stored by index for use in the RESET and DMA commands.&lt;br /&gt;
The string is passed as is to the RESET routine, and substituted for the CARD=N&lt;br /&gt;
in the DMA command config string.  This config string is passed to pic_open() &lt;br /&gt;
for that operation.&lt;br /&gt;
&lt;br /&gt;
The RESET command performs a pic_reset() on card indices N1 through N2.  &lt;br /&gt;
If N2 is not supplied, it defaults to N1.&lt;br /&gt;
&lt;br /&gt;
The DMA command sets up a DMA channel operation.  The config string contains a &lt;br /&gt;
list of flags using a key=value syntax to define the operation.  &lt;br /&gt;
Pertinent flags are:&lt;br /&gt;
&lt;br /&gt;
 CARD=N		! config string for card N is inserted here&lt;br /&gt;
 PORT=port		! port on card to use (ie. MODULE1,TUNER2,TBANK21)&lt;br /&gt;
 RATE=rate		! sample rate in Hertz&lt;br /&gt;
 BITS=bits		! sample size in bits&lt;br /&gt;
 LENGTH=len		! length of circular memory buffer in seconds (def=1)&lt;br /&gt;
 FREQ=freq		! center frequency int Hertz for tuner&lt;br /&gt;
 DEC=dec		! decimation for tuner (def=1)&lt;br /&gt;
 GAIN=gain		! gain in dB for tuner (def=0)&lt;br /&gt;
 DIR=io		! direction of transfer (-1=input 1=output) (def=-1)&lt;br /&gt;
 XFER=xlen		! transfer length in bytes&lt;br /&gt;
 SKIP=skip		! only capture every skip frames where frame=XFER &lt;br /&gt;
 FUNC=func		! argument to pic_dmafunc() (-2=continuous, &amp;gt;0=&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt;passes)&lt;br /&gt;
 FILE=filename		! filename to write into or read from&lt;br /&gt;
 PKT=pktype		! output pktype=ICE|SDDS|VRT packets (FILE=udp:address)&lt;br /&gt;
&lt;br /&gt;
A list of all flags available may be found in flags.hlp.&lt;br /&gt;
These include CFIR, PFIR, and RFIR for loading filter taps.&lt;br /&gt;
&lt;br /&gt;
The CORE command runs the setup for a CORE as described by the ICECORE paradigm.&lt;br /&gt;
The syntax for this may be found in jvcc.hlp.&lt;br /&gt;
&lt;br /&gt;
The LOADFC command loads the filter coefficients found in the file into the designated&lt;br /&gt;
tuner of filter core.  The tuner filter location CFIR, RFIR, or PFIR is determined by&lt;br /&gt;
the filter length.&lt;br /&gt;
&lt;br /&gt;
The START command starts a thread for each dma indices M1 through M2.  &lt;br /&gt;
If M2 is not supplied, it defaults to M1.&lt;br /&gt;
&lt;br /&gt;
The PAUSE command pauses the script for the specified number of seconds.&lt;br /&gt;
This is intended to be used for testing purposes only.&lt;br /&gt;
&lt;br /&gt;
The WAIT command waits for a thread for dma on index M to complete.  &lt;br /&gt;
If M = -1, it waits for a user keypress.&lt;br /&gt;
&lt;br /&gt;
The STOP command stops the thread performing a dma on indices M1 through M2.  &lt;br /&gt;
If M2 is not supplied, it defaults to M1.&lt;br /&gt;
&lt;br /&gt;
The SET and GET commands will set or get any of the named keys found in keys.hlp.&lt;br /&gt;
If keyname begins with '0x', it is assumed to be a core control register offset for that DMA channel.&lt;br /&gt;
&lt;br /&gt;
At the end of the script, all cards are closed before exiting.&lt;br /&gt;
&lt;br /&gt;
Here is an example script:&lt;br /&gt;
&lt;br /&gt;
!!!!!!!!!!!!!!!!!!!!!!!!!&lt;br /&gt;
! Example srvice script&lt;br /&gt;
! CARD=x in DMA subs that into config&lt;br /&gt;
!!!!!!!!!!!!!!!!!!!!!!!!!&lt;br /&gt;
CARD 0 ICEPIC,DEVNO=0,IOM1=LB2DR3,IOM2=D2AWGR3,MUXCLK=P,&lt;br /&gt;
CARD 1 ICEPIC,DEVNO=2,IOM1=LB2DR3,IOM2=D2RF,MUXCLK=P,&lt;br /&gt;
RESET 0 1&lt;br /&gt;
DMA 0 CARD=0,PORT=PM0TUNER1,RATE=100e6,BITS=-16,LENGTH=1,DEC=4,MBITS=-16,RFFREQ=950,RFBW=40,RFGAIN=15,RFOPTS=(ENABLE|DCS|AIS|LNA|XREF),XMTGO,TC=CPUP0&lt;br /&gt;
DMA 1 CARD=0,PORT=MODULE2,RATE=25e6,BITS=-16,LENGTH=1,DIR=1,RFFREQ=70,RFATTEN=0&lt;br /&gt;
DMA 2 CARD=1,PORT=PM0TUNER1,RATE=100e6,BITS=-16,LENGTH=1,DEC=4,MBITS=-16,RFFREQ=950,RFBW=40,RFGAIN=15,RFOPTS=(ENABLE|DCS|AIS|LNA|XREF),XMTGO,TC=CPUP0&lt;br /&gt;
DMA 3 CARD=1,PORT=MODULE2,RATE=25e6,BITS=-16,LENGTH=1,DIR=1,RFFREQ=70,RFATTEN=0&lt;br /&gt;
START 0 3&lt;br /&gt;
PAUSE 1&lt;br /&gt;
SET 0 FREQ 1.23e6&lt;br /&gt;
PAUSE 1&lt;br /&gt;
SET 0 GAIN -6&lt;br /&gt;
WAIT&lt;br /&gt;
STOP 0 3&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>