From 38978594c28f13fc59b50f5079c04a025071df68 Mon Sep 17 00:00:00 2001 From: bacon Date: Mon, 10 Feb 2025 15:29:53 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=95=BF=E5=BA=A6=E6=8E=A5?= =?UTF-8?q?=E6=94=B6=E7=9A=84=E9=99=90=E5=AE=9A=E4=BB=A3=E7=A0=81=EF=BC=8C?= =?UTF-8?q?=E4=BC=BC=E4=B9=8E=E8=BF=90=E8=A1=8C=E6=AD=A3=E5=B8=B8=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 2 +- rocket-chip | 2 +- tb/sw/src/halfLvdsMacSvr.c | 10 +++++++--- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 4537e9d..dafacf0 100644 --- a/Makefile +++ b/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 diff --git a/rocket-chip b/rocket-chip index 0eec8c6..2131fe7 160000 --- a/rocket-chip +++ b/rocket-chip @@ -1 +1 @@ -Subproject commit 0eec8c65489e0e6ace60126d4ba500b3a0c4417c +Subproject commit 2131fe7cd62dfa695da82463007cab310650aa22 diff --git a/tb/sw/src/halfLvdsMacSvr.c b/tb/sw/src/halfLvdsMacSvr.c index a956983..5f34d8b 100644 --- a/tb/sw/src/halfLvdsMacSvr.c +++ b/tb/sw/src/halfLvdsMacSvr.c @@ -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,12 +157,16 @@ 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 { - *tx1_txFifo = *rx0_rxFifo; - rx_index += 4U; + if (rx_len > rx_index) + { + *tx1_txFifo = *rx0_rxFifo; + rx_index += 4U; + } } } @@ -177,7 +182,6 @@ uint32_t HLM_poll(uint32_t mode) break; } } - } else {