Add DMA-friendly MLKEM windows

This commit is contained in:
2026-07-05 20:07:14 +08:00
parent d13f7933d8
commit 2b7c43edcb
7 changed files with 281 additions and 69 deletions

View File

@@ -2,9 +2,9 @@
//
// Both software stacks use the same base address, 0xbf400000. Their internal
// maps do not overlap:
// ML-KEM: 0x0000..0x0114
// FFT: 0x1000, 0x2000, 0x3000, 0x4000, 0xf000 windows
// Route 0x0xxx to ML-KEM and all other offsets to FFT.
// ML-KEM: 0x0000..0x3fff
// FFT: 0x8000..0xcfff
// Route the low ML-KEM block to ML-KEM and the high FFT block to FFT.
module fft_mlkem_axi_slave (
input clk,
input resetn,
@@ -54,8 +54,8 @@ module fft_mlkem_axi_slave (
output mlkem_intr
);
wire aw_to_mlkem = (s_axi_awaddr[15:12] == 4'h0);
wire ar_to_mlkem = (s_axi_araddr[15:12] == 4'h0);
wire aw_to_mlkem = (s_axi_awaddr[15:12] <= 4'h3);
wire ar_to_mlkem = (s_axi_araddr[15:12] <= 4'h3);
reg write_sel_mlkem;
reg write_active;