mirror of https://github.com/KLayout/klayout.git
Bugfix: small LVS and DRC macro iessues (LVS and DRC menus not working etc.)
This commit is contained in:
parent
1251fb2cd6
commit
ebca5e1ce6
|
|
@ -15,33 +15,37 @@
|
|||
<interpreter>ruby</interpreter>
|
||||
<dsl-interpreter-name/>
|
||||
<text>
|
||||
# Installs the home menu entries (needs to be done on autorun, not autorun-early)
|
||||
module DRC
|
||||
|
||||
if RBA::Application::instance && RBA::Application::instance.main_window
|
||||
# Installs the home menu entries (needs to be done on autorun, not autorun-early)
|
||||
|
||||
cat = "drc"
|
||||
if RBA::Application::instance && RBA::Application::instance.main_window
|
||||
|
||||
name = cat.upcase
|
||||
cat = "drc"
|
||||
|
||||
mw = RBA::Application::instance.main_window
|
||||
mw.menu.insert_menu("tools_menu.verification_group+", cat, name)
|
||||
name = cat.upcase
|
||||
|
||||
mw = RBA::Application::instance.main_window
|
||||
mw.menu.insert_menu("tools_menu.verification_group+", cat, name)
|
||||
|
||||
@new_action = RBA::Action::new
|
||||
@new_action.title = "New #{name} Script"
|
||||
@new_action.on_triggered do
|
||||
mw.show_macro_editor(cat, true)
|
||||
end
|
||||
|
||||
mw.menu.insert_item("tools_menu.#{cat}.end", "new_script", @new_action)
|
||||
|
||||
@edit_action = RBA::Action::new
|
||||
@edit_action.title = "Edit #{name} Script"
|
||||
@edit_action.on_triggered do
|
||||
mw.show_macro_editor(cat, false)
|
||||
end
|
||||
|
||||
mw.menu.insert_item("tools_menu.#{cat}.end", "edit_script", @edit_action)
|
||||
|
||||
new_action = RBA::Action::new
|
||||
new_action.title = "New #{name} Script"
|
||||
new_action.on_triggered do
|
||||
mw.show_macro_editor(cat, true)
|
||||
end
|
||||
|
||||
mw.menu.insert_item("tools_menu.#{cat}.end", "new_script", new_action)
|
||||
|
||||
edit_action = RBA::Action::new
|
||||
edit_action.title = "Edit #{name} Script"
|
||||
edit_action.on_triggered do
|
||||
mw.show_macro_editor(cat, false)
|
||||
end
|
||||
|
||||
mw.menu.insert_item("tools_menu.#{cat}.end", "edit_script", edit_action)
|
||||
|
||||
end
|
||||
</text>
|
||||
</klayout-macro>
|
||||
|
|
|
|||
|
|
@ -15,6 +15,14 @@
|
|||
with support by either one of those languages.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
As a special kind of macros, DRC and LVS scripts are available for editing
|
||||
and debugging too. These scripts are basically Ruby scripts but run in a
|
||||
customized environment so that specific functions are provided.
|
||||
For more details on these kind of scripts see <link href="/manual/drc.xml"/>
|
||||
and <link href="/manual/lvs.xml"/>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
In a simple scenario, scripts can be stored in simple text files and loaded by KLayout using the "-rm" or "-r" command-line option.
|
||||
"-rm" will run a script and then execute the normal application. "-r" will run a script and then exit the
|
||||
|
|
@ -82,6 +90,9 @@
|
|||
search paths. This makes those folders useful for keeping plain Ruby or Python libraries. Generic ".lym" files cannot
|
||||
reside there and those locations are not scanned for autorun macros.
|
||||
</li>
|
||||
<li>
|
||||
DRC and LVS scripts are kept inside "drc" and "lvs" folders respectively.
|
||||
</li>
|
||||
<li>
|
||||
In addition, further repositories can be given on the command line with the "-j" option. This allows
|
||||
adding development repositories which are under configuration management and contain the latest code
|
||||
|
|
|
|||
|
|
@ -685,27 +685,22 @@ BEGIN_PROTECTED
|
|||
}
|
||||
}
|
||||
|
||||
if (cat == "drc") {
|
||||
TipDialog td (this,
|
||||
tl::to_string (QObject::tr ("<html><body>To get started with the DRC feature, read the documentation provided: <a href=\"int:/manual/drc.xml\">Design Rule Checks (DRC)</a>.</body></html>")),
|
||||
"macro-editor-drc-tips");
|
||||
td.exec_dialog ();
|
||||
} else {
|
||||
TipDialog td (this,
|
||||
tl::to_string (QObject::tr ("<html><body>To get started with the macro development feature, read the documentation provided: <a href=\"int:/about/macro_editor.xml\">About Macro Development</a>.</body></html>")),
|
||||
"macro-editor-basic-tips");
|
||||
td.exec_dialog ();
|
||||
}
|
||||
TipDialog td (this,
|
||||
tl::to_string (QObject::tr ("<html><body>To get started with the macro development feature, read the documentation provided: <a href=\"int:/about/macro_editor.xml\">About Macro Development</a>.</body></html>")),
|
||||
"macro-editor-basic-tips");
|
||||
td.exec_dialog ();
|
||||
|
||||
} else if (force_add) {
|
||||
} else {
|
||||
|
||||
if (! cat.empty ()) {
|
||||
select_category (cat);
|
||||
}
|
||||
|
||||
lym::Macro *m = new_macro ();
|
||||
if (force_add && m) {
|
||||
set_run_macro (m);
|
||||
if (force_add) {
|
||||
lym::Macro *m = new_macro ();
|
||||
if (m) {
|
||||
set_run_macro (m);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,33 +15,37 @@
|
|||
<interpreter>ruby</interpreter>
|
||||
<dsl-interpreter-name/>
|
||||
<text>
|
||||
# Installs the home menu entries (needs to be done on autorun, not autorun-early)
|
||||
module LVS
|
||||
|
||||
if RBA::Application::instance && RBA::Application::instance.main_window
|
||||
# Installs the home menu entries (needs to be done on autorun, not autorun-early)
|
||||
|
||||
cat = "lvs"
|
||||
if RBA::Application::instance && RBA::Application::instance.main_window
|
||||
|
||||
name = cat.upcase
|
||||
cat = "lvs"
|
||||
|
||||
mw = RBA::Application::instance.main_window
|
||||
mw.menu.insert_menu("tools_menu.verification_group+", cat, name)
|
||||
name = cat.upcase
|
||||
|
||||
mw = RBA::Application::instance.main_window
|
||||
mw.menu.insert_menu("tools_menu.verification_group+", cat, name)
|
||||
|
||||
@new_action = RBA::Action::new
|
||||
@new_action.title = "New #{name} Script"
|
||||
@new_action.on_triggered do
|
||||
mw.show_macro_editor(cat, true)
|
||||
end
|
||||
|
||||
mw.menu.insert_item("tools_menu.#{cat}.end", "new_script", @new_action)
|
||||
|
||||
@edit_action = RBA::Action::new
|
||||
@edit_action.title = "Edit #{name} Script"
|
||||
@edit_action.on_triggered do
|
||||
mw.show_macro_editor(cat, false)
|
||||
end
|
||||
|
||||
mw.menu.insert_item("tools_menu.#{cat}.end", "edit_script", @edit_action)
|
||||
|
||||
new_action = RBA::Action::new
|
||||
new_action.title = "New #{name} Script"
|
||||
new_action.on_triggered do
|
||||
mw.show_macro_editor(cat, true)
|
||||
end
|
||||
|
||||
mw.menu.insert_item("tools_menu.#{cat}.end", "new_script", new_action)
|
||||
|
||||
edit_action = RBA::Action::new
|
||||
edit_action.title = "Edit #{name} Script"
|
||||
edit_action.on_triggered do
|
||||
mw.show_macro_editor(cat, false)
|
||||
end
|
||||
|
||||
mw.menu.insert_item("tools_menu.#{cat}.end", "edit_script", edit_action)
|
||||
|
||||
end
|
||||
</text>
|
||||
</klayout-macro>
|
||||
|
|
|
|||
|
|
@ -70,9 +70,19 @@ module LVS
|
|||
# create a template for the macro editor:
|
||||
mt = create_template("lvs")
|
||||
mt.text = <<"END"
|
||||
# Try this sample script with this layout:
|
||||
# https://github.com/KLayout/klayout/tree/master/samples/lvs/ringo.gds
|
||||
# and this schematic:
|
||||
# https://github.com/KLayout/klayout/tree/master/samples/lvs/schematic.cir
|
||||
|
||||
# Reference schematic (if not absolute: path relative to original layout)
|
||||
schematic("schematic.cir")
|
||||
|
||||
# Tip: you can also use:
|
||||
# schematic(source.path.sub(/\.(oas|gds)/, ".cir"))
|
||||
# to derive the schematic name from the layout file's name
|
||||
# by substituting .oas or .gsd with .cir.
|
||||
|
||||
# Enable hierarchical mode
|
||||
deep
|
||||
|
||||
|
|
@ -88,12 +98,10 @@ active = input(2, 0)
|
|||
pplus = input(3, 0)
|
||||
nplus = input(4, 0)
|
||||
poly = input(5, 0)
|
||||
contact = input(6, 0)
|
||||
metal1 = input(7, 0)
|
||||
metal1_lbl = labels(7, 1)
|
||||
via1 = input(8, 0)
|
||||
metal2 = input(9, 0)
|
||||
metal2_lbl = labels(9, 1)
|
||||
contact = input(8, 0)
|
||||
metal1 = input(9, 0) # includes labels
|
||||
via1 = input(10, 0)
|
||||
metal2 = input(11, 0) # includes labels
|
||||
|
||||
# Bulk layer for terminal provisioning
|
||||
bulk = polygon_layer
|
||||
|
|
@ -133,10 +141,8 @@ connect(ntie, contact)
|
|||
connect(nwell, ntie)
|
||||
connect(ptie, contact)
|
||||
connect(contact, metal1)
|
||||
connect(metal1, metal1_lbl) # attaches labels
|
||||
connect(metal1, via1)
|
||||
connect(via1, metal2)
|
||||
connect(metal2, metal2_lbl) # attaches labels
|
||||
|
||||
# Global
|
||||
connect_global(bulk, "SUBSTRATE")
|
||||
|
|
|
|||
Loading…
Reference in New Issue