19/9/2000 First draft GKP 1.0
21/9/2000 Second draft GKP 1.1
30/4/2001 Converted to new form and added spectrum GKP 2.0
22/2/2005 Clarified JP1 function GKP 2.1
The SMT356 is a size 1 TIM offering the following features;-
Four communications ports for control
8 channel, 14-bit simultaneous sample ADC
High bandwidth data output via a single 16-bit SDB (Sundance Digital Bus)
Notes:
Within the drawings, DIP Switch refers to Jumper Bank 1.
The SMT356 (356) module is a single width TIM device.
It incorporates a Xilinx XCV300 Virtex FPGA.
Eight 14-bit ADCs interface to the Virtex device, together with six ‘C40 style comm
ports.
Version 2.1 Page 5 of 26 SMT356356 User Manual
EMC
This module is designed to operate from within an enclosed host system, which is
built to provide EMC shielding. Operation within the EU EMC guidelines is not
guaranteed unless it is installed within an adequate host system.
This module is protected from damage by fast voltage transients originating from
outside the host system which may be introduced through the output cables.
Short circuiting any output to ground does not cause the host PC system to lock up
or reboot.
Power
This module must be fixed to a TIM40 compliant carrier board. Additionally, a 3v3
power source must be provided to the fixings. This is normally achieved by means of
a power source provided directly through conducting pillars on the carrier board.
Power for the analog components on this module is provided by on-board dc-dc
converters. All of the analog circuitry is shielded on the top and bottom of the module
using custom RFI shielding cans.
Version 2.1 Page 6 of 26 SMT356356 User Manual
ADC Sub-System
This consists of 8 Analog Devices AD9240 converters. These provide an overall
system performance with an ENOB of 12 (minimum) for each of the eight channels.
All ADCs simultaneously sample using the same clock.
Input Level
The input to the ADC module is DC coupled with a pk-pk level of 2v. This is centred
about 0v.
Vmin=-1v
Vmax=+1v.
Output Codes
The converted samples are presented on the SDB connector as 16 bit offset binary.
Code 0x0000 is equivalent to –Vmax
Code 0x8000 is equivalent to 0V
Code 0xFFFC is equivalent to +Vmax
The two least significant bits of the output word are undefined and should be masked
by the user.
Version 2.1 Page 7 of 26 SMT356356 User Manual
ADC Control
All of the ADCs are controlled via one of the six available ‘C40 style comm ports. The
desired comm port must be selected using the jumper bank JP1.
JP1 – positions 5-7 Comm Port
7 6 5
ON ON ON 0
ON ON OFF 1
ON OFF ON 2
ON OFF OFF 3
OFF ON ON 4
OFF ON OFF 5
This interface contains a single control register. This controls the clock divider, clock
enable, ADC enable and the state of the four LEDs. This register is described here,
Bit D20 of this register controls the ADC clock enable via software. A ‘1’ enables the
ADC, or generates a rising edge trigger (depending on clock enable mode). The
power-on state of this bit is ‘0’.
Bit D21 controls the clock enable mode. A ‘0’ selects latched counter mode, a ‘1’
selects direct control. The power-on state of this bit is ‘0’.
Version 2.1 Page 8 of 26 SMT356356 User Manual
D31-24 determines the number of samples in clock enable mode ‘0’. The range is
from 1-256. The value loaded into bits 31-24 is the required sample count –1. A value
of 0 gives 1 sample, a value of 0xFF gives 256 samples.
Note that the sample count should be changed before the acquisition is triggered.
Bits D15-8 control the enabled state of the 8 ADCs. The power-on state is a ‘1’ for
each bit, indicating that all channels are enabled. Setting a bit to a ‘0’ will remove that
ADC’s output from appearing in the SDB data stream.
Programmable Clock Divider
An 8-bit divider is provided which allows the ADC clock to be provided from a divided
clock. The following table shows the possible values,
Sampling rates of 50, 25, 16.6 and 12.5 are not allowed.
Version 2.1 Page 9 of 26 SMT356356 User Manual
The divider can be bypassed in order to get a division of 1. This is achieved as
follows,
JP1 – position 3
OFF ON
Divider bypass Divider enable
Note that selecting divider bypass is not compatible with using the
internal clock as this would attempt to clock the ADCs at 100MHz.
The programmable divider power on default setting is to divide by 2.
Version 2.1 Page 10 of 26 SMT356356 User Manual
K
Sample Clock Routing
OUTPUT
SAMPLE CLOC
MUX
DIVIDER
PROGRAMM ABLE
TO ADC s
3
DIP Switch
SDB CLOCK
MUX
4
DIP Switch
MUX
SAMPLE CLOCK
EXTERNAL 0-10MHz
1
DIP Switch
100M Hz
OSCILLATOR
DIV BY 2
Version 2.1 Page 11 of 26 SMT356356 User Manual
Connector Position
Jumper Bank JP1
Version 2.1 Page 12 of 26 SMT356356 User Manual
Version 2.1 Page 12 of 26 SMT356356 User Manual
Input Circuitry Input Circuitry
Version 2.1 Page 13 of 26 SMT356356 User Manual
Virtex
The main component which controls the operation of the module is a Virtex FPGA
from Xilinx. This device is volatile in nature, and requires reconfiguring every time the
module is powered on. The configuration data (bitstream) must be presented through
comm port 3.
The bitstream is supplied on the distribution disk as ‘smt356.mcs’. This is an ASCII
text file and a function for configuring is supplied. This function makes use of stdio file
operations.
When this module is used with a TIM with large flash memory, then the configuration
can be stored in this memory and this operation is therefore much faster. Eg. The
SMT332 may be ordered with the 356 configuration in flash memory and a simpler
function is used to configure the Virtex.
When the module is not configured, LED5 will be illuminated. Upon successful
configuration, LED5 will extinguish.
SDB
The sampled data is output on an SDB (Sundance Digital Bus) connector. This is
simple yet versatile bus system, with a protocol for bi-directional data transfer. The
SDB implementation on this module is as an output only.
Once the sample clock is enabled, all ADCs are sampled at the same time at a
frequency selected by Jumper Bank position 1 and/or the divider.
The 14 bit samples occupy the higher 14 bits of the SDB word. Bits 0 and 1 are
undefined.
The sampled data is presented, one channel at a time, to the most significant 14 data
bits of the SDB connector. This data will be transmitted on the SDB as a packet with
the WEN signal active (low) for the whole packet.
The sample data is buffered within a 256 word FIFO.
The maximum sampling rate per ADC is 10MHz, which indicates that the maximum
SDB word rate would be 80MHz. The SMT356 module allows for the SDB word rate
to be set to either 50 or 100MHz as follows,
JP1 – position 4
OFF ON
SDB=100MHz SDB=50MHz
A lower word rate may be needed where the receiving device is not able to sustain
the faster transfer speed.
If the sampled data rate (number of channels enabled x sample rate) is in excess of
the SDB data rate (50 or 100MHz), then the module’s internal FIFO will fill up. When
the FIFO has become full, LED1 will illuminate but the module will still process data.
The LED will remain illuminated until a control word with bit D23 set is received. Note
that this bit needs to be cleared before proper operation can be resumed.
At a sample rate of 5MHz with all channels enabled, the standard 50MHz SDB data
rate is sufficient to operate without FIFO filling problems.
Notes:
The SDB bi-directional functionality is not supported on this module.
The ACK signal on the SDB connector is not used.
The user defined pin UD0 is not used, UD1 is driven high (when connected to
an SMT332, UD1 is the FIFO partial reset).
The write enable pin (WEN) is driven active (low) by the SMT356 when it is
transmitting data on the SDB.
Version 2.1 Page 16 of 26 SMT356356 User Manual
Clock Enable
The clock enable (ADC sample enable) is controlled from either the external enable
input or from an enable register. The selection is made as follows,
JP1 – position 2
OFF ON
External enable Internal enable
register
The external enable input has a pull-up resistor to the active state. So, if the module
was to be permanently enabled, then Jumper Bank-2 should be in the ON position
and the clock enable input left unconnected.
The clock enable mode is selected by bit D21 of the control register. With this bit set
to ‘0’, the external clock enable rising edge is used to start a counter which in turn
allows the ADC to be enabled for a pre-set number of samples. The sample count is
set in the control register bits D31-24. If control register bit D21 is set to '1’, then the
external clock enable is routed directly to the ADC and samples will therefore be
taken so long as this signal remains active (‘1’). This is shown diagrammatically in the
following figure.
Clock Source
The sample rate of the converters is derived from one of two sources. Either from an
external clock input or via the on-module reference. The selection is made as follows,
JP1 – position 1
OFF ON
External clock Internal clock
The maximum external clock frequency is 10MHz. This should be TTL compatible.
In either mode, the selected clock is passed through a programmable divider and
then output to a connector.
Version 2.1 Page 17 of 26 SMT356356 User Manual
FOR ADCs
CLOCK ENABLE
MUX
MUX
DIP Switch
bit D21
LATCH
SAMPLE
COUNTER
START
VALUE
ENABLE
COUNTER
2Control Register
ENABLE INPUT
EXTERNAL CLOCK
bit D20
Control Register
bits D31-24
Control Register
SAMPLE CLOCK
Version 2.1 Page 18 of 26 SMT356356 User Manual
Example Code
Configure Virtex
(included in file scope356.c)
Open Virtex configuration file
if (!( fp = fopen("smt356.mcs","rb") )) {
printf("Could not open smt356.mcs file.\n");
exit(0);
}
if (record_type==0) { // data record
record_decoded=1;
for(i=0;i<(byte_count/4);i++) {
load_word =hex2dec(fgetcc(fp))<<4;
load_word+=hex2dec(fgetcc(fp))<<0;
This little application runs under SMT6000. It demonstrates the quick method to
configure the Virtex from flash memory on the SMT332. The application displays all 8
channels in an oscilloscope type display on the SMT6000 graphical window.
Include this because we are going to do printf.
#include <stdio.h>
volatile unsigned int *comm_status, *comm0_data;
This is a function which converts an ASCII hex character into binary.
This bit is necessary to ensure that the hardware of the SMT332 is in a known good
state.
// set mux signal to known state
for(i=0;i!=16;i++);
*emifce3=0xffff3f23;
for(i=0;i!=16;i++);
fifobase=(unsigned *)0x0300c000;
*fifobase=temp;
fifobase=(unsigned *)0x03008000;
*fifobase=temp;
fifobase=(unsigned *)0x0300c000;
*fifobase=temp;
for(i=0;i!=16;i++);
*emifce3=0x00000030;
for(i=0;i!=16;i++);
Here we go with the main application.
//
// start of scope loop
//
pass=0;
Select a full capture size of 256 samples.
samples=256;
Enable all channels. Remember there is one enable bit for each channel.
channels=255;
active_channels=8;
Set the clock divider to 10.
divider=10;
Version 2.1 Page 24 of 26 SMT356356 User Manual
while(1) {
The leds variable is just used to show action on the SMT356’s LEDs.
leds=pass++;
if(pass==16) pass=0;