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: 
Explorer
Explorer
631 Views
Registered: ‎05-23-2017

how to transfer a fixed-point with 512 bitwidth port

Jump to solution

I have a kernel, whoes input is 10000 16 bit fixed-point data, i.e., ap_fixed<16,4>.

kernel( ap_fixed<16,4> input1,...){

.....

}

 

To leverage the max port transfer a 512 bitwidth data should be used for kernel input.

So for  a 512 bit port, there are 512/16=32 input each read of the port.

 

I don't know how to write this port.

Should I write like this?

kernel( ap_fixed<512> input2,...){

.....

}

 

And then each 16 bit of input2 will be the input1?

0 Kudos
1 Solution

Accepted Solutions
Moderator
Moderator
508 Views
Registered: ‎11-04-2010

Re: how to transfer a fixed-point with 512 bitwidth port

Jump to solution

Hi, @mathmaxsean ,

In host end, you have to combine the 32 16bit width data into 1 512 bit width data. 

Both the data width in host and kernel are 512 bit.

-------------------------------------------------------------------------
Don't forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
6 Replies
Moderator
Moderator
603 Views
Registered: ‎11-04-2010

Re: how to transfer a fixed-point with 512 bitwidth port

Jump to solution

Hi, @mathmaxsean ,

The interface of kernel can be any type with 512-bit width to match the DDR interface.

Then you need to split the 512-bit data to 32 16bit data by yourself.

The kernel interface can be:

 kernel( const ap_uint<512> *input2, ...){

//code for spliting the 512-bit data to 32 16-bit data by yourself

...

}

-------------------------------------------------------------------------
Don't forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Xilinx Employee
Xilinx Employee
597 Views
Registered: ‎01-12-2017

Re: how to transfer a fixed-point with 512 bitwidth port

Jump to solution
0 Kudos
Explorer
Explorer
575 Views
Registered: ‎05-23-2017

Re: how to transfer a fixed-point with 512 bitwidth port

Jump to solution

@hongh

 

Thanks for that.

I know the uer need to manually to splite the 512-bit data in there kernel.

For my case the type of the data is ap_fixed<16,4>

1. how can I use the 512 bit-data for the kernel port?

  Can I use ap_fixed<512> for the kernel port like the ap_uint<512>?

  Then each 16 bit is  one of my data?

2. Can I use the ap_fixed<16,4> on my host side code?

 

 

0 Kudos
Explorer
Explorer
574 Views
Registered: ‎05-23-2017

Re: how to transfer a fixed-point with 512 bitwidth port

Jump to solution

@kalib

 

Thanks.

Is there an example using the 512 fixed-point data for transfer?

0 Kudos
Moderator
Moderator
509 Views
Registered: ‎11-04-2010

Re: how to transfer a fixed-point with 512 bitwidth port

Jump to solution

Hi, @mathmaxsean ,

In host end, you have to combine the 32 16bit width data into 1 512 bit width data. 

Both the data width in host and kernel are 512 bit.

-------------------------------------------------------------------------
Don't forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
Explorer
Explorer
497 Views
Registered: ‎05-23-2017

Re: how to transfer a fixed-point with 512 bitwidth port

Jump to solution

Thanks.

0 Kudos