WIP: Extraction of DRC and LVS doc, added doc to classes

This commit is contained in:
Matthias Koefferlein 2019-06-28 18:44:36 +02:00
parent ef1441e546
commit 2f66f3ee3b
14 changed files with 351 additions and 129 deletions

View File

@ -2,15 +2,21 @@
$script_call = $0 + " " + ARGV.join(" ")
$key="%DRC%"
$infile="src/drc/drc/built-in-macros/drc.lym"
$loc = "about/drc_ref"
$indir="src/drc/drc/built-in-macros"
$loc = "about"
$outfiles="src/lay/lay/doc"
$title="DRC Reference"
def create_ref(s)
if s =~ /(.*)#(.*)/
"<a href=\"/" + $loc + "_" + $1.downcase + ".xml#" + $2 + "\">#{s}</a>"
def create_ref(mod, s)
if s =~ /(.*)::(.*)#(.*)/
"<a href=\"/" + $loc + "/" + $1.downcase + "_ref_" + $2.downcase + ".xml#" + $3 + "\">#{s}</a>"
elsif s =~ /(.*)::(.*)/
"<a href=\"/" + $loc + "/" + $1.downcase + "_ref_" + $2.downcase + ".xml\">#{s}</a>"
elsif s =~ /(.*)#(.*)/
if $2 != ""
"<a href=\"/" + $loc + "/" + mod.downcase + "_ref_" + $1.downcase + ".xml#" + $2 + "\">#{s}</a>"
else
"<a href=\"/" + $loc + "/" + mod.downcase + "_ref_" + $1.downcase + ".xml\">#{$1}</a>"
end
else
"<a href=\"#" + s + "\">#{s}</a>"
end
@ -20,11 +26,11 @@ def create_class_doc_ref(s)
"<class_doc href=\"" + s + "\">#{s}</class_doc>"
end
def escape(s)
def escape(mod, s)
s.gsub("&", "&amp;").
gsub("<", "&lt;").
gsub(">", "&gt;").
gsub(/\\([\w#]+)/) { create_ref($1) }.
gsub(/\\([\w:#]+)/) { create_ref(mod, $1) }.
gsub(/RBA::([\w#]+)/) { create_class_doc_ref($1) }
end
@ -38,12 +44,14 @@ class DocItem
attr_accessor :synopsis
attr_accessor :name
attr_accessor :doc
attr_accessor :mod
def initialize(block)
def initialize(mod, block)
@paragraphs = []
para = nil
self.synopsis = []
self.mod = mod
in_code = false
block.each do |b|
@ -91,7 +99,7 @@ class DocItem
i > 0 && doc += "</p><p>\n"
p.each do |pp|
doc += escape(pp).
doc += escape(self.mod, pp).
gsub(/\\@/, "&at;").
gsub(/\s*@code\s*/, "<pre>").
gsub(/\s*@\/code\s*/, "</pre>").
@ -113,13 +121,13 @@ end
class Scope < DocItem
def initialize(block)
super(block)
def initialize(mod, block)
super(mod, block)
@items = {}
end
def add_doc_item(block)
item = DocItem::new(block)
def add_doc_item(mod, block)
item = DocItem::new(mod, block)
@items[item.name] = item
end
@ -137,8 +145,8 @@ class Scope < DocItem
HEAD
doc += "<doc>\n"
doc += "<title>" + escape(self.brief) + "</title>\n"
doc += "<keyword name=\"" + escape(self.name) + "\"/>\n"
doc += "<title>" + escape(self.mod, self.brief) + "</title>\n"
doc += "<keyword name=\"" + escape(self.mod, self.name) + "\"/>\n"
doc += super_produce_doc
@ -151,14 +159,14 @@ HEAD
item.name || raise("Missing @name for item #{item_key}")
item.brief || raise("Missing @brief for item #{item_key}")
doc += "<h2>\"" + escape(item.name) + "\" - " + escape(item.brief) + "</h2>\n"
doc += "<keyword name=\"" + escape(item.name) + "\"/>\n"
doc += "<a name=\"" + escape(item.name) + "\"/>"
doc += "<h2>\"" + escape(self.mod, item.name) + "\" - " + escape(self.mod, item.brief) + "</h2>\n"
doc += "<keyword name=\"" + escape(self.mod, item.name) + "\"/>\n"
doc += "<a name=\"" + escape(self.mod, item.name) + "\"/>"
if ! item.synopsis.empty?
doc += "<p>Usage:</p>\n"
doc += "<ul>\n"
item.synopsis.each do |s|
doc += "<li><tt>" + escape(s) + "</tt></li>\n"
doc += "<li><tt>" + escape(self.mod, s) + "</tt></li>\n"
end
doc += "</ul>\n"
end
@ -177,17 +185,22 @@ end
class Collector
def initialize(mod, title)
@mod = mod
@title = title
end
def add_block(block)
if block.find { |l| l =~ /^@scope/ }
# is a scope block
@scopes ||= {}
@current_scope = Scope::new(block)
@current_scope = Scope::new(@mod, block)
@scopes[@current_scope.name] = @current_scope
else
@current_scope && @current_scope.add_doc_item(block)
@current_scope && @current_scope.add_doc_item(@mod, block)
end
end
@ -196,7 +209,7 @@ class Collector
@scopes.keys.sort.each do |k|
suffix = k.downcase
outfile = $outfiles + "/" + $loc + "_" + suffix + ".xml"
outfile = $outfiles + "/" + $loc + "/" + @mod + "_ref_" + suffix + ".xml"
File.open(outfile, "w") do |file|
file.write(@scopes[k].produce_doc)
puts "---> #{outfile} written."
@ -207,7 +220,7 @@ class Collector
def produce_index
outfile = $outfiles + "/" + $loc + ".xml"
outfile = $outfiles + "/" + $loc + "/" + @mod + "_ref.xml"
File.open(outfile, "w") do |file|
doc = <<HEAD
@ -221,14 +234,14 @@ HEAD
doc += "<doc>\n"
doc += "<title>#{escape($title)}</title>\n"
doc += "<keyword name=\"#{escape($title)}\"/>\n"
doc += "<title>#{escape(@mod, @title)}</title>\n"
doc += "<keyword name=\"#{escape(@mod, @title)}\"/>\n"
doc += "<topics>\n"
@scopes.keys.sort.each do |k|
suffix = k.downcase
doc += "<topic href=\"/#{$loc}_#{suffix}.xml\"/>\n"
doc += "<topic href=\"/#{$loc}/#{@mod}_ref_#{suffix}.xml\"/>\n"
end
doc += "</topics>\n"
@ -244,36 +257,68 @@ HEAD
end
collector = Collector::new
collectors = {
"DRC" => Collector::new("drc", "DRC Reference"),
"LVS" => Collector::new("lvs", "LVS Reference")
}
File.open($infile, "r") do |file|
Dir.entries($indir).each do |p|
block = nil
line = 0
if p !~ /\.rb$/
next
end
file.each_line do |l|
infile = File.join($indir, p)
puts "Extracting doc from #{infile} .."
line += 1
File.open(infile, "r") do |file|
begin
l = unescape(l)
if l =~ /^\s*#\s*#{$key}/
block = []
elsif l =~ /^\s*#\s*(.*)\s*$/
block && block.push($1)
elsif l =~ /^\s*$/
block && collector.add_block(block)
block = nil
block = []
collector = nil
line = 0
file.each_line do |l|
line += 1
begin
l = unescape(l)
if ! collector
collectors.each do |k,c|
if l =~ /^\s*#\s*%#{k}%/
collector = c
l = nil
block = []
break
end
end
end
if l
if l =~ /^\s*#\s*(.*)\s*$/
collector && block.push($1)
elsif l =~ /^\s*$/
collector && collector.add_block(block)
collector = nil
end
end
rescue => ex
puts "ERROR in line #{line}:\n" + ex.to_s
puts ex.backtrace # @@@
exit 1
end
rescue => ex
puts "ERROR in line #{line}:\n" + ex.to_s
exit 1
end
end
end
collector.produce_doc
collector.produce_index
collectors.each do |k,collector|
collector.produce_doc
collector.produce_index
end

View File

@ -1112,7 +1112,7 @@ CODE
# @name netter
# @brief Creates a new netter object
# @synopsis netter
# See \Netter for more details
# See \Netter# for more details
def netter
DRC::DRCNetter::new

View File

@ -23,8 +23,8 @@ module DRC
#
# Network formation:
#
# A basic Service the Netter object provides is the formation of
# connected networks of conductive shapes. To do so, the Netter
# A basic service the Netter object provides is the formation of
# connected networks of conductive shapes (netting). To do so, the Netter
# must be given a connection specification. This happens by calling
# "connect" with two polygon layers. The Netter will then regard all
# overlaps of shapes on these layers as connections between the

View File

@ -358,8 +358,10 @@ CODE
end
# %DRC%
# @name path
# @brief Gets the path of the corresponding layout file or nil if there is no path
# @synopsis path
def path
@path
end

View File

@ -17,6 +17,8 @@ module LVS
# LVS is built upon DRC. So all functions available in DRC are also available
# in LVS. In LVS, DRC functions are used to derive functional layers from original
# layers or specification of the layout source.
#
# For more details about the DRC functions see \DRC::global.
class LVSEngine < DRCEngine
@ -24,6 +26,16 @@ module LVS
super
end
# %LVS%
# @name netter
# @brief Creates a new netter object
# @synopsis netter
# See \Netter# for more details
def netter
LVS::LVSNetter::new
end
def _netter
@netter ||= LVS::LVSNetter::new(self)
end
@ -41,7 +53,7 @@ module LVS
end
# %DRC%
# %LVS%
# @name report_lvs
# @brief Specifies an LVS report for output
# @synopsis report_lvs([ filename ])
@ -66,7 +78,7 @@ module LVS
@output_lvsdb_file = filename
end
# %DRC%
# %LVS%
# @name schematic
# @brief Reads the reference netlist
# @synopsis schematic(filename)
@ -74,36 +86,36 @@ module LVS
# @synopsis schematic(netlist)
# See \Netter#schematic for a description of that function.
# %DRC%
# %LVS%
# @name compare
# @brief Compares the extracted netlist vs. the schematic
# @synopsis compare
# See \Netter#compare for a description of that function.
# %DRC%
# %LVS%
# @name same_nets
# @brief Establishes an equivalence between the nets
# @synopsis same_nets(circuit, net_a, net_b)
# @synopsis same_nets(circuit_a, net_a, circuit_b, net_b)
# See \Netter#same_nets for a description of that function.
# %DRC%
# %LVS%
# @name same_circuits
# @brief Establishes an equivalence between the circuits
# @synopsis same_circuits(circuit_a, circuit_b)
# See \Netter#same_circuits for a description of that function.
# %DRC%
# %LVS%
# @name same_device_classes
# @brief Establishes an equivalence between the device_classes
# @synopsis same_device_classes(class_a, class_b)
# See \Netter#same_device_classes for a description of that function.
# %DRC%
# %LVS%
# @name equivalent_pins
# @brief Marks pins as equivalent
# @synopsis equivalent_pins(circuit, pins ...)
# See \Netter#equivalen_pins for a description of that function.
# See \Netter#equivalent_pins for a description of that function.
# %LVS%
# @name min_caps

View File

@ -12,25 +12,16 @@ module LVS
# @brief LVS Reference: Netter object
# The Netter object provides services related to network extraction
# from a layout plus comparison against a reference netlist.
# Similar to the DRC netter (which lacks the compare ability), the
# Similar to the DRC \DRC::Netter (which lacks the compare ability), the
# relevant method of this object are available as global functions too
# where they act on a default incarnation. Usually it's not required
# to instantiate a Netter object explicitly.
#
# An individual netter object can be created, if the netter results
# need to be kept for multiple extractions or when different configurations
# need to be used in the same script. If you really want
# a Netter object, use the global \netter function:
# The Netter object provides services related to network extraction
# from a layout plus comparison against a reference netlist.
# Similar to the DRC netter (which lacks the compare ability), the
# relevant method of this object are available as global functions too
# where they act on a default incarnation. Usually it's not required
# to instantiate a Netter object explicitly.
#
# The LVS Netter object inherits all methods of the \DRC::Netter.
#
# An individual netter object can be created, if the netter results
# need to be kept for multiple extractions. If you really need
# a Netter object, use the global \netter function:
# a Netter object, use the global \global#netter function:
#
# @code
# # create a new Netter object:

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "klayout_doc.dtd">
<!-- generated by /home/matthias/klayout/master/scripts/extract_doc.rb -->
<!-- generated by /home/matthias/klayout/dvb/scripts/extract_doc.rb -->
<!-- DO NOT EDIT! -->
<doc>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "klayout_doc.dtd">
<!-- generated by /home/matthias/klayout/master/scripts/extract_doc.rb -->
<!-- generated by /home/matthias/klayout/dvb/scripts/extract_doc.rb -->
<!-- DO NOT EDIT! -->
<doc>
@ -20,7 +20,27 @@ or provide function-like alternatives for the methods.
<li><tt>antenna_check(gate, metal, ratio, [ diode_specs ... ])</tt></li>
</ul>
<p>
See <a href="/about/drc_ref_netter.xml#antenna_check">Netter#antenna_check</a> for a description of that function
See <a href="/about/drc_ref_netter.xml#antenna_check">Netter#antenna_check</a> for a description of that function.
</p>
<h2>"bjt3" - Supplies the BJT3 transistor extractor class</h2>
<keyword name="bjt3"/>
<a name="bjt3"/><p>Usage:</p>
<ul>
<li><tt>bjt3(name)</tt></li>
</ul>
<p>
Use this class with <a href="#device_extract">device_extract</a> to specify extraction of a
bipolar junction transistor
</p>
<h2>"bjt4" - Supplies the BJT4 transistor extractor class</h2>
<keyword name="bjt4"/>
<a name="bjt4"/><p>Usage:</p>
<ul>
<li><tt>bjt4(name)</tt></li>
</ul>
<p>
Use this class with <a href="#device_extract">device_extract</a> to specify extraction of a
bipolar junction transistor with a substrate terminal
</p>
<h2>"box" - Creates a box object</h2>
<keyword name="box"/>
@ -32,6 +52,27 @@ See <a href="/about/drc_ref_netter.xml#antenna_check">Netter#antenna_check</a> f
This function creates a box object. The arguments are the same than for the
<class_doc href="DBox">DBox</class_doc> constructors.
</p>
<h2>"capacitor" - Supplies the capacitor extractor class</h2>
<keyword name="capacitor"/>
<a name="capacitor"/><p>Usage:</p>
<ul>
<li><tt>capacitor(name, area_cap)</tt></li>
</ul>
<p>
Use this class with <a href="#device_extract">device_extract</a> to specify extraction of a capacitor.
The area_cap argument is the capacitance in Farad per square micrometer.
</p>
<h2>"capacitor_with_bulk" - Supplies the capacitor extractor class that includes a bulk terminal</h2>
<keyword name="capacitor_with_bulk"/>
<a name="capacitor_with_bulk"/><p>Usage:</p>
<ul>
<li><tt>capacitor_with_bulk(name)</tt></li>
</ul>
<p>
Use this class with <a href="#device_extract">device_extract</a> to specify extraction of a capacitor
with a bulk terminal.
The area_cap argument is the capacitance in Farad per square micrometer.
</p>
<h2>"cell" - Selects a cell for input on the default source</h2>
<keyword name="cell"/>
<a name="cell"/><p>Usage:</p>
@ -58,7 +99,7 @@ l1 = input(1, 0)
<li><tt>clear_connections</tt></li>
</ul>
<p>
See <a href="/about/drc_ref_netter.xml#clear_connections">Netter#clear_connections</a> for a description of that function
See <a href="/about/drc_ref_netter.xml#clear_connections">Netter#clear_connections</a> for a description of that function.
</p>
<h2>"clip" - Specifies clipped input on the default source</h2>
<keyword name="clip"/>
@ -96,6 +137,15 @@ See <a href="/about/drc_ref_netter.xml#connect">Netter#connect</a> for a descrip
<p>
See <a href="/about/drc_ref_netter.xml#connect_global">Netter#connect_global</a> for a description of that function.
</p>
<h2>"connect_implicit" - Specifies a label pattern for implicit net connections</h2>
<keyword name="connect_implicit"/>
<a name="connect_implicit"/><p>Usage:</p>
<ul>
<li><tt>connect_implicit(label_pattern)</tt></li>
</ul>
<p>
See <a href="/about/drc_ref_netter.xml#connect_implicit">Netter#connect_implicit</a> for a description of that function.
</p>
<h2>"dbu" - Gets or sets the database unit to use</h2>
<keyword name="dbu"/>
<a name="dbu"/><p>Usage:</p>
@ -135,6 +185,16 @@ implied always. Sometimes cell variants will be created.
</p><p>
Deep mode can be cancelled with <a href="#tiles">tiles</a> or <a href="#flat">flat</a>.
</p>
<h2>"diode" - Supplies the diode extractor class</h2>
<keyword name="diode"/>
<a name="diode"/><p>Usage:</p>
<ul>
<li><tt>diode(name)</tt></li>
</ul>
<p>
Use this class with <a href="#device_extract">device_extract</a> to specify extraction of a
planar diode
</p>
<h2>"edge" - Creates an edge object</h2>
<keyword name="edge"/>
<a name="edge"/><p>Usage:</p>
@ -178,9 +238,10 @@ See <a href="/about/drc_ref_source.xml#extent">Source#extent</a> for a descripti
<a name="extract_devices"/><p>Usage:</p>
<ul>
<li><tt>extract_devices(extractor, layer_hash)</tt></li>
<li><tt>extract_devices(extractor_class, name, layer_hash)</tt></li>
</ul>
<p>
See <a href="/about/drc_ref_netter.xml#extract_devices">Netter#extract_devices</a> for a description of that function
See <a href="/about/drc_ref_netter.xml#extract_devices">Netter#extract_devices</a> for a description of that function.
</p>
<h2>"flat" - Disables tiling mode</h2>
<keyword name="flat"/>
@ -225,15 +286,6 @@ this method.
<ul>
<li><tt>is_tiled?</tt></li>
</ul>
<h2>"join_nets" - Specifies a label pattern for implicit net connections</h2>
<keyword name="join_nets"/>
<a name="join_nets"/><p>Usage:</p>
<ul>
<li><tt>join_nets(label_pattern)</tt></li>
</ul>
<p>
See <a href="/about/drc_ref_netter.xml#join_nets">Netter#join_nets</a> for a description of that function
</p>
<h2>"l2n_data" - Gets the internal <class_doc href="LayoutToNetlist">LayoutToNetlist</class_doc> object for the default <a href="#Netter">Netter</a></h2>
<keyword name="l2n_data"/>
<a name="l2n_data"/><p>Usage:</p>
@ -241,7 +293,7 @@ See <a href="/about/drc_ref_netter.xml#join_nets">Netter#join_nets</a> for a des
<li><tt>l2n_data</tt></li>
</ul>
<p>
See <a href="/about/drc_ref_netter.xml#l2n_data">Netter#l2n_data</a> for a description of that function
See <a href="/about/drc_ref_netter.xml#l2n_data">Netter#l2n_data</a> for a description of that function.
</p>
<h2>"labels" - Gets the labels (text) from an original layer</h2>
<keyword name="labels"/>
@ -337,6 +389,33 @@ delivered by <a href="#polygon_layer">polygon_layer</a> is not.
On the other hand, a layer created by the <a href="#make_layer">make_layer</a> method is not intended to be
filled with <a href="/about/drc_ref_layer.xml#insert">Layer#insert</a>.
</p>
<h2>"mos3" - Supplies the MOS3 transistor extractor class</h2>
<keyword name="mos3"/>
<a name="mos3"/><p>Usage:</p>
<ul>
<li><tt>mos3(name)</tt></li>
</ul>
<p>
Use this class with <a href="#device_extract">device_extract</a> to specify extraction of a
three-terminal MOS transistor
</p>
<h2>"mos4" - Supplies the MOS4 transistor extractor class</h2>
<keyword name="mos4"/>
<a name="mos4"/><p>Usage:</p>
<ul>
<li><tt>mos4(name)</tt></li>
</ul>
<p>
Use this class with <a href="#device_extract">device_extract</a> to specify extraction of a
four-terminal MOS transistor
</p>
<h2>"netlist" - Obtains the extracted netlist from the default <a href="#Netter">Netter</a></h2>
<keyword name="netlist"/>
<a name="netlist"/><p>
The netlist is a <class_doc href="Netlist">Netlist</class_doc> object. If no netlist is extracted
yet, this method will trigger the extraction process.
See <a href="/about/drc_ref_netter.xml#netlist">Netter#netlist</a> for a description of this function.
</p>
<h2>"netter" - Creates a new netter object</h2>
<keyword name="netter"/>
<a name="netter"/><p>Usage:</p>
@ -344,7 +423,7 @@ filled with <a href="/about/drc_ref_layer.xml#insert">Layer#insert</a>.
<li><tt>netter</tt></li>
</ul>
<p>
See <a href="#Netter">Netter</a> for more details
See <a href="/about/drc_ref_netter.xml">Netter</a> for more details
</p>
<h2>"no_borders" - Reset the tile borders</h2>
<keyword name="no_borders"/>
@ -454,6 +533,42 @@ By default this is the cell name of the default source. If there
is no source layout you'll need to give the cell name in the
third parameter.
</p>
<h2>"report_netlist" - Specifies an extracted netlist report for output</h2>
<keyword name="report_netlist"/>
<a name="report_netlist"/><p>Usage:</p>
<ul>
<li><tt>report_netlist([ filename ])</tt></li>
</ul>
<p>
This method applies to runsets creating a netlist through
extraction. Extraction happens when connections and/or device
extractions are made. If this statement is used, the extracted
netlist plus the net and device shapes are turned into a
layout-to-netlist report (L2N database) and shown in the
netlist browser window. If a file name is given, the report
will also be written to the given file.
</p>
<h2>"resistor" - Supplies the resistor extractor class</h2>
<keyword name="resistor"/>
<a name="resistor"/><p>Usage:</p>
<ul>
<li><tt>resistor(name, sheet_rho)</tt></li>
</ul>
<p>
Use this class with <a href="#device_extract">device_extract</a> to specify extraction of a resistor.
The sheet_rho value is the sheet resistance in ohms/square.
</p>
<h2>"resistor_with_bulk" - Supplies the resistor extractor class that includes a bulk terminal</h2>
<keyword name="resistor_with_bulk"/>
<a name="resistor_with_bulk"/><p>Usage:</p>
<ul>
<li><tt>resistor_with_bulk(name)</tt></li>
</ul>
<p>
Use this class with <a href="#device_extract">device_extract</a> to specify extraction of a resistor
with a bulk terminal.
The sheet_rho value is the sheet resistance in ohms/square.
</p>
<h2>"select" - Specifies cell filters on the default source</h2>
<keyword name="select"/>
<a name="select"/><p>Usage:</p>
@ -535,6 +650,22 @@ Except if the argument is a <class_doc href="Cell">Cell</class_doc> object, a ce
stating the cell name under which the results are saved. If no cellname is
specified, either the current cell or "TOP" is used.
</p>
<h2>"target_netlist" - With this statement, an extracted netlist is finally written to a file</h2>
<keyword name="target_netlist"/>
<a name="target_netlist"/><p>Usage:</p>
<ul>
<li><tt>target_netlist(filename [, format [, comment ] ])</tt></li>
</ul>
<p>
This method applies to runsets creating a netlist through
extraction. Extraction happens when connections and/or device
extractions are made. If this statement is used, the extracted
netlist is written to the given file.
</p><p>
The format parameter specifies the writer to use. You can use nil
to use the standard format or produce a SPICE writer with <a href="#write_spice">write_spice</a>.
See <a href="#write_spice">write_spice</a> for more details.
</p>
<h2>"threads" - Specifies the number of CPU cores to use in tiling mode</h2>
<keyword name="threads"/>
<a name="threads"/><p>Usage:</p>
@ -611,4 +742,17 @@ In verbose mode, more output is generated in the log file
<p>
In verbose mode, more output is generated in the log file
</p>
<h2>"write_spice" - Defines SPICE output format (with options)</h2>
<keyword name="write_spice"/>
<a name="write_spice"/><p>Usage:</p>
<ul>
<li><tt>write_spice([ use_net_names [, with_comments ] ])</tt></li>
</ul>
<p>
Use this option in <a href="#target_netlist">target_netlist</a> for the format parameter to
specify SPICE format.
"use_net_names" and "with_comments" are boolean parameters indicating
whether to use named nets (numbers if false) and whether to add
information comments such as instance coordinates or pin names.
</p>
</doc>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "klayout_doc.dtd">
<!-- generated by /home/matthias/klayout/master/scripts/extract_doc.rb -->
<!-- generated by /home/matthias/klayout/dvb/scripts/extract_doc.rb -->
<!-- DO NOT EDIT! -->
<doc>
@ -2062,7 +2062,7 @@ For each corner, an edge pair containing the edges forming in the angle is retur
</p><p>
A method delivering all objects not matching the angle criterion is <a href="#without_angle">without_angle</a>.
</p><p>
The following images demonstrate some use cases of <a href="#with_angle">with_angle</a> and <a href="#without_angle">without_angle</a>:
The following images demonstrate some use cases of <a href="#with_angle">with_angle</a> and <a href="#without_angle:">without_angle:</a>
</p><p>
<table>
<tr>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "klayout_doc.dtd">
<!-- generated by /home/matthias/klayout/master/scripts/extract_doc.rb -->
<!-- generated by /home/matthias/klayout/dvb/scripts/extract_doc.rb -->
<!-- DO NOT EDIT! -->
<doc>
@ -14,10 +14,6 @@ as global functions too where they act on a default incarnation
of the netter. Usually it's not required to instantiate a Netter
object, but it serves as a container for this functionality.
</p><p>
An individual netter object can be created, if the netter results
need to be kept for multiple extractions. If you really need
a Netter object, use the global <a href="#netter">netter</a> function:
</p><p>
<pre>
# create a new Netter object:
nx = netter
@ -27,8 +23,8 @@ nx.connect(poly, contact)
</p><p>
Network formation:
</p><p>
A basic Service the Netter object provides is the formation of
connected networks of conductive shapes. To do so, the Netter
A basic service the Netter object provides is the formation of
connected networks of conductive shapes (netting). To do so, the Netter
must be given a connection specification. This happens by calling
"connect" with two polygon layers. The Netter will then regard all
overlaps of shapes on these layers as connections between the
@ -183,17 +179,45 @@ Global nets are common to all cells. Global nets automatically connect to parent
cells throughs implied pins. An example is the substrate (bulk) net which connects
to shapes belonging to tie-down diodes.
</p>
<h2>"connect_implicit" - Specifies a search pattern for labels which create implicit net connections</h2>
<keyword name="connect_implicit"/>
<a name="connect_implicit"/><p>Usage:</p>
<ul>
<li><tt>connect_implicit(label_pattern)</tt></li>
</ul>
<p>
Use this method to supply a glob pattern for labels which create implicit net connections
on the top level circuit. This feature is useful to connect identically labelled nets
while a component isn't integrated yet. If the component is integrated, net may be connected
on a higher hierarchy level - e.g. by a power mesh. Inside the component this net consists
of individual islands. To properly perform netlist extraction and comparison, these islands
need to be connected even though there isn't a physical connection. "connect_implicit" can
achive this if these islands are labelled with the same text on the top level of the
component.
</p><p>
Glob pattern are used which resemble shell file pattern: "*" is for all labels, "VDD"
for all "VDD" labels (pattern act case sensitive). "VDD*" is for all labels beginning
with "VDD" (still different labels will be connected to different nets!). "{VDD,VSS}"
is either "VDD" or "VSS".
</p><p>
The search pattern is applied on the next net extraction. The search pattern is cleared
on "clear_connections".
</p>
<h2>"extract_devices" - Extracts devices based on the given extractor class, name and device layer selection</h2>
<keyword name="extract_devices"/>
<a name="extract_devices"/><p>Usage:</p>
<ul>
<li><tt>extract_devices(extractor, layer_hash)</tt></li>
<li><tt>extract_devices(extractor_class, name, layer_hash)</tt></li>
</ul>
<p>
Runs the device extraction for given device extractor class.
Runs the device extraction for given device extractor class. In the first
form, the extractor object is given. In the second form, the extractor's
class object and the new extractor's name is given.
</p><p>
The device extractor is either an instance of one of the predefined extractor
classes (e.g. <class_doc href="DeviceExtractorMOS4Transistor">DeviceExtractorMOS4Transistor</class_doc>) or a custom class. It provides the
classes (e.g. obtained from the utility methods such as <a href="#mos4">mos4</a>) or a custom class.
It provides the
algorithms for deriving the device parameters from the device geometry. It needs
several device recognition layers which are passed in the layer hash.
</p><p>
@ -212,38 +236,13 @@ active = input(2, 0)
poly = input(3, 0)
bulk = make_layer # renders an empty layer used for putting the terminals on
nactive = active - nwell # active area of NMOS
nsd = nactive - poly # source/drain area
nactive = active - nwell # active area of NMOS
nsd = nactive - poly # source/drain area
gate = nactive &amp; poly # gate area
mos4_ex = <class_doc href="DeviceExtractorMOS4Transistor">DeviceExtractorMOS4Transistor</class_doc>::new("NMOS4")
extract_devices(mos4_ex, { :SD =&gt; nsd, :G =&gt; gate, :P =&gt; poly, :W =&gt; bulk })
extract_devices(mos4("NMOS4"), { :SD =&gt; nsd, :G =&gt; gate, :P =&gt; poly, :W =&gt; bulk })
</pre>
</p>
<h2>"join_nets" - Specifies a search pattern for labels which create implicit net connections</h2>
<keyword name="join_nets"/>
<a name="join_nets"/><p>Usage:</p>
<ul>
<li><tt>join_nets(label_pattern)</tt></li>
</ul>
<p>
Use this method to supply a glob pattern for labels which create implicit net connections
on the top level circuit. This feature is useful to connect identically labelled nets
while a component isn't integrated yet. If the component is integrated, net may be connected
on a higher hierarchy level - e.g. by a power mesh. Inside the component this net consists
of individual islands. To properly perform netlist extraction and comparison, these islands
need to be connected even though there isn't a physical connection. "join_nets" can
achive this if these islands are labelled with the same text on the top level of the
component.
</p><p>
Glob pattern are used which resemble shell file pattern: "*" is for all labels, "VDD"
for all "VDD" labels (pattern act case sensitive). "VDD*" is for all labels beginning
with "VDD" (still different labels will be connected to different nets!). "{VDD,VSS}"
is either "VDD" or "VSS".
</p><p>
The search pattern is applied on the next net extraction. The search pattern is cleared
on "clear_connections".
</p>
<h2>"l2n_data" - Gets the internal <class_doc href="LayoutToNetlist">LayoutToNetlist</class_doc> object</h2>
<keyword name="l2n_data"/>
<a name="l2n_data"/><p>Usage:</p>
@ -254,4 +253,16 @@ on "clear_connections".
The <class_doc href="LayoutToNetlist">LayoutToNetlist</class_doc> object provides access to the internal details of
the netter object.
</p>
<h2>"netlist" - Gets the extracted netlist or triggers extraction if not done yet</h2>
<keyword name="netlist"/>
<a name="netlist"/><p>Usage:</p>
<ul>
<li><tt>netlist</tt></li>
</ul>
<p>
If no extraction has been performed yet, this method will start the
layout analysis. Hence, all <a href="#connect">connect</a>, <a href="#connect_global">connect_global</a> and <a href="#connect_implicit">connect_implicit</a>
calls must have been made before this method is used. Further <a href="#connect">connect</a>
statements will clear the netlist and re-extract it again.
</p>
</doc>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "klayout_doc.dtd">
<!-- generated by /home/matthias/klayout/master/scripts/extract_doc.rb -->
<!-- generated by /home/matthias/klayout/dvb/scripts/extract_doc.rb -->
<!-- DO NOT EDIT! -->
<doc>
@ -180,6 +180,12 @@ the specified rectangle.
<a href="#touching">touching</a> is a similar method which delivers shapes touching
the search region with their bounding box (without the requirement to overlap)
</p>
<h2>"path" - Gets the path of the corresponding layout file or nil if there is no path</h2>
<keyword name="path"/>
<a name="path"/><p>Usage:</p>
<ul>
<li><tt>path</tt></li>
</ul>
<h2>"polygons" - Gets the polygon shapes (or shapes that can be converted polygons) from an input layer</h2>
<keyword name="polygons"/>
<a name="polygons"/><p>Usage:</p>

View File

@ -29,6 +29,13 @@
<topic href="/about/custom_queries.xml"/>
<topic href="/about/rba_notation.xml"/>
<topic href="/about/drc_ref.xml"/>
<topic href="/about/drc_ref_layer.xml"/>
<topic href="/about/drc_ref_netter.xml"/>
<topic href="/about/drc_ref_source.xml"/>
<topic href="/about/drc_ref_global.xml"/>
<topic href="/about/lvs_ref.xml"/>
<topic href="/about/lvs_ref_netter.xml"/>
<topic href="/about/lvs_ref_global.xml"/>
<!-- TODO: more -->
</topics>

View File

@ -135,6 +135,9 @@
<file alias="drc_ref_source.xml">doc/about/drc_ref_source.xml</file>
<file alias="drc_ref_global.xml">doc/about/drc_ref_global.xml</file>
<file alias="drc_ref_netter.xml">doc/about/drc_ref_netter.xml</file>
<file alias="lvs_ref.xml">doc/about/lvs_ref.xml</file>
<file alias="lvs_ref_global.xml">doc/about/lvs_ref_global.xml</file>
<file alias="lvs_ref_netter.xml">doc/about/lvs_ref_netter.xml</file>
<file alias="packages.xml">doc/about/packages.xml</file>
</qresource>
<qresource prefix="/help/manual">

View File

@ -51,7 +51,8 @@ ResourceHelpProvider::ResourceHelpProvider (const char *folder, const std::strin
QDomDocument
ResourceHelpProvider::get (const std::string &path) const
{
QResource res (resource_url (tl::to_qstring (path)));
QString qpath = tl::to_qstring (path);
QResource res (resource_url (qpath));
if (res.size () == 0) {
throw tl::Exception (tl::to_string (QObject::tr ("ERROR: no data found for resource ")) + tl::to_string (res.fileName ()));
}