Skip to content

Commit a9a8139

Browse files
Virat AgarwalGitHub Enterprise
authored andcommitted
C model updates
1 parent dfe0945 commit a9a8139

17 files changed

+80
-149
lines changed

common/utility/reference.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@
146146
"SLR Assignments": "https://www.xilinx.com/html_docs/xilinx2021_1/vitis_doc/migrating_new_target_platform.html#img1535745661571",
147147
"SystemC": "https://www.xilinx.com/html_docs/xilinx2021_1/vitis_doc/runemulation1.html#cmo1619037605921",
148148
"XRT Native API": "https://www.xilinx.com/html_docs/xilinx2021_1/vitis_doc/devhostapp.html#jln1620691667890",
149-
"P2P": "https://www.xilinx.com/html_docs/xilinx2021_1/vitis_doc/Chunk938767849.html#qex1558551641915"
149+
"P2P": "https://www.xilinx.com/html_docs/xilinx2021_1/vitis_doc/Chunk938767849.html#qex1558551641915",
150+
"RTL C-Model": "https://www.xilinx.com/html_docs/xilinx2021_1/vitis_doc/rtl_kernel_wizard.html#wnd1523535864477"
150151
}
151152
}

rtl_kernels/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Example | Description | Key Concepts / Keywords
99
[rtl_adder_streams/][]|This example shows an adder with streams using 3 RTL kernels.|__Key__ __Concepts__<br> - [RTL Kernel](https://www.xilinx.com/html_docs/xilinx2021_1/vitis_doc/devrtlkernel.html)<br> - [Multiple RTL Kernels](https://www.xilinx.com/html_docs/xilinx2021_1/vitis_doc/devrtlkernel.html)<br>
1010
[rtl_streaming_free_running_k2k/][]|This is simple example which demonstrate how to use and configure a free running RTL kernel.|__Key__ __Concepts__<br> - [Read/Write Stream](https://www.xilinx.com/html_docs/xilinx2021_1/vitis_doc/streamingconnections.html#ynb1556233012018)<br> - [RTL Kernel](https://www.xilinx.com/html_docs/xilinx2021_1/vitis_doc/devrtlkernel.html)<br> - [Free Running Kernel](https://www.xilinx.com/html_docs/xilinx2021_1/vitis_doc/streamingconnections.html#uug1556136182736)<br>__Keywords__<br> - [ap_axiu](https://www.xilinx.com/html_docs/xilinx2021_1/vitis_doc/streamingconnections.html#tzq1555344621950)<br> - [hls::stream](https://www.xilinx.com/html_docs/xilinx2021_1/vitis_doc/hls_stream_library.html)
1111
[rtl_streaming_k2k_mm/][]|This example uses two simple increment RTL kernels connected to each other via stream interface and connected to host via memory mapped C++ data mover kernels|__Key__ __Concepts__<br> - [Read/Write Stream](https://www.xilinx.com/html_docs/xilinx2021_1/vitis_doc/streamingconnections.html#ynb1556233012018)<br> - [RTL Kernel](https://www.xilinx.com/html_docs/xilinx2021_1/vitis_doc/devrtlkernel.html)<br>__Keywords__<br> - [ap_axiu](https://www.xilinx.com/html_docs/xilinx2021_1/vitis_doc/streamingconnections.html#tzq1555344621950)<br> - [hls::stream](https://www.xilinx.com/html_docs/xilinx2021_1/vitis_doc/hls_stream_library.html)
12-
[rtl_vadd/][]|Simple example of vector addition using RTL Kernel|__Key__ __Concepts__<br> - [RTL Kernel](https://www.xilinx.com/html_docs/xilinx2021_1/vitis_doc/devrtlkernel.html)<br>__Keywords__<br> - [kernel_files](https://www.xilinx.com/html_docs/xilinx2021_1/vitis_doc/devrtlkernel.html#nuy1588349382079)
12+
[rtl_vadd/][]|This is a simple example of vector addition using RTL kernel and supports all flows including sw_emu using C-Model.|__Key__ __Concepts__<br> - [RTL Kernel](https://www.xilinx.com/html_docs/xilinx2021_1/vitis_doc/devrtlkernel.html)<br> - [RTL C-Model](https://www.xilinx.com/html_docs/xilinx2021_1/vitis_doc/rtl_kernel_wizard.html#wnd1523535864477)<br>__Keywords__<br> - [kernel_files](https://www.xilinx.com/html_docs/xilinx2021_1/vitis_doc/devrtlkernel.html#nuy1588349382079)
1313
[rtl_vadd_2clks/][]|This example shows vector addition with 2 kernel clocks using RTL Kernel.|__Key__ __Concepts__<br> - [RTL Kernel](https://www.xilinx.com/html_docs/xilinx2021_1/vitis_doc/devrtlkernel.html)<br> - [Multiple Kernel Clocks](https://www.xilinx.com/html_docs/xilinx2021_1/vitis_doc/vitiscommandcompiler.html#mcj1568640526180__section_bh5_dg4_bjb)<br>__Keywords__<br> - [clock](https://www.xilinx.com/html_docs/xilinx2021_1/vitis_doc/vitiscommandcompiler.html#ans1568640653312)<br> - [freqHz](https://www.xilinx.com/html_docs/xilinx2021_1/vitis_doc/vitiscommandcompiler.html#ans1568640653312__section_vh5_yf4_bjb)<br> - [ap_clk](https://www.xilinx.com/html_docs/xilinx2021_1/vitis_doc/managing_interface_synthesis.html#opo1539734223038)<br> - ap_clk2
1414
[rtl_vadd_2kernels/][]|This example has two RTL Kernels. Both Kernel_0 and Kernel_1 perform vector addition. The Kernel_1 reads the output from Kernel_0 as one of two inputs.|__Key__ __Concepts__<br> - [Multiple RTL Kernels](https://www.xilinx.com/html_docs/xilinx2021_1/vitis_doc/devrtlkernel.html)<br>
1515
[rtl_vadd_hw_debug/][]|This is an example that showcases the Hardware Debug of Vector Addition RTL Kernel in Hardware.|__Key__ __Concepts__<br> - [RTL Kernel Debug](https://www.xilinx.com/html_docs/xilinx2021_1/vitis_doc/debuggingapplicationskernels.html#xey1524445482547)<br>

rtl_kernels/rtl_vadd/README.rst

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
Vadd Simple (RTL Kernel)
22
========================
33

4-
Simple example of vector addition using RTL Kernel
4+
This is a simple example of vector addition using RTL kernel and supports all flows including sw_emu using C-Model.
55

6-
**KEY CONCEPTS:** `RTL Kernel <https://www.xilinx.com/html_docs/xilinx2021_1/vitis_doc/devrtlkernel.html>`__
6+
**KEY CONCEPTS:** `RTL Kernel <https://www.xilinx.com/html_docs/xilinx2021_1/vitis_doc/devrtlkernel.html>`__, `RTL C-Model <https://www.xilinx.com/html_docs/xilinx2021_1/vitis_doc/rtl_kernel_wizard.html#wnd1523535864477>`__
77

88
**KEYWORDS:** `kernel_files <https://www.xilinx.com/html_docs/xilinx2021_1/vitis_doc/devrtlkernel.html#nuy1588349382079>`__
99

@@ -23,15 +23,17 @@ Application code is located in the src directory. Accelerator binary files will
2323

2424
::
2525

26-
src/hdl/krnl_vadd_rtl.v
27-
src/hdl/krnl_vadd_rtl_adder.sv
28-
src/hdl/krnl_vadd_rtl_axi_read_master.sv
29-
src/hdl/krnl_vadd_rtl_axi_write_master.sv
30-
src/hdl/krnl_vadd_rtl_control_s_axi.v
31-
src/hdl/krnl_vadd_rtl_counter.sv
32-
src/hdl/krnl_vadd_rtl_int.sv
3326
src/host.cpp
34-
src/vadd.cpp
27+
src/krnl_vadd/gen_xo.tcl
28+
src/krnl_vadd/hdl/krnl_vadd_rtl.v
29+
src/krnl_vadd/hdl/krnl_vadd_rtl_adder.sv
30+
src/krnl_vadd/hdl/krnl_vadd_rtl_axi_read_master.sv
31+
src/krnl_vadd/hdl/krnl_vadd_rtl_axi_write_master.sv
32+
src/krnl_vadd/hdl/krnl_vadd_rtl_control_s_axi.v
33+
src/krnl_vadd/hdl/krnl_vadd_rtl_counter.sv
34+
src/krnl_vadd/hdl/krnl_vadd_rtl_int.sv
35+
src/krnl_vadd/package_kernel.tcl
36+
src/krnl_vadd/vadd_CModel.cpp
3537
3638
COMMAND LINE ARGUMENTS
3739
----------------------
@@ -62,6 +64,6 @@ The example also supports sw_emu by running the vadd.cpp code provided in the ``
6264

6365
::
6466

65-
package_xo -xo_path ${xoname} -kernel_name krnl_vadd_rtl -ip_directory ./packaged_kernel_${suffix} -kernel_files src/vadd.cpp
67+
package_xo -xo_path ${xoname} -kernel_name krnl_vadd_rtl -ip_directory ./packaged_kernel_${suffix} -kernel_files src/krnl_vadd/vadd_CModel.cpp
6668

6769
For more comprehensive documentation, `click here <http://xilinx.github.io/Vitis_Accel_Examples>`__.

rtl_kernels/rtl_vadd/config.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
VIVADO := $(XILINX_VIVADO)/bin/vivado
2-
$(TEMP_DIR)/vadd.xo: scripts/package_kernel.tcl scripts/gen_xo.tcl src/hdl/*.sv src/hdl/*.v
2+
$(TEMP_DIR)/vadd.xo: src/krnl_vadd/package_kernel.tcl src/krnl_vadd/gen_xo.tcl src/krnl_vadd/hdl/*.sv src/krnl_vadd/hdl/*.v
33
mkdir -p $(TEMP_DIR)
4-
$(VIVADO) -mode batch -source scripts/gen_xo.tcl -tclargs $(TEMP_DIR)/vadd.xo vadd $(TARGET) $(DEVICE) $(XSA)
4+
$(VIVADO) -mode batch -source src/krnl_vadd/gen_xo.tcl -tclargs $(TEMP_DIR)/vadd.xo $(TARGET) $(DEVICE) $(XSA)

rtl_kernels/rtl_vadd/description.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
{
22
"name": "Vadd Simple (RTL Kernel)",
33
"description": [
4-
"Simple example of vector addition using RTL Kernel"
4+
"This is a simple example of vector addition using RTL kernel and supports all flows including sw_emu using C-Model."
55
],
66
"flow": "vitis",
77
"keywords": [
88
"kernel_files"
99
],
1010
"key_concepts": [
11-
"RTL Kernel"
11+
"RTL Kernel",
12+
"RTL C-Model"
1213
],
1314
"platform_blacklist": [
1415
"nodma"

rtl_kernels/rtl_vadd/details.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ The example also supports sw_emu by running the vadd.cpp code provided in the ``
1818

1919
::
2020

21-
package_xo -xo_path ${xoname} -kernel_name krnl_vadd_rtl -ip_directory ./packaged_kernel_${suffix} -kernel_files src/vadd.cpp
21+
package_xo -xo_path ${xoname} -kernel_name krnl_vadd_rtl -ip_directory ./packaged_kernel_${suffix} -kernel_files src/krnl_vadd/vadd_CModel.cpp

rtl_kernels/rtl_vadd/scripts/gen_xo.tcl renamed to rtl_kernels/rtl_vadd/src/krnl_vadd/gen_xo.tcl

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,23 @@
1414
# under the License.
1515
#
1616

17-
if { $::argc != 5 } {
18-
puts "ERROR: Program \"$::argv0\" requires 5 arguments!\n"
19-
puts "Usage: $::argv0 <xoname> <krnl_name> <target> <xpfm_path> <device>\n"
17+
if { $::argc != 4 } {
18+
puts "ERROR: Program \"$::argv0\" requires 4 arguments!\n"
19+
puts "Usage: $::argv0 <xoname> <target> <xpfm_path> <device>\n"
2020
exit
2121
}
2222

2323
set xoname [lindex $::argv 0]
24-
set krnl_name [lindex $::argv 1]
25-
set target [lindex $::argv 2]
26-
set xpfm_path [lindex $::argv 3]
27-
set device [lindex $::argv 4]
24+
set target [lindex $::argv 1]
25+
set xpfm_path [lindex $::argv 2]
26+
set device [lindex $::argv 3]
2827

29-
set suffix "${krnl_name}_${target}_${device}"
28+
set suffix "vadd_${target}_${device}"
3029

31-
source -notrace ./scripts/package_kernel.tcl
30+
source -notrace ./src/krnl_vadd/package_kernel.tcl
3231

3332
if {[file exists "${xoname}"]} {
3433
file delete -force "${xoname}"
3534
}
3635

37-
package_xo -xo_path ${xoname} -kernel_name krnl_vadd_rtl -ip_directory ./packaged_kernel_${suffix} -kernel_files src/vadd.cpp
36+
package_xo -xo_path ${xoname} -kernel_name krnl_vadd_rtl -ip_directory ./packaged_kernel_${suffix} -kernel_files src/krnl_vadd/vadd_CModel.cpp

0 commit comments

Comments
 (0)