Vdd Vdd GND5
Vin1 in7 GND 5
Vin2 in6 GND 0
Vin3 in5 GND 0
Vin4 in4 GND 5
Vin5 in3 GND 0
Vin6 in2 GND 0
Vin7 in1 GND 0
Vin8 in0 GND 5
Vin9 shift GND pwl(0,5 15ms,5 15.01ms,0 30ms,0 30.01ms,5 35ms,5 35.01ms,0
40ms,0 )
Vin10 sh_amt4 GND pwl(0,0 10ms,0 10.01ms,5 15ms,5 15.01ms,0 25ms,0
25.01ms,5 30ms,5 30.01ms,5 35ms,5 35.01ms,5 40ms,5)
Vin11 sh_amt2 GND pwl(0,0 5ms,0 5.01ms,5 10ms,5 10.01ms,0 20ms,0 20.01ms,5
25ms,5 25.01ms,0 30ms,0 30.01ms,5 35ms,5 35.01ms,5 40ms,5)
Vin12 sh_amt1 GND pwl(0,5 5ms,5 5.01ms,0 15ms,0 15.01ms,5 20ms,5 20.01ms,0
30ms,0 30.01ms,5 35ms,5 35.01ms,5 40ms,5)
Vin13 sh_arith GND pwl(0,0 40ms,0)
Vin14 rotate GND pwl(0,0 40ms,0)
.option post
.tran 5m 40ms
.end
This file produces an output in HSPICE which demonstrates
Logical Shifting.
It simulates Logical Shifting to the right 1 bit, 2 bits, 4 bits, and 7 bits as well as shifting to the left by the same amounts.
Notice both the Arithmetic Shifting and Rotate features are disabled.
*NOTE* Only in7, in4 and in0 are set to "high" to demonstrate the Barrel Shifter's full capablities.
Vdd Vdd GND5
Vin1 in7 GND 5
Vin2 in6 GND 0
Vin3 in5 GND 0
Vin4 in4 GND 5
Vin5 in3 GND 0
Vin6 in2 GND 0
Vin7 in1 GND 0
Vin8 in0 GND 5
Vin9 shift GND pwl(0,5 15ms,5 15.01ms,0 30ms,0 30.01ms,5 35ms,5 35.01ms,0
40ms,0 )
Vin10 sh_amt4 GND pwl(0,0 10ms,0 10.01ms,5 15ms,5 15.01ms,0 25ms,0
25.01ms,5 30ms,5 30.01ms,5 35ms,5 35.01ms,5 40ms,5)
Vin11 sh_amt2 GND pwl(0,0 5ms,0 5.01ms,5 10ms,5 10.01ms,0 20ms,0 20.01ms,5
25ms,5 25.01ms,0 30ms,0 30.01ms,5 35ms,5 35.01ms,5 40ms,5)
Vin12 sh_amt1 GND pwl(0,5 5ms,5 5.01ms,0 15ms,0 15.01ms,5 20ms,5 20.01ms,0
30ms,0 30.01ms,5 35ms,5 35.01ms,5 40ms,5)
Vin13 sh_arith GND pwl(0,5 40ms,5)
Vin14 rotate GND pwl(0,0 40ms,0)
.option post
.tran 5m 40ms
.end
This file produces an output in HSPICE which demonstrates
Arithmetic Shifting.
It simulates Arithmetic Shifting to the right 1 bit, 2 bits, 4 bits, and 7 bits as well as shifting to the left by the same amounts.
Notice only the Rotate feature is disabled.
*NOTE* Only in7, in4 and in0 are set to "high" to demonstrate the Barrel Shifter's full capablities.
Vdd Vdd GND5
Vin1 in7 GND 5
Vin2 in6 GND 0
Vin3 in5 GND 0
Vin4 in4 GND 5
Vin5 in3 GND 0
Vin6 in2 GND 0
Vin7 in1 GND 0
Vin8 in0 GND 5
Vin9 shift GND pwl(0,5 15ms,5 15.01ms,0 30ms,0 30.01ms,5 35ms,5 35.01ms,0
40ms,0 )
Vin10 sh_amt4 GND pwl(0,0 10ms,0 10.01ms,5 15ms,5 15.01ms,0 25ms,0
25.01ms,5 30ms,5 30.01ms,5 35ms,5 35.01ms,5 40ms,5)
Vin11 sh_amt2 GND pwl(0,0 5ms,0 5.01ms,5 10ms,5 10.01ms,0 20ms,0 20.01ms,5
25ms,5 25.01ms,0 30ms,0 30.01ms,5 35ms,5 35.01ms,5 40ms,5)
Vin12 sh_amt1 GND pwl(0,5 5ms,5 5.01ms,0 15ms,0 15.01ms,5 20ms,5 20.01ms,0
30ms,0 30.01ms,5 35ms,5 35.01ms,5 40ms,5)
Vin13 sh_arith GND pwl(0,0 40ms,0)
Vin14 rotate GND pwl(0,0 40ms,0)
.option post
.tran 5m 40ms
.end
This file produces an output in HSPICE which demonstrates
Rotating.
It simulates Rotating to the right 1 bit, 2 bits, 4 bits, and 7 bits as well as shifting to the left by the same amounts.
Notice only the Arithmetic Shifting feature is disabled.
*NOTE* Only in7, in4 and in0 are set to "high" to demonstrate the Barrel Shifter's full capablities.