Translate

2013년 10월 1일 화요일

Data Lanes HS Transmission Example(1~4 Lanes)



One-Data Lane Configuration


Two-Data Lane Configuration


Three-Data Lane Configuration


Four-Data Lane Configuration


Multiple Packets per Transmission

In its simplest form, a transmission may contain one packet. If many packets are to be transmitted, the overhead of frequent switching between LPS and High-Speed Mode will severely limit bandwidth if packets are sent separately, e.g. one packet per transmission.

Separate Transmissions


single Transmission

KEY:
  • LPS – Low Power State                     
  • SP – Short Packet
  • SoT – Start of Transmission            
  • LgP – Long Packet
  • EoT – End of Transmission

Short Packet Structure

Packet Header (4 bytes)
  • Data Identifier (DI) * 1byte: Contains the Virtual Channel[7:6] and Data Type[5:0].
  • Packet Data * 2byte:Length is fixed at two bytes
  • Error Correction Code (ECC) * 1byte:allows single-bit errors to be corrected and 2-bit errors to be detected.
Packet Size
  • Fixed length 4 bytes
The first byte of any packet is the DI (Data Identifier) byte.
  • DI[7:6]:These two bits identify the data as directed to one of four virtual channels.
  • DI[5:0]:These six bits specify the Data Type.



Long Packet Structure

Packet Header (4 bytes)
  • Data Identifier (DI) * 1byte:Contains the Virtual Channel[7:6] and Data Type[5:0].
  • Word Count (WC) * 2byte:defines the number of bytes in the Data Payload.
  • Error Correction Code (ECC) * 1byte:allows single-bit errors to be corrected and 2-bit errors to be detected.
Data Payload (0~65535 bytes)
  • Length = WC × bytes
Packet Footer (2 bytes):Checksum
  • If the payload has length 0, then the Checksum calculation results in FFFFh
  • If the Checksum isn’t calculated, the Checksum value is 0000h
Packet Size
  • 4 + (0~65535) + 2 = 6 ~ 65541 bytes



Data Types for Processor-sourced Packets


Error Correction Code

 P7 = 0
 P6 = 0
 P5 = D10^D11^D12^D13^D14^D15^D16^D17^D18^D19^D21^D22^D23
 P4 = D4^D5^D6^D7^D8^D9^D16^D17^D18^D19^D20^D22^D23
 P3 = D1^D2^D3^D7^D8^D9^D13^D14^D15^D19^D20^D21^D23
 P2 = D0^D2^D3^D5^D6^D9^D11^D12^D15^D18^D20^D21^D22
 P1 = D0^D1^D3^D4^D6^D8^D10^D12^D14^D17^D20^D21^D22^D23
 P0 = D0^D1^D2^D4^D5^D7^D10^D11^D13^D16^D20^D21^D22^D23


Checksum

unsigned char xx[] = {0x01,0x5a,0x5a,0x03,0x08,0x2A, 0x00,0x01
                                          ,0x00,0xF8,0x00,0xF6,0x57,0x00,0X00,0xE5};

typedef unsigned short  U16;
typedef unsigned char   U8;

U16 CRC_kjh;
U16 crc16_update(U16 crc, U8 a);

int main()
{
            U16 crc,k;
            crc = 0xFFFF;
            for (k=0; k<1; k++) crc = crc16_update(crc, xx[k]);
            CRC_kjh = crc;
}

U16 crc16_update(U16 crc, U8 a)
{
            int j;
            crc ^=a;
                        for (j = 0; j < 8; ++j)
                       {
                              if (crc & 1) crc = (crc >> 1) ^ 0x8408;
                              else crc = (crc >> 1);
                       }
             return crc;
}