MemoryModule mm2 = proc.new MemoryModule(memoryShip2);
SortedMergeModule sm = proc.new SortedMergeModule();
- // So far: we have two spare Counter ships; one can be used for resetting
+ // So far: we have four spare Counter ships; one can be used for resetting
for(int i=0; i<2; i++) {
- RepeatModule r0 = proc.new RepeatModule();
RepeatModule r1 = proc.new RepeatModule();
DownCounterModule c0 = proc.new DownCounterModule();
DownCounterModule c1 = proc.new DownCounterModule();
AluModule alu = proc.new AluModule();
- // FIXME: we should be able to get rid of this!
- r0.val.connect(proc.new OnceModule(stride_length).out);
- r0.count.connect(proc.new OnceModule(num_strides).out);
- r0.out.connect(c0.start);
-
+ c0.start.connect(proc.new ForeverModule(stride_length).out);
c0.incr.connect(proc.new ForeverModule(1).out);
c1.start.connect(proc.new OnceModule(end_of_data + i*stride_length).out);