forked from Xilinx/Vitis-Tutorials
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Squashed 'codec' changes from 5aba8ac~10..5aba8ac (#706)
5aba8ac Merge pull request Xilinx#287 from yunleiz/fnext 19dee47 [CR] fixed CR-1135031 b040292 Merge pull request Xilinx#282 from siyangw/next 9a9cb58 revise platform to try hw building 1d9e5ca Merge pull request Xilinx#285 from yunleiz/fnext 71f0059 add jks max run time 687d1be [CR] fixed CR-1131396 6e9d17e [CR] fixed CR-1135031 66df00b Merge pull request Xilinx#281 from liyuanz/next e861b73 Merge pull request Xilinx#283 from yuxiangz/cr_gui 3242569 add opts for vivado timing 56b80a3 turn gui off 3736af1 fix cr-1136890 593736c Merge remote-tracking branch 'xf_codec/next' into next 920328a Merge branch 'next' of https://gitenterprise.xilinx.com/siyangw/xf_codec into next d741262 update mk 346140b Merge pull request Xilinx#279 from yuanqian/update_doc_next 99c323b update 027fc06 update dfe3f08 update 5c1fa81 Merge pull request Xilinx#280 from liyuanz/next 252e3de update 34d3995 fix bug in description 7f2b6c2 update doc for portal 3cec66e Merge pull request Xilinx#278 from liyuanz/next 6be5245 fix bug in makefile fa91918 update makefile 97b29b0 delete pikEnc/host/third_party/lcms/m4 aa87fb5 change 2022.1_stable_latest to 2022.2_stable_latest 84c4c7f add hls_pre.tcl for fixing CR Co-authored-by: sdausr <sdausr@xilinx.com>
- Loading branch information
2 people
authored and
GitHub Enterprise
committed
Sep 16, 2022
1 parent
d031f49
commit d5529bc
Showing
1,617 changed files
with
600,149 additions
and
462 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
*.log | ||
*.yuv | ||
*.jpg | ||
_x_* | ||
build_dir* | ||
emconfig.json | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
@Library('pipeline-library')_ | ||
VitisLibPipeline (branch: 'regression', libname: 'xf_codec', TARGETS: 'hls_csim:hls_csynth:hls_cosim:vitis_sw_emu:vitis_hw_emu:vitis_hw_build', | ||
VitisLibPipeline (branch: 'next', libname: 'xf_codec', TARGETS: 'hls_csim:hls_csynth:hls_cosim:vitis_sw_emu:vitis_hw_emu:vitis_hw_build', | ||
upstream_dependencies: 'xf_utils_hw,next,../utils; xf_database,next,../database; xf_fintech,next,../quantitative_finance', | ||
devtest: 'RunDeploy.sh', TOOLVERSION: '2022.1_stable_latest') | ||
|
||
devtest: 'RunDeploy.sh', TOOLVERSION: '2022.2_stable_latest') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,104 +1,26 @@ | ||
JPEG Decoder | ||
============ | ||
|
||
Jpeg Decoder example resides in ``L2/demos/jpegDec`` directory. The tutorial provides a step-by-step guide that covers commands for building and running kernel. | ||
|
||
Executable Usage | ||
---------------- | ||
|
||
* **Work Directory(Step 1)** | ||
|
||
The steps for library download and environment setup can be found in :ref:`l2_vitis_codec`. For getting the design, | ||
|
||
``` | ||
cd L2/demos/jpegDec | ||
``` | ||
|
||
* **Build kernel(Step 2)** | ||
|
||
Run the following make command to build your XCLBIN and host binary targeting a specific device. Please be noticed that this process will take a long time, maybe couple of hours. | ||
|
||
``` | ||
make run TARGET=hw DEVICE=xilinx_u250_xdma_201830_2 | ||
``` | ||
|
||
* **Run kernel(Step 3)** | ||
|
||
To get the benchmark results, please run the following command. | ||
|
||
``` | ||
./build_dir.hw.xilinx_u250_xdma_201830_2/host.exe -xclbin build_dir.hw.xilinx_u250_xdma_201830_2/jpegDecoder.xclbin -JPEGFile android.jpg | ||
``` | ||
|
||
JPEG Decoder Input Arguments: | ||
|
||
``` | ||
Usage: host.exe -[-xclbin -dataSetDir -refDir] | ||
-xclbin: the kernel name | ||
-JPEGFile: the path point to input *.jpg | ||
``` | ||
|
||
Note: Default arguments are set in Makefile, you can use other :ref:`pictures` listed in the table. | ||
|
||
* **Example output(Step 4)** | ||
|
||
``` | ||
Found Platform | ||
Platform Name: Xilinx | ||
INFO: Found Device=xilinx_u250_xdma_201830_2 | ||
INFO: Importing build_dir.hw.xilinx_u250_xdma_201830_2/jpegDecoder.xclbin | ||
Loading: 'build_dir.hw.xilinx_u250_xdma_201830_2/jpegDecoder.xclbin' | ||
INFO: Kernel has been created | ||
INFO: Finish kernel setup | ||
... | ||
INFO: Finish kernel execution | ||
INFO: Finish E2E execution | ||
INFO: Data transfer from host to device: 40 us | ||
INFO: Data transfer from device to host: 6 us | ||
INFO: Average kernel execution per run: 988 us | ||
... | ||
INFO: android.yuv will be generated from the jpeg decoder's output oINFO: android.yuv is generated correctly | ||
INFO: android.yuv is generated correctly | ||
``` | ||
|
||
Profiling | ||
--------- | ||
|
||
The hardware resource utilizations are listed in the following table. | ||
Different tool versions may result slightly different resource. | ||
|
||
##### Table 1 IP resources for jpegDecoder with huffman decoder(L1 IP) | ||
|
||
| IP | BRAM | URAM | DSP | FF | LUT | Frequency(MHz) | | ||
|-----------------------|----------|----------|----------|----------|---------|-----------------| | ||
| huffman_decoder | 5 | 0 | 12 | 6963 | 7344 | 286 | | ||
|
||
##### Table 2 IP resources for jpegDecoder with jfif parser and huffman decoder(L1 IP) | ||
|
||
| IP | BRAM | URAM | DSP | FF | LUT | Frequency(MHz) | | ||
|-----------------------|----------|----------|----------|----------|---------|-----------------| | ||
| kernel_parser_decoder | 5 | 0 | 12 | 7615 | 8382 | 257 | | ||
|
||
##### Table 3 Hardware resources for jpegDecoder with jfif parser, huffman, iq and idct (L2 kernel) | ||
|
||
| Kernel | BRAM | URAM | DSP | FF | LUT | Frequency(MHz) | | ||
|-----------------------|----------|----------|----------|----------|---------|-----------------| | ||
| jpegDecoder | 7 | 0 | 39 | 12298 | 13417 | 257 | | ||
|
||
Result | ||
------ | ||
|
||
To check the output yuv file, download https://sourceforge.net/projects/raw-yuvplayer/ . | ||
Then upload the rebuild_image.yuv, set the right sample radio and custom size on the software, and check the yuv file. | ||
|
||
Table 1 : Jpeg Decoder profiling | ||
|
||
![Table 1 : Jpeg Decoder profiling](../../../docs/images/jpegDecoderpofile.png) | ||
|
||
##### Note | ||
``` | ||
| 1. MAX_DEC_PIX is for benchmark. If testcase image is larger than 20M, the value of MAX_DEC_PIX should be enlarged following the size of image. | ||
| 2. MAXCMP_BC is for benchmark. If testcase image is larger than 20M, the value of MAXCMP_BC should be enlarged following the size of image. | ||
``` | ||
# Level 1: HLS Modules | ||
|
||
The Level 1 APIs of Vitis Codec Library is presented as HLS C++ modules. | ||
|
||
This level of API is mainly provided for hardware-savvy developers. | ||
The API description and design details of these modules can be found | ||
in _L1 Module User Guide_ section of the library document. | ||
|
||
## License | ||
|
||
Licensed using the [Apache 2.0 license](https://www.apache.org/licenses/LICENSE-2.0). | ||
|
||
Copyright 2022 Xilinx, Inc. | ||
|
||
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. | ||
Copyright 2022 Xilinx, Inc. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* Copyright 2019 Xilinx, Inc. | ||
* | ||
* 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. | ||
*/ | ||
|
||
#ifndef XLNX_CFG_H | ||
#define XLNX_CFG_H | ||
|
||
#define XLNX_DEBUG_DCT | ||
#define XLNX_DEBUG_CMAP | ||
|
||
#define XLNX_DISABLE_BLK_DICT | ||
#define XLNX_DISABLE_RECT_DCT | ||
#define XLNX_DISABLE_ARC | ||
#define XLNX_DISABLE_2NDCMP | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.