From 9e931c47ec00abe9c6cbfb71b06920835ad151ea Mon Sep 17 00:00:00 2001 From: Andreas Olofsson Date: Sat, 18 Apr 2015 16:26:32 -0400 Subject: [PATCH] Cleanup --- elink/README.md | 26 ++-- elink/hdl/elink.v | 369 +++++++++++++++++++++++++-------------------- elink/hdl/ereset.v | 4 +- elink/hdl/erx.v | 2 +- elink/hdl/erx_io.v | 4 +- 5 files changed, 222 insertions(+), 183 deletions(-) diff --git a/elink/README.md b/elink/README.md index b745cef..d9e0b54 100644 --- a/elink/README.md +++ b/elink/README.md @@ -92,19 +92,19 @@ REGISTER |ADDRESS |NOTES ----------|---------|-------------------------------------------- - ELRESET | 0xF0000 | Soft reset - ELTX | 0xF0004 | Elink tranmit config - ELRX | 0xF0008 | Elink receiver config - ELCLK | 0xF000C | Clock config - ELCOREID | 0xF0010 | ID to drive to Epiphany chip - ELVERSION | 0xF0014 | Platform version - ELDATAIN | 0xF0018 | Direct data from elink receiver - ELDATAOUT | 0xF001C | Direct data for elink transmitter - ELDEBUG | 0xF0020 | Various debug signals - EMBOXLO | 0xF0024 | Lower 32 bits of 64b wide mail box fifo - EMBOXHI | 0xF0028 | Upper 32 bits of 64b wide mail box fifo - EMMURX | 0xE0000 | Start of receiver MMU lookup table - EMMUTX | 0xD0000 | Start of transmit MMU lookup table (tbd) + ELRESET | 0xE0000 | Soft reset + ELTX | 0xE0004 | Elink tranmit config + ELRX | 0xE0008 | Elink receiver config + ELCLK | 0xE000C | Clock config + ELCOREID | 0xE0010 | ID to drive to Epiphany chip + ELVERSION | 0xE0014 | Platform version + ELDATAIN | 0xE0018 | Direct data from elink receiver + ELDATAOUT | 0xE001C | Direct data for elink transmitter + ELDEBUG | 0xE0020 | Various debug signals + EMBOXLO | 0xE0024 | Lower 32 bits of 64b wide mail box fifo + EMBOXHI | 0xE0028 | Upper 32 bits of 64b wide mail box fifo + EMMURX | 0xD0000 | Start of receiver MMU lookup table + EMMUTX | 0xC0000 | Start of transmit MMU lookup table (tbd) ###ELINK CONFIGURATION REGISTERS REGISTER | DESCRIPTION diff --git a/elink/hdl/elink.v b/elink/hdl/elink.v index 1c56b5e..91773e2 100644 --- a/elink/hdl/elink.v +++ b/elink/hdl/elink.v @@ -1,44 +1,62 @@ /* - ######################################################################## - 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. + + ###DESCRIPTION + The "elink" is a low-latency/high-speed interface for communicating between + FPGAs and ASICs (such as Epiphany) that implement the elink protocol. + The interface "should" achieve a peak throughput of 8 Gbit/s in FPGAs with + 24 available LVDS signal pairs. - TRANSMIT + ###ELINK INTERFACE I/O SIGNALS - 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 + SIGNAL |DIR| DESCRIPTION + ---------------|---|-------------- + txo_frame | O | TX Packet framing signal. + txo_lclk | O | TX A clock aligned in the center of the data eye + txo_data[7:0] | O | TX Dual data rate (DDR) that transmits packet + txi_rd_wait | I | TX Push back (input) for read transactions + txi_wd_wait | I | TX Push back (input) for write transactions + rxi_frame | I | RX Packet framing signal. Rising edge signals new packet. + rxi_lclk | I | RX A clock aligned in the center of the data eye + rxi_data[7:0] | I | RX Dual data rate (DDR) that transmits packet + rxo_rd_wait | O | RX Push back (output) for read transactions + rxo_wr_wait | O | RX Push back (output) for write transactions + m_axi* | - | AXI master interface + s_axi* | - | AXI slave interface + hard_reset | I | Reset input + clkin | I | Input clock for PLL + clkbypass[2:0] | I | Input clocks for bypassing PLL + cclk_n/cclk_p | O | Differential clock output for Epiphany + chip_resetb | O | Reset for Epiphany + colid[3:0] | O | Column coordinate pins for Epiphany + rowid[3:0] | O | Row coordinate pins for Epiphany + embox_not_empty| O | Mailbox not empty (connect to interrupt line) + embox_full | O | Mailbox is full indicator - RECEIVE + ###BUS INTERFACE The elink has a 64 bit data AXI master and 32-bit data AXI slave interface for connecting to a standard AXI network. + ###EMESH PACKET + 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 + dstraddr[31:0] | Address for write, read-request, or read-responses 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: + ###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: + ###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 @@ -52,7 +70,7 @@ last byte of the previous transaction (byte8 or byte12) will be followed by byte5 of the new transaction. - PUSHBACK: + ###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 @@ -73,144 +91,162 @@ to indicate to the transmit logic that no more transactions can be received because the receiver buffer full. - ######################################################################## - ELINK MEMORY MAP - ######################################################################## + ###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) + 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<