2021-10-12 15:31:42 -05:00
|
|
|
// SPDX-FileCopyrightText: 2020 Efabless Corporation
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
// you may not use this file except in compliance with the License.
|
|
|
|
// You may obtain a copy of the License at
|
|
|
|
//
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
//
|
|
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
// See the License for the specific language governing permissions and
|
|
|
|
// limitations under the License.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
|
|
|
// `default_nettype none
|
|
|
|
`ifndef TOP_ROUTING
|
|
|
|
`define USER1_ABUTMENT_PINS \
|
|
|
|
.AMUXBUS_A(analog_a),\
|
|
|
|
.AMUXBUS_B(analog_b),\
|
|
|
|
.VSSA(vssa1),\
|
|
|
|
.VDDA(vdda1),\
|
|
|
|
.VSWITCH(vddio),\
|
|
|
|
.VDDIO_Q(vddio_q),\
|
|
|
|
.VCCHIB(vccd),\
|
|
|
|
.VDDIO(vddio),\
|
2021-11-03 09:53:09 -05:00
|
|
|
.VCCD(vccd),\
|
2021-10-12 15:31:42 -05:00
|
|
|
.VSSIO(vssio),\
|
2021-11-03 09:53:09 -05:00
|
|
|
.VSSD(vssd),\
|
2021-12-06 18:38:24 -06:00
|
|
|
.VSSIO_Q(vssio_q),
|
2021-10-12 15:31:42 -05:00
|
|
|
|
|
|
|
`define USER2_ABUTMENT_PINS \
|
|
|
|
.AMUXBUS_A(analog_a),\
|
|
|
|
.AMUXBUS_B(analog_b),\
|
|
|
|
.VSSA(vssa2),\
|
|
|
|
.VDDA(vdda2),\
|
|
|
|
.VSWITCH(vddio),\
|
|
|
|
.VDDIO_Q(vddio_q),\
|
|
|
|
.VCCHIB(vccd),\
|
|
|
|
.VDDIO(vddio),\
|
2021-11-03 09:53:09 -05:00
|
|
|
.VCCD(vccd),\
|
2021-10-12 15:31:42 -05:00
|
|
|
.VSSIO(vssio),\
|
2021-11-03 09:53:09 -05:00
|
|
|
.VSSD(vssd),\
|
2021-12-06 18:38:24 -06:00
|
|
|
.VSSIO_Q(vssio_q),
|
2021-10-12 15:31:42 -05:00
|
|
|
|
|
|
|
`define MGMT_ABUTMENT_PINS \
|
|
|
|
.AMUXBUS_A(analog_a),\
|
|
|
|
.AMUXBUS_B(analog_b),\
|
|
|
|
.VSSA(vssa),\
|
|
|
|
.VDDA(vdda),\
|
|
|
|
.VSWITCH(vddio),\
|
|
|
|
.VDDIO_Q(vddio_q),\
|
|
|
|
.VCCHIB(vccd),\
|
|
|
|
.VDDIO(vddio),\
|
|
|
|
.VCCD(vccd),\
|
|
|
|
.VSSIO(vssio),\
|
|
|
|
.VSSD(vssd),\
|
2021-12-06 18:38:24 -06:00
|
|
|
.VSSIO_Q(vssio_q),
|
2021-10-12 15:31:42 -05:00
|
|
|
`else
|
|
|
|
`define USER1_ABUTMENT_PINS
|
|
|
|
`define USER2_ABUTMENT_PINS
|
|
|
|
`define MGMT_ABUTMENT_PINS
|
|
|
|
`endif
|
|
|
|
|
|
|
|
`define HVCLAMP_PINS(H,L) \
|
|
|
|
.DRN_HVC(H), \
|
|
|
|
.SRC_BDY_HVC(L)
|
|
|
|
|
|
|
|
`define LVCLAMP_PINS(H1,L1,H2,L2,L3) \
|
|
|
|
.BDY2_B2B(L3), \
|
|
|
|
.DRN_LVC1(H1), \
|
|
|
|
.DRN_LVC2(H2), \
|
|
|
|
.SRC_BDY_LVC1(L1), \
|
|
|
|
.SRC_BDY_LVC2(L2)
|
|
|
|
|
2022-09-20 16:49:08 -05:00
|
|
|
`define INPUT_PAD(X,Y,CONB_ONE,CONB_ZERO) \
|
2022-09-20 15:00:09 -05:00
|
|
|
wire loop_zero_``X; \
|
|
|
|
wire loop_one_``X; \
|
2021-10-12 15:31:42 -05:00
|
|
|
sky130_ef_io__gpiov2_pad_wrapped X``_pad ( \
|
|
|
|
`MGMT_ABUTMENT_PINS \
|
|
|
|
`ifndef TOP_ROUTING \
|
2021-12-06 18:38:24 -06:00
|
|
|
.PAD(X), \
|
2021-10-12 15:31:42 -05:00
|
|
|
`endif \
|
2022-09-20 16:49:08 -05:00
|
|
|
.OUT(CONB_ZERO), \
|
2022-09-20 15:00:09 -05:00
|
|
|
.OE_N(CONB_ONE), \
|
|
|
|
.HLD_H_N(loop_one_``X), \
|
2021-10-12 15:31:42 -05:00
|
|
|
.ENABLE_H(porb_h), \
|
2022-09-20 15:00:09 -05:00
|
|
|
.ENABLE_INP_H(loop_zero_``X), \
|
2021-10-12 15:31:42 -05:00
|
|
|
.ENABLE_VDDA_H(porb_h), \
|
2022-09-20 15:00:09 -05:00
|
|
|
.ENABLE_VSWITCH_H(loop_zero_``X), \
|
|
|
|
.ENABLE_VDDIO(CONB_ONE), \
|
2021-10-12 15:31:42 -05:00
|
|
|
.INP_DIS(por), \
|
2022-09-20 16:49:08 -05:00
|
|
|
.IB_MODE_SEL(CONB_ZERO), \
|
|
|
|
.VTRIP_SEL(CONB_ZERO), \
|
|
|
|
.SLOW(CONB_ZERO), \
|
|
|
|
.HLD_OVR(CONB_ZERO), \
|
|
|
|
.ANALOG_EN(CONB_ZERO), \
|
|
|
|
.ANALOG_SEL(CONB_ZERO), \
|
|
|
|
.ANALOG_POL(CONB_ZERO), \
|
|
|
|
.DM({CONB_ZERO, CONB_ZERO, CONB_ONE}), \
|
2021-10-12 15:31:42 -05:00
|
|
|
.PAD_A_NOESD_H(), \
|
|
|
|
.PAD_A_ESD_0_H(), \
|
|
|
|
.PAD_A_ESD_1_H(), \
|
|
|
|
.IN(Y), \
|
|
|
|
.IN_H(), \
|
2022-09-20 15:00:09 -05:00
|
|
|
.TIE_HI_ESD(loop_one_``X), \
|
|
|
|
.TIE_LO_ESD(loop_zero_``X) )
|
2021-10-12 15:31:42 -05:00
|
|
|
|
2022-09-20 16:49:08 -05:00
|
|
|
`define OUTPUT_PAD(X,Y,CONB_ONE,CONB_ZERO,INPUT_DIS,OUT_EN_N) \
|
2022-09-20 15:00:09 -05:00
|
|
|
wire loop_zero_``X; \
|
|
|
|
wire loop_one_``X; \
|
2021-10-12 15:31:42 -05:00
|
|
|
sky130_ef_io__gpiov2_pad_wrapped X``_pad ( \
|
|
|
|
`MGMT_ABUTMENT_PINS \
|
|
|
|
`ifndef TOP_ROUTING \
|
2021-12-06 18:38:24 -06:00
|
|
|
.PAD(X), \
|
2021-10-12 15:31:42 -05:00
|
|
|
`endif \
|
|
|
|
.OUT(Y), \
|
|
|
|
.OE_N(OUT_EN_N), \
|
2022-09-20 15:00:09 -05:00
|
|
|
.HLD_H_N(loop_one_``X), \
|
2021-10-12 15:31:42 -05:00
|
|
|
.ENABLE_H(porb_h), \
|
2022-09-20 15:00:09 -05:00
|
|
|
.ENABLE_INP_H(loop_zero_``X), \
|
2021-10-12 15:31:42 -05:00
|
|
|
.ENABLE_VDDA_H(porb_h), \
|
2022-09-20 15:00:09 -05:00
|
|
|
.ENABLE_VSWITCH_H(loop_zero_``X), \
|
|
|
|
.ENABLE_VDDIO(CONB_ONE), \
|
2021-10-12 15:31:42 -05:00
|
|
|
.INP_DIS(INPUT_DIS), \
|
2022-09-20 16:49:08 -05:00
|
|
|
.IB_MODE_SEL(CONB_ZERO), \
|
|
|
|
.VTRIP_SEL(CONB_ZERO), \
|
|
|
|
.SLOW(CONB_ZERO), \
|
|
|
|
.HLD_OVR(CONB_ZERO), \
|
|
|
|
.ANALOG_EN(CONB_ZERO), \
|
|
|
|
.ANALOG_SEL(CONB_ZERO), \
|
|
|
|
.ANALOG_POL(CONB_ZERO), \
|
|
|
|
.DM({CONB_ONE, CONB_ONE, CONB_ZERO}), \
|
2021-11-22 14:21:06 -06:00
|
|
|
.PAD_A_NOESD_H(), \
|
|
|
|
.PAD_A_ESD_0_H(), \
|
|
|
|
.PAD_A_ESD_1_H(), \
|
|
|
|
.IN(), \
|
|
|
|
.IN_H(), \
|
2022-09-20 15:00:09 -05:00
|
|
|
.TIE_HI_ESD(loop_one_``X), \
|
|
|
|
.TIE_LO_ESD(loop_zero_``X))
|
2021-11-22 14:21:06 -06:00
|
|
|
|
2022-09-20 16:49:08 -05:00
|
|
|
`define OUTPUT_NO_INP_DIS_PAD(X,Y,CONB_ONE,CONB_ZERO,OUT_EN_N) \
|
2022-09-20 15:00:09 -05:00
|
|
|
wire loop_zero_``X; \
|
|
|
|
wire loop_one_``X; \
|
2021-11-22 14:21:06 -06:00
|
|
|
sky130_ef_io__gpiov2_pad_wrapped X``_pad ( \
|
|
|
|
`MGMT_ABUTMENT_PINS \
|
|
|
|
`ifndef TOP_ROUTING \
|
2021-12-06 18:38:24 -06:00
|
|
|
.PAD(X), \
|
2021-11-22 14:21:06 -06:00
|
|
|
`endif \
|
|
|
|
.OUT(Y), \
|
|
|
|
.OE_N(OUT_EN_N), \
|
2022-09-20 15:00:09 -05:00
|
|
|
.HLD_H_N(loop_one_``X), \
|
2021-11-22 14:21:06 -06:00
|
|
|
.ENABLE_H(porb_h), \
|
2022-09-20 15:00:09 -05:00
|
|
|
.ENABLE_INP_H(loop_zero_``X), \
|
2021-11-22 14:21:06 -06:00
|
|
|
.ENABLE_VDDA_H(porb_h), \
|
2022-09-20 15:00:09 -05:00
|
|
|
.ENABLE_VSWITCH_H(loop_zero_``X), \
|
|
|
|
.ENABLE_VDDIO(CONB_ONE), \
|
2022-09-20 16:49:08 -05:00
|
|
|
.INP_DIS(CONB_ZERO), \
|
|
|
|
.IB_MODE_SEL(CONB_ZERO), \
|
|
|
|
.VTRIP_SEL(CONB_ZERO), \
|
|
|
|
.SLOW(CONB_ZERO), \
|
|
|
|
.HLD_OVR(CONB_ZERO), \
|
|
|
|
.ANALOG_EN(CONB_ZERO), \
|
|
|
|
.ANALOG_SEL(CONB_ZERO), \
|
|
|
|
.ANALOG_POL(CONB_ZERO), \
|
|
|
|
.DM({CONB_ONE, CONB_ONE, CONB_ZERO}), \
|
2021-10-12 15:31:42 -05:00
|
|
|
.PAD_A_NOESD_H(), \
|
|
|
|
.PAD_A_ESD_0_H(), \
|
|
|
|
.PAD_A_ESD_1_H(), \
|
|
|
|
.IN(), \
|
|
|
|
.IN_H(), \
|
2022-09-20 15:00:09 -05:00
|
|
|
.TIE_HI_ESD(loop_one_``X), \
|
|
|
|
.TIE_LO_ESD(loop_zero_``X))
|
2021-10-12 15:31:42 -05:00
|
|
|
|
2022-09-20 16:49:08 -05:00
|
|
|
`define INOUT_PAD(X,Y,CONB_ONE,CONB_ZERO,Y_OUT,INPUT_DIS,OUT_EN_N,MODE) \
|
2022-09-20 15:00:09 -05:00
|
|
|
wire loop_zero_``X; \
|
|
|
|
wire loop_one_``X; \
|
2021-10-12 15:31:42 -05:00
|
|
|
sky130_ef_io__gpiov2_pad_wrapped X``_pad ( \
|
|
|
|
`MGMT_ABUTMENT_PINS \
|
|
|
|
`ifndef TOP_ROUTING \
|
2021-12-06 18:38:24 -06:00
|
|
|
.PAD(X), \
|
2021-10-12 15:31:42 -05:00
|
|
|
`endif \
|
|
|
|
.OUT(Y_OUT), \
|
|
|
|
.OE_N(OUT_EN_N), \
|
2022-09-20 15:00:09 -05:00
|
|
|
.HLD_H_N(loop_one_``X), \
|
2021-10-12 15:31:42 -05:00
|
|
|
.ENABLE_H(porb_h), \
|
2022-09-20 15:00:09 -05:00
|
|
|
.ENABLE_INP_H(loop_zero_``X), \
|
2021-10-12 15:31:42 -05:00
|
|
|
.ENABLE_VDDA_H(porb_h), \
|
2022-09-20 15:00:09 -05:00
|
|
|
.ENABLE_VSWITCH_H(loop_zero_``X), \
|
|
|
|
.ENABLE_VDDIO(CONB_ONE), \
|
2021-10-12 15:31:42 -05:00
|
|
|
.INP_DIS(INPUT_DIS), \
|
2022-09-20 16:49:08 -05:00
|
|
|
.IB_MODE_SEL(CONB_ZERO), \
|
|
|
|
.VTRIP_SEL(CONB_ZERO), \
|
|
|
|
.SLOW(CONB_ZERO), \
|
|
|
|
.HLD_OVR(CONB_ZERO), \
|
|
|
|
.ANALOG_EN(CONB_ZERO), \
|
|
|
|
.ANALOG_SEL(CONB_ZERO), \
|
|
|
|
.ANALOG_POL(CONB_ZERO), \
|
2021-10-12 15:31:42 -05:00
|
|
|
.DM(MODE), \
|
|
|
|
.PAD_A_NOESD_H(), \
|
|
|
|
.PAD_A_ESD_0_H(), \
|
|
|
|
.PAD_A_ESD_1_H(), \
|
|
|
|
.IN(Y), \
|
|
|
|
.IN_H(), \
|
2022-09-20 15:00:09 -05:00
|
|
|
.TIE_HI_ESD(loop_one_``X), \
|
|
|
|
.TIE_LO_ESD(loop_zero_``X) )
|
2021-10-12 15:31:42 -05:00
|
|
|
|
|
|
|
// `default_nettype wire
|