Add DMA-friendly MLKEM windows
This commit is contained in:
@@ -14,6 +14,7 @@ void dma_start_transfer(int ch_id, u32 src, u32 dst, u32 bytes, u32 tag) {
|
||||
ch->DST_ADDR = dst;
|
||||
ch->LENGTH = bytes;
|
||||
ch->TAG = tag; // 可选,填入任务ID
|
||||
ch->MODE = DMA_MODE_MEM2MEM;
|
||||
|
||||
// 置 Burst 属性并触发传输
|
||||
// AXI SIZE: 2 (代表 2^2 = 4 Bytes,与 32-bit 数据线匹配)
|
||||
@@ -34,4 +35,4 @@ void dma_wait_polling(int ch_id) {
|
||||
// 清除 Done 标志位 (Write 1 to Clear Bit 1)
|
||||
// 注意:写 1 清 0 的设计,所以我们对 bit 1 写入 1
|
||||
ch->STATUS = STATUS_DONE_BIT;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user