Bit size changing using Verilog
If you know the number is between -2097152 and 2097151, then just truncate the 10 MSBs (test_dat1 &lt;= test_dat0[21:0]).

Otherwise you cannot fit a 32bit number into a 22bit register whilst maintaining the value. It would be equivalent to trying to fit 2-litres of soda into a 1-litre bottle without losing any.