3 #ship bitfifo : BitFifo
6 #ship rotator : Rotator
11 // 0: 100100100111110000000
12 // sel 011110100001001000000
13 // 1: 111000101000011000011
14 // r: 111000100110111000000
18 deliver; // deliver a junk word
19 load repeat counter with 37; deliver; // deliver it 37 times (once per bit)
21 load repeat counter with 38; deliver; // deliver it 37 times
23 // insert bits in lsb order
25 literal BitFifo.inOp[lsbFirst,take=37];
28 // toss out 37 bits, take one, repeat. sign extend the result
30 literal BitFifo.outOp[drop=37,take=1,signExtend];
33 bitfifo.out: [*] wait, take, sendto lut3.in2;
34 lut3.in2: load repeat counter with 4; notify bitfifo.out;
35 load repeat counter with 63;
36 take, deliver, notify bitfifo.out;
37 load repeat counter with 11;
38 take, deliver, notify bitfifo.out;
40 // mux on second input
41 lut3.inLut: literal 226;
44 lut3.in1: literal 18683;
45 load repeat counter with 37; deliver;
47 load repeat counter with 37; deliver;
49 lut3.in3: literal 12000;
50 load repeat counter with 37; deliver;
52 load repeat counter with 37; deliver;
54 lut3.out: [*] wait, take, sendto alu3.in2;
56 alu3.in1: literal 0; deliver; [*] take, deliver;
57 alu3.in2: notify lut3.out; [*] take, deliver, notify lut3.out;
58 alu3.in3: literal 0; deliver; [*] take, deliver;
59 alu3.outBits: [*] take, sendto debug.in;
61 alu3.out1: [*] take, sendto alu3.in1;
62 alu3.out2: [*] take, sendto alu3.in3;
64 debug.in: [*] take, deliver;