blob: 23d9cf60f9e5517d588cab69017fdb4d2a0842f3 [file] [log] [blame]
agorararmard6c766a82020-12-10 18:13:12 +02001// SPDX-FileCopyrightText: 2020 Efabless Corporation
agorararmarde5780bf2020-12-09 21:27:56 +00002//
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.
agorararmardafa96ea2020-12-09 23:37:31 +020014// SPDX-License-Identifier: Apache-2.0
agorararmarde5780bf2020-12-09 21:27:56 +000015
Tim Edwardsbc035512020-11-23 11:16:08 -050016`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
27module mgmt_protect_hv (
Ahmed Ghazy1d1679d2020-11-30 17:44:45 +020028`ifdef USE_POWER_PINS
Tim Edwardsbc035512020-11-23 11:16:08 -050029 inout vccd,
30 inout vssd,
31 inout vdda1,
32 inout vssa1,
33 inout vdda2,
34 inout vssa2,
Ahmed Ghazy1d1679d2020-11-30 17:44:45 +020035`endif
Tim Edwardsbc035512020-11-23 11:16:08 -050036
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 Ghazy4d782842020-12-16 00:12:42 +020045`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 Edwardsbc035512020-11-23 11:16:08 -050052 // 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 Edwardsbc035512020-11-23 11:16:08 -0500101endmodule
Ahmed Ghazy4d782842020-12-16 00:12:42 +0200102
Tim Edwardsbc035512020-11-23 11:16:08 -0500103`default_nettype wire