Changeset c2011b47 in rtems


Ignore:
Timestamp:
Feb 21, 2018, 6:23:35 PM (22 months ago)
Author:
Martin Aberg <maberg@…>
Branches:
master
Children:
431661d
Parents:
1a2656cd
git-author:
Martin Aberg <maberg@…> (02/21/18 18:23:35)
git-committer:
Daniel Hellstrom <daniel@…> (09/20/18 10:48:32)
Message:

leon, grspw_pkt: support CCSDS/ISO16 data CRC

When the CCSDS/CCITT CRC-16 and 16-bit ISO-checksum logic is available in
GRSPW2, the DCRCT field is used to determine how to generate the CRC/checksum
code. grspw_hw_sup has been extended with the field ccsds_crc

Location:
bsps/sparc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • bsps/sparc/include/bsp/grspw_pkt.h

    r1a2656cd rc2011b47  
    3636
    3737/* Enable Data CRC generation (if CRC is available in HW)
    38  * Data CRC will be appended (one byte at end of packet)
     38 * Data CRC will be appended (one or two byte at end of packet, depending on
     39 * Data CRC type)
    3940 */
    4041#define TXPKT_FLAG_DCRC 0x0200
     42
     43/* Data CRC type */
     44#define TXPKT_FLAG_DCRCT_MASK   0x0c00
     45/* RMAP CRC. 1 byte */
     46#define TXPKT_FLAG_DCRCT_RMAP   0x0000
     47/* CCSDS/CCITT CRC-16. 2 byte */
     48#define TXPKT_FLAG_DCRCT_CCSDS  0x0400
     49/* 16-bit ISO-checksum (J.G. Fletcher, ISO 8473-1:1998). 2 byte */
     50#define TXPKT_FLAG_DCRCT_ISO16  0x0800
    4151
    4252/* Control how many bytes the beginning of the Header
     
    6171
    6272#define TXPKT_FLAG_INPUT_MASK (TXPKT_FLAG_NOCRC_MASK | TXPKT_FLAG_IE | \
    63                                 TXPKT_FLAG_HCRC | TXPKT_FLAG_DCRC)
     73                                TXPKT_FLAG_HCRC | TXPKT_FLAG_DCRC | \
     74                                TXPKT_FLAG_DCRCT_MASK)
    6475
    6576/* Marks if packet was transmitted or not */
     
    177188        char    irq_num;        /* Number of interrupts that can be generated */
    178189        char    itmr_width;     /* SpW Intr. ISR timers bit width. 0=no timer */
     190        char    ccsds_crc;      /* CCSDS CRC-16 and 16-bit ISO is available */
    179191};
    180192
  • bsps/sparc/shared/spw/grspw_pkt.c

    r1a2656cd rc2011b47  
    114114#define GRSPW_CTRL_NCH_BIT      27
    115115#define GRSPW_CTRL_PO_BIT       26
     116#define GRSPW_CTRL_CC_BIT       25
    116117#define GRSPW_CTRL_ID_BIT       24
    117118#define GRSPW_CTRL_LE_BIT       22
     
    138139#define GRSPW_CTRL_NCH  (0x3<<GRSPW_CTRL_NCH_BIT)
    139140#define GRSPW_CTRL_PO   (1<<GRSPW_CTRL_PO_BIT)
     141#define GRSPW_CTRL_CC   (1<<GRSPW_CTRL_CC_BIT)
    140142#define GRSPW_CTRL_ID   (1<<GRSPW_CTRL_ID_BIT)
    141143#define GRSPW_CTRL_LE   (1<<GRSPW_CTRL_LE_BIT)
     
    31213123        priv->hwsup.rmap = (ctrl & GRSPW_CTRL_RA) >> GRSPW_CTRL_RA_BIT;
    31223124        priv->hwsup.rmap_crc = (ctrl & GRSPW_CTRL_RC) >> GRSPW_CTRL_RC_BIT;
     3125        priv->hwsup.ccsds_crc = (ctrl & GRSPW_CTRL_CC) >> GRSPW_CTRL_CC_BIT;
    31233126        priv->hwsup.rx_unalign = (ctrl & GRSPW_CTRL_RX) >> GRSPW_CTRL_RX_BIT;
    31243127        priv->hwsup.nports = 1 + ((ctrl & GRSPW_CTRL_PO) >> GRSPW_CTRL_PO_BIT);
Note: See TracChangeset for help on using the changeset viewer.