aboutsummaryrefslogtreecommitdiffstats
path: root/picorv32.v
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2017-02-11 12:52:18 +0100
committerClifford Wolf <clifford@clifford.at>2017-02-11 12:52:18 +0100
commite4312b0fab053cda38cb46623341db85e9f8a060 (patch)
tree0c024824a0a2e87a7d661a7ca3a8a9ee36ab584c /picorv32.v
parent42b4397390aba11ae79d761a7317ebda9da489f4 (diff)
downloadpicorv32-e4312b0fab053cda38cb46623341db85e9f8a060.tar.gz
picorv32-e4312b0fab053cda38cb46623341db85e9f8a060.zip
Fix "mem_xfer is used before its declaration" warning
Diffstat (limited to 'picorv32.v')
-rw-r--r--picorv32.v3
1 files changed, 2 insertions, 1 deletions
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)) &&