Add ILA for debugging dma requests

This commit is contained in:
Byron Lathi
2025-11-09 22:26:27 -08:00
parent ce729f9008
commit df377dda5d
6 changed files with 6338 additions and 4 deletions

View File

@@ -1,4 +1,3 @@
*
!.gitignore
!*/
!*/.xci
!*.xci

6304
ip/ila_0/ila_0.xci Normal file

File diff suppressed because it is too large Load Diff

3
ip/pcie4_uscale_plus_0/.gitignore vendored Normal file
View File

@@ -0,0 +1,3 @@
*
!.gitignore
!*.xci

View File

@@ -1,4 +1,5 @@
ip/pcie4_uscale_plus_0/pcie4_uscale_plus_0.xci
ip/ila_0/ila_0.xci
src/alibaba_cloud.xdc
src/alibaba_pcie_top.sv
src/regs/verilator.vlt

View File

@@ -103,6 +103,31 @@ always_comb begin
hwif_in.dma_wr.done.done.hwset = wr_desc.sts_valid;
end
`ifndef SIM
ila_0 rd_desc_ila (
.clk (clk),
.probe0 (rd_desc.req_src_addr),
.probe1 (rd_desc.req_dst_addr),
.probe2 (rd_desc.req_len),
.probe3 (rd_desc.req_tag),
.probe4 (rd_desc.req_valid),
.probe5 (rd_desc.req_ready),
.probe6 (rd_desc.sts_valid)
);
ila_0 wr_desc_ila (
.clk (clk),
.probe0 (wr_desc.req_dst_addr),
.probe1 (wr_desc.req_src_addr),
.probe2 (wr_desc.req_len),
.probe3 (wr_desc.req_tag),
.probe4 (wr_desc.req_valid),
.probe5 (wr_desc.req_ready),
.probe6 (wr_desc.sts_valid)
);
`endif
taxi_dma_if_pcie_us #(
// disable flow control, shouldn't be needed

View File

@@ -76,6 +76,8 @@ int virt_to_phys_user(uintptr_t *paddr, uintptr_t vaddr)
int main(void)
{
uint32_t dma_mem_addr = 0x10;
/* Instead of allocating source, just use the constant string */
//printf("Allocating 1024 bytes as source\n");
@@ -108,7 +110,7 @@ int main(void)
printf("Sending read DMA\n");
pcie_base[0] = (uint32_t)src_phys;
pcie_base[1] = (uint32_t)(src_phys >> 32);
pcie_base[2] = 0;
pcie_base[2] = dma_mem_addr;
pcie_base[3] = strlen(src);
for (int i = 0; i < 4; i++) {
@@ -125,7 +127,7 @@ int main(void)
printf("Sending read DMA\n");
pcie_base[8] = (uint32_t)dst_phys;
pcie_base[9] = (uint32_t)(dst_phys >> 32);
pcie_base[10] = 0;
pcie_base[10] = dma_mem_addr;
pcie_base[11] = strlen(src);
for (int i = 8; i < 12; i++) {