Skip to content

Commit 03b0557

Browse files
committed
Merge remote-tracking branch 'gitenterprise/master'
2 parents ca0a157 + c4de828 commit 03b0557

361 files changed

Lines changed: 2841 additions & 513 deletions

File tree

Some content is hidden

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

AppNotes/Digital_Up_Converter/dds.h

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
1-
//______________________________________________________________________________
2-
// dds.h:
3-
// - barebone direct digital synthesizer class
4-
//
5-
//
6-
// a. paek, sep 2016
7-
//______________________________________________________________________________
1+
/*
2+
* Copyright 1986-2022 Xilinx, Inc. All Rights Reserved.
3+
* Copyright 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved.
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
817

918
#ifndef DDS_H_
1019
#define DDS_H_

AppNotes/Digital_Up_Converter/duc.cpp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
/*
2+
* Copyright 1986-2022 Xilinx, Inc. All Rights Reserved.
3+
* Copyright 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved.
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
118
#include "duc.h"
219

320
#if 1

AppNotes/Digital_Up_Converter/duc.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
/*
2+
* Copyright 1986-2022 Xilinx, Inc. All Rights Reserved.
3+
* Copyright 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved.
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
118
#ifndef DUC_H
219
#define DUC_H
320

AppNotes/Digital_Up_Converter/duc_test.cpp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
/*
2+
* Copyright 1986-2022 Xilinx, Inc. All Rights Reserved.
3+
* Copyright 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved.
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
118
#include "duc.h"
219
#include <math.h>
320

AppNotes/Digital_Up_Converter/fir.h

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
1-
//______________________________________________________________________________
2-
// fir.h:
3-
// - various FIR module
4-
//
5-
//
6-
// a. paek, sep 2013
7-
//______________________________________________________________________________
8-
9-
// some classes removed from xapp1299 reference code.
1+
/*
2+
* Copyright 1986-2022 Xilinx, Inc. All Rights Reserved.
3+
* Copyright 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved.
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
1017

1118
#ifndef _FIR_H
1219
#define _FIR_H

Array/array_partition_block_cyclic/README

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ matmul_partition.h
88
matmul_partition_test.cpp
99
run_hls.tcl
1010
run_vitis_commandline.sh
11+
run.py
1112

1213
Running the Design using Vitis HLS (edit run_hls.tcl to set $hls_exec and enable specific run steps)
1314
=========================================================
@@ -17,3 +18,6 @@ Running the design using Vitis v++ and vitis-run commands
1718
=====================================================
1819
./run_vitis_commandline.sh
1920

21+
Running the design using python script
22+
=====================================================
23+
vitis -s run.py
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
2+
import vitis
3+
import os
4+
5+
cwd = os.getcwd()+'/'
6+
7+
# Initialize session
8+
client = vitis.create_client()
9+
client.set_workspace(path='./w')
10+
11+
# Delete the component if it already exists
12+
if os.path.exists('./w/array_partition_block_cyclic'):
13+
client.delete_component(name='array_partition_block_cyclic')
14+
15+
# Create component. Create new config file in the component folder of the workspace
16+
comp = client.create_hls_component(name='array_partition_block_cyclic', cfg_file = ['hls_config.cfg'], template = 'empty_hls_component')
17+
18+
# Get handle of config file, then programmatically set desired options
19+
cfg_file = client.get_config_file(path = './w/array_partition_block_cyclic/hls_config.cfg')
20+
cfg_file.set_value ( key = 'part', value = 'xcvu9p-flga2104-2-i')
21+
cfg_file.set_value (section = 'hls', key = 'syn.file', value = cwd+'matmul_partition.cpp')
22+
cfg_file.set_values(section = 'hls', key = 'tb.file', values = [cwd+'matmul_partition_test.cpp'])
23+
cfg_file.set_value (section = 'hls', key = 'syn.top', value = 'matmul_partition')
24+
cfg_file.set_value (section = 'hls', key = 'clock', value = '4') # 250MHz
25+
cfg_file.set_value (section = 'hls', key = 'flow_target', value = 'vivado')
26+
#cfg_file.set_value (section = 'hls', key = 'package.output.syn', value = '0')
27+
cfg_file.set_value (section = 'hls', key = 'package.output.format', value = 'rtl')
28+
cfg_file.set_value (section = 'hls', key = 'csim.code_analyzer', value = '0')
29+
30+
# Run flow steps
31+
comp = client.get_component(name='array_partition_block_cyclic')
32+
comp.run(operation='C_SIMULATION')
33+
comp.run(operation='SYNTHESIS')
34+
comp.run(operation='CO_SIMULATION')

Array/array_partition_block_cyclic/run_hls.tcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#
22
# Copyright 1986-2022 Xilinx, Inc. All Rights Reserved.
3-
# Copyright 2022-2023 Advanced Micro Devices, Inc. All Rights Reserved.
3+
# Copyright 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved.
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.

Array/array_partition_complete/README

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ matmul_partition.h
88
matmul_partition_test.cpp
99
run_hls.tcl
1010
run_vitis_commandline.sh
11+
run.py
1112

1213
Running the Design using Vitis HLS (edit run_hls.tcl to set $hls_exec and enable specific run steps)
1314
=========================================================
@@ -17,3 +18,7 @@ Running the design using Vitis v++ and vitis-run commands
1718
=====================================================
1819
./run_vitis_commandline.sh
1920

21+
Running the design using python script
22+
=====================================================
23+
vitis -s run.py
24+
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
2+
import vitis
3+
import os
4+
5+
cwd = os.getcwd()+'/'
6+
7+
# Initialize session
8+
client = vitis.create_client()
9+
client.set_workspace(path='./w')
10+
11+
# Delete the component if it already exists
12+
if os.path.exists('./w/array_partition_complete'):
13+
client.delete_component(name='array_partition_complete')
14+
15+
# Create component. Create new config file in the component folder of the workspace
16+
comp = client.create_hls_component(name='array_partition_complete', cfg_file = ['hls_config.cfg'], template = 'empty_hls_component')
17+
18+
# Get handle of config file, then programmatically set desired options
19+
cfg_file = client.get_config_file(path = './w/array_partition_complete/hls_config.cfg')
20+
cfg_file.set_value ( key = 'part', value = 'xcvu9p-flga2104-2-i')
21+
cfg_file.set_value (section = 'hls', key = 'syn.file', value = cwd+'matmul_partition.cpp')
22+
cfg_file.set_values(section = 'hls', key = 'tb.file', values = [cwd+'matmul_partition_test.cpp'])
23+
cfg_file.set_value (section = 'hls', key = 'syn.top', value = 'matmul_partition')
24+
cfg_file.set_value (section = 'hls', key = 'clock', value = '4') # 250MHz
25+
cfg_file.set_value (section = 'hls', key = 'flow_target', value = 'vitis')
26+
cfg_file.set_value (section = 'hls', key = 'package.output.syn', value = '0')
27+
cfg_file.set_value (section = 'hls', key = 'package.output.format', value = 'xo')
28+
cfg_file.set_value (section = 'hls', key = 'csim.code_analyzer', value = '0')
29+
30+
# Run flow steps
31+
comp = client.get_component(name='array_partition_complete')
32+
comp.run(operation='C_SIMULATION')
33+
comp.run(operation='SYNTHESIS')
34+
comp.run(operation='CO_SIMULATION')

0 commit comments

Comments
 (0)