spp_send is the sending end of the Space Packet Protocol (blocks SE-1 to SE-3 and TB-1 of the architecture). It
accepts the requests of NumTx_g user ports, each of them a service access point of the Packet Service or of the
Octet String Service, checks and buffers every SDU, multiplexes the ports, builds the Packet Primary Header of every
Octet String with the Packet Sequence Count of its APID or a Packet Name, and passes each Space Packet with the
destination of its managed data path to the transfer layer.
Each user port shall take requests as an AXI4-Stream of DataWidth_g bits with Keep and Last, one SDU per packet of the stream, first byte in lane 0; the generic TxOctetString_g selects the Octet String Service ('1') or the Packet Service ('0') per port. A request is passed when its last beat is accepted.
SPP 3.2.3.4, 3.3.3.2, 3.4.3.2.1.1
SE-IF-02
TUser of an Octet String port shall carry the parameters of OCTET_STRING.request (APID, Secondary Header Indicator, Packet Type, Packet Name valid, Packet Name; layout of the architecture, section 6), constant during the SDU.
SPP 3.4.2.1, 3.4.2.2, 3.4.3.2.2
SE-IF-03
A request of a Packet Service port shall be a complete Space Packet; the APID parameter of PACKET.request is the APID of its header.
SPP 3.3.2.1, 3.3.2.2; CPTP 5.1.1
SE-IF-04
The packet output shall be an AXI4-Stream of DataWidth_g bits with Keep and Last, one Space Packet per packet of the stream; TUser bit 0 shall flag an error end of packet with the last beat and bits 4:1 shall hold the destination index of the APID.
none
SE-IF-05
Every rejected SDU shall be reported as a one-cycle event with its reason, its port and its APID; every Space Packet that leaves the output shall be signalled on Sent.
CPTP 5.5.2c
SE-IF-06
The reset input shall return the sending end from any state to an empty state and initialise the send APID table again.
none (D14)
SE-IF-07
A last beat without byte enables shall end the SDU, which consists of the bytes of the earlier beats; its Space Packet shall end with the beat of its last byte.
Each port shall store complete SDUs in a buffer of BufferBytes_g bytes and pass them on in the order of submission.
SPP 3.2.2.1
SE-BF-02
An SDU longer than the maximum packet length (less 6 bytes for an Octet String) or than the buffer shall be rejected (reason 0x01).
SPP 3.2.2.1, 3.2.3.1; CPTP 5.1.2, 5.5.2
SE-BF-03
A Space Packet of the Packet Service shall be rejected when it is shorter than 7 bytes (0x02), when its Packet Version Number is not '000' (0x03), when its length is not its Packet Data Length plus 7 (0x04), or when it is an Idle Packet with the Secondary Header Flag set (0x05).
SPP 4.1.2.2, 4.1.3.2.2, 4.1.3.3.3.4, 4.1.3.5
SE-BF-04
An Octet String shall be rejected when it has no byte (0x02), when its APID is the Idle APID and its Secondary Header Indicator is set (0x05), or when it carries a Packet Name for a telemetry packet (0x06).
The multiplexer shall pass one complete SDU at a time, selecting among the ports with a complete SDU by fixed priority (port 0 first) or by round robin as Cfg_RoundRobin selects.
One Octet String shall result in one Space Packet: the Packet Primary Header (Packet Version Number '000', the Packet Type of the request, the Secondary Header Flag equal to the Secondary Header Indicator, the APID, Sequence Flags '11', Packet Sequence Count or Packet Name, Packet Data Length equal to the length of the Octet String minus one) followed without gap by the Octet String.
The Packet Sequence Count shall be the count of the APID in the send APID table, which is then incremented modulo 16384; a telecommand packet with a valid Packet Name shall carry the name and leave the count unchanged.
SPP 4.1.3.4.3, 4.2.2.4
SE-AS-03
A Space Packet of the Packet Service shall be transferred without any change.
SPP 3.3.1
SE-AS-04
Every SDU shall be transferred along the managed data path of its APID: the destination index of its entry; an SDU whose APID has no enabled path shall be rejected (0x07).
SPP 4.2.3.3
SE-AS-05
An SDU whose descriptor or table entry has a double bit error shall be rejected (0x08); a double bit error in the data of an SDU shall end its Space Packet with an error end of packet.