From e4312b0fab053cda38cb46623341db85e9f8a060 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Sat, 11 Feb 2017 12:52:18 +0100 Subject: [PATCH] Fix "mem_xfer is used before its declaration" warning --- picorv32.v | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/picorv32.v b/picorv32.v index 55e54f5..e6fde6d 100644 --- a/picorv32.v +++ b/picorv32.v @@ -316,6 +316,7 @@ module picorv32 #( reg mem_do_rdata; reg mem_do_wdata; + wire mem_xfer; reg mem_la_secondword, mem_la_firstword_reg, last_mem_valid; wire mem_la_firstword = COMPRESSED_ISA && (mem_do_prefetch || mem_do_rinst) && next_pc[1] && !mem_la_secondword; wire mem_la_firstword_xfer = COMPRESSED_ISA && mem_xfer && (!last_mem_valid ? mem_la_firstword : mem_la_firstword_reg); @@ -328,7 +329,7 @@ module picorv32 #( wire [31:0] mem_rdata_latched; wire mem_la_use_prefetched_high_word = COMPRESSED_ISA && mem_la_firstword && prefetched_high_word && !clear_prefetched_high_word; - wire mem_xfer = (mem_valid && mem_ready) || (mem_la_use_prefetched_high_word && mem_do_rinst); + assign mem_xfer = (mem_valid && mem_ready) || (mem_la_use_prefetched_high_word && mem_do_rinst); wire mem_busy = |{mem_do_prefetch, mem_do_rinst, mem_do_rdata, mem_do_wdata}; wire mem_done = resetn && ((mem_xfer && |mem_state && (mem_do_rinst || mem_do_rdata || mem_do_wdata)) || (&mem_state && mem_do_rinst)) &&