31 #include <hls_stream.h>
38 #define UINT8 ap_uint<8>
39 #define UINT32 ap_uint<32>
56 bytes[3] = (n >> 24) & 0xFF;
57 bytes[2] = (n >> 16) & 0xFF;
58 bytes[1] = (n >> 8) & 0xFF;
97 case 0x01:
count = 1;
break;
98 case 0x03:
count = 2;
break;
99 case 0x07:
count = 3;
break;
100 case 0x0F:
count = 4;
break;
101 case 0x1F:
count = 5;
break;
102 case 0x3F:
count = 6;
break;
103 case 0x7F:
count = 7;
break;
104 case 0xFF:
count = 8;
break;
117 switch(noValidBytes) {
118 case 1: keep = 0x01;
break;
119 case 2: keep = 0x03;
break;
120 case 3: keep = 0x07;
break;
121 case 4: keep = 0x0F;
break;
122 case 5: keep = 0x1F;
break;
123 case 6: keep = 0x3F;
break;
124 case 7: keep = 0x7F;
break;
125 case 8: keep = 0xFF;
break;
: A generic class used by the Network-Transport-Stack (NTS) to to transfer a chunk of data over an AX...
ap_uint< 8 > lenToKeep(ap_uint< 4 > noValidBytes)
Returns the 'tkeep' field of an AxiWord as a function of the number of valid bytes in that word.
ap_uint< 4 > keepToLen(ap_uint< 8 > keepValue)
Swap the two bytes of a word (.i.e, 16 bits).
ap_uint< 32 > bigEndianToInteger(ap_uint< 8 > *buffer, int lsb)
void integerToBigEndian(ap_uint< 32 > n, ap_uint< 8 > *bytes)