This forum is for sharing information about SiTCP. Please do not hesitate to post any questions, comments or answers within the scope of this purpose.

Connection of SiTCP with C-sockets


I am trying to work out whether I can use SiTCP (with the eval. license) with C-sockets (and 0-MQ STREAM) and what the exact procedure is. Therefore I have a set of questions:

1) I see that SiTCP has the following TCP ports to handle the communication (tcp_open_req, tcp_open_ack, tcp_close_req, tcp_close_ack) however open_req in all the example designs is tight to 1'b0. Having, this tight to 1'b0 makes me think that SiTCP can only act as a TCP server (binds only) and cannot be used as client (connect). Therefore is there a way I can bind my C-socket server to a specific port and then have SiTCP connect to it?

2) I am a bit puzzled regarding the TCP rx word count port being an input. I mostly need to use SiTCP to stream data out of the system and only receive commands to either re-send or drop a packet back into my FPGA. So from the documentation (SiTCP manual) I don't understand whether the word count is needed for the reception functionality of SiTCP or for the transmission. Also, I am not quite sure how this information is being used, can you please provide some more clarification about it?

3) Finally, is there a specific configuration of the C-socket I need to use to ensure that once the connection is open the software isn't requesting for the connection to close?

Thanks a lot in advance,
Kind regards,


  • Hi, Ioannis ,

    SiTCP has a server mode and a client mode.
    But the manual for the client mode is only available in Japanese.

    Please give me some time to translate it.

  • If your third question is about "Keep alive", you can find out more about "SO_KEEPALIVE" from the following page:

  • Hi thanks for the reply,
    indeed the document in Japanese seems to have more information than the English version so it might be useful if you consider translating it. In any case, I managed to set SiTCP in client mode.
    I get a valid connection with my server running on linux (C-socket server). However, once I transmit my data from the core I can see the following information in Wireshak, the payload is transmitted with the ZeroWindow flag. The result is that my server receives non-sense (but this might be also a printing issue).
    Is that something you have observed in the past? Or am I doing anything wrong?

  • Please give me some time to translate it.

    We have translated into English the parts of the I/O port description and the Internal register description that seem to correspond to your question.
    (Some parts are incomplete, such as references not being included in the document, because I translated them in a hurry, but this is a result of prioritising the time it takes to provide the information. Please understand).
    Please use it as a reference.

  • Hi,
    thank you very much for the translation that is really helpful!!
    Do you have any comment regarding the ZeroWindow packet? I am able to receive my data but still SiTCP sends them by reporting that the buffer size is 0 in the reception (in case it helps more I don't have a fifo on the RX since I am only sending data but I have set tcp_rx_wc to x"ffff")

  • edited November 7

    If you do not want to use the TCP receive function, set RX_FILL [15: 0] to 0. It's okay to set other values, but we recommend setting them to 0.
    See "1.2.2. TCP data reception"

Sign In or Register to comment.