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
Explorer
Explorer
5,448 Views
Registered: ‎05-31-2015

std_logic_vector to sfixed

Jump to solution

Hello,

 

               I am doing some fixed point operation. I have a 24 bit std_logic_vector as input to module. I want to convert this to sfixed datatype. Which function can I use for this ? Or what are the options for such an implementation. I am working in VHDL in Xilinx ISE 14.7.

 

With Regards

Shalini

0 Kudos
1 Solution

Accepted Solutions
Explorer
Explorer
9,441 Views
Registered: ‎05-31-2015

Re: std_logic_vector to sfixed

Jump to solution

Hello,

           I changed std_logic_vector to integer using to_integer(signed(stdlogicvector)). Then I changed this integer to sfixed using to_sfixed(integer,num1,num2).

 

With Regards

Shalini 

0 Kudos
3 Replies
Xilinx Employee
Xilinx Employee
5,437 Views
Registered: ‎08-01-2008

Re: std_logic_vector to sfixed

Jump to solution

refer language template

https://www.xilinx.com/support/documentation/sw_manuals/xilinx10/isehelp/ise_c_language_templates.htm

 

check this as well

http://vhdlguru.blogspot.in/2010/03/fixed-point-operations-in-vhdl-tutorial.html

http://stackoverflow.com/questions/34349367/using-fixed-point-in-vhdl

Thanks and Regards
Balkrishan
--------------------------------------------------------------------------------------------
Please mark the post as an answer "Accept as solution" in case it helped resolve your query.
Give kudos in case a post in case it guided to the solution.
0 Kudos
Explorer
Explorer
5,414 Views
Registered: ‎05-31-2015

Re: std_logic_vector to sfixed

Jump to solution

Hello,

 

           Thanks for reply. I reffered them , but my issue still persist. Please help.

 

With Regards

Shalini

0 Kudos
Explorer
Explorer
9,442 Views
Registered: ‎05-31-2015

Re: std_logic_vector to sfixed

Jump to solution

Hello,

           I changed std_logic_vector to integer using to_integer(signed(stdlogicvector)). Then I changed this integer to sfixed using to_sfixed(integer,num1,num2).

 

With Regards

Shalini 

0 Kudos