UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Adventurer
Adventurer
2,095 Views
Registered: ‎12-16-2013

Is it possible to choos among HP ports in SDSoC?

Jump to solution

Hi all,

 

I am wondering if it is posible to choose the HP port assigened to an argument in the accelerator.

 

for example in the following code  (the accelerator prototype) assigne A,B and E to HP0 and C to HP1 and D and F to HP2.

 

int accel(float A[N], float  B[N], float  C[N], float  D[N], float  E[N], float  F[N]);

 

A,B, E -->  HP0

C        -- > HP1

D, F    --> HP2

 

Thanks 

Mohammad

0 Kudos
1 Solution

Accepted Solutions
Xilinx Employee
Xilinx Employee
3,908 Views
Registered: ‎06-29-2015

Re: Is it possible to choos among HP ports in SDSoC?

Jump to solution

Hi Mohammad,

 

There is a way to do this, but its currently undocumented. Theres no guarantee that this will continue to work in the future. But heres how it works in 2016.4. Given the platform tcl API for a platform (im using the zc702 built-in platform):

 

set pfm [sdsoc::create_pfm zc702.hpfm]
sdsoc::pfm_name        $pfm "xilinx.com" "xd" "zc702" "1.0"
sdsoc::pfm_description $pfm "Zynq ZC702 Board"
sdsoc::pfm_clock       $pfm FCLK_CLK0 ps7 0 false proc_sys_reset_0
sdsoc::pfm_clock       $pfm FCLK_CLK1 ps7 1 false proc_sys_reset_1
sdsoc::pfm_clock       $pfm FCLK_CLK2 ps7 2 true  proc_sys_reset_2
sdsoc::pfm_clock       $pfm FCLK_CLK3 ps7 3 false proc_sys_reset_3
sdsoc::pfm_axi_port    $pfm M_AXI_GP0 ps7 M_AXI_GP
sdsoc::pfm_axi_port    $pfm M_AXI_GP1 ps7 M_AXI_GP
sdsoc::pfm_axi_port    $pfm S_AXI_ACP ps7 S_AXI_ACP
sdsoc::pfm_axi_port    $pfm S_AXI_HP0 ps7 S_AXI_HP
sdsoc::pfm_axi_port    $pfm S_AXI_HP1 ps7 S_AXI_HP
sdsoc::pfm_axi_port    $pfm S_AXI_HP2 ps7 S_AXI_HP
sdsoc::pfm_axi_port    $pfm S_AXI_HP3 ps7 S_AXI_HP
for {set i 0} {$i < 16} {incr i} {
  sdsoc::pfm_irq       $pfm In$i xlconcat
}
sdsoc::generate_hw_pfm $pfm

Notice that S_AXI_HP0 is the port on the block named ps7.

 

In your code you can use the sys_port pragma to specify which port you want an argument to be connected to. Heres an example for matrix multiply:

 

#pragma SDS data sys_port(A:ps7_S_AXI_HP0, B:ps7_S_AXI_HP1)
#pragma SDS data access_pattern(A:SEQUENTIAL, B:SEQUENTIAL, C:SEQUENTIAL)
void mmult_accel (float A[N*N], float B[N*N], float C[N*N]);

Notice that you give the port using the format: <IP>_<PORT> where <IP> is "ps7" and <PORT> is "S_AXI_HP0". 

 

Sam

 

0 Kudos
1 Reply
Xilinx Employee
Xilinx Employee
3,909 Views
Registered: ‎06-29-2015

Re: Is it possible to choos among HP ports in SDSoC?

Jump to solution

Hi Mohammad,

 

There is a way to do this, but its currently undocumented. Theres no guarantee that this will continue to work in the future. But heres how it works in 2016.4. Given the platform tcl API for a platform (im using the zc702 built-in platform):

 

set pfm [sdsoc::create_pfm zc702.hpfm]
sdsoc::pfm_name        $pfm "xilinx.com" "xd" "zc702" "1.0"
sdsoc::pfm_description $pfm "Zynq ZC702 Board"
sdsoc::pfm_clock       $pfm FCLK_CLK0 ps7 0 false proc_sys_reset_0
sdsoc::pfm_clock       $pfm FCLK_CLK1 ps7 1 false proc_sys_reset_1
sdsoc::pfm_clock       $pfm FCLK_CLK2 ps7 2 true  proc_sys_reset_2
sdsoc::pfm_clock       $pfm FCLK_CLK3 ps7 3 false proc_sys_reset_3
sdsoc::pfm_axi_port    $pfm M_AXI_GP0 ps7 M_AXI_GP
sdsoc::pfm_axi_port    $pfm M_AXI_GP1 ps7 M_AXI_GP
sdsoc::pfm_axi_port    $pfm S_AXI_ACP ps7 S_AXI_ACP
sdsoc::pfm_axi_port    $pfm S_AXI_HP0 ps7 S_AXI_HP
sdsoc::pfm_axi_port    $pfm S_AXI_HP1 ps7 S_AXI_HP
sdsoc::pfm_axi_port    $pfm S_AXI_HP2 ps7 S_AXI_HP
sdsoc::pfm_axi_port    $pfm S_AXI_HP3 ps7 S_AXI_HP
for {set i 0} {$i < 16} {incr i} {
  sdsoc::pfm_irq       $pfm In$i xlconcat
}
sdsoc::generate_hw_pfm $pfm

Notice that S_AXI_HP0 is the port on the block named ps7.

 

In your code you can use the sys_port pragma to specify which port you want an argument to be connected to. Heres an example for matrix multiply:

 

#pragma SDS data sys_port(A:ps7_S_AXI_HP0, B:ps7_S_AXI_HP1)
#pragma SDS data access_pattern(A:SEQUENTIAL, B:SEQUENTIAL, C:SEQUENTIAL)
void mmult_accel (float A[N*N], float B[N*N], float C[N*N]);

Notice that you give the port using the format: <IP>_<PORT> where <IP> is "ps7" and <PORT> is "S_AXI_HP0". 

 

Sam

 

0 Kudos