Skip to content

Commit

Permalink
Add QDMA feature for Alveo cards
Browse files Browse the repository at this point in the history
This feature enables the Xilinx QDMA engine as alternative to BlueDMA.
If the feature is enabled, following changes are made to the standard HW design:
- Remove BlueDMA
- Replace MSIX interrupt controller with adjusted IRQ controller for QDMA
- Substitute PCIe DMA/Bridge with QDMA IP, and add specific IPs for control
- Add Dummy Master for in_ic for compatibility with other plugins (and to make Vivado happy)

No changes to the TLKM and API required since QDMA is used for the Versal platform as well.
  • Loading branch information
tsmk94 committed May 10, 2022
1 parent f0a088d commit 7650894
Show file tree
Hide file tree
Showing 10 changed files with 1,162 additions and 4 deletions.
1 change: 1 addition & 0 deletions toolflow/vivado/common/common_ip.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ dict set stdcomps qdma_intr_ctrl vlnv "esa.informatik.tu-darmstadt.de:
dict set stdcomps axi_generic_off vlnv "esa.informatik.tu-darmstadt.de:user:axi_generic_offset:0.1"
dict set stdcomps axioffset_hbm vlnv "esa.informatik.tu-darmstadt.de:user:AXIOffsetHBM:1.0"
dict set stdcomps sume_clock_prog vlnv "esa.informatik.tu-darmstadt.de:user:SumeClockProgrammer:1.0"
dict set stdcomps axi_dummy_master vlnv "esa.informatik.tu-darmstadt.de:user:AXIDummyMaster:1.0"
dict set stdcomps dmi vlnv "esa.informatik.tu-darmstadt.de:user:DMI_rtl:1.0"
dict set stdcomps axi_to_dmi vlnv "esa.informatik.tu-darmstadt.de:user:AXI_to_Dmi:1.0"
dict set stdcomps tapasco_mmu vlnv "esa.informatik.tu-darmstadt.de:user:TapascoMMU:1.0"
Expand Down
753 changes: 753 additions & 0 deletions toolflow/vivado/common/ip/AXIDummyMaster/component.xml

Large diffs are not rendered by default.

66 changes: 66 additions & 0 deletions toolflow/vivado/common/ip/AXIDummyMaster/src/AXIDummyMaster.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
module AXIDummyMaster(M_AXI_aclk,
M_AXI_aresetn,
M_AXI_arvalid,
M_AXI_arready,
M_AXI_araddr,
M_AXI_arprot,
M_AXI_rready,
M_AXI_rvalid,
M_AXI_rdata,
M_AXI_rresp,
M_AXI_awready,
M_AXI_awvalid,
M_AXI_awaddr,
M_AXI_awprot,
M_AXI_wready,
M_AXI_wvalid,
M_AXI_wdata,
M_AXI_wstrb,
M_AXI_bvalid,
M_AXI_bready,
M_AXI_bresp);

input M_AXI_aclk;
input M_AXI_aresetn;

output M_AXI_arvalid;
input M_AXI_arready;
output [11:0] M_AXI_araddr;
output [2:0] M_AXI_arprot;

output M_AXI_rready;
input M_AXI_rvalid;
input [31:0] M_AXI_rdata;
input [1:0] M_AXI_rresp;

input M_AXI_awready;
output M_AXI_awvalid;
output [11:0] M_AXI_awaddr;
output [2:0] M_AXI_awprot;

input M_AXI_wready;
output M_AXI_wvalid;
output [31:0] M_AXI_wdata;
output [3:0] M_AXI_wstrb;

input M_AXI_bvalid;
output M_AXI_bready;
input [1:0] M_AXI_bresp;

assign M_AXI_arvalid = 0;
assign M_AXI_araddr = 0;
assign M_AXI_arprot = 0;

assign M_AXI_rready = 1;

assign M_AXI_awvalid = 0;
assign M_AXI_awaddr = 0;
assign M_AXI_awprot = 0;

assign M_AXI_wvalid = 0;
assign M_AXI_wdata = 0;
assign M_AXI_wstrb = 0;

assign M_AXI_bready = 1;
endmodule

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Definitional proc to organize widgets for parameters.
proc init_gui { IPINST } {
ipgui::add_param $IPINST -name "Component_Name"
#Adding Page
ipgui::add_page $IPINST -name "Page 0"


}


27 changes: 27 additions & 0 deletions toolflow/vivado/platform/AU250/plugins/qdma.tcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Copyright (c) 2014-2022 Embedded Systems and Applications, TU Darmstadt.
#
# This file is part of TaPaSCo
# (see https://github.com/esa-tu-darmstadt/tapasco).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#

namespace eval qdma {

# Overwrite this function with true if platform supports QDMA
proc is_qdma_supported {} {
return true
}

}
5 changes: 3 additions & 2 deletions toolflow/vivado/platform/AU280/AU280.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -177,12 +177,13 @@ namespace eval platform {
insert_regslice "dma_migic" false "/memory/dma/m32_axi" "/memory/mig_ic/S00_AXI" "/memory/mem_clk" "/memory/mem_peripheral_aresetn" "/memory"
insert_regslice "host_memctrl" true "/host/M_MEM_CTRL" "/memory/S_MEM_CTRL" "/clocks_and_resets/mem_clk" "/clocks_and_resets/mem_interconnect_aresetn" ""
insert_regslice "arch_mem" false "/arch/M_MEM_0" "/memory/S_MEM_0" "/clocks_and_resets/design_clk" "/clocks_and_resets/design_interconnect_aresetn" ""
insert_regslice "host_dma" true "/host/M_DMA" "/memory/S_DMA" "/clocks_and_resets/host_clk" "/clocks_and_resets/host_interconnect_aresetn" ""
insert_regslice "dma_host" true "/memory/M_HOST" "/host/S_HOST" "/clocks_and_resets/host_clk" "/clocks_and_resets/host_interconnect_aresetn" ""
insert_regslice "host_dma" [expr {![tapasco::is_feature_enabled "QDMA"]}] "/host/M_DMA" "/memory/S_DMA" "/clocks_and_resets/host_clk" "/clocks_and_resets/host_interconnect_aresetn" ""
insert_regslice "dma_host" [expr {![tapasco::is_feature_enabled "QDMA"]}] "/memory/M_HOST" "/host/S_HOST" "/clocks_and_resets/host_clk" "/clocks_and_resets/host_interconnect_aresetn" ""
insert_regslice "host_arch" true "/host/M_ARCH" "/arch/S_ARCH" "/clocks_and_resets/design_clk" "/clocks_and_resets/design_interconnect_aresetn" ""
insert_regslice "l2_cache" [tapasco::is_feature_enabled "Cache"] "/memory/cache_l2_0/M0_AXI" "/memory/mig/C0_DDR4_S_AXI" "/clocks_and_resets/mem_clk" "/clocks_and_resets/mem_peripheral_aresetn" "/memory"

insert_regslice "host_mmu" [tapasco::is_feature_enabled "SVM"] "/host/M_MMU" "/memory/S_MMU" "/clocks_and_resets/host_clk" "/clocks_and_resets/host_interconnect_aresetn" ""
insert_regslice "host_qdma" [tapasco::is_feature_enabled "QDMA"] "host/M_MEM_QDMA" "/memory/S_MEM_QDMA" "/clocks_and_resets/host_clk" "clocks_and_resets/host_interconnect_aresetn" ""

if {[is_regslice_enabled "pe" false]} {
set ips [get_bd_cells /arch/target_ip_*]
Expand Down
27 changes: 27 additions & 0 deletions toolflow/vivado/platform/AU280/plugins/qdma.tcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Copyright (c) 2014-2022 Embedded Systems and Applications, TU Darmstadt.
#
# This file is part of TaPaSCo
# (see https://github.com/esa-tu-darmstadt/tapasco).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#

namespace eval qdma {

# Overwrite this function with true if platform supports QDMA
proc is_qdma_supported {} {
return true
}

}
4 changes: 3 additions & 1 deletion toolflow/vivado/platform/AU280/plugins/svm.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ namespace eval svm {
proc add_iommu {} {
if {[tapasco::is_feature_enabled "SVM"]} {

puts "Adding IOMMU to memory subsystem..."

# add slave port to host subsystem
current_bd_instance "/host"
set m_mmu [create_bd_intf_pin -mode Master -vlnv xilinx.com:interface:aximm_rtl:1.0 "M_MMU"]
Expand Down Expand Up @@ -83,5 +85,5 @@ namespace eval svm {
}
}

tapasco::register_plugin "platform::svm::add_iommu" "pre-wiring"
tapasco::register_plugin "platform::svm::add_iommu" "mid-subsystems"
tapasco::register_plugin "platform::svm::addressmap" "post-address-map"
4 changes: 3 additions & 1 deletion toolflow/vivado/platform/common/platform.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ namespace eval platform {
current_bd_instance $instance
}

tapasco::call_plugins "pre-wiring"
tapasco::call_plugins "mid-subsystems"

set sss [list $ss_intc]

Expand All @@ -83,6 +83,8 @@ namespace eval platform {
puts "Subsystem $name complete."
}

tapasco::call_plugins "pre-wiring"

wire_subsystem_wires
wire_subsystem_intfs
addressmap::construct_address_map
Expand Down
Loading

0 comments on commit 7650894

Please sign in to comment.