Follow

Interesting details of ieee.fixed_pkg

Today I learned that in order to assign a negative sfixed (signed fixed-point) signal or variable to another signal or variable, I have to use resize.

process
variable x0: sfixed(7 downto -8) := to_sfixed(1, 7, -8);
constant val: sfixed(7 downto -8) := to_sfixed(10, 7, -8);
begin
-- does not work:
x0 := -val;

bowfinger.de/blog/2023/05/inte

Sign in to participate in the conversation
CleverLibre Social

CleverLibre Social is an inclusive social instance for open discussion, learning, and community.
All cultures welcome.
Hate speech and harassment strictly forbidden.