Microcontroller, Interface description, Source – Sundance SMT148 User Manual
Page 23: Interface description source
Version 1.4
Page 23 of 35
SMT148 User Manual
Microcontroller
The microcontroller brings great flexibility to this carrier card by enabling USB,
Firewire and UART (RS485/RS232) external communications. Its interface inside the
FPGA is directly connected to the switch fabric and must therefore comply with the
input node and output node descriptions.
Interface description
The microcontroller is connected to the FPGA on the carrier card with the following
signals:
DATA
input/output 8-bit data bus, bidirectional
ADDRESS
input
12-bit address bus
NWE
input
Write enable, active low
NOE
input
Output enable, active low
NCS2
input
Chip select, active low
The microcontroller is the master device and sees the FPGA as an addressable
memory space. There is no interrupt signal available between the two devices and in
order to catch any event the microcontroller will poll the interrupts from the FPGA
regularly.
Source
As an input to the switch fabric the microcontroller interface can access any
destination resource connected to the switch fabric. The microcontroller is able to
convey data from a USB, Firewire or RS485/232 connection. When initiating a new
transfer, the microcontroller should signal where the data are coming from, how much
data there is and what the final destination for these data will be.
The first 32-bit word expected by the interface contains information about the transfer
type and the amount of data that need to be transferred to the switch fabric. This
word needs to be sent to address h000
Bit 31: never ending transfer if 1. This setting can be useful when the connection
needs to always be enabled such as the microcontroller is streaming data to the DAC
without stopping. This bit must be set to 0 if the microcontroller interface needs to be
dynamically reconnected to another node at some stage.
Bit 29 down to 28: Transfer type, RS232=”00”, RS485=”01”, USB=”10”, Firewire=”11”
Bit 25 down to 0: This is the total number of bytes that will be sent to the
microcontroller interface (excluding this word). This gives a maximum transfer length
of 2^26-1 bytes (64Mbytes). When the microcontroller interface has received all data
it expected, it will go in an idle state for 2us before starting a new transfer if instructed
to do so. This setting is ignored if bit 31 is set to 1.
Please note that all nodes connected to the switch fabric transmit and receive
information based on 32-bit words. All the remaining words part of this transfer will be
sent to address h001.
The second 32-bit word sent to the interface and passed to the switch fabric is the
destination address (coded on the LSB, all other bytes must be set to 0). It can