Skip to content

Commit

Permalink
create PR for merging the oneAPI editor changes into oneapi-asp (#153)
Browse files Browse the repository at this point in the history
* create PR for merging the oneAPI editor changes into oneapi-asp

* reformatting and cleaning up

* adding more comments and cleaning up
  • Loading branch information
boelkrug-intel authored Sep 3, 2024
1 parent 564ee54 commit 76ba584
Show file tree
Hide file tree
Showing 53 changed files with 6,231 additions and 526 deletions.
271 changes: 199 additions & 72 deletions common/hardware/common/build/board_hw.tcl

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions common/hardware/common/build/ddr_board_hw.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ set_module_property COMPOSITION_CALLBACK compose
# |
source parameters.tcl

add_parameter NUMBER_OF_MEMORY_BANKS INTEGER $p_NUMBER_OF_MEMORY_BANKS
set_parameter_property NUMBER_OF_MEMORY_BANKS DEFAULT_VALUE $p_NUMBER_OF_MEMORY_BANKS
add_parameter NUMBER_OF_MEMORY_BANKS INTEGER $p_MEM_0_NUMBER_OF_MEMORY_BANKS
set_parameter_property NUMBER_OF_MEMORY_BANKS DEFAULT_VALUE $p_MEM_0_NUMBER_OF_MEMORY_BANKS
set_parameter_property NUMBER_OF_MEMORY_BANKS DISPLAY_NAME "Number of Memory Banks"
set_parameter_property NUMBER_OF_MEMORY_BANKS AFFECTS_ELABORATION true

Expand All @@ -24,23 +24,23 @@ set_parameter_property NUMBER_OF_DMA_CHANNELS DEFAULT_VALUE $p_NUMBER_OF_DMA_CHA
set_parameter_property NUMBER_OF_DMA_CHANNELS DISPLAY_NAME "Number of DMA Channels"
set_parameter_property NUMBER_OF_DMA_CHANNELS AFFECTS_ELABORATION true

add_parameter MEMORY_BANK_ADDRESS_WIDTH INTEGER $p_MEMORY_BANK_ADDRESS_WIDTH
set_parameter_property MEMORY_BANK_ADDRESS_WIDTH DEFAULT_VALUE $p_MEMORY_BANK_ADDRESS_WIDTH
add_parameter MEMORY_BANK_ADDRESS_WIDTH INTEGER $p_MEM_0_MEMORY_BANK_ADDRESS_WIDTH
set_parameter_property MEMORY_BANK_ADDRESS_WIDTH DEFAULT_VALUE $p_MEM_0_MEMORY_BANK_ADDRESS_WIDTH
set_parameter_property MEMORY_BANK_ADDRESS_WIDTH DISPLAY_NAME "Memory Bank Address Width"
set_parameter_property MEMORY_BANK_ADDRESS_WIDTH AFFECTS_ELABORATION true

add_parameter DATA_WIDTH INTEGER $p_DATA_WIDTH
set_parameter_property DATA_WIDTH DEFAULT_VALUE $p_DATA_WIDTH
add_parameter DATA_WIDTH INTEGER $p_MEM_0_DATA_WIDTH
set_parameter_property DATA_WIDTH DEFAULT_VALUE $p_MEM_0_DATA_WIDTH
set_parameter_property DATA_WIDTH DISPLAY_NAME "Data Width"
set_parameter_property DATA_WIDTH AFFECTS_ELABORATION true

add_parameter MAX_BURST_SIZE INTEGER $p_MAX_BURST_SIZE
set_parameter_property MAX_BURST_SIZE DEFAULT_VALUE $p_MAX_BURST_SIZE
add_parameter MAX_BURST_SIZE INTEGER $p_MEM_0_MAX_BURST_SIZE
set_parameter_property MAX_BURST_SIZE DEFAULT_VALUE $p_MEM_0_MAX_BURST_SIZE
set_parameter_property MAX_BURST_SIZE DISPLAY_NAME "Maximum Burst Size"
set_parameter_property MAX_BURST_SIZE AFFECTS_ELABORATION true

add_parameter KERNEL_GLOBALMEM_WAITREQUEST_ALLOWANCE INTEGER $p_KERNEL_GLOBALMEM_WAITREQUEST_ALLOWANCE
set_parameter_property KERNEL_GLOBALMEM_WAITREQUEST_ALLOWANCE DEFAULT_VALUE $p_KERNEL_GLOBALMEM_WAITREQUEST_ALLOWANCE
add_parameter KERNEL_GLOBALMEM_WAITREQUEST_ALLOWANCE INTEGER $p_MEM_0_KERNEL_GLOBALMEM_WAITREQUEST_ALLOWANCE
set_parameter_property KERNEL_GLOBALMEM_WAITREQUEST_ALLOWANCE DEFAULT_VALUE $p_MEM_0_KERNEL_GLOBALMEM_WAITREQUEST_ALLOWANCE
set_parameter_property KERNEL_GLOBALMEM_WAITREQUEST_ALLOWANCE DISPLAY_NAME "Kernel to global memory waitrequest allowance"
set_parameter_property KERNEL_GLOBALMEM_WAITREQUEST_ALLOWANCE AFFECTS_ELABORATION true

Expand All @@ -49,8 +49,8 @@ set_parameter_property SNOOP_PORT_ENABLE DEFAULT_VALUE $p_SNOOP_PORT_ENABLE
set_parameter_property SNOOP_PORT_ENABLE DISPLAY_NAME "Enable Snoop Port"
set_parameter_property SNOOP_PORT_ENABLE AFFECTS_ELABORATION true

add_parameter MBD_TO_MEMORY_PIPE_STAGES INTEGER $p_MBD_TO_MEMORY_PIPE_STAGES
set_parameter_property MBD_TO_MEMORY_PIPE_STAGES DEFAULT_VALUE $p_MBD_TO_MEMORY_PIPE_STAGES
add_parameter MBD_TO_MEMORY_PIPE_STAGES INTEGER $p_MEM_0_MBD_TO_MEMORY_PIPE_STAGES
set_parameter_property MBD_TO_MEMORY_PIPE_STAGES DEFAULT_VALUE $p_MEM_0_MBD_TO_MEMORY_PIPE_STAGES
set_parameter_property MBD_TO_MEMORY_PIPE_STAGES DISPLAY_NAME "MBD to Memory Pipeline Stages"
set_parameter_property MBD_TO_MEMORY_PIPE_STAGES AFFECTS_ELABORATION true
# |
Expand Down
87 changes: 73 additions & 14 deletions common/hardware/common/build/rtl/afu.sv
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,19 @@ import ofs_asp_pkg::*;
ofs_plat_avalon_mem_if.to_source mmio64_if,

// Local memory interface.
ofs_plat_avalon_mem_if.to_slave local_mem[ASP_LOCALMEM_NUM_CHANNELS],

`ifdef ASP_ENABLE_GLOBAL_MEM_0
ofs_plat_avalon_mem_if.to_slave local_mem0[ASP_GLOBAL_MEM_0_NUM_CHANNELS],
`endif
`ifdef ASP_ENABLE_GLOBAL_MEM_1
ofs_plat_avalon_mem_if.to_slave local_mem1[ASP_GLOBAL_MEM_1_NUM_CHANNELS],
`endif
`ifdef ASP_ENABLE_GLOBAL_MEM_2
ofs_plat_avalon_mem_if.to_slave local_mem2[ASP_GLOBAL_MEM_2_NUM_CHANNELS],
`endif
`ifdef ASP_ENABLE_GLOBAL_MEM_3
ofs_plat_avalon_mem_if.to_slave local_mem3[ASP_GLOBAL_MEM_3_NUM_CHANNELS],
`endif

`ifdef INCLUDE_IO_PIPES
// Ethernet
ofs_plat_hssi_channel_if hssi_pipes[IO_PIPES_NUM_CHAN],
Expand Down Expand Up @@ -45,7 +56,19 @@ assign clk = pClk;

//local wires to connect between asp_logic and kernel_wrapper - kernel control and memory-interface
kernel_control_intf kernel_control();
kernel_mem_intf kernel_mem[ASP_LOCALMEM_NUM_CHANNELS]();

`ifdef ASP_ENABLE_GLOBAL_MEM_0
kernel_mem_intf kernel_mem0[ASP_GLOBAL_MEM_0_NUM_CHANNELS]();
`endif
`ifdef ASP_ENABLE_GLOBAL_MEM_1
kernel_mem_intf kernel_mem1[ASP_GLOBAL_MEM_1_NUM_CHANNELS]();
`endif
`ifdef ASP_ENABLE_GLOBAL_MEM_2
kernel_mem_intf kernel_mem2[ASP_GLOBAL_MEM_2_NUM_CHANNELS]();
`endif
`ifdef ASP_ENABLE_GLOBAL_MEM_3
kernel_mem_intf kernel_mem3[ASP_GLOBAL_MEM_3_NUM_CHANNELS]();
`endif

// The width of the Avalon-MM user field is narrower on the AFU side
// of VTP, since VTP uses a bit to flag VTP page table traffic.
Expand Down Expand Up @@ -181,30 +204,66 @@ asp_logic asp_logic_inst (
.kernel_clk ( uClk_usrDiv2 ),
.kernel_clk_reset ( uClk_usrDiv2_reset ),
.host_mem_if ( host_mem_va_if_dma ),
.mmio64_if ( mmio64_if_shim ),
.mmio64_if ( mmio64_if_shim )
`ifdef INCLUDE_IO_PIPES
.uoe_csr_avmm,
,.uoe_csr_avmm
`endif
`ifdef ASP_ENABLE_GLOBAL_MEM_0
,.local_mem0
`endif
`ifdef ASP_ENABLE_GLOBAL_MEM_1
,.local_mem1
`endif
`ifdef ASP_ENABLE_GLOBAL_MEM_2
,.local_mem2
`endif
`ifdef ASP_ENABLE_GLOBAL_MEM_3
,.local_mem3
`endif

,.kernel_control

`ifdef ASP_ENABLE_GLOBAL_MEM_0
,.kernel_mem0(kernel_mem0)
`endif
`ifdef ASP_ENABLE_GLOBAL_MEM_1
,.kernel_mem1(kernel_mem1)
`endif
`ifdef ASP_ENABLE_GLOBAL_MEM_2
,.kernel_mem2(kernel_mem2)
`endif
`ifdef ASP_ENABLE_GLOBAL_MEM_3
,.kernel_mem3(kernel_mem3)
`endif
.local_mem,

.kernel_control,
.kernel_mem
);

kernel_wrapper kernel_wrapper_inst (
.clk (uClk_usrDiv2),
.clk2x (uClk_usr),
.reset_n (!uClk_usrDiv2_reset),

.kernel_control,
.kernel_mem
.kernel_control

`ifdef ASP_ENABLE_GLOBAL_MEM_0
,.kernel_mem0
`endif
`ifdef ASP_ENABLE_GLOBAL_MEM_1
,.kernel_mem1
`endif
`ifdef ASP_ENABLE_GLOBAL_MEM_2
,.kernel_mem2
`endif
`ifdef ASP_ENABLE_GLOBAL_MEM_3
,.kernel_mem3
`endif

`ifdef INCLUDE_USM_SUPPORT
, .kernel_svm (kernel_svm_kclk)
,.kernel_svm (kernel_svm_kclk)
`endif

`ifdef INCLUDE_IO_PIPES
,.udp_avst_from_kernel,
.udp_avst_to_kernel
,.udp_avst_from_kernel
,.udp_avst_to_kernel
`endif
);

Expand Down
Loading

0 comments on commit 76ba584

Please sign in to comment.