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.
This commit is contained in:
Brian Glod 2017-05-30 16:32:51 -04:00 • committed by Robert Ghilduta
commit 8673f5803a
2 changed files with 4 additions and 4 deletions

View file

@ -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 ""

View file

@ -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;