02-29-2012 12:48 AM
I have a BLACK BOX coded in HDL which implements the substraction between two consecutive inputs.
The input of my BLACK BOX is a UFIX_3_0: Numbers between 0 and 7.
My output has TWOS COMPLEMENT format:
But my output in MATLAB is:
How to cast a TWOS COMPLEMENT with arbitrary lenght to be displayed correctly in matlab?
02-29-2012 01:17 AM
To set two's complement format of Black Box output you should define type of the signal in the block initialization script (named NAME_OF_YOUR_HDL_config.m).
There is a line like:
So just change type from unsigned (UFix) to signed (Fix):