/* ######################################################################## DESCRIPTION ######################################################################## The "eLink" is a low latency chip to chip interface used by for communication between Epiphany chips and FPGAs. The interface "should" achieve a peak throughput of 8 Gbit/s in FPGAs with 24 available LVDS signal pairs. TRANSMIT SIGNAL | DESCRIPTION ---------------|-------------- TXO_FRAME | Packet framing signal. Rising edge signals new packet. TXO_LCLK | A clock aligned in the center of the data eye TXO_DATA[7:0] | Dual data rate (DDR) that transmits packet TXI_RD_WAIT | Push back signal for read transactions TXI_WR_WAIT | Push back signal for write transactions RECEIVE The elink has a 64 bit data AXI master and 32-bit data AXI slave interface for connecting to a standard AXI network. PACKET SUBFIELD | DESCRIPTION ----------------|---------------- access | Indicates a valid packet write | A write transaction. Access & ~write indicates a read. datamode[1:0] | Datasize (00=8b,01=16b,10=32b,11=64b) ctrlmode[3:0] | Various packet modes for the Epiphany chip dstraddr[31:0] | Address for write, read-request, or read-responses transaction data[31:0] | Data for write transaction, return data for read response srcaddr[31:0] | Return address for read-request, upper data for 64 bit write PACKET-FORMAT: The elink was born out of a need to connect multiple Epiphany chips together and uses the eMesh 104 bit atomic packet structure for communication. The eMesh atomic packet consists of the following sub fields. FRAMING: The number of bytes to be received is determined by the data of the first “valid” byte (byte0) and the level of the FRAME signal. The data captured on the rising edge of the LCLK is considered to be byte0 if the FRAME control captured at the same cycle is high but was low at the rising edge of the previous LCLK cycle (ie rising edge). The cycle after the last byte of the transaction (byte8 or byte12) will determine if the receiver should go into data streaming mode based on the level of the FRAME control signal. If the FRAME signal is low, the transaction is complete. If the FRAME control signal stays high, the eLink goes into “streaming mode”, meaning that the last byte of the previous transaction (byte8 or byte12) will be followed by byte5 of the new transaction. PUSHBACK: The WAIT_RD and WAIT_WR signals are used to stall transmission when a receiver is unable to accept more transactions. The receiver will raise its WAIT output signal on the second rising edge of LCLK input following the capturing rising edge of the last transaction byte (byte8 or byte12) but will be ready to accept one more full transaction (byte0 through byte8/byte12). The WAIT signal seen by the transmitter is assumed to be of the “unspecified” phase delay (while still of the LCLK clock period) and therefore has to be sampled with the two-cycle synchronizer. Once synchronized to the transmitter's LCLK clock domain, the WAIT control signals will prevent new transaction from being transmitted. If the transaction is in the middle of the transmission when the synchronized WAIT control goes high, the transmission process is to be completed without interruption. The txo_* interface driven out from the E16G301 uses a divided version of the core cock frequency (RXI_WE_CCLK_{P,N}). The transmit clock is automatically aligned in the middle of the data eye by the eLink on chip transmit logic. The receiver logic assumes the clock is aligned at the center of the receiver data eye. The “wait” signals are used to indicate to the transmit logic that no more transactions can be received because the receiver buffer full. ######################################################################## ELINK MEMORY MAP ######################################################################## The elink has an parameter called 'ELINKID' that can be configured by the module instantiating the elink. REGISTER | ADDRESS | NOTES ------------| -------------|------ ESYSRESET | 0xF0000 | Soft reset ESYSTX | 0xF0004 | Elink tranmit config ESYSRX | 0xF0008 | Elink receiver config ESYSCLK | 0xF000C | Clock config ESYSCOREID | 0xF0010 | ID to drive to Epiphany chip ESYSVERSION | 0xF0014 | Platform version ESYSDATAIN | 0xF0018 | Direct data from elink receiver ESYSDATAOUT | 0xF001C | Direct data for elink transmitter ESYSDEBUG | 0xF0020 | Various debug signals --------------------------------------------------------------------------- EMBOXLO | 0xC0004 | Lower 32 bits of 64 bit wide mail box fifo EMBOXHI | 0xC0008 | Upper 32 bits of 64 bit wide mail box fifo --------------------------------------------------------------------------- ESYSMMURX | 0xE0000 | Start of receiver MMU lookup table ESYSMMUTX | 0xD0000 | Start of transmit MMU lookup table (tbd) ######################################################################## ELINK CONFIGURATION REGISTER (32bit access) ######################################################################## ------------------------------------------------------------- ESYSRESET ***Elink reset*** [0] 0 - elink active 1 - elink in reset ------------------------------------------------------------- ESYSTX ***Elink transmitter configuration*** [0] 0 - link TX disable 1 - link TX enable [1] 0 - normal pass through transaction mode 1 - mmu mode [3:2] 00 - normal mode 01 - gpio drive mode 10 - reserved 11 - reserved [7:4] Transmit control mode for eMesh [8] AXI slave read timeout enable ------------------------------------------------------------- ESYSRX ***Elink receiver configuration*** [0] 0 - link RX disable 1 - link RX enable [1] 0 - normal transaction mode 1 - mmu mode [3:2] 00 - normal mode 01 - gpio sample mode (drive rd wait pins from registers) 10 - reserved 11 - reserved ------------------------------------------------------------- ESYSCLK ***Elink clock setting*** [0] Enable CCLK [1] Enable TX_LCLK [2] CCLK PLL bypass mode (cclk is set to clkin) [3] LCLK PLL bypass mode (lclk is set to clkin) [7:4] CCLK PLL Divider (1< Contributed by Fred Huettig Contributed by Roman Trogan This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program (see the file COPYING). If not, see . */