SiTCP for SK 1 st version Jul 13, 2006 Tomohisa Uchida, KEK
Overview Prepared –The Net-list file –An reference design –An reference program to control bus via UDP All files in SK.zip
The reference design. Implemented on Spartan 3E Starter Kit – Produced by XILINX. Functions –TCP A test data generator and checker Echo back server Can be selected by a slide-SW on the board (SW3) –UDP Simple register file access I have verified it on my board !
Spartan 3E Starter Kit Reset SW Test data generation TCP Echo back
Structure of “060713SK” folder SiTCP_S3E_StarterKit –The reference design files. SiTCP_FOR_SK –The net-list files and related files. BCP –The reference program to control bus of SiTCP via UDP.
“SiTCP_S3E_StarterKit” directory Includes the reference design files. ” Coregen” directory –Library files that are used in the design. –Generated by CORE-GENERATOR “ISE” directory –Working directory of ISE. –I compiled with the version i of ISE. “Src” directory –Source code files of the design.
“SiTCP_FOR_SK” directory Includes net-list files used to implement SiTCP. SiTCP_FOR_SK.ngc –Net-list file of SiTCP Asyncfifo8bx2kw* –Asynchronous FIFO –Used in the SiTCP Copy the above files to working directory of ISE. –See the reference design. “SiTCP_S3E_StarterKit” directory.
“Src” directory Consists of –S3E_SK_SITCP_FOR_SK.V The top module –SiTCP_FOR_SK.V Top module of SiTCP –TCP_TEST.V An simple application of TCP. Test data generator and checker. –LOC_REG.v An simple application of UDP. Register files.
“BCP” directory Consists of –bcp_dbg.c The reference program. –bcp.h Header file of ” bcp_dbg.c”.
TCP: Normal sequence Establish Received FIN Closing phase Received SYN, ACK Closed Transfer phase The signals of TCP_TEST.V From a SYN packet is received to a FIN packet received.
Transfer phase TCP_ESTABLISH keeps in high level. Should write data to send in this phase. If TCP_ESTABLISH goes to low level, –The connection is disconnected (Normal). –A network error occurred (Error). I recommends TCP_ESTABLISH is used to initialize front-end circuits.
TCP Transmit Timing The signals of TCP_TEST.V
Transmit Stop Timing The signals of TCP_TEST.V Max. 8 clocks
TCP Receive Timing The signals of TCP_TEST.V Max. 8 clocks
Closing Timing
Closing phase Started by TCP_CLS_REQ –Asserted by receiving a FIN packet. When TCP_CLS_REQ is asserted, –Stop to transmit data as soon as possible. –After that, response with TCP_CLS_ACK in high level. When the connection is closed, –TCP_ESTABLISH goes low.
UDP Use an original protocol (BCP) to access bus of SiTCP. BCP is encapsulated in UDP packet. I prepare a reference program. –I wrote this for debugging. –Pease, customize it.
BCP header Position in byte NameDescription 0Ver.[3:0] / Type [3:0] Should be 0xFF, means the test version. 1Command[3:0] / Flag [3:0] Command 0xC = Read operation 0x8 = Write operation Flag, valid only ACK packet [3] = ACK packet [2:1] = always zero [0] = Bus error 2IDNumber to identify, any number can be used. 3LengthLength of read / write access
BCP header Position in byte NameDescription 4 Address [31:24]Read / Write Address 5 Address [23:16]Read / Write Address 6 Address [15: 8]Read / Write Address 7 Address [7: 0]Read / Write Address 8 Write data [7:0]1 st write data : 7+N Write data [7:0]The last (N-th) write data
Reference program IP address of SiTCP = UDP port of SiTCP = 4660 (0x1234) In this example, - Read 4 bytes data from SiTCP, - Addresses are from 0x00 to 0x03.
Write timing
Read timing
SiTCP is under developing. If you find bugs or problems, please report it to me. Thank you. Tomohisa Uchida, KEK If you have questions, Please ask me or Hayato-san.