SpaceWire Bank IP

  

List of figures

IP_SPW_BANK overview

SPW interface internal scheme

TX part waveforms

RX part waveforms

 

List of tables

Acronyms

IP SPW pads occupation

IP generics

IP ports

RXO output forms

RXO output forms

 

 

Introduction

This document is intended to help user to configure and use the Serializer/ Deserializer and Clock Recovery SpaceWire IP provided by NanoXplore (file IP_SPW_BANK.vhd).

 

This IP does not implement the full SpaceWire CODEC.

 

All the contents of this document are protected by copyright law. They may not be disclosed to third parties or copied or duplicated in any form without the written consent of NanoXplore.

For any question, please contact NanoXplore team support@nanoxplore.com.

  Acronyms

Acronym

Definition

DES

Deserializer

DIV

Divider

FPGA

Field Programmable Gate Array

IO

InputOutput

IP

Intellectual Property

LSB

Less Significant Bit

RX

Receiver

SER

Serializer

SPW

SpaceWire

TX

Transmitter

WFG

WaveForm Generator

Acronyms

Description

The IP_SPW_BANK can be instantiated for configuring SpaceWire protocol above a NG-Medium complex IO Bank.

The location of the IO Bank must be specified in the instantiation using the bank generic parameter. The IP instantiates some elements in the FPGA and some in the specified bank:

  •   2 WFG in FPGA

  •   17 Pads in specified bank

 

The following figure represents an overview of the IP, including the two SpaceWire interfaces and the different inputs and outputs of the IP.

The input and output differential lines (DI, SI, DO, SO) are represented as an unique signal in the IP. Physically, you will have to connect 2 pads as these lines are differentials.

 

IP_SPW_BANK overview

 

The following table presents the matching between IP ports and the NG-Medium IO Bank pads locations. These locations should not be specified with the ‘addPad’ method in Python script: they are already specified inside the IP.

 

Name

Location

DO1

D01P & D01N

SO1

D02P & D02N

DI1

D03P & D03N

SI1

D04P & D04N

DO2

D12P & D12N

SO2

D13P & D13N

DI2

D14P & D14N

SI2

D15P & D15N

(Required)

D10N

IP SPW pads occupation

The following table presents the different generics to be specified in the instantiation of the IP. 

Name

Type

Description

Values

dataSize

Integer

Width of the data packets to be transmitted

4, 6, 8, 10

bank

String

Bank where the SpaceWire IP should be located

IOB2, IOB3, IOB4, IOB5, IOB9, IOB10, IOB11, IOB12

voltage

String

Bank voltage

1.5V, 1.8V, 2.5V

reference

String

Termination reference of pads

floating, VT

IP generics

For pre synthesis simulation, only dataSize generic is needed. Other generics are mandatory for synthesis with NXmap.

 

Finally, the following table shows the signals to be connected. All the reset signals are optional, they are forced to ‘0’ by default.

 

Name

Width

Direction

Description

DO1

1

Out

DO output line of the SpaceWire

SO1

1

Out

SO output line of the SpaceWire

DI1

1

In

DI input line of the SpaceWire

SI1

1

In

SI input line of the SpaceWire

RXRST1

1

In

Receiver reset

RXO1

20

Out

Receiver data out

RXSCK1

1

Out

Receiver slow clock

TXRST1

1

In

Transmitter reset

TXI1

10

In

Transmitter input

TXFCK1

1

In

Transmitter fast clock

TXSCK1

1

Out

Transmitter slow clock (generated by IP)

DO2

1

Out

DO output line of the SpaceWire

SO2

1

Out

SO output line of the SpaceWire

DI2

1

In

DI input line of the SpaceWire

SI2

1

In

SI input line of the SpaceWire

RXRST2

1

IN

Receiver reset

RXO2

20

Out

Receiver data out

RXSCK2

1

Out

Receiver slow clock

TXRST2

1

In

Transmitter reset

TXI2

10

In

Transmitter input

TXFCK2

1

In

Transmitter fast clock

TXSCK2

1

Out

Transmitter slow clock (generated by IP)

IP ports

The following figure presents a detailed view of each of the two SpaceWire interfaces included in the IP.

In the RX part, the “F circle” represents the fact that the divided recovery clock is passing through Fabric before being used by the synchronization block to ensure correct clock alignment.

 

SPW interface internal scheme

When set to ‘1’, the RXRST signal can be used to stop the receiver part. It resets the synchronization between bank clock and fabric clock. It also resets the recovery clock divider to ensure a clean restart when RXRST is back to '0'.

 

When RXRST is set to '1', the value on RXO output is stable but undefined. It is not set to plain zero.

 

When set to ‘1’, the TXRST signal can be used to stop the transmitter part. It resets the synchronization between bank clock and fabric clock. It also resets the TXFCK divider to ensure a clean restart when TXRST is back to '0'.

 

When TXRST is set to '1', the values on DO and SO outputs are forced to '0'. The first word transmitted after a reset is undefined.

Waveforms

TX part

To send data, user has to use the TXI input bus starting from index 0 to index ‘dataSize-1’.

 

The following figure presents the lines of the SpaceWire when emitting a message.

The vertical red lines delimits the visible words on DO & SO outputs. LSB is sent first.

In this example, dataSize was set to 6.

 

The delay between sampling of data by TXSCK (txOut on previous figure) and serialized data on DO & SO depends on the initial conditions.

RX part

To receive data, user has to use the RXO output bus. Depending on the dataSize set, there are one or more words available in the bus. It is important to note that the words are not aligned.

The two following tables show how 6 bits long words may be organized in the RXO bus. The length of Past and Future offsets cannot be predicted.

 

In the best case, the length of ‘Future’ + ‘Past’ is equal to 2 and thus there are 18 bits available for words which corresponds to 3 complete words. The repartition of the 2 bits between Past and Future parts cannot be predicted.

 

Future

WORD3

WORD2

WORD1

Past

RXO output forms

In most cases, the length of ‘Future’ + ‘Past’ is equal to 8 and thus there are 12 bits available for words which corresponds to 2 complete words. The repartition of the 8 bits between Past and Future parts cannot be predicted.

 

Future

WORD2

WORD1

Past

RXO output forms

For a dataSize of 6, the minimum number of bits to consider to be sure to retrieve one word is 11 bits. The Figure below presents the lines of the SpaceWire when receiving a message.

 

Again, the vertical red lines are just delimiting the visible words on the DI & SI lines.

The first received word (circled in red) is incomplete: we only received the first 5 bits of our first message. If we wait one more rising edge on the rxOut, we are now able to see the full word (circled in blue) on the bits 5 down to 0.

 

SpaceWire example

The provided example ‘SpaceWire’ is a small design which shows how to instantiate an IP_SPW_BANK IP. It includes a PLL and a WFG for the clock generation.

The generic dataSize is set to 6, and the bank generic to “IOB12” in order to use J4 & J5 SpaceWire connectors of the NG-Medium evaluation kit board v2.

 The emitted data can be defined using the 6 switches on the evaluation kit board.

 As a simple test, we made a physical loop (simple cable) between J4 & J5 connectors to receive the message we transmit.

As we want to transfer a 6 bits message, we decided to retrieve only 11 bits on the 20 available. In facts by retrieving 11 bits, we can be sure that we will retrieve a 6 bit message. If we wanted to retrieve 2 consecutive messages, we should have retrieved 17 bits.

 This design does not include any synchronization mechanism, we have hard-coded that the bits 5 downto 0 are our received word. It will work in pre synthesis simulation, but the offset may change for post synthesis / post routing simulation.

Moreover, the offset will also be different for a bitstreamed design tested on evaluation kit board. So do not worry if the switch number 1 on the board does not change the state of the led1 but of another led.

 

© NanoXplore 2022