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
20 lines
523 B
Verilog
20 lines
523 B
Verilog
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
|