cloudFPGA (cF) API
1.0
The documentation of the source code of cloudFPGA (cF)
|
#include <stdint.h>
#include "ap_int.h"
#include "ap_utils.h"
#include <hls_stream.h>
#include <queue>
#include <string>
#include "network_utils.hpp"
#include "NTS/AxisRaw.hpp"
Go to the source code of this file.
Macros | |
#define | UINT8 ap_uint<8> |
#define | UINT32 ap_uint<32> |
Functions | |
ap_uint< 32 > | bigEndianToInteger (ap_uint< 8 > *buffer, int lsb) |
void | integerToBigEndian (ap_uint< 32 > n, ap_uint< 8 > *bytes) |
ap_uint< 4 > | keepToLen (ap_uint< 8 > keepValue) |
Swap the two bytes of a word (.i.e, 16 bits). More... | |
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. More... | |
#define UINT32 ap_uint<32> |
Definition at line 39 of file network_utils.cpp.
#define UINT8 ap_uint<8> |
Copyright 2016 – 2021 IBM Corporation
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Definition at line 38 of file network_utils.cpp.
ap_uint<32> bigEndianToInteger | ( | ap_uint< 8 > * | buffer, |
int | lsb | ||
) |
Definition at line 41 of file network_utils.cpp.
void integerToBigEndian | ( | ap_uint< 32 > | n, |
ap_uint< 8 > * | bytes | ||
) |
Definition at line 54 of file network_utils.cpp.
ap_uint<4> keepToLen | ( | ap_uint< 8 > | keepValue | ) |
Swap the two bytes of a word (.i.e, 16 bits).
[in] | inpWord,the | 16-bit unsigned data to swap. |
Swap the four bytes of a double-word (.i.e, 32 bits).
[in] | inpDWord,a | 32-bit unsigned data. |
Returns the number of valid bytes in an AxiWord.
[in] | The | 'tkeep' field of the AxiWord. |
Definition at line 94 of file network_utils.cpp.
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.
[in] | The | number of valid bytes in an AxiWord. |
Definition at line 114 of file network_utils.cpp.