aboutsummaryrefslogtreecommitdiffstats
path: root/picosoc
diff options
context:
space:
mode:
authorOlof Kindgren <olof.kindgren@gmail.com>2018-05-18 23:28:18 +0200
committerOlof Kindgren <olof.kindgren@gmail.com>2018-05-18 23:52:31 +0200
commit2ceb472178ccd0f95555476eb4917cd615279cf7 (patch)
tree2c733433a6604103de62e2d458027396b637bb86 /picosoc
parent3015c18e5322febd8d136fb5161c68bd4e1f00fb (diff)
downloadpicorv32-2ceb472178ccd0f95555476eb4917cd615279cf7.tar.gz
picorv32-2ceb472178ccd0f95555476eb4917cd615279cf7.zip
Bypass picosoc compile order check if PICORV32_REGS is defined.
Previously, picosoc.v needed to be sourced before picorv32.v to ensure that the PICORV32_REGS `define (used to select implementation for the register file) was set to picosoc_regs This allows for overriding PICORV32_REGS, e.g. by setting it externally in the EDA tool invocation. In this case, the compile order between picorv32.v and picosoc.v is not important. Note: This change will break the safety check if PICORV32_REGS is defined between sourcing picorv32.v and picosoc.v
Diffstat (limited to 'picosoc')
-rw-r--r--picosoc/picosoc.v2
1 files changed, 2 insertions, 0 deletions
diff --git a/picosoc/picosoc.v b/picosoc/picosoc.v
index 0f82df5..6298a8e 100644
--- a/picosoc/picosoc.v
+++ b/picosoc/picosoc.v
@@ -17,11 +17,13 @@
*
*/
+`ifndef PICORV32_REGS
`ifdef PICORV32_V
`error "picosoc.v must be read before picorv32.v!"
`endif
`define PICORV32_REGS picosoc_regs
+`endif
module picosoc (
input clk,