OptoRing.

The OptoRing module is the standard communication tool in the system. It is based on a Agilent 1300nm multimode receiver/transmitter pair directly coupled to a FPGA based  serial tranceiver running 200Mb/s.

 

The OptoRing modules are organized in ring-shaped clusters, with 2-32 modules, allowing packets of organized data to be sent from any one module to another.

 

Data packets are either:

 

·         message type single character data for command/status information, or

·         packets carrying 32bit organized bulk data for pixel data

 

Register layout:

 

Offset              Read                                        Write

---------------------------------------------------------------------------------------

0x00                RX-data(31..0)                        TX-data(31..0)

0x04                status(31..0)                            command(7..0)

0x08                rx-character(7..0)                     tx-character(7..0)

0x0C               RXchar origin address(7..0)    Destination address(7..0)

0x10                RX pixel counter(19..0)          Pixel counter treshold value(9..0)

0x14                RX timer counter(7..0)            RX timeout value(7..0)

0x18                RX load(7..0)                          reserved

0x1C               reserved                                   reserved

--

0x20                RX Memory pt(31..0)             RX Memory pt(31..0)

0x24                RX Memory pt mask(31..0)    RX Memory pt mask(31..0)

0x28                reserved

0x2C               reserved

--

0x30                Memory read pt(31..0)            Memory read pt(31..0)

0x34                reserved

0x38                reserved

0x3C               reserved

---------------------------------------------------------------------------------------

 

0x00:   Registered RX- and TX- data

 

To be continued...............

 

0x04:   Status- and Command- registers

 

The bit definition for the status register ( offset 0x04 ) is as follows:

 

status(0):         RW                  OptoRing on/off ( off force all bits to '0')

status(1):         WO                 clear timer- and pixel- counters

status(2):         reserved           no function

status(3):         RW                  Master                         interrupt enable

status(4):         RW                  RX char ready                         interrupt enable

status(5):         RW                  TX char busy               interrupt enable

status(6):         RW                  Pixel counter threshold           interrupt enable

status(7):         RW                  RX timeout                 interrupt enable

status(8):         RW                  Orange LED   for test

status(9):         RW                  Yellow LED   for test

status(15 downto 10):             reserved           no function

 

status(16)        RO                  RX char ready

status(17)        RO                  TX char busy

status(18)        RO                  Pixel counter treshold

status(19)        RO                  rx timeout

status(20)        RO                  Carrier detect  Active high

status(21)        RO                  Framing detect Active high

status(31 downto 22): RO      allways '0'

 

All bits power up as '0' and are active high.

 

The lower 16 bits can be operated one by one by the command register. Bits 0 - 3 points to the bit that is to be modified and bit7 is the value to be inserted.

 

0x08:   Character RX- and TX- registers

 

To be continued...............

 

0x0C:  OptoRing source and destination address registers

 

Every OptoRing module has a uniq 8 bit address, where the lower 3 bits is set to zero and the upper 5 bits set by jumpers on the board. Before any communication can start, the host must write the address of the destination  OptoRing module into the destination address register ( offset 0x0C ).

 

0x10:   RX pixel counter operation registers

 

To be continued...............

 

0x14:   RX timer counter operation registers

 

To be continued...............

 

0x18:   OR-load register 

 

To be continued...............

 

 

General description

 

The OptoRing module is always operated by this set of registers no matter what platform it is running on. The communication is fully symmetric, - the transmission and receiption of works in the same way and with the same speed.

 

Two kinds of data are available, single character (8 bits) with full handshake,  and stream-data ( 32-bit) with limited check. The two datatypes are handled by the OptoRing fully transparent.

 

 

Character communication.

 

·         When a character is written into the lower 8 bits of the tx_char register ( offsett 0x08 ) the tx_char_busy flag ( status bit 4) is set immidiately.

·         When the character arrives in the reciever the rx_char_rdy flag ( status bit 5) is set.

·         When the character is read from the rx_char register ( offsett 0x08 ), the rx_char_rdy flag is cleared, and a character acknowledge command is sent to the transmitter which in turn clears the tx_char_busy flag in the initiating transmitter

 

Stream data communication.

 

·         32 bit dwords of data can be written into the transmitter either by a write cycle to the tx_data register ( offsett 0x00) , or by clocking data into the high speed input port of the OptoRing module.

·         32 bit dwords of data can be read from the reciever either by a read cycle from the rx_data register ( offsett 0x00) , or by clocking data out from the high speed output port of the OptoRing module.

 

The user should monitor the RXH_empty flag ( status bit 6), and if cleared read the RXH_usedw word to gain information about the amount of data ready to be read.

 

The camera uses the HS input port, to put pixel data into the transmitter, and the data could be read from the reciever, either by reading data from the rx_data register, or by initiating a DMA transfer taking advantage of the HS output port.