Update matmul fast-start software image
This commit is contained in:
2
sdk/software/bsp/env/start.S
vendored
2
sdk/software/bsp/env/start.S
vendored
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user