23
SiTCP for SK 1 st version Jul 13, 2006 Tomohisa Uchida, KEK

SiTCP for SK 1 st version Jul 13, 2006 Tomohisa Uchida, KEK

  • View
    218

  • Download
    0

Embed Size (px)

Citation preview

Page 1: SiTCP for SK 1 st version Jul 13, 2006 Tomohisa Uchida, KEK

SiTCP for SK1st version

Jul 13, 2006

Tomohisa Uchida, KEK

Page 2: 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 060713SK.zip

Page 3: SiTCP for SK 1 st version Jul 13, 2006 Tomohisa Uchida, KEK

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 !

Page 4: SiTCP for SK 1 st version Jul 13, 2006 Tomohisa Uchida, KEK

Spartan 3E Starter Kit

Reset SW Test data generation

TCP Echo back

Page 5: SiTCP for SK 1 st version Jul 13, 2006 Tomohisa Uchida, KEK

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 SiTC

P via UDP.

Page 6: SiTCP for SK 1 st version Jul 13, 2006 Tomohisa Uchida, KEK

“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 8.1.03i of ISE.

• “Src” directory– Source code files of the design.

Page 7: SiTCP for SK 1 st version Jul 13, 2006 Tomohisa Uchida, KEK

“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.

Page 8: SiTCP for SK 1 st version Jul 13, 2006 Tomohisa Uchida, KEK

“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.

Page 9: SiTCP for SK 1 st version Jul 13, 2006 Tomohisa Uchida, KEK

“BCP” directory

• Consists of– bcp_dbg.c

• The reference program.

– bcp.h• Header file of ” bcp_dbg.c”.

Page 10: SiTCP for SK 1 st version Jul 13, 2006 Tomohisa Uchida, KEK

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.

Page 11: SiTCP for SK 1 st version Jul 13, 2006 Tomohisa Uchida, KEK

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.

Page 12: SiTCP for SK 1 st version Jul 13, 2006 Tomohisa Uchida, KEK

TCP Transmit Timing

The signals of TCP_TEST.V

Page 13: SiTCP for SK 1 st version Jul 13, 2006 Tomohisa Uchida, KEK

Transmit Stop Timing

The signals of TCP_TEST.V

Max. 8 clocks

Page 14: SiTCP for SK 1 st version Jul 13, 2006 Tomohisa Uchida, KEK

TCP Receive Timing

The signals of TCP_TEST.V

Max. 8 clocks

Page 15: SiTCP for SK 1 st version Jul 13, 2006 Tomohisa Uchida, KEK

Closing Timing

Page 16: SiTCP for SK 1 st version Jul 13, 2006 Tomohisa Uchida, KEK

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.

Page 17: SiTCP for SK 1 st version Jul 13, 2006 Tomohisa Uchida, KEK

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.

Page 18: SiTCP for SK 1 st version Jul 13, 2006 Tomohisa Uchida, KEK

BCP headerPosition

in byte

Name Description

0 Ver.[3:0] /

Type [3:0]

Should be 0xFF

, means the test version.

1 Command[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

2 ID Number to identify, any number can be used.

3 Length Length of read / write access

Page 19: SiTCP for SK 1 st version Jul 13, 2006 Tomohisa Uchida, KEK

BCP header

Position

in byte

Name Description

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] 1st write data

:

7+N Write data [7:0] The last (N-th) write data

Page 20: SiTCP for SK 1 st version Jul 13, 2006 Tomohisa Uchida, KEK

Reference programIP address of SiTCP = 192.168.0.16

UDP port of SiTCP = 4660 (0x1234)

In this example,- Read 4 bytes data from SiTCP,- Addresses are from 0x00 to 0x03.

Page 21: SiTCP for SK 1 st version Jul 13, 2006 Tomohisa Uchida, KEK

Write timing

Page 22: SiTCP for SK 1 st version Jul 13, 2006 Tomohisa Uchida, KEK

Read timing

Page 23: SiTCP for SK 1 st version Jul 13, 2006 Tomohisa Uchida, KEK

SiTCP is under developing.

If you find bugs or problems, please report it to me.

Thank you.

Tomohisa Uchida, KEK ([email protected])

If you have questions,Please ask me or Hayato-san.