[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [f-cpu] Late answer




Hello!

Why not use the barrel shifter, but optimise the design to be super-fast for
a shift left of exactly 16 bits. Eg

shifter1 = (shift_amount & 4) ? input[47:0]+input[63:48] : input // do bit 4
FIRST for fast 16-bit
shifter2 = (shift_amount & 5) ? shifter1[31:0]+shifter1[63:32] : shifter1
shifter3 = (shift_amount & 1) ? shifter2[62:0]+shifter2[63] : shifter2
etc...
result = (shift_amount==16) ? shifter1 : shifter6 // bypass all but first
stage in 16-bit case

Cheers, John
*************************************************************
To unsubscribe, send an e-mail to majordomo@seul.org with
unsubscribe f-cpu       in the body. http://f-cpu.seul.org/