diff --git a/sdk/axi_ram.mif b/sdk/axi_ram.mif index 37b5e71..de58885 100644 --- a/sdk/axi_ram.mif +++ b/sdk/axi_ram.mif @@ -24,7 +24,7 @@ 00010101011111100100000111101110 00000011100101000000000111001110 00101000100000000000000111001110 -00000011100000000110110000001101 +00000011100000001000000000001101 01011000000000000000100000001110 00000011100000000000010000001101 00101001000000000000000110001101 @@ -39,155 +39,142 @@ 01010000000000000000000000000000 00000000000000000000000000000000 00010101011111100000000000001100 -00000010100000010011010000010000 -00101001000000000000000110010000 -00000010100000010000010000001111 +00000010100000010011010000001111 00101001000000000000000110001111 -00000010100000010101000000001110 -00101001000000000000000110001110 +00000010100000010000010000010001 +00101001000000000000000110010001 +00000010100000010101000000010000 00101001000000000000000110010000 -00000010100000010101010000000100 +00101001000000000000000110001111 +00000010100000010101010000000101 +00101001000000000000000110000101 +00000010100000010011000000000100 00101001000000000000000110000100 -00000010100000010011000000010100 +00000010100000010111110000010100 00101001000000000000000110010100 -00000010100000010111110000010011 +00000010100000010100110000000111 +00101001000000000000000110000111 +00101001000000000000000110010000 +00101001000000000000000110010001 +00000010100000010100100000010011 00101001000000000000000110010011 -00000010100000010100110000010010 -00101001000000000000000110010010 -00101001000000000000000110001110 +00010101011111101010000000001110 +00101001000000000000000110010000 +00000011100000000100000111010010 +00101001100000000000001001000000 +00000010100000000101100000000110 +00000011100000000001000111001101 +00101001100000000000000110100110 +00000011100000001000000111001000 +00010100001110001000000000001001 +00010100000000000000000000110010 +00101001100000000000000100001001 +00000011100000001010000111000111 +00000011100011100010001001010010 +00101001100000000000000011110010 +00000011100000001011000111000110 +00000010100000100000000000000111 +00101001100000000000000011000111 +00000010100001000000000000001001 +00101001100000000000000111001001 00101001000000000000000110001111 -00000010100000010100100000001001 -00101001000000000000000110001001 -00010101011111101010000000001101 -00101001000000000000000110001110 -00000011100000000100000110101000 -00101001100000000000000100000000 -00000011100000000001000110110001 -00000010100000000101100000000111 -00101001100000000000001000100111 -00000011100000001000000110100101 -00010100001110001000000000000110 -00010100000000000000000000110000 -00101001100000000000000010100110 -00000011100000001010000110100100 -00000011100011100010001000010000 -00101001100000000000000010010000 -00000011100000001011000110110011 -00000010100000100000000000010100 -00000010100001000000000000010010 -00101001100000000000001001110100 +00101001000000000000000110010001 +00101001000000000000000110010000 +00101001000000000000000110001111 +00101001000000000000000110000101 +00101001000000000000000110000100 +00101001000000000000000110010100 +00000010100000010000110000010010 +00101001000000000000000110010010 +00101001000000000000000110010011 +00101001000000000000000110010010 +00000010100000001100110000001000 +00101001000000000000000110001000 +00000010100000001100100000000111 +00000010100000001111010000000110 +00101001000000000000000110000111 00000010101111111100000001100011 -00010101011111101010000000001111 -00000000000101010000001000101110 -00101001100000000000000110110010 -00101000100000000000000111001100 +00101001000000000000000110000110 +00101000100000000000000110101100 00000011010000000100000110001100 01011011111111111111100110000000 -00000010100000000100000000010000 -00000011100000000100000111101100 -00101001100000000000000111010000 -00101000100000000000000110001110 -00010101011111100000000000001101 -00000011100000000001010110101111 -00000011010000000000000000000000 -00101010000000000000000111101100 +00000010100000000100000000001111 +00000011100000000100000111001100 +00101001100000000000000110101111 +00101000100000000000000110001101 +00010101011111100000000000001110 +00000011100000000001010111001110 +00101010000000000000000111001100 00000011010000001000000110001100 01011011111111111111100110000000 -00000010100000010011010000010000 -00101001000000000000000110110000 -00000010100000010000010000001100 -00101001000000000000000110101100 -00000010100000010101000000010001 -00101001000000000000000110110001 -00000000010001001111000111001100 +00000000010001001111000110101100 00101001100000000011000001101100 -00101010000000000011000001110001 -00000010100000010101010000001000 -00101001000000000000000110110000 -00101001000000000000000110101000 -00000010100000010011000000000111 -00101001000000000000000110100111 -00000010100000010111110000000110 -00101001000000000000000110100110 -00000010100000010000110000001111 -00101001000000000000000110101111 -00000010100000010100100000000101 -00101001000000000000000110100101 -00101001000000000000000110101111 -00000010100000001100110000000100 -00101001000000000000000110100100 -00000010100000001100100000010100 -00000010100000001111010000010011 -00101001000000000000000110110100 -00000010100000000010010000010010 -00101001000000000000000110110011 -00000010100000010101111000110000 -01101000000000000000101001001100 -00000010100000001100001000110000 -00010101011111100000000000001101 -00000000010001001110000111001100 -00000011010000000011110110001100 -00101001000000000000000110110000 -00000010100000000010010000001111 -00000010100000010101110110001101 -01101000000000000000100111101100 -00000010100000001100000110001101 -00010101011111100000000000001111 -00000000010001001101000111001100 -00000011010000000011110110001100 -00101001000000000000000111101101 +00101010000000000011000001101111 00000010100000000010010000010000 -00000010100000010101110110001111 -01101100000000010001101000001100 -00010101011111100000000000001101 -00101001000000000000000110101111 -00000011100000000001010110101101 -00101010000000000000000110101100 -00000011010000001000000110001100 -01011011111111111111100110000000 -00000000010001001100000111001100 -00000011010000000011110110001100 -00000010100000000010010000001111 -00000010100000010101110110001101 -01101000000000000000100111101100 -00000010100000001100000110001101 +00000010100000010101110111101110 +01101000000000000000101000001100 +00000010100000001100000111101110 00010101011111100000000000010000 -00000000010001001011000111001100 +00000000010001001110000110101100 00000011010000000011110110001100 -00101001000000000000001000001101 +00101001000000000000001000001110 00000010100000000010010000001111 -00000010100000010101110110001101 +00000010100000010101110110001110 01101000000000000000100111101100 -00000010100000001100000110001101 +00000010100000001100000110001110 00010101011111100000000000010000 -00000000010001001010000111001100 +00000000010001001101000110101100 00000011010000000011110110001100 -00101001000000000000001000001101 +00101001000000000000001000001110 00000010100000000010010000001111 -00000010100000010101110110001101 +00000010100000010101110110001110 01101000000000000000100111101100 -00000010100000001100000110001101 +00000010100000001100000110001110 00010101011111100000000000010000 -00000000010001001001000111001100 +00000000010001001100000110101100 00000011010000000011110110001100 -00101001000000000000001000001101 +00101001000000000000001000001110 00000010100000000010010000001111 -00000010100000010101110110001101 +00000010100000010101110110001110 01101000000000000000100111101100 -00000010100000001100000110001101 +00000010100000001100000110001110 +00010101011111100000000000010000 +00000000010001001011000110101100 +00000011010000000011110110001100 +00101001000000000000001000001110 +00000010100000000010010000001111 +00000010100000010101110110001110 +01101000000000000000100111101100 +00000010100000001100000110001110 +00010101011111100000000000010000 +00000000010001001010000110101100 +00000011010000000011110110001100 +00101001000000000000001000001110 +00000010100000000010010000001111 +00000010100000010101110110001110 +01101000000000000000100111101100 +00000010100000001100000110001110 +00010101011111100000000000010000 +00000000010001001001000110101100 +00000011010000000011110110001100 +00101001000000000000001000001110 +00000010100000000010010000001111 +00000010100000010101110110001110 +01101000000000000000100111101100 +00000010100000001100000110001110 00010101011111100000000000001111 -00000011010000000011110111001110 -00101001000000000000000111101101 +00000011010000000011110110101101 +00101001000000000000000111101110 00000010100000000010010000001100 -00000010100000010101110111001111 -01101000000000000000100110001110 -00000010100000001100000111001111 +00000010100000010101110110101110 +01101000000000000000100110001101 +00000010100000001100000110101110 00010101011111100000000000001100 -00101001000000000000000110001111 +00101001000000000000000110001110 00000010100000010011010000001101 00101001000000000000000110001101 -00000010100000010000010000001110 -00101001000000000000000110001110 +00000010100000010000010000000100 +00101001000000000000000110000100 00000010100000010101000000000101 00101001000000000000000110000101 00101001000000000000000110001101 @@ -208,6 +195,7 @@ 00000000000101010000000000000100 00000010100000000100000001100011 01001100000000000000000000100000 -00000010100000001100000110001111 -01010011111111101110101111111111 -01010011111111101110101111111111 +00000011010000000000000000000000 +00000011010000000000000000000000 +00000011010000000000000000000000 +00000011010000000000000000000000 diff --git a/sdk/software/bsp/env/start.S b/sdk/software/bsp/env/start.S index b4b1ac4..e91db37 100644 --- a/sdk/software/bsp/env/start.S +++ b/sdk/software/bsp/env/start.S @@ -118,7 +118,7 @@ _start: #WRITE(li.wne,OFS_DIVISOR_LSB, divisor & 0xff); li.w t3, 0xbf20f500 ld.w t3, t3, 0 - li.w t2, 0x1b + li.w t2, 0x20 beq zero, t3, 1f li.w t2, 0x1 1: diff --git a/sdk/software/examples/asm/Makefile b/sdk/software/examples/asm/Makefile index 3fc5595..442e3fc 100644 --- a/sdk/software/examples/asm/Makefile +++ b/sdk/software/examples/asm/Makefile @@ -18,6 +18,7 @@ BSP_USE_TRAP := 0 BSP_USE_DRIVERS := 0 endif +LA32RSOC_WINDOWS_HOME?=../../../.. include ../../bsp/common.mk # Strip picolibc: no -lc -lm -lg -lsemihost, keep -lgcc only diff --git a/sdk/software/examples/asm/start_matmul_fast.S b/sdk/software/examples/asm/start_matmul_fast.S index f276ad7..551e778 100644 --- a/sdk/software/examples/asm/start_matmul_fast.S +++ b/sdk/software/examples/asm/start_matmul_fast.S @@ -36,7 +36,7 @@ _start: st.b zero, t0, 1 li.w t2, 0xbf20f500 ld.w t2, t2, 0 - li.w t1, 0x1b + li.w t1, 0x20 beq zero, t2, 1f li.w t1, 0x1 1: diff --git a/sdk/software/examples/asm/user-sample.c b/sdk/software/examples/asm/user-sample.c index 1307f90..e3af891 100644 --- a/sdk/software/examples/asm/user-sample.c +++ b/sdk/software/examples/asm/user-sample.c @@ -109,7 +109,6 @@ unsigned long UART_BASE = 0xbf000000; #define MATMUL_DMA_SRC_BASE (MATMUL_BASE_UNCACHED + 0x020) #define MATMUL_DMA_GROUPS (MATMUL_BASE_UNCACHED + 0x028) #define MATMUL_DMA_SRC_STRIDE (MATMUL_BASE_UNCACHED + 0x02C) -#define MATMUL_DMA_CYCLES (MATMUL_BASE_UNCACHED + 0x034) #define CTRL_START_B0 0x1 #define CTRL_START_B1 0x2 @@ -124,8 +123,6 @@ unsigned long UART_BASE = 0xbf000000; #define DMA_CTRL_VAL (CTRL_BURST_SIZE(2) | CTRL_BURST_LEN(63) | CTRL_START_BIT) #define MATMUL_EP_ID 0 -volatile unsigned int matmul_dma_cycles; - int main(void) { if (MATMUL_GROUP_NUM <= 0) { @@ -148,7 +145,6 @@ int main(void) *mat_ctrl = CTRL_DMA_START; uart_put_crc_prefix_fifo(); while (!(*mat_status & STATUS_DMA_DONE)) {} - matmul_dma_cycles = *(volatile unsigned int *)MATMUL_DMA_CYCLES; *mat_status = STATUS_DMA_DONE; crc = *mat_crc; diff --git a/sdk/user-sample.bin b/sdk/user-sample.bin index b631c96..eaa8ba6 100755 Binary files a/sdk/user-sample.bin and b/sdk/user-sample.bin differ