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!

Reply

ap_fixed details

Highlighted
Teacher
Posts: 5,146
Registered: ‎03-31-2012

Re: ap_fixed details

I just found this old thread and wanted to contribute a solution to it which I didn't have at the time:

 

The traits file in %XILINX/include/utils/x_hls_traits.h has the solution to this issue. One can define a trait based on types and use them like this:

 

typedef ap_fixed<...> foo;

typedef ap_fixed<...> bar;

 

typedef typename hls::x_traits<foo, bar>::MULT_T fooXbar;

 

This is how multiplication etc operators can expand their outputs based on the size of the input variable.

- 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.