cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
coder123
Visitor
Visitor
575 Views
Registered: ‎03-20-2020

Question in Fixed point

Jump to solution

What this line really means in_signl : in ufixed( 10 DOWNTO 0 );

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
calibra
Voyager
Voyager
535 Views
Registered: ‎06-20-2012

ufixed( a DOWNTO b );

ufixed -> unsigned positive number

sfixed -> signed number 2’s Complement

Scale = 2(**b)

ex:

ufixed(3 downto -3) := "0110100"; -- 6.5

0110100= 52 but the scale is 2(**-3) the number is 52/8 = 6.5

0110.100 = 6+0.5

Whole number is on the left and includes 0 index (3 downto 0)

Fraction is to the right of the 0 index (-1 downto -3)

 

 

== If this was helpful, please feel free to give Kudos, and close if it answers your question ==

View solution in original post

4 Replies
calibra
Voyager
Voyager
565 Views
Registered: ‎06-20-2012

in_signal : in ufixed( 10 DOWNTO 0 );

input port unsigned 11 bits scale (2**0)

== If this was helpful, please feel free to give Kudos, and close if it answers your question ==
coder123
Visitor
Visitor
547 Views
Registered: ‎03-20-2020

Can you explain more please ?!

Tags (1)
0 Kudos
calibra
Voyager
Voyager
536 Views
Registered: ‎06-20-2012

ufixed( a DOWNTO b );

ufixed -> unsigned positive number

sfixed -> signed number 2’s Complement

Scale = 2(**b)

ex:

ufixed(3 downto -3) := "0110100"; -- 6.5

0110100= 52 but the scale is 2(**-3) the number is 52/8 = 6.5

0110.100 = 6+0.5

Whole number is on the left and includes 0 index (3 downto 0)

Fraction is to the right of the 0 index (-1 downto -3)

 

 

== If this was helpful, please feel free to give Kudos, and close if it answers your question ==

View solution in original post

calibra
Voyager
Voyager
436 Views
Registered: ‎06-20-2012

@coder123 

If  I answer your question mark as solved and close the post.

== If this was helpful, please feel free to give Kudos, and close if it answers your question ==
0 Kudos