The scalar divider produces 1 bit per cycle so the worst case
latency is the input width plus a couple cycles.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/RISCV/RISCVSchedSiFive7.td | ||
---|---|---|
201–202 |
Why does latency take 2 extra cycles and resource cycles is only 1 extra cycle? |
llvm/lib/Target/RISCV/RISCVSchedSiFive7.td | ||
---|---|---|
201–202 | I might still have the numbers off by a couple cycles, but it's probably better than being off by a factor of 2 or 4. They were already 1 apart so I left them 1 apart. This is what's currently in our downstream. The basic idea is that there is one pipeline stage in the divider that is used repeatedly in a loop. There is 1-2 stages in front of that and 1-2 stages after that. Two divides can't overlap in the repeated part but we might be able to start a new divide while the previous divide is still in the stages after the repeated part. The ResourceCycles for SiFive7IDiv is intended to track the number of cycles that can't overlap. Unfortunately, I don't have the exact number for how much they can overlap. |
Why does latency take 2 extra cycles and resource cycles is only 1 extra cycle?