Forum Discussion
Altera_Forum
Honored Contributor
10 years agoThe easiest way to sign extend a number is:
wire numAs24 = -24'd1245
wire numAs32 = {{(8){numAs24}},numAs24};
Granted the above is in Verilog, but it should be easy to turn it into the equivalent VHDL. Basically all it does is copy bit 23 into all of the upper bits.