cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
12,428 Views
Registered: ‎12-09-2014

How to do XOR operation using DSP48E2

Jump to solution

Hi all,

 

As we were trying to use DSP48E2 we could not find documentation on how to configure this in Vivado, which hardware platform to select zynq..etc also how to perform XOR operation using DSP48E2.Kindly can anyone help us or provide documentation or pointers on how to go about this.

 

regards

Ravi chandran

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Teacher
Teacher
19,977 Views
Registered: ‎03-31-2012
DSP48E2 is a hardware block in the FPGA so it has no direct C access. Some tool has to convert your C code to HDL. Xilinx has such a tool called HLS. You need to partition your C code into parts which can run on a processor (microblaze?) and hardware. Then you need to convert the hardware portion of your C to HDL using HLS. You also have to add an AXI slave design to your hardware C so that the generated HDL can be plugged into the MB design with this AXI path.
- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.

View solution in original post

9 Replies
Highlighted
Xilinx Employee
Xilinx Employee
12,418 Views
Registered: ‎07-01-2010

Hi,

For Details on HDL coding styles and attribute information refer to UG901.

http://www.xilinx.com/support/documentation/sw_manuals/xilinx2014_4/ug901-vivado-synthesis.pdf

The UG479, has the design considerations and specifics of DSP48 in 7-series which includes zynq.
http://www.xilinx.com/support/documentation/user_guides/ug479_7Series_DSP48E1.pdf

 

For Ultrascale devices refer to this link

http://www.xilinx.com/support/documentation/user_guides/ug579-ultrascale-dsp.pdf

Regards,
Achutha

---------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------
0 Kudos
Highlighted
Visitor
Visitor
12,348 Views
Registered: ‎12-09-2014

Hi,

 

Thanks for the reply.In ultrascale 579 he tells about setting of ALUMODE and OPMODE .we are trying to do it in C not in HDL is this possible if so any snippet code on how to do that??

 

regards

Ravi chandran

0 Kudos
Highlighted
Teacher
Teacher
19,978 Views
Registered: ‎03-31-2012
DSP48E2 is a hardware block in the FPGA so it has no direct C access. Some tool has to convert your C code to HDL. Xilinx has such a tool called HLS. You need to partition your C code into parts which can run on a processor (microblaze?) and hardware. Then you need to convert the hardware portion of your C to HDL using HLS. You also have to add an AXI slave design to your hardware C so that the generated HDL can be plugged into the MB design with this AXI path.
- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.

View solution in original post

Highlighted
Visitor
Visitor
12,322 Views
Registered: ‎12-09-2014

Thanks for your reply.that means that I cannot configure ALUMODE and OPMODE using any C directive?? and also need to convert C code to HDL code using HLS to access the same...then if I write a XOR operation in C using HLS this will use normal LUT's which means I cannot force HLS to use DSP48E2 using C right??

 

0 Kudos
Highlighted
Visitor
Visitor
12,319 Views
Registered: ‎12-09-2014

also do you have any code snippet where  we can do an XOR in DSP48E2 which has both C as well as HDL code using HLS so that we get an idea and run the same on the HLS tool???

0 Kudos
Highlighted
Teacher
Teacher
12,311 Views
Registered: ‎03-31-2012

To be frank I am not sure even HDL synthesizers from Xilinx infer XOR operations in DSP48E. I haven't had a case where I needed such a wide XOR block. I think it's pretty much hopeless to get HLS to infer such a specific feature. You should ask in HLS forum; maybe someone from Xilinx can give some suggestions.

 

PS it seems someone else is interested in the same question: http://forums.xilinx.com/t5/High-Level-Synthesis-HLS/How-to-force-HLS-to-implement-XOR-operation-using-DSP48/td-p/552431

 

- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
0 Kudos
Highlighted
Visitor
Visitor
12,296 Views
Registered: ‎12-09-2014

Hi ,

 

when you refering as AXI path this means that it will have to support AXI interface protocol and also what do you mean by MB design (master board) so as to interface this and then use the DSP48E2 ??

 

ravi

0 Kudos
Highlighted
Visitor
Visitor
12,289 Views
Registered: ‎12-09-2014

Also say if I am using signal processing chain which would include all logical operations and also MAC and add sub ..etc then to do all these if we need DSP48E2 ..does that mean for all these you would require AXI slave interface and MB design so that all the processing blocks would work in maximum optimized mode????

0 Kudos
Highlighted
Teacher
Teacher
12,278 Views
Registered: ‎03-31-2012

I mentioned microblaze as an example because you need some processor to run the rest of the C code. But that was an assumption on my part that you would want to partition your design into C and hardware. I am not sure what exactly you are trying to do.

 

About using all the features of DSP48E, you should know that XOR feature is exclusive of multiplier and accumulator in DSP48E so at one time you can use one or the other. Again I am pretty sure (and one Xilinx employee confers) inferring XOR in DSP48E can't be done by HLS.

- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
0 Kudos