In order to be able to transmit and receive time-codes a SpaceWire CODEC has a time-code interface. The time-code interface comprises two signals, TICK_IN and TICK_OUT, together with an eight-bit time-code input-port and an eight-bit time-code output-port. The eight-bit input and output are split into two fields: a six-bit time field and two-bit control-flag field.
The TICK_IN signal is used to request the transmission of a time-code and the eight-bit input port provides the time-code value to be sent. Whenever TICK_IN is asserted the SpaceWire CODEC will send a time-code immediately after the character currently being transmitted has finished. Note that a SpaceWire CODEC can only send time-codes when it is up and running sending Nulls, FCTs and/or data (i.e. is in the Run state).
The TICK_OUT is used to indicate that a time-code has arrived at a SpaceWire interface. TICK_OUT is asserted whenever the link interface is in the Run state and the receiver receives a valid Time-Code. The eight-bit time-code output-port is set to reflect the contents of the time-code.