blob: 8556356f5ea74ff2eb2cd1bcf31444b0e6baf7cb [file] [log] [blame]
agorararmarde5780bf2020-12-09 21:27:56 +00001# Copyright 2020 Efabless Corporation
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.
14
Ahmed Ghazy72154392020-11-11 14:56:52 +020015package require openlane
16set script_dir [file dirname [file normalize [info script]]]
17
18prep -design $script_dir -tag user_project_wrapper -overwrite
19set save_path $script_dir/../..
20
21verilog_elaborate
22
23init_floorplan
24
Ahmed Ghazyec81bd22020-11-19 16:09:08 +020025place_io_ol
Ahmed Ghazy72154392020-11-11 14:56:52 +020026
agorararmardd0eb02c2020-12-07 22:36:16 +020027set ::env(FP_DEF_TEMPLATE) $script_dir/../../def/user_project_wrapper_empty.def
agorararmardc86f63d2020-11-27 18:43:43 +000028
29apply_def_template
30
Ahmed Ghazyec81bd22020-11-19 16:09:08 +020031add_macro_placement mprj 1150 1700 N
Ahmed Ghazy72154392020-11-11 14:56:52 +020032
33manual_macro_placement f
34
agorararmardc86f63d2020-11-27 18:43:43 +000035set ::env(_SPACING) 1.6
36set ::env(_WIDTH) 3
Ahmed Ghazya4367b32020-11-26 21:03:30 +020037
agorararmardc86f63d2020-11-27 18:43:43 +000038set power_domains [list {vccd1 vssd1} {vccd2 vssd2} {vdda1 vssa1} {vdda2 vssa2}]
39
40set ::env(_VDD_NET_NAME) vccd1
41set ::env(_GND_NET_NAME) vssd1
42set ::env(_V_OFFSET) 14
43set ::env(_H_OFFSET) $::env(_V_OFFSET)
44set ::env(_V_PITCH) 180
45set ::env(_H_PITCH) 180
46set ::env(_V_PDN_OFFSET) 0
47set ::env(_H_PDN_OFFSET) 0
48
49foreach domain $power_domains {
50 set ::env(_VDD_NET_NAME) [lindex $domain 0]
51 set ::env(_GND_NET_NAME) [lindex $domain 1]
52 gen_pdn
53
54 set ::env(_V_OFFSET) \
55 [expr $::env(_V_OFFSET) + 2*($::env(_WIDTH)+$::env(_SPACING))]
56 set ::env(_H_OFFSET) \
57 [expr $::env(_H_OFFSET) + 2*($::env(_WIDTH)+$::env(_SPACING))]
58 set ::env(_V_PDN_OFFSET) [expr $::env(_V_PDN_OFFSET)+6*$::env(_WIDTH)]
59 set ::env(_H_PDN_OFFSET) [expr $::env(_H_PDN_OFFSET)+6*$::env(_WIDTH)]
60}
Ahmed Ghazyec81bd22020-11-19 16:09:08 +020061
Ahmed Ghazy72154392020-11-11 14:56:52 +020062global_routing_or
63detailed_routing
64
65run_magic
66run_magic_spice_export
67
68save_views -lef_path $::env(magic_result_file_tag).lef \
69 -def_path $::env(tritonRoute_result_file_tag).def \
70 -gds_path $::env(magic_result_file_tag).gds \
71 -mag_path $::env(magic_result_file_tag).mag \
72 -save_path $save_path \
73 -tag $::env(RUN_TAG)
74
75run_magic_drc
76
77run_lvs; # requires run_magic_spice_export
78
79run_antenna_check