Skip to content

Commit 67e5765

Browse files
author
fengx
committed
pull subtree
2 parents 0ad39c5 + 768f0a0 commit 67e5765

File tree

511 files changed

+27396
-5662
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

511 files changed

+27396
-5662
lines changed

data_compression/L1/README.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

data_compression/L1/README.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
==================
2+
Primitive Overview
3+
==================
4+
5+
The Level 1 APIs of Vitis Data Compression Library is presented as HLS
6+
C++ modules. This Algorithm Library provides a range of primitives for implementing data compression in C++ for Vitis. Headers for these hardware APIs can be found in ``include`` directory of the package.
7+
8+
Stream-based Interface
9+
``````````````````````
10+
The interface of primitives in this library are mostly HLS streams, with the main input stream along with output stream throughout the dataflow.
11+
12+
The benefits of this interface are
13+
14+
- Within a HLS dataflow region, all primitives connected via HLS streams can work in parallel, and this is the key to FPGA acceleration.
15+
16+
This level of API is mainly provided for hardware-savvy developers. The
17+
API description and design details of these modules can be found in L1
18+
Module User Guide section of the `library
19+
document <https://xilinx.github.io/Vitis_Libraries/data_compression/source/L1/L1.html>`__.

data_compression/L1/include/hw/axi_stream_utils.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ namespace compression {
2929

3030
typedef ap_uint<8> streamDt;
3131

32+
namespace details {
33+
3234
void axis2hlsStreamFixedSize(hls::stream<qdma_axis<8, 0, 0, 0> >& inputAxiStream,
3335
hls::stream<streamDt>& inputStream,
3436
uint32_t inputSize) {
@@ -210,6 +212,7 @@ void streamDataK2dmFixedSize(hls::stream<ap_uint<8> >& out,
210212
}
211213
}
212214

215+
} // end details
213216
} // end compression
214217
} // end xf
215218

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
#define STABLE_SIZE 544
2+
const uint8_t fixed_litml_op[STABLE_S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0, 17, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 20, 0, 0, 0, 18, 0, 0, 0,
15+
0, 0, 0, 0, 16, 0, 0, 64, 19, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 20, 0, 0, 0, 18,
16+
0, 0, 0, 0, 0, 0, 0, 96, 0, 0, 21, 18, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 19, 0,
17+
0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 16, 19, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0,
18+
0, 20, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 21, 19, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,
19+
16, 0, 0, 0, 20, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 64, 19, 0, 0, 0, 17, 0, 0, 0, 0,
20+
0, 0, 0, 16, 0, 0, 0, 20, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 16, 23, 19, 27, 17, 25, 21, 29, 16, 24,
21+
20, 28, 18, 26, 22, 64, 16, 23, 19, 27, 17, 25, 21, 29, 16, 24, 20, 28, 18, 26, 22, 64};
22+
23+
const uint8_t fixed_litml_bits[STABLE_SIZE] = {
24+
7, 8, 8, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 8, 8, 9, 7, 8, 8, 9, 7, 8, 8, 9, 7, 8, 8, 9, 8, 8, 8, 9, 7, 8, 8, 8, 7, 8, 8,
25+
9, 7, 8, 8, 9, 8, 8, 8, 9, 7, 8, 8, 9, 7, 8, 8, 9, 7, 8, 8, 9, 8, 8, 8, 9, 7, 8, 8, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 8,
26+
8, 9, 7, 8, 8, 9, 7, 8, 8, 9, 7, 8, 8, 9, 8, 8, 8, 9, 7, 8, 8, 8, 7, 8, 8,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9, 7, 8, 8, 9, 7, 8, 8, 9, 8, 8, 8, 9, 7, 8, 8, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 8, 8, 9, 7, 8, 8, 9,
36+
7, 8, 8, 9, 7, 8, 8, 9, 8, 8, 8, 9, 7, 8, 8, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 8, 8, 9, 7, 8, 8, 9, 7, 8, 8, 9, 7, 8, 8,
37+
9, 8, 8, 8, 9, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5};
38+
39+
const uint16_t fixed_litml_val[STABLE_SIZE] = {
40+
0, 80, 16, 115, 31, 112, 48, 192, 10, 96, 32, 160, 0, 128, 64, 224, 6, 88, 24, 144, 59, 120,
41+
56, 208, 17, 104, 40, 176, 8, 136, 72, 240, 4, 84, 20, 227, 43, 116, 52, 200, 13, 100, 36, 168,
42+
4, 132, 68, 232, 8, 92, 28, 152, 83, 124, 60, 216, 23, 108, 44, 184, 12, 140, 76, 248, 3, 82,
43+
18, 163, 35, 114, 50, 196, 11, 98, 34, 164, 2, 130, 66, 228, 7, 90, 26, 148, 67, 122, 58, 212,
44+
19, 106, 42, 180, 10, 138, 74, 244, 5, 86, 22, 0, 51, 118, 54, 204, 15, 102, 38, 172, 6, 134,
45+
70, 236, 9, 94, 30, 156, 99, 126, 62, 220, 27, 110, 46, 188, 14, 142, 78, 252, 0, 81, 17, 131,
46+
31, 113, 49, 194, 10, 97, 33, 162, 1, 129, 65, 226, 6, 89, 25, 146, 59, 121, 57, 210, 17, 105,
47+
41, 178, 9, 137, 73, 242, 4, 85, 21, 258, 43, 117, 53, 202, 13, 101, 37, 170, 5, 133, 69, 234,
48+
8, 93, 29, 154, 83, 125, 61, 218, 23, 109, 45, 186, 13, 141, 77, 250, 3, 83, 19, 195, 35, 115,
49+
51, 198, 11, 99, 35, 166, 3, 131, 67, 230, 7, 91, 27, 150, 67, 123, 59, 214, 19, 107, 43, 182,
50+
11, 139, 75, 246, 5, 87, 23, 0, 51, 119, 55, 206, 15, 103, 39, 174, 7, 135, 71, 238, 9, 95,
51+
31, 158, 99, 127, 63, 222, 27, 111, 47, 190, 15, 143, 79, 254, 0, 80, 16, 115, 31, 112, 48, 193,
52+
10, 96, 32, 161, 0, 128, 64, 225, 6, 88, 24, 145, 59, 120, 56, 209, 17, 104, 40, 177, 8, 136,
53+
72, 241, 4, 84, 20, 227, 43, 116, 52, 201, 13, 100, 36, 169, 4, 132, 68, 233, 8, 92, 28, 153,
54+
83, 124, 60, 217, 23, 108, 44, 185, 12, 140, 76, 249, 3, 82, 18, 163, 35, 114, 50, 197, 11, 98,
55+
34, 165, 2, 130, 66, 229, 7, 90, 26, 149, 67, 122, 58, 213, 19, 106, 42, 181, 10, 138, 74, 245,
56+
5, 86, 22, 0, 51, 118, 54, 205, 15, 102, 38, 173, 6, 134, 70, 237, 9, 94, 30, 157, 99, 126,
57+
62, 221, 27, 110, 46, 189, 14, 142, 78, 253, 0, 81, 17, 131, 31, 113, 49, 195, 10, 97, 33, 163,
58+
1, 129, 65, 227, 6, 89, 25, 147, 59, 121, 57, 211, 17, 105, 41, 179, 9, 137, 73, 243, 4, 85,
59+
21, 258, 43, 117, 53, 203, 13, 101, 37, 171, 5, 133, 69, 235, 8, 93, 29, 155, 83, 125, 61, 219,
60+
23, 109, 45, 187, 13, 141, 77, 251, 3, 83, 19, 195, 35, 115, 51, 199, 11, 99, 35, 167, 3, 131,
61+
67, 231, 7, 91, 27, 151, 67, 123, 59, 215, 19, 107, 43, 183, 11, 139, 75, 247, 5, 87, 23, 0,
62+
51, 119, 55, 207, 15, 103, 39, 175, 7, 135, 71, 239, 9, 95, 31, 159, 99, 127, 63, 223, 27, 111,
63+
47, 191, 15, 143, 79, 255, 1, 257, 17, 4097, 5, 1025, 65, 16385, 3, 513, 33, 8193, 9, 2049, 129, 0,
64+
2, 385, 25, 6145, 7, 1537, 97, 24577, 4, 769, 49, 12289, 13, 3073, 193, 0};

0 commit comments

Comments
 (0)