From 8673f5803a167ea2bbb4d16e30c2c8c8bee4e2e2 Mon Sep 17 00:00:00 2001 From: Brian Glod Date: Tue, 30 May 2017 16:32:51 -0400 Subject: [PATCH] ip: opencores: Fix I2C ARST_LVL The OpenCores I2C ARST_LVL was specified as STD_LOGIC in the _hw.tcl file. But becuase the top-level is Verilog, this causes Qsys to output a syntactically incorrect value for the parameter. Solved this by changing the parameter to an integer, limiting the allowed values to 0:1 and only using the LSB in the Verilog HDL. --- hdl/fpga/ip/opencores/i2c/qsys/oc_i2c_master_hw.tcl | 4 ++-- hdl/fpga/ip/opencores/i2c/rtl/verilog/i2c_master_top.v | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hdl/fpga/ip/opencores/i2c/qsys/oc_i2c_master_hw.tcl b/hdl/fpga/ip/opencores/i2c/qsys/oc_i2c_master_hw.tcl index 6fb556dc..9329cf66 100644 --- a/hdl/fpga/ip/opencores/i2c/qsys/oc_i2c_master_hw.tcl +++ b/hdl/fpga/ip/opencores/i2c/qsys/oc_i2c_master_hw.tcl @@ -47,11 +47,11 @@ add_fileset_file i2c.qip OTHER PATH ../i2c.qip # # parameters # -add_parameter ARST_LVL STD_LOGIC 0 "" +add_parameter ARST_LVL INTEGER 0 "" set_parameter_property ARST_LVL DEFAULT_VALUE 0 set_parameter_property ARST_LVL DISPLAY_NAME ARST_LVL set_parameter_property ARST_LVL WIDTH "" -set_parameter_property ARST_LVL TYPE STD_LOGIC +set_parameter_property ARST_LVL TYPE INTEGER set_parameter_property ARST_LVL UNITS None set_parameter_property ARST_LVL ALLOWED_RANGES 0:1 set_parameter_property ARST_LVL DESCRIPTION "" diff --git a/hdl/fpga/ip/opencores/i2c/rtl/verilog/i2c_master_top.v b/hdl/fpga/ip/opencores/i2c/rtl/verilog/i2c_master_top.v index fa64a533..9c6790f8 100644 --- a/hdl/fpga/ip/opencores/i2c/rtl/verilog/i2c_master_top.v +++ b/hdl/fpga/ip/opencores/i2c/rtl/verilog/i2c_master_top.v @@ -81,7 +81,7 @@ module i2c_master_top( scl_pad_i, scl_pad_o, scl_padoen_o, sda_pad_i, sda_pad_o, sda_padoen_o ); // parameters - parameter ARST_LVL = 1'b0; // asynchronous reset level + parameter ARST_LVL = 0; // asynchronous reset level // // inputs & outputs @@ -149,7 +149,7 @@ module i2c_master_top( // // generate internal reset - wire rst_i = arst_i ^ ARST_LVL; + wire rst_i = arst_i ^ ARST_LVL[0]; // generate wishbone signals wire wb_wacc = wb_we_i & wb_ack_o;