From 240efce9d0c13f2dbc38ade5d6d3071f607e538f Mon Sep 17 00:00:00 2001 From: RehabSayed-G Date: Mon, 7 Aug 2023 19:48:43 +0300 Subject: [PATCH] modifying menues --- rules/klayout/macros/drc_options.yml | 16 +- rules/klayout/macros/gf180mcu_drc.lydrc | 81 +++++---- rules/klayout/macros/gf180mcu_lvs.lylvs | 73 +++++--- rules/klayout/macros/gf180mcu_options.lym | 204 ++++++++++------------ rules/klayout/macros/lvs_options.yml | 26 +-- 5 files changed, 210 insertions(+), 190 deletions(-) diff --git a/rules/klayout/macros/drc_options.yml b/rules/klayout/macros/drc_options.yml index 490c8f38..a6d31089 100644 --- a/rules/klayout/macros/drc_options.yml +++ b/rules/klayout/macros/drc_options.yml @@ -1,11 +1,9 @@ --- -drc_mode: '' -run_mode: "--run_mode=flat" -variant: "--variant=C" +run_mode: flat +variant: C top_cell_name: '' -run_dir: '' -verbose: '' -feol: '' -beol: '' -offgrid: '' -connectivity: '' +verbose: 'false' +feol: true +beol: true +offgrid: 'true' +connectivity: 'false' diff --git a/rules/klayout/macros/gf180mcu_drc.lydrc b/rules/klayout/macros/gf180mcu_drc.lydrc index e4650d3c..56eff2c4 100644 --- a/rules/klayout/macros/gf180mcu_drc.lydrc +++ b/rules/klayout/macros/gf180mcu_drc.lydrc @@ -30,56 +30,65 @@ # See the License for the specific language governing permissions and # limitations under the License. -require 'yaml' - - -## reading the parent directory of the current file -run_dir = File.expand_path("..", __dir__) +require "yaml" ## reading the loaded gds file path layout_path = Pathname.new(RBA::CellView.active.filename) layout_dir = layout_path.split()[0] ## read saved options from yaml file -options = YAML.load(File.read(__dir__ + "/drc_options.yml")) - -## create options passed to run_drc.py -options_str = "#{options["drc_mode"]} #{options["run_mode"]} #{options["variant"]} #{options["top_cell_name"]} #{options["verbose"]} #{options["feol"]} #{options["beol"]} #{options["offgrid"]} #{options["connectivity"]} #{options["run_dir"]}" +dir_path = File.dirname(File.expand_path(__FILE__)) +options = YAML.load(File.read(dir_path + "/drc_options.yml")) -## run_drc command line -cmd = "python3 #{run_dir}/drc/run_drc.py --path=#{layout_path} #{options_str}" - -## start running drc -puts "######### running #{cmd}" -drc_res = `#{cmd}` +## reading the parent directory of the current file +run_dir = File.expand_path("..", dir_path) ## read the log of drc run to get output lydb file paths if run_dir option is disables gds_name = layout_path.split()[1].to_s.split(".")[0] -if options["run_dir"] == "" - File.open(__dir__ + "/drc_res.txt", "w") { |file| file.write(drc_res) } - lydb_path = File.readlines(__dir__ + "/drc_res.txt")[3].split(/ /)[-1] - File.delete(__dir__ + "/drc_res.txt") - lydb_dir = lydb_path.to_s().split("/#{gds_name}")[0] -else - lydb_dir = options["run_dir"].split("=")[1] + +## pass options to main.drc +$run_mode = options["run_mode"] + +if options["variant"] == "A" + $metal_top = "30K" + $metal_level = "3LM" + $mim_option = "A" +elsif options["variant"] == "B" + $metal_top = "11K" + $metal_level = "4LM" + $mim_option = "B" +elsif options["variant"] == "C" + $metal_top = "9K" + $metal_level = "5LM" + $mim_option = "B" +elsif options["variant"] == "D" + $metal_top = "9K" + $metal_level = "6LM" + $mim_option = "B" +elsif options["variant"] == "E" + $metal_top = "9K" + $metal_level = "6LM" + $mim_option = "A" end +$topcell = options["top_cell_name"] + +$verbose = options["verbose"] + +$feol = options["feol"] + +$beol = options["beol"] + +$offgrid = options["offgrid"] + +$conn_drc = options["connectivity"] + +## include run files -## choose the displayed database file -if options["drc_mode"] == "--antenna_only" - lydb_file = "#{gds_name}_antenna.lyrdb" - -elsif options["drc_mode"] == "--density_only" - lydb_file = "#{gds_name}_density.lyrdb" - -else - lydb_file = "#{gds_name}_main.lyrdb" - - end +#%include ../drc/rule_decks/antenna.drc +#%include ../drc/rule_decks/density.drc +#%include ../drc/main.drc -## open a klayout window with database loaded -`klayout #{layout_path} -m #{lydb_dir}/#{lydb_file}` - diff --git a/rules/klayout/macros/gf180mcu_lvs.lylvs b/rules/klayout/macros/gf180mcu_lvs.lylvs index eab12b8d..8b77dec0 100644 --- a/rules/klayout/macros/gf180mcu_lvs.lylvs +++ b/rules/klayout/macros/gf180mcu_lvs.lylvs @@ -34,13 +34,14 @@ require 'yaml' ## reading the parent directory of the current file -run_dir = File.expand_path("..", __dir__) +dir_path = File.dirname(File.expand_path(__FILE__)) +run_dir = File.expand_path("..", dir_path) ## reading the loaded gds file path layout_path = Pathname.new(RBA::CellView.active.filename) ## read saved options from yaml file -options = YAML.load(File.read(__dir__ + "/lvs_options.yml")) +options = YAML.load(File.read(dir_path + "/lvs_options.yml")) ## reading netlist option to get netlist_path if options["netlist"] == "" @@ -53,33 +54,61 @@ else end -## create options passed to run_drc.py -options_str = "--lvs_sub=#{options["sub_name"]} #{options["run_mode"]} #{options["variant"]} #{options["top_cell_name"]} #{options["spice_net"]} #{options["spice_comment"]} #{options["verbose"]} #{options["schematic_simple"]} #{options["net_only"]} #{options["top_lvl_pins"]} #{options["combine"]} #{options["purge"]} #{options["purge_nets"]} #{options["run_dir"]}" - -## run_drc command line -cmd = "python3 #{run_dir}/lvs/run_lvs.py --layout=#{layout_path} --netlist=#{net_dir} #{options_str}" - -## start running drc -puts "######### running #{cmd}" -lvs_res = `#{cmd}` - ## read the log of lvs run to get output lydb file paths if run_dir option is disables gds_name = layout_path.split()[1].to_s.split(".")[0] -if options["run_dir"] == "" - File.open(__dir__ + "/lvs_res.txt", "w") { |file| file.write(lvs_res) } - lydb_path = File.readlines(__dir__ + "/lvs_res.txt")[3].split(/ /)[-1] - File.delete(__dir__ + "/lvs_res.txt") - lydb_dir = lydb_path.to_s().split("/#{gds_name}")[0] -else - lydb_dir = options["run_dir"].split("=")[1] + +## passing options to lvs run file +$schematic = net_dir + +$lvs_sub = options["sub_name"] + +$run_mode = options["run_mode"] + +if options["variant"] == "A" + $metal_top = "30K" + $metal_level = "3LM" + $mim_option = "A" +elsif options["variant"] == "B" + $metal_top = "11K" + $metal_level = "4LM" + $mim_option = "B" +elsif options["variant"] == "C" + $metal_top = "9K" + $metal_level = "5LM" + $mim_option = "B" +elsif options["variant"] == "D" + $metal_top = "9K" + $metal_level = "6LM" + $mim_option = "B" end -lydb_file = "#{gds_name}.lvsdb" +unless options["top_cell_name"] == "" + $topcell = options["top_cell_name"] +end + +$spice_net_names = options["spice_net"] + +$spice_comments = options["spice_comment"] + +$scale = options["scale"] + +$verbose = options["verbose"] + +$schematic_simplify = options["schematic_simple"] + +$net_only = options["net_only"] + +$top_lvl_pins = options["top_lvl_pins"] + +$combine = options["combine"] + +$purge = options["purge"] +$purge_nets = options["purge_nets"] -## open a klayout window with database loaded -`klayout #{layout_path} -mn #{lydb_dir}/#{lydb_file}` +## include lvs run file +#%include ../lvs/gf180mcu.lvs diff --git a/rules/klayout/macros/gf180mcu_options.lym b/rules/klayout/macros/gf180mcu_options.lym index 065b8ccd..7c519b68 100644 --- a/rules/klayout/macros/gf180mcu_options.lym +++ b/rules/klayout/macros/gf180mcu_options.lym @@ -36,37 +36,6 @@ require 'yaml' # Adding DRC options ##################################################################################### - #0 Setting DRC mode - drc_mode_action = RBA::Action::new - drc_mode_action.title = "DRC type" - drc_mode_action.on_triggered do - - drc_mode_select = RBA::InputDialog::ask_item("DRC modes options", "Select DRC mode:", [ "Antenna only", "Density only", "Main only", "Main & Antenna only", "Main & Density only", "Main, Antenna & Density" ], 3) - options = YAML.load(File.read(__dir__ + "/drc_options.yml")) - if drc_mode_select == "Antenna only" - options["drc_mode"] = "--antenna_only" - File.open(__dir__ + "/drc_options.yml", "w") { |file| file.write(options.to_yaml) } - elsif drc_mode_select == "Density only" - options["drc_mode"] = "--density_only" - File.open(__dir__ + "/drc_options.yml", "w") { |file| file.write(options.to_yaml) } - elsif drc_mode_select == "Main only" - options["drc_mode"] = " " - File.open(__dir__ + "/drc_options.yml", "w") { |file| file.write(options.to_yaml) } - elsif drc_mode_select == "Main & Antenna only" - options["drc_mode"] = "--antenna" - File.open(__dir__ + "/drc_options.yml", "w") { |file| file.write(options.to_yaml) } - elsif drc_mode_select == "Main & Density only" - options["drc_mode"] = "--density" - File.open(__dir__ + "/drc_options.yml", "w") { |file| file.write(options.to_yaml) } - elsif drc_mode_select == "Main, Antenna & Density" - options["drc_mode"] = "--antenna --density" - File.open(__dir__ + "/drc_options.yml", "w") { |file| file.write(options.to_yaml) } - end - - end - -mw.menu.insert_item("submenu.drc_menu.end", "drc_mode", drc_mode_action) - #1 Setting run mode run_mode_drc_action = RBA::Action::new run_mode_drc_action.title = "Run mode" @@ -75,7 +44,7 @@ mw.menu.insert_item("submenu.drc_menu.end", "drc_mode", drc_mode_action) run_mode_select = RBA::InputDialog::ask_item("Run mode", "Select run mode:", [ "tiling", "deep", "flat" ], 1) options = YAML.load(File.read(__dir__ + "/drc_options.yml")) if run_mode_select - options["run_mode"]= "--drc_mode=#{run_mode_select}" + options["run_mode"]= run_mode_select File.open(__dir__ + "/drc_options.yml", "w") { |file| file.write(options.to_yaml) } else options["run_mode"]= "" @@ -93,7 +62,7 @@ mw.menu.insert_item("submenu.drc_menu.end", "drc_mode", drc_mode_action) variant_select = RBA::InputDialog::ask_item("Variant options", "Select variant option:", [ "A", "B", "C" , "D", "E"], 2) options = YAML.load(File.read(__dir__ + "/drc_options.yml")) if variant_select - options["variant"] = "--variant=#{variant_select}" + options["variant"] = variant_select File.open(__dir__ + "/drc_options.yml", "w") { |file| file.write(options.to_yaml) } end @@ -107,27 +76,13 @@ mw.menu.insert_item("submenu.drc_menu.end", "drc_mode", drc_mode_action) top_cell_name = RBA::InputDialog::ask_string("Top cell name", "Please enter Top_cell name", "TOP") options = YAML.load(File.read(__dir__ + "/drc_options.yml")) if top_cell_name - options["top_cell_name"] = "--topcell=#{top_cell_name}" + options["top_cell_name"] = top_cell_name File.open(__dir__ + "/drc_options.yml", "w") { |file| file.write(options.to_yaml) } end end mw.menu.insert_item("submenu.drc_menu.end", "TOP_cell_name", top_cell_action) - #4 Adding run_dir path - run_dir_action = RBA::Action::new - run_dir_action.title = "Run_dir Path" - run_dir_action.on_triggered do - run_dir_path = RBA::InputDialog::ask_string("Run dir Path", "Please enter Run dir Path", "#{__dir__}") - options = YAML.load(File.read(__dir__ + "/drc_options.yml")) - if run_dir_path - options["run_dir"] = "--run_dir=#{run_dir_path}" - File.open(__dir__ + "/drc_options.yml", "w") { |file| file.write(options.to_yaml) } - end - - end - mw.menu.insert_item("submenu.drc_menu.end", "run_dir_path", run_dir_action) - #5 Setting verbose mode verbose_drc_action = RBA::Action::new verbose_drc_action.title = "Verbose mode" @@ -137,7 +92,10 @@ mw.menu.insert_item("submenu.drc_menu.end", "drc_mode", drc_mode_action) options = YAML.load(File.read(__dir__ + "/drc_options.yml")) if verbose_drc_action.is_checked? - options["verbose"] = "--verbose" + options["verbose"] = "true" + File.open(__dir__ + "/drc_options.yml", "w") { |file| file.write(options.to_yaml) } + else + options["verbose"] = "false" File.open(__dir__ + "/drc_options.yml", "w") { |file| file.write(options.to_yaml) } end @@ -151,8 +109,11 @@ mw.menu.insert_item("submenu.drc_menu.end", "drc_mode", drc_mode_action) feol_action.checked=(true) feol_action.on_triggered do options = YAML.load(File.read(__dir__ + "/drc_options.yml")) - unless feol_action.is_checked? - options["feol"] = "--no_feol" + if feol_action.is_checked? + options["feol"] = true + File.open(__dir__ + "/drc_options.yml", "w") { |file| file.write(options.to_yaml) } + else + options["feol"] = false File.open(__dir__ + "/drc_options.yml", "w") { |file| file.write(options.to_yaml) } end @@ -166,8 +127,11 @@ mw.menu.insert_item("submenu.drc_menu.end", "drc_mode", drc_mode_action) beol_action.checked=(true) beol_action.on_triggered do options = YAML.load(File.read(__dir__ + "/drc_options.yml")) - unless beol_action.is_checked? - options["beol"] = "--no_beol" + if beol_action.is_checked? + options["beol"] = true + File.open(__dir__ + "/drc_options.yml", "w") { |file| file.write(options.to_yaml) } + else + options["beol"] = false File.open(__dir__ + "/drc_options.yml", "w") { |file| file.write(options.to_yaml) } end @@ -181,8 +145,11 @@ mw.menu.insert_item("submenu.drc_menu.end", "drc_mode", drc_mode_action) offgrid_action.checked=(true) offgrid_action.on_triggered do options = YAML.load(File.read(__dir__ + "/drc_options.yml")) - unless offgrid_action.is_checked? - options["offgrid"] = "--no_offgrid" + if offgrid_action.is_checked? + options["offgrid"] = "true" + File.open(__dir__ + "/drc_options.yml", "w") { |file| file.write(options.to_yaml) } + else + options["offgrid"] = "false" File.open(__dir__ + "/drc_options.yml", "w") { |file| file.write(options.to_yaml) } end @@ -197,7 +164,10 @@ mw.menu.insert_item("submenu.drc_menu.end", "drc_mode", drc_mode_action) connectivity_action.on_triggered do options = YAML.load(File.read(__dir__ + "/drc_options.yml")) if connectivity_action.is_checked? - options["connectivity"] = "--connectivity" + options["connectivity"] = "true" + File.open(__dir__ + "/drc_options.yml", "w") { |file| file.write(options.to_yaml) } + else + options["connectivity"] = "false" File.open(__dir__ + "/drc_options.yml", "w") { |file| file.write(options.to_yaml) } end @@ -215,7 +185,7 @@ mw.menu.insert_item("submenu.drc_menu.end", "drc_mode", drc_mode_action) sub_name = RBA::InputDialog::ask_string("Substrate name", "Please enter substrate name", "gf180mcu_gnd") options = YAML.load(File.read(__dir__ + "/lvs_options.yml")) if sub_name - options["sub_name"] = "--lvs_sub=#{sub_name}" + options["sub_name"] = sub_name File.open(__dir__ + "/lvs_options.yml", "w") { |file| file.write(options.to_yaml) } end @@ -230,7 +200,7 @@ mw.menu.insert_item("submenu.drc_menu.end", "drc_mode", drc_mode_action) options = YAML.load(File.read(__dir__ + "/lvs_options.yml")) run_mode_select = RBA::InputDialog::ask_item("Run mode", "Select run mode:", [ "tiling", "deep", "flat" ], 1) if run_mode_select - options["run_mode"] = "--run_mode=#{run_mode_select}" + options["run_mode"] = run_mode_select File.open(__dir__ + "/lvs_options.yml", "w") { |file| file.write(options.to_yaml) } end @@ -245,7 +215,7 @@ mw.menu.insert_item("submenu.drc_menu.end", "drc_mode", drc_mode_action) options = YAML.load(File.read(__dir__ + "/lvs_options.yml")) variant_select = RBA::InputDialog::ask_item("Variant options", "Select variant option:", [ "A", "B", "C", "D" ], 2) if variant_select - options["variant"] = "--variant=#{variant_select}" + options["variant"] = variant_select File.open(__dir__ + "/lvs_options.yml", "w") { |file| file.write(options.to_yaml) } end @@ -273,26 +243,12 @@ mw.menu.insert_item("submenu.drc_menu.end", "drc_mode", drc_mode_action) top_cell_name = RBA::InputDialog::ask_string("Top cell name", "Please enter Top_cell name", "TOP") options = YAML.load(File.read(__dir__ + "/lvs_options.yml")) if top_cell_name - options["top_cell_name"] = "--topcell=#{top_cell_name}" + options["top_cell_name"] = top_cell_name File.open(__dir__ + "/lvs_options.yml", "w") { |file| file.write(options.to_yaml) } end end mw.menu.insert_item("submenu.lvs_menu.end", "TOP_cell_name", top_cell_action) - - #6 Adding run_dir path - run_dir_action = RBA::Action::new - run_dir_action.title = "Run_dir Path" - run_dir_action.on_triggered do - run_dir_path = RBA::InputDialog::ask_string("Run dir Path", "Please enter Run dir Path", "#{__dir__}") - options = YAML.load(File.read(__dir__ + "/lvs_options.yml")) - if run_dir_path - options["run_dir"] = "--run_dir=#{run_dir_path}" - File.open(__dir__ + "/lvs_options.yml", "w") { |file| file.write(options.to_yaml) } - end - - end - mw.menu.insert_item("submenu.lvs_menu.end", "run_dir_path", run_dir_action) #7 Setting spice net names spice_net_action = RBA::Action::new @@ -302,8 +258,11 @@ mw.menu.insert_item("submenu.drc_menu.end", "drc_mode", drc_mode_action) spice_net_action.on_triggered do options = YAML.load(File.read(__dir__ + "/lvs_options.yml")) - unless spice_net_action.is_checked? - options["spice_net"] = "--no_net_names" + if spice_net_action.is_checked? + options["spice_net"] = true + File.open(__dir__ + "/lvs_options.yml", "w") { |file| file.write(options.to_yaml) } + else + options["spice_net"] = false File.open(__dir__ + "/lvs_options.yml", "w") { |file| file.write(options.to_yaml) } end @@ -319,9 +278,11 @@ mw.menu.insert_item("submenu.drc_menu.end", "drc_mode", drc_mode_action) options = YAML.load(File.read(__dir__ + "/lvs_options.yml")) if spice_comment_action.is_checked? - options["spice_comment"] = "--spice_comments" + options["spice_comment"] = true + File.open(__dir__ + "/lvs_options.yml", "w") { |file| file.write(options.to_yaml) } + else + options["spice_comment"] = false File.open(__dir__ + "/lvs_options.yml", "w") { |file| file.write(options.to_yaml) } - end end @@ -336,7 +297,10 @@ mw.menu.insert_item("submenu.drc_menu.end", "drc_mode", drc_mode_action) options = YAML.load(File.read(__dir__ + "/lvs_options.yml")) if scale_action.is_checked? - options["scale"] = "--scale " + options["scale"] = true + File.open(__dir__ + "/lvs_options.yml", "w") { |file| file.write(options.to_yaml) } + else + options["scale"] = false File.open(__dir__ + "/lvs_options.yml", "w") { |file| file.write(options.to_yaml) } end @@ -352,7 +316,10 @@ mw.menu.insert_item("submenu.drc_menu.end", "drc_mode", drc_mode_action) options = YAML.load(File.read(__dir__ + "/lvs_options.yml")) if verbose_action.is_checked? - options["verbose"] = "--verbose " + options["verbose"] = true + File.open(__dir__ + "/lvs_options.yml", "w") { |file| file.write(options.to_yaml) } + else + options["verbose"] = false File.open(__dir__ + "/lvs_options.yml", "w") { |file| file.write(options.to_yaml) } end @@ -368,7 +335,10 @@ mw.menu.insert_item("submenu.drc_menu.end", "drc_mode", drc_mode_action) options = YAML.load(File.read(__dir__ + "/lvs_options.yml")) if schematic_simple_action.is_checked? - options["schematic_simple"] = "--schematic_simplify " + options["schematic_simple"] = true + File.open(__dir__ + "/lvs_options.yml", "w") { |file| file.write(options.to_yaml) } + else + options["schematic_simple"] = false File.open(__dir__ + "/lvs_options.yml", "w") { |file| file.write(options.to_yaml) } end @@ -384,8 +354,11 @@ mw.menu.insert_item("submenu.drc_menu.end", "drc_mode", drc_mode_action) options = YAML.load(File.read(__dir__ + "/lvs_options.yml")) if net_only_action.is_checked? - options["net_only"] = "--net_only" - File.open(__dir__ + "/lvs_options.yml", "w") { |file| file.write(options.to_yaml) } + options["net_only"] = true + File.open(__dir__ + "/lvs_options.yml", "w") { |file| file.write(options.to_yaml)} + else + options["net_only"] = false + File.open(__dir__ + "/lvs_options.yml", "w") { |file| file.write(options.to_yaml)} end end @@ -400,8 +373,11 @@ mw.menu.insert_item("submenu.drc_menu.end", "drc_mode", drc_mode_action) options = YAML.load(File.read(__dir__ + "/lvs_options.yml")) if top_lvl_pins_action.is_checked? - options["top_lvl_pins"] = "--top_lvl_pins" - File.open(__dir__ + "/lvs_options.yml", "w") { |file| file.write(options.to_yaml) } + options["top_lvl_pins"] = true + File.open(__dir__ + "/lvs_options.yml", "w") { |file| file.write(options.to_yaml)} + else + options["top_lvl_pins"] = false + File.open(__dir__ + "/lvs_options.yml", "w") { |file| file.write(options.to_yaml)} end end @@ -416,7 +392,10 @@ mw.menu.insert_item("submenu.drc_menu.end", "drc_mode", drc_mode_action) options = YAML.load(File.read(__dir__ + "/lvs_options.yml")) if combine_action.is_checked? - options["combine"] = "--combine" + options["combine"] = true + File.open(__dir__ + "/lvs_options.yml", "w") { |file| file.write(options.to_yaml) } + else + options["combine"] = false File.open(__dir__ + "/lvs_options.yml", "w") { |file| file.write(options.to_yaml) } end @@ -433,7 +412,10 @@ mw.menu.insert_item("submenu.drc_menu.end", "drc_mode", drc_mode_action) options = YAML.load(File.read(__dir__ + "/lvs_options.yml")) if purge_action.is_checked? - options["purge"] = "--purge" + options["purge"] = true + File.open(__dir__ + "/lvs_options.yml", "w") { |file| file.write(options.to_yaml) } + else + options["purge"] = false File.open(__dir__ + "/lvs_options.yml", "w") { |file| file.write(options.to_yaml) } end @@ -449,7 +431,10 @@ mw.menu.insert_item("submenu.drc_menu.end", "drc_mode", drc_mode_action) options = YAML.load(File.read(__dir__ + "/lvs_options.yml")) if purge_nets_action.is_checked? - options["purge_nets"] = "--purge_nets" + options["purge_nets"] = true + File.open(__dir__ + "/lvs_options.yml", "w") { |file| file.write(options.to_yaml) } + else + options["purge_nets"] = false File.open(__dir__ + "/lvs_options.yml", "w") { |file| file.write(options.to_yaml) } end @@ -463,31 +448,30 @@ mw.menu.insert_item("submenu.drc_menu.end", "drc_mode", drc_mode_action) mw.on_view_closed do ## write default options - drc_options = {"drc_mode"=>"", - "run_mode"=>"--run_mode=flat", - "variant"=>"--variant=C" , + drc_options = { + "run_mode"=>"flat", + "variant"=>"C" , "top_cell_name"=>"", - "run_dir"=>"", - "verbose"=>"", - "feol"=>"", - "beol"=>"", - "offgrid"=> "", - "connectivity"=>"" } - lvs_options = {"sub_name"=>"--lvs_sub=gf180mcu_gnd", - "run_mode"=>"--run_mode=flat", - "variant"=>"--variant=C" , + "verbose"=>"false", + "feol"=>true, + "beol"=>true, + "offgrid"=> "true", + "connectivity"=>"false" } + lvs_options = {"sub_name"=>"gf180mcu_gnd", + "run_mode"=>"flat", + "variant"=>"C" , "netlist"=>"" , - "spice_net"=>"", + "spice_net"=>true, "top_cell_name"=>"", - "run_dir"=>"", - "spice_comment"=>"", - "verbose"=>"", - "schematic_simple"=>"", - "net_only"=>"", - "top_lvl_pins"=>"", - "combine"=>"", - "purge"=>"", - "purge_nets"=>"" + "spice_comment"=>false, + "scale"=>false, + "verbose"=>false, + "schematic_simple"=>false, + "net_only"=>false, + "top_lvl_pins"=>false, + "combine"=>false, + "purge"=>false, + "purge_nets"=>false } File.open(__dir__ + "/drc_options.yml", "w") { |file| file.write(drc_options.to_yaml) } File.open(__dir__ + "/lvs_options.yml", "w") { |file| file.write(lvs_options.to_yaml) } diff --git a/rules/klayout/macros/lvs_options.yml b/rules/klayout/macros/lvs_options.yml index befbd993..a13d610a 100644 --- a/rules/klayout/macros/lvs_options.yml +++ b/rules/klayout/macros/lvs_options.yml @@ -1,16 +1,16 @@ --- -sub_name: "--lvs_sub=gf180mcu_gnd" -run_mode: "--run_mode=flat" -variant: "--variant=C" +sub_name: gf180mcu_gnd +run_mode: flat +variant: C netlist: '' -spice_net: '' +spice_net: true top_cell_name: '' -run_dir: '' -spice_comment: '' -verbose: '' -schematic_simple: '' -net_only: '' -top_lvl_pins: '' -combine: '' -purge: '' -purge_nets: '' +spice_comment: false +scale: false +verbose: false +schematic_simple: false +net_only: false +top_lvl_pins: false +combine: false +purge: false +purge_nets: false