PipelineC icon indicating copy to clipboard operation
PipelineC copied to clipboard

Make tool optimize for fewer pipelining registers

Open JulianKemmerer opened this issue 3 years ago • 9 comments

Right now the tool inserts registers to meet timing - with no regard to how many registers are being inserted.

Instead: manually find the smallest bitwidth wire ~in the area... always choose to slice fewer wires over more if possible with the same timing characteristics/delays ...

JulianKemmerer avatar Mar 18 '22 00:03 JulianKemmerer

https://google.github.io/xls/scheduling/#scheduling-to-minimize-pipeline-registers

JulianKemmerer avatar Mar 21 '22 20:03 JulianKemmerer

Who knows maybe https://github.com/JulianKemmerer/PipelineC/blob/master/src/DEVICE_MODELS.py will get to this some day?

JulianKemmerer avatar Nov 02 '22 23:11 JulianKemmerer

Closing https://github.com/JulianKemmerer/PipelineC/issues/65 definitely helps reduce register use if you are combining global variables and deep pipelines

JulianKemmerer avatar Dec 02 '22 03:12 JulianKemmerer

Does it lower resource usage? Any measutement?

suarezvictor avatar Dec 03 '22 00:12 suarezvictor

Yeah recent commit for #65 looks to save ~50 percent of flip flops on ECP5 ray tracer builds - we should do another attempt making it work

On Artix I measured up to like 87K flip-flops saved depending on how your count shift registers.

See info in the pipelinec discord 👍

JulianKemmerer avatar Dec 03 '22 00:12 JulianKemmerer

Excellent work

suarezvictor avatar Dec 03 '22 16:12 suarezvictor

What about keccak resource usage? I'm curious 😏

bartokon avatar Dec 03 '22 16:12 bartokon

@bartokon for keccak - the particulars of #65 I wouldnt expect to apply much IIRC about keccak

  1. since it doesnt maintain a global state variable wired into the pipeline at various places or 2) doesnt have lots of 'unresolved compile time math'/placing doing math on constants that is mistaken for stuff needing LUTs, etc

There also could be some room to tune some of weird pipelining magic numbers ... I am experimenting with some things right now for the ray tracer

So ~maybe but probably not much improvement

JulianKemmerer avatar Dec 04 '22 01:12 JulianKemmerer

Similar issue is wanting to optimize for area

starts with first parsing area out of the reports from the tool...

Similar to #45

JulianKemmerer avatar Oct 29 '23 15:10 JulianKemmerer