Forum Discussion
Altera_Forum
Honored Contributor
9 years ago --- Quote Start --- I'm trying to use the resize function in order to convert a signed 12 bit value to a 16 bit value. But whenever I'm using the resize function the output value is 0. But when I'm manually converting it, it's getting converted correctly. Can anyoone please help me with this ? Thanks, --- Quote End --- you didn't show your code. if it is std_logic_vector you need to define if it is resized as signed or unsigned so that negative values are filled with ones. data_resized <= resize(signed(data),18); -- assuming data is 16 bits std_logic_vector