agorararmard | 6c766a8 | 2020-12-10 18:13:12 +0200 | [diff] [blame] | 1 | // SPDX-FileCopyrightText: 2020 Efabless Corporation |
agorararmard | e5780bf | 2020-12-09 21:27:56 +0000 | [diff] [blame] | 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
agorararmard | afa96ea | 2020-12-09 23:37:31 +0200 | [diff] [blame] | 14 | // SPDX-License-Identifier: Apache-2.0 |
agorararmard | e5780bf | 2020-12-09 21:27:56 +0000 | [diff] [blame] | 15 | |
Tim Edwards | 581068f | 2020-11-19 12:45:25 -0500 | [diff] [blame] | 16 | // `default_nettype none |
Tim Edwards | 9eda80d | 2020-10-08 21:36:44 -0400 | [diff] [blame] | 17 | module mprj_io #( |
| 18 | parameter AREA1PADS = 18 // Highest numbered pad in area 1 |
| 19 | ) ( |
| 20 | inout vddio, |
| 21 | inout vssio, |
| 22 | inout vdda, |
| 23 | inout vssa, |
| 24 | inout vccd, |
| 25 | inout vssd, |
| 26 | |
| 27 | inout vdda1, |
| 28 | inout vdda2, |
| 29 | inout vssa1, |
| 30 | inout vssa2, |
| 31 | inout vccd1, |
| 32 | inout vccd2, |
| 33 | inout vssd1, |
| 34 | inout vssd2, |
| 35 | |
Tim Edwards | 04ba17f | 2020-10-02 22:27:50 -0400 | [diff] [blame] | 36 | input vddio_q, |
| 37 | input vssio_q, |
| 38 | input analog_a, |
| 39 | input analog_b, |
Tim Edwards | 44bab47 | 2020-10-04 22:09:54 -0400 | [diff] [blame] | 40 | input porb_h, |
Tim Edwards | 44bab47 | 2020-10-04 22:09:54 -0400 | [diff] [blame] | 41 | inout [`MPRJ_IO_PADS-1:0] io, |
Tim Edwards | 04ba17f | 2020-10-02 22:27:50 -0400 | [diff] [blame] | 42 | input [`MPRJ_IO_PADS-1:0] io_out, |
Tim Edwards | 44bab47 | 2020-10-04 22:09:54 -0400 | [diff] [blame] | 43 | input [`MPRJ_IO_PADS-1:0] oeb, |
shalan | 0d14e6e | 2020-08-31 16:50:48 +0200 | [diff] [blame] | 44 | input [`MPRJ_IO_PADS-1:0] hldh_n, |
Tim Edwards | 04ba17f | 2020-10-02 22:27:50 -0400 | [diff] [blame] | 45 | input [`MPRJ_IO_PADS-1:0] enh, |
shalan | 0d14e6e | 2020-08-31 16:50:48 +0200 | [diff] [blame] | 46 | input [`MPRJ_IO_PADS-1:0] inp_dis, |
| 47 | input [`MPRJ_IO_PADS-1:0] ib_mode_sel, |
Tim Edwards | 04ba17f | 2020-10-02 22:27:50 -0400 | [diff] [blame] | 48 | input [`MPRJ_IO_PADS-1:0] vtrip_sel, |
| 49 | input [`MPRJ_IO_PADS-1:0] slow_sel, |
| 50 | input [`MPRJ_IO_PADS-1:0] holdover, |
shalan | 0d14e6e | 2020-08-31 16:50:48 +0200 | [diff] [blame] | 51 | input [`MPRJ_IO_PADS-1:0] analog_en, |
| 52 | input [`MPRJ_IO_PADS-1:0] analog_sel, |
| 53 | input [`MPRJ_IO_PADS-1:0] analog_pol, |
| 54 | input [`MPRJ_IO_PADS*3-1:0] dm, |
Tim Edwards | 581068f | 2020-11-19 12:45:25 -0500 | [diff] [blame] | 55 | output [`MPRJ_IO_PADS-1:0] io_in, |
| 56 | inout [`MPRJ_IO_PADS-8:0] analog_io |
shalan | 0d14e6e | 2020-08-31 16:50:48 +0200 | [diff] [blame] | 57 | ); |
Tim Edwards | 9eda80d | 2020-10-08 21:36:44 -0400 | [diff] [blame] | 58 | |
| 59 | wire [`MPRJ_IO_PADS-1:0] loop1_io; |
Tim Edwards | 581068f | 2020-11-19 12:45:25 -0500 | [diff] [blame] | 60 | wire [6:0] no_connect; |
Tim Edwards | 9eda80d | 2020-10-08 21:36:44 -0400 | [diff] [blame] | 61 | |
Ahmed Ghazy | df4dd88 | 2020-11-25 18:38:42 +0200 | [diff] [blame] | 62 | sky130_ef_io__gpiov2_pad_wrapped area1_io_pad [AREA1PADS - 1:0] ( |
Tim Edwards | 9eda80d | 2020-10-08 21:36:44 -0400 | [diff] [blame] | 63 | `USER1_ABUTMENT_PINS |
| 64 | `ifndef TOP_ROUTING |
Tim Edwards | 4c73335 | 2020-10-12 16:32:36 -0400 | [diff] [blame] | 65 | .PAD(io[AREA1PADS - 1:0]), |
Tim Edwards | 9eda80d | 2020-10-08 21:36:44 -0400 | [diff] [blame] | 66 | `endif |
Tim Edwards | 4c73335 | 2020-10-12 16:32:36 -0400 | [diff] [blame] | 67 | .OUT(io_out[AREA1PADS - 1:0]), |
| 68 | .OE_N(oeb[AREA1PADS - 1:0]), |
| 69 | .HLD_H_N(hldh_n[AREA1PADS - 1:0]), |
| 70 | .ENABLE_H(enh[AREA1PADS - 1:0]), |
| 71 | .ENABLE_INP_H(loop1_io[AREA1PADS - 1:0]), |
| 72 | .ENABLE_VDDA_H(porb_h), |
| 73 | .ENABLE_VSWITCH_H(vssio), |
| 74 | .ENABLE_VDDIO(vccd), |
| 75 | .INP_DIS(inp_dis[AREA1PADS - 1:0]), |
| 76 | .IB_MODE_SEL(ib_mode_sel[AREA1PADS - 1:0]), |
| 77 | .VTRIP_SEL(vtrip_sel[AREA1PADS - 1:0]), |
| 78 | .SLOW(slow_sel[AREA1PADS - 1:0]), |
| 79 | .HLD_OVR(holdover[AREA1PADS - 1:0]), |
| 80 | .ANALOG_EN(analog_en[AREA1PADS - 1:0]), |
| 81 | .ANALOG_SEL(analog_sel[AREA1PADS - 1:0]), |
| 82 | .ANALOG_POL(analog_pol[AREA1PADS - 1:0]), |
| 83 | .DM(dm[AREA1PADS*3 - 1:0]), |
| 84 | .PAD_A_NOESD_H(), |
Tim Edwards | 581068f | 2020-11-19 12:45:25 -0500 | [diff] [blame] | 85 | .PAD_A_ESD_0_H({analog_io[AREA1PADS - 8:0], no_connect}), |
Tim Edwards | 4c73335 | 2020-10-12 16:32:36 -0400 | [diff] [blame] | 86 | .PAD_A_ESD_1_H(), |
| 87 | .IN(io_in[AREA1PADS - 1:0]), |
| 88 | .IN_H(), |
| 89 | .TIE_HI_ESD(), |
| 90 | .TIE_LO_ESD(loop1_io[AREA1PADS - 1:0]) |
Tim Edwards | 9eda80d | 2020-10-08 21:36:44 -0400 | [diff] [blame] | 91 | ); |
| 92 | |
Ahmed Ghazy | df4dd88 | 2020-11-25 18:38:42 +0200 | [diff] [blame] | 93 | sky130_ef_io__gpiov2_pad_wrapped area2_io_pad [`MPRJ_IO_PADS - AREA1PADS - 1:0] ( |
Tim Edwards | 9eda80d | 2020-10-08 21:36:44 -0400 | [diff] [blame] | 94 | `USER2_ABUTMENT_PINS |
| 95 | `ifndef TOP_ROUTING |
Tim Edwards | 4c73335 | 2020-10-12 16:32:36 -0400 | [diff] [blame] | 96 | .PAD(io[`MPRJ_IO_PADS - 1:AREA1PADS]), |
Tim Edwards | 9eda80d | 2020-10-08 21:36:44 -0400 | [diff] [blame] | 97 | `endif |
Tim Edwards | 4c73335 | 2020-10-12 16:32:36 -0400 | [diff] [blame] | 98 | .OUT(io_out[`MPRJ_IO_PADS - 1:AREA1PADS]), |
| 99 | .OE_N(oeb[`MPRJ_IO_PADS - 1:AREA1PADS]), |
| 100 | .HLD_H_N(hldh_n[`MPRJ_IO_PADS - 1:AREA1PADS]), |
| 101 | .ENABLE_H(enh[`MPRJ_IO_PADS - 1:AREA1PADS]), |
| 102 | .ENABLE_INP_H(loop1_io[`MPRJ_IO_PADS - 1:AREA1PADS]), |
| 103 | .ENABLE_VDDA_H(porb_h), |
| 104 | .ENABLE_VSWITCH_H(vssio), |
| 105 | .ENABLE_VDDIO(vccd), |
| 106 | .INP_DIS(inp_dis[`MPRJ_IO_PADS - 1:AREA1PADS]), |
| 107 | .IB_MODE_SEL(ib_mode_sel[`MPRJ_IO_PADS - 1:AREA1PADS]), |
| 108 | .VTRIP_SEL(vtrip_sel[`MPRJ_IO_PADS - 1:AREA1PADS]), |
| 109 | .SLOW(slow_sel[`MPRJ_IO_PADS - 1:AREA1PADS]), |
| 110 | .HLD_OVR(holdover[`MPRJ_IO_PADS - 1:AREA1PADS]), |
| 111 | .ANALOG_EN(analog_en[`MPRJ_IO_PADS - 1:AREA1PADS]), |
| 112 | .ANALOG_SEL(analog_sel[`MPRJ_IO_PADS - 1:AREA1PADS]), |
| 113 | .ANALOG_POL(analog_pol[`MPRJ_IO_PADS - 1:AREA1PADS]), |
| 114 | .DM(dm[`MPRJ_IO_PADS*3 - 1:AREA1PADS*3]), |
| 115 | .PAD_A_NOESD_H(), |
Tim Edwards | 581068f | 2020-11-19 12:45:25 -0500 | [diff] [blame] | 116 | .PAD_A_ESD_0_H(analog_io[`MPRJ_IO_PADS - 8:AREA1PADS - 7]), |
Tim Edwards | 4c73335 | 2020-10-12 16:32:36 -0400 | [diff] [blame] | 117 | .PAD_A_ESD_1_H(), |
| 118 | .IN(io_in[`MPRJ_IO_PADS - 1:AREA1PADS]), |
| 119 | .IN_H(), |
| 120 | .TIE_HI_ESD(), |
| 121 | .TIE_LO_ESD(loop1_io[`MPRJ_IO_PADS - 1:AREA1PADS]) |
Tim Edwards | 9eda80d | 2020-10-08 21:36:44 -0400 | [diff] [blame] | 122 | ); |
shalan | 0d14e6e | 2020-08-31 16:50:48 +0200 | [diff] [blame] | 123 | |
Tim Edwards | 04ba17f | 2020-10-02 22:27:50 -0400 | [diff] [blame] | 124 | endmodule |
Tim Edwards | 581068f | 2020-11-19 12:45:25 -0500 | [diff] [blame] | 125 | // `default_nettype wire |