34 #include "../MEM/mem.hpp"
35 #include "../NTS/nts.hpp"
54 #ifndef __SYNTH_LOG2CEIL__
55 #define __SYNTH_LOG2CEIL__
96 n <= 0x100000 ? 20 : \
97 n <= 0x200000 ? 21 : \
98 n <= 0x400000 ? 22 : \
99 n <= 0x800000 ? 23 : \
100 n <= 0x1000000 ? 24 : \
101 n <= 0x2000000 ? 25 : \
102 n <= 0x4000000 ? 26 : \
103 n <= 0x8000000 ? 27 : \
104 n <= 0x10000000 ? 28 : \
105 n <= 0x20000000 ? 29 : \
106 n <= 0x40000000 ? 30 : \
107 n <= 0x80000000 ? 31 : \
108 n <= 0x100000000 ? 32 : \
120 ap_uint<16>
byteSwap16(ap_uint<16> inputValue);
121 ap_uint<32>
byteSwap32(ap_uint<32> inputValue);
122 ap_uint<48>
byteSwap48(ap_uint<48> inputValue);
123 ap_uint<64>
byteSwap64(ap_uint<64> inputValue);
159 #define concat2(firstCharConst, secondCharConst) firstCharConst secondCharConst
161 #define concat3(firstCharConst, secondCharConst, thirdCharConst) firstCharConst secondCharConst thirdCharConst
168 #ifndef __SYNTHESIS__
169 #define printInfo(callerName , format, ...) \
170 do { gTraceEvent = true; printf("(@%5.5d) [%-20s] INFO - " format, gSimCycCnt, callerName, ##__VA_ARGS__); } while (0)
172 #define printInfo(callerName , format, ...) \
181 #ifndef __SYNTHESIS__
182 #define printWarn(callerName , format, ...) \
183 do { gTraceEvent = true; printf("(@%5.5d) [%-20s] WARNING - " format, gSimCycCnt, callerName, ##__VA_ARGS__); } while (0)
185 #define printWarn(callerName , format, ...) \
194 #ifndef __SYNTHESIS__
195 #define printError(callerName , format, ...) \
196 do { gTraceEvent = true; printf("(@%5.5d) [%-20s] ERROR - " format, gSimCycCnt, callerName, ##__VA_ARGS__); } while (0)
198 #define printError(callerName , format, ...) \
207 #ifndef __SYNTHESIS__
208 #define printFatal(callerName , format, ...) \
209 do { gTraceEvent = true; gFatalError = true; printf("\n(@%5.5d) [%-20s] FATAL - " format, gSimCycCnt, callerName, ##__VA_ARGS__); printf("\n\n"); exit(99); } while (0)
211 #define printFatal(callerName , format, ...) \
222 #ifndef __SYNTHESIS__
223 #define assessSize(callerName , stream , streamName, depth) \
224 do { if (stream.size() >= depth) printFatal(callerName, "Stream \'%s\' is full: Cannot write.", streamName); } while (0)
226 #define assessSize(callerName , stream, streamName, depth) \
ap_uint< 48 > byteSwap48(ap_uint< 48 > inputValue)
Swap the six bytes of a triple-word (.i.e, 48 bits).
void printEthAddr(EthAddr ethAddr)
void printLE_SockPair(const char *callerName, LE_SocketPair sockPair)
Print a socket pair association in LITTLE-ENDIAN order.
LE_tKeep lenToLE_tKeep(ap_uint< 4 > noValidBytes)
A function to set a number of '1' in an 8-bit field. It is used here to set the number of valid bytes...
void printArpBindPair(const char *callerName, ArpBindPair arpBind)
Print an ARP binding pair association.
ap_uint< 64 > byteSwap64(ap_uint< 64 > inputValue)
Swap the eight bytes of a quad-word (.i.e, 64 bits).
void printAxisRaw(const char *callerName, AxisRaw chunk)
Prints an Axis raw data chunk (used for debugging).
void printTcpPort(TcpPort tcpPort)
void printDmCmd(const char *callerName, DmCmd dmCmd)
Prints the details of a Data Mover Command (used for debugging).
void printLE_SockAddr(const char *callerName, LE_SockAddr leSockAddr)
Print a socket address encoded in LITTLE_ENDIAN order.
const char * getTcpStateName(TcpState tcpState)
Returns the name of an enum-based TCP-State as a user friendly string.
tKeep lenTotKeep(ap_uint< 4 > noValidBytes)
A function to set a number of '1' in an 8-bit field. It is used here to set the number of valid bytes...
void printIp4Addr(const char *callerName, const char *message, Ip4Addr ip4Addr)
Print an IPv4 address prepended with a message (used for debugging).
void printSockPair(const char *callerName, SocketPair sockPair)
Print a socket pair association.
void printSockAddr(SockAddr sockAddr)
ap_uint< 32 > byteSwap32(ap_uint< 32 > inputVector)
ap_uint< 16 > byteSwap16(ap_uint< 16 > inputVector)