How to change the fractional point between two sfixed numbers in VHDL

Status
Not open for further replies.

brou

Newbie level 1
Joined
Aug 15, 2014
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
6
Hi all,

I want to convert an sfixed number(0111.0) to another sfixed (01.110). Do you propose a faster implementation than this?

I tried to do:


Code VHDL - [expand]
1
2
3
4
5
signal a : sfixed(3 downto -1);
signal b : sfixed(1 downto -3);
 
a <=  to_sfixed (7.0, a);      -- a = "01110" = 7
b <= a;                        -- b = "01110"= 1.75



but the synthesis tool implements this in low frequency.

Thanks!
 
Last edited by a moderator:

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…