blob: 394f62ba0a44f3e40376a5ddf42a551dba74f8ca [file] [log] [blame]
Ahmed Ghazy72154392020-11-11 14:56:52 +02001package require openlane
2set script_dir [file dirname [file normalize [info script]]]
3
4prep -design $script_dir -tag user_project_wrapper -overwrite
5set save_path $script_dir/../..
6
7verilog_elaborate
8
9init_floorplan
10
Ahmed Ghazyec81bd22020-11-19 16:09:08 +020011place_io_ol
Ahmed Ghazy72154392020-11-11 14:56:52 +020012
agorararmardc86f63d2020-11-27 18:43:43 +000013set ::env(FP_DEF_TEMPATE) $script_dir/../../def/user_project_wrapper_empty.def
14
15apply_def_template
16
Ahmed Ghazyec81bd22020-11-19 16:09:08 +020017add_macro_placement mprj 1150 1700 N
Ahmed Ghazy72154392020-11-11 14:56:52 +020018
19manual_macro_placement f
20
agorararmardc86f63d2020-11-27 18:43:43 +000021set ::env(_SPACING) 1.6
22set ::env(_WIDTH) 3
Ahmed Ghazya4367b32020-11-26 21:03:30 +020023
agorararmardc86f63d2020-11-27 18:43:43 +000024set power_domains [list {vccd1 vssd1} {vccd2 vssd2} {vdda1 vssa1} {vdda2 vssa2}]
25
26set ::env(_VDD_NET_NAME) vccd1
27set ::env(_GND_NET_NAME) vssd1
28set ::env(_V_OFFSET) 14
29set ::env(_H_OFFSET) $::env(_V_OFFSET)
30set ::env(_V_PITCH) 180
31set ::env(_H_PITCH) 180
32set ::env(_V_PDN_OFFSET) 0
33set ::env(_H_PDN_OFFSET) 0
34
35foreach domain $power_domains {
36 set ::env(_VDD_NET_NAME) [lindex $domain 0]
37 set ::env(_GND_NET_NAME) [lindex $domain 1]
38 gen_pdn
39
40 set ::env(_V_OFFSET) \
41 [expr $::env(_V_OFFSET) + 2*($::env(_WIDTH)+$::env(_SPACING))]
42 set ::env(_H_OFFSET) \
43 [expr $::env(_H_OFFSET) + 2*($::env(_WIDTH)+$::env(_SPACING))]
44 set ::env(_V_PDN_OFFSET) [expr $::env(_V_PDN_OFFSET)+6*$::env(_WIDTH)]
45 set ::env(_H_PDN_OFFSET) [expr $::env(_H_PDN_OFFSET)+6*$::env(_WIDTH)]
46}
Ahmed Ghazyec81bd22020-11-19 16:09:08 +020047
Ahmed Ghazy72154392020-11-11 14:56:52 +020048global_routing_or
49detailed_routing
50
51run_magic
52run_magic_spice_export
53
54save_views -lef_path $::env(magic_result_file_tag).lef \
55 -def_path $::env(tritonRoute_result_file_tag).def \
56 -gds_path $::env(magic_result_file_tag).gds \
57 -mag_path $::env(magic_result_file_tag).mag \
58 -save_path $save_path \
59 -tag $::env(RUN_TAG)
60
61run_magic_drc
62
63run_lvs; # requires run_magic_spice_export
64
65run_antenna_check