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 | bc03551 | 2020-11-23 11:16:08 -0500 | [diff] [blame] | 16 | `default_nettype none |
| 17 | /*----------------------------------------------------------------------*/ |
| 18 | /* mgmt_protect_hv: */ |
| 19 | /* */ |
| 20 | /* High voltage (3.3V) part of the mgmt_protect module. Split out into */ |
| 21 | /* a separate module and file so that the synthesis tools can handle it */ |
| 22 | /* separately from the rest, since it uses a different standard cell */ |
| 23 | /* library. See the file mgmt_protect.v for a full description of the */ |
| 24 | /* whole management protection method. */ |
| 25 | /*----------------------------------------------------------------------*/ |
| 26 | |
| 27 | module mgmt_protect_hv ( |
Ahmed Ghazy | 1d1679d | 2020-11-30 17:44:45 +0200 | [diff] [blame] | 28 | `ifdef USE_POWER_PINS |
Tim Edwards | bc03551 | 2020-11-23 11:16:08 -0500 | [diff] [blame] | 29 | inout vccd, |
| 30 | inout vssd, |
| 31 | inout vdda1, |
| 32 | inout vssa1, |
| 33 | inout vdda2, |
| 34 | inout vssa2, |
Ahmed Ghazy | 1d1679d | 2020-11-30 17:44:45 +0200 | [diff] [blame] | 35 | `endif |
Tim Edwards | bc03551 | 2020-11-23 11:16:08 -0500 | [diff] [blame] | 36 | |
| 37 | output mprj_vdd_logic1, |
| 38 | output mprj2_vdd_logic1 |
| 39 | |
| 40 | ); |
| 41 | |
| 42 | wire mprj_vdd_logic1_h; |
| 43 | wire mprj2_vdd_logic1_h; |
| 44 | |
Ahmed Ghazy | 4d78284 | 2020-12-16 00:12:42 +0200 | [diff] [blame] | 45 | `ifdef USE_POWER_PINS |
| 46 | // This is to emulate the substrate shorting grounds together for LVS |
| 47 | // purposes |
| 48 | assign vssa2 = vssa1; |
| 49 | assign vssa1 = vssd; |
| 50 | `endif |
| 51 | |
Tim Edwards | bc03551 | 2020-11-23 11:16:08 -0500 | [diff] [blame] | 52 | // Logic high in the VDDA (3.3V) domains |
| 53 | |
| 54 | sky130_fd_sc_hvl__conb_1 mprj_logic_high_hvl ( |
| 55 | `ifdef USE_POWER_PINS |
| 56 | .VPWR(vdda1), |
| 57 | .VGND(vssa1), |
| 58 | .VPB(vdda1), |
| 59 | .VNB(vssa1), |
| 60 | `endif |
| 61 | .HI(mprj_vdd_logic1_h), |
| 62 | .LO() |
| 63 | ); |
| 64 | |
| 65 | sky130_fd_sc_hvl__conb_1 mprj2_logic_high_hvl ( |
| 66 | `ifdef USE_POWER_PINS |
| 67 | .VPWR(vdda2), |
| 68 | .VGND(vssa2), |
| 69 | .VPB(vdda2), |
| 70 | .VNB(vssa2), |
| 71 | `endif |
| 72 | .HI(mprj2_vdd_logic1_h), |
| 73 | .LO() |
| 74 | ); |
| 75 | |
| 76 | // Level shift the logic high signals into the 1.8V domain |
| 77 | |
| 78 | sky130_fd_sc_hvl__lsbufhv2lv_1 mprj_logic_high_lv ( |
| 79 | `ifdef USE_POWER_PINS |
| 80 | .VPWR(vdda1), |
| 81 | .VGND(vssd), |
| 82 | .LVPWR(vccd), |
| 83 | .VPB(vdda1), |
| 84 | .VNB(vssd), |
| 85 | `endif |
| 86 | .X(mprj_vdd_logic1), |
| 87 | .A(mprj_vdd_logic1_h) |
| 88 | ); |
| 89 | |
| 90 | sky130_fd_sc_hvl__lsbufhv2lv_1 mprj2_logic_high_lv ( |
| 91 | `ifdef USE_POWER_PINS |
| 92 | .VPWR(vdda2), |
| 93 | .VGND(vssd), |
| 94 | .LVPWR(vccd), |
| 95 | .VPB(vdda2), |
| 96 | .VNB(vssd), |
| 97 | `endif |
| 98 | .X(mprj2_vdd_logic1), |
| 99 | .A(mprj2_vdd_logic1_h) |
| 100 | ); |
Tim Edwards | bc03551 | 2020-11-23 11:16:08 -0500 | [diff] [blame] | 101 | endmodule |
Ahmed Ghazy | 4d78284 | 2020-12-16 00:12:42 +0200 | [diff] [blame] | 102 | |
Tim Edwards | bc03551 | 2020-11-23 11:16:08 -0500 | [diff] [blame] | 103 | `default_nettype wire |