Run the CPU at 100 MHz

The FPU picks the FADD/FSUB operands and works out exponents and leading
zeros as it takes them, and finds the back end's leading one a clock
before using it; those were the paths that held the design to 91 MHz.
Add, multiply and the multiply-adds now take 13 clocks, divide and
square root 37, int -> float 9. Setup slack at 100 MHz is +0.286 ns.
On the board: an empty FOR loop 6.4 us (was 8.3), SIN 33 us (was 37).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
brad ArantandClaude Opus 5.5 committed 2026-12-01 07:26:59 -08:00
1 parent bda9bb67b6
commit 2dafda5fe5
14 files changed
+78 -51

No files matched your search

+4 -4
View File
@@ -8,9 +8,9 @@
// instruction. Taken branches and jumps take 3, loads and stores 3 (more if
// the bus waits), multiplies 4 and divides 35. Floating-point operations run
// in rv32_fpu.v: 4 clocks for moves, sign injection, compares, min/max and
// class, 5 for float -> int, 8 for int -> float, 12 for add, subtract,
// class, 5 for float -> int, 9 for int -> float, 13 for add, subtract,
// multiply and the multiply-adds (4 if an operand is infinite, NaN or zero),
// 36 for divide and square root; float loads and stores as integer ones.
// 37 for divide and square root; float loads and stores as integer ones.
//
// Instruction port: synchronous read. i_rdata is the word at the i_addr given
// in the last cycle with i_en high, and must hold while i_en is low.
@@ -29,8 +29,8 @@
// breakpoint) are raised one cycle late, from registers, to keep the long
// paths out of the trap logic; the instruction has no effect either way.
//
// Speed: 90 MHz with 1.5 ns to spare on the XC7A35T-1 (bench/), about 2100
// LUTs, 900 flip-flops and 4 DSP slices.
// Speed: 100 MHz in the full design on the XC7A35T-1. The integer core
// alone (bench/) is about 2100 LUTs, 900 flip-flops and 4 DSP slices.
//
// Implemented: RV32I, M, F (rv32_fpu.v; fflags, frm, fcsr; mstatus.FS, which
// resets to Initial: F instructions and CSRs are illegal while it is Off,