4 #ship bitfifo : BitFifo
7 #ship rotator : Rotator
12 // 0: 100100100111110000000
13 // sel 011110100001001000000
14 // 1: 111000101000011000011
15 // r: 111000100110111000000
18 deliver; // deliver a junk word
20 set ilc=37; deliver; // deliver it 37 times (once per bit)
22 set ilc=38; deliver; // deliver it 37 times
24 // insert bits in lsb order
26 set word= BitFifo.inOp[lsbFirst,take=37];
29 // toss out 37 bits, take one, repeat. sign extend the result
31 set word= BitFifo.outOp[drop=37,take=1,signExtend];
34 bitfifo.out: set ilc=*; recv token, take, send to lut3.in2;
35 lut3.in2: set ilc=4; send token to bitfifo.out;
37 take, deliver, send token to bitfifo.out;
39 take, deliver, send token to bitfifo.out;
41 // mux on second input
42 lut3.inLut: set word= 226;
45 lut3.in1: set word= 18683;
50 lut3.in3: set word= 12000;
55 lut3.out: set ilc=*; recv token, take, send to alu3.in2;
57 alu3.in1: set word= 0; deliver; set ilc=*; take, deliver;
58 alu3.in2: send token to lut3.out; set ilc=*; take, deliver, send token to lut3.out;
59 alu3.in3: set word= 0; deliver; set ilc=*; take, deliver;
60 alu3.outBits: set ilc=*; take, send to debug.in;
62 alu3.out1: set ilc=*; take, send to alu3.in1;
63 alu3.out2: set ilc=*; take, send to alu3.in3;
65 debug.in: set ilc=*; take, deliver;