1
0
mirror of https://github.com/aolofsson/oh.git synced 2025-01-17 20:02:53 +08:00

common/hdl: Fix syntax error when CFG_ASIC is undefined

Workaround for:
Recent Vivado (2016.4) synth step seems to have dropped support for
"-verilog_define CFG_ASIC=0"

Signed-off-by: Ola Jeppsson <ola@adapteva.com>
This commit is contained in:
Ola Jeppsson 2017-02-03 02:26:37 +01:00
parent 6a50842b46
commit 049a031e47
18 changed files with 54 additions and 0 deletions

View File

@ -11,6 +11,9 @@ module oh_buffer #(parameter N = 1, // number of inputs
output [N-1:0] out // output
);
`ifndef CFG_ASIC
`define CFG_ASIC 0
`endif
localparam ASIC = `CFG_ASIC;
generate

View File

@ -12,6 +12,9 @@ module oh_clockgate (
output eclk // enabled clock output
);
`ifndef CFG_ASIC
`define CFG_ASIC 0
`endif
localparam ASIC = `CFG_ASIC; // use ASIC lib
generate

View File

@ -12,6 +12,9 @@ module oh_clockmux #(parameter N = 1) // number of clock inputs
output clkout
);
`ifndef CFG_ASIC
`define CFG_ASIC 0
`endif
localparam ASIC = `CFG_ASIC;
generate

View File

@ -11,6 +11,9 @@ module oh_clockor #(parameter N = 1) // number of clock inputs
output clkout
);
`ifndef CFG_ASIC
`define CFG_ASIC 0
`endif
localparam ASIC = `CFG_ASIC;
generate

View File

@ -14,6 +14,9 @@ module oh_csa32 #(parameter DW = 1 // data width
output [DW-1:0] c //carry
);
`ifndef CFG_ASIC
`define CFG_ASIC 0
`endif
localparam ASIC = `CFG_ASIC; // use asic library
generate

View File

@ -17,6 +17,9 @@ module oh_csa42 #( parameter DW = 1 // data width
output [DW-1:0] cout //carry out
);
`ifndef CFG_ASIC
`define CFG_ASIC 0
`endif
localparam ASIC = `CFG_ASIC; // use asic library
generate

View File

@ -13,6 +13,9 @@ module oh_delay #(parameter DW = 1, // width of data
output [DW-1:0] out // output
);
`ifndef CFG_ASIC
`define CFG_ASIC 0
`endif
localparam ASIC = `CFG_ASIC; // use asic library
generate

View File

@ -15,6 +15,9 @@ module oh_dsync #(parameter PS = 2, // number of sync stages
output dout // synchronized data
);
`ifndef CFG_ASIC
`define CFG_ASIC 0
`endif
localparam ASIC = `CFG_ASIC; // use asic library
generate

View File

@ -12,6 +12,9 @@ module oh_lat0 #(parameter DW = 1 // data width
output [DW-1:0] out // output data (stable/latched when clk=1)
);
`ifndef CFG_ASIC
`define CFG_ASIC 0
`endif
localparam ASIC = `CFG_ASIC; // use ASIC lib
generate

View File

@ -12,6 +12,9 @@ module oh_lat1 #(parameter DW = 1 //data width
output [DW-1:0] out // output data (stable/latched when clk=0)
);
`ifndef CFG_ASIC
`define CFG_ASIC 0
`endif
localparam ASIC = `CFG_ASIC; // use ASIC lib
generate

View File

@ -33,6 +33,9 @@ module oh_memory_dp # (parameter DW = 104, //memory width
input [DW-1:0] bist_din // data input
);
`ifndef CFG_ASIC
`define CFG_ASIC 0
`endif
localparam ASIC = `CFG_ASIC; // use asic library
generate

View File

@ -33,6 +33,9 @@ module oh_memory_sp # (parameter DW = 104, // memory width
input [DW-1:0] bist_din // data input
);
`ifndef CFG_ASIC
`define CFG_ASIC 0
`endif
localparam ASIC = `CFG_ASIC; // use ASIC lib
generate

View File

@ -11,6 +11,9 @@ module oh_pwr_gate (
output vddg // gated output supply
);
`ifndef CFG_ASIC
`define CFG_ASIC 0
`endif
localparam ASIC = `CFG_ASIC; // use asic library
`ifdef TARGET_SIM

View File

@ -13,6 +13,9 @@ module oh_pwr_isohi #(parameter DW = 1 // width of data inputs
output [DW-1:0] out // out = iso | in
);
`ifndef CFG_ASIC
`define CFG_ASIC 0
`endif
localparam ASIC = `CFG_ASIC; // use ASIC lib
generate

View File

@ -13,6 +13,9 @@ module oh_pwr_isolo #(parameter DW = 1 // width of data inputs
output [DW-1:0] out // out = ~iso & in
);
`ifndef CFG_ASIC
`define CFG_ASIC 0
`endif
localparam ASIC = `CFG_ASIC; // use ASIC lib
generate

View File

@ -13,6 +13,9 @@ module ohr_reg0 #(parameter DW = 1 // data width
output [DW-1:0] out // output data (stable/latched when clk=1)
);
`ifndef CFG_ASIC
`define CFG_ASIC 0
`endif
localparam ASIC = `CFG_ASIC; // use ASIC lib
generate

View File

@ -13,6 +13,9 @@ module oh_reg1 #(parameter DW = 1 // data width
output [DW-1:0] out // output data (stable/latched when clk=1)
);
`ifndef CFG_ASIC
`define CFG_ASIC 0
`endif
localparam ASIC = `CFG_ASIC;
generate

View File

@ -13,6 +13,9 @@ module oh_rsync #(parameter PS = 2 // number of sync stages
output nrst_out
);
`ifndef CFG_ASIC
`define CFG_ASIC 0
`endif
localparam ASIC = `CFG_ASIC; // use ASIC lib
generate