From 2ceb472178ccd0f95555476eb4917cd615279cf7 Mon Sep 17 00:00:00 2001 From: Olof Kindgren Date: Fri, 18 May 2018 23:28:18 +0200 Subject: [PATCH] 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 --- picosoc/picosoc.v | 2 ++ 1 file changed, 2 insertions(+) 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,