feat(ntt): implement synchronous NTT core with Barrett modular reduction
Phase 2.1: Merged Path00+Path01 NTT engine. - barrett_mul.v: Barrett modular multiplication (a·b mod 3329) - butterfly_unit.v: Cooley-Tukey/Gentleman-Sande butterfly - zeta_rom.v: 128-entry ROM with bit-reversed roots of unity - ntt_core.v: 7-layer NTT FSM, 256×12-bit register file - ntt_sync.v: valid/ready streaming wrapper Verified: 13/13 vectors bit-exact vs Python NTT/NTTInverse
This commit is contained in:
19
sync_rtl/ntt/ntt_sync.v
Normal file
19
sync_rtl/ntt/ntt_sync.v
Normal file
@@ -0,0 +1,19 @@
|
||||
module ntt_sync (
|
||||
input clk, rst_n,
|
||||
input [11:0] coeff_in,
|
||||
input valid_i,
|
||||
output ready_o,
|
||||
output [11:0] coeff_out,
|
||||
output valid_o,
|
||||
input ready_i,
|
||||
input mode,
|
||||
output done_o
|
||||
);
|
||||
ntt_core u_ntt_core (
|
||||
.clk(clk), .rst_n(rst_n),
|
||||
.coeff_in(coeff_in), .valid_i(valid_i), .ready_o(ready_o),
|
||||
.mode(mode),
|
||||
.coeff_out(coeff_out), .valid_o(valid_o), .ready_i(ready_i),
|
||||
.done_o(done_o)
|
||||
);
|
||||
endmodule
|
||||
Reference in New Issue
Block a user