增加长度接收的限定代码,似乎运行正常了
This commit is contained in:
2
Makefile
2
Makefile
@@ -200,7 +200,7 @@ sw:
|
||||
|
||||
$(TARGET)-objcopy -O binary ./tb/sw/build/slvTest.elf ./tb/sw/build/slvTest.bin
|
||||
|
||||
$(TARGET)-objdump --disassemble-all --disassemble-zeroes --section=.text --section=.text.startup --section=.text.init --section=.data --section=.bss --section=.rodata --section=.trap_entry ./tb/sw/build/slvTest.elf > ./tb/sw/build/slvTest.dump
|
||||
$(TARGET)-objdump -S -s --disassemble-all --disassemble-zeroes --section=.text --section=.text.startup --section=.text.init --section=.data --section=.bss --section=.rodata --section=.trap_entry ./tb/sw/build/slvTest.elf > ./tb/sw/build/slvTest.dump
|
||||
|
||||
$(TARGET)-objcopy -O verilog ./tb/sw/build/slvTest.elf ./tb/sw/build/slvTest.verilog
|
||||
sed -i 's/@400/@000/g' ./tb/sw/build/slvTest.verilog
|
||||
|
||||
Submodule rocket-chip updated: 0eec8c6548...2131fe7cd6
@@ -125,6 +125,7 @@ uint32_t HLM_poll(uint32_t mode)
|
||||
else if (mode == WORKMODE_SLAVE)
|
||||
{
|
||||
uint32_t rx_index = 0;
|
||||
uint32_t rx_len;
|
||||
while (1)
|
||||
{
|
||||
if (isr_flag[CDR_INT_TX0_FIFO_DEQ])
|
||||
@@ -156,14 +157,18 @@ uint32_t HLM_poll(uint32_t mode)
|
||||
len = (first >> 20U);
|
||||
*tx1_txLen = len + 8U;
|
||||
*tx1_txFifo = first;
|
||||
rx_len = len + 4;
|
||||
rx_index += 4U;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (rx_len > rx_index)
|
||||
{
|
||||
*tx1_txFifo = *rx0_rxFifo;
|
||||
rx_index += 4U;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (isr_flag[CDR_INT_RX0END])
|
||||
{
|
||||
@@ -177,7 +182,6 @@ uint32_t HLM_poll(uint32_t mode)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user