DC Video Tutorial Lesson

Lesson Three

Design and library objects

Design Object

  • Verilog-level
    Object divided into six: Design, Clock, Port, Net , Cell and Pin.
    Few differences: Design is currently located in the top __ __, and __ Cell is instantiated in the top level module __; Port is the port that communicates with the outside of the top, and Pin is the example of the module and an external module to interact port.
    ** Object concept is similar to the programming language "objects."

  • Schematic level

Here Insert Picture Description
Depending on the selected viewing angle can be different types of object with the same name, for example, may be a CLK clock, net, it may be a PIN, when writing tcl statements need to distinguish between different attributes. Especially the design and cell conversion can occur at any time.

Commands

Q: How to disambiguate?
For example command set_load 5 SUM, SUM is no type specified net or port, then the capacitive load 5pF load can not be determined in what place will be loaded on the default port.
Here Insert Picture Description

  • get_ * command
set_load 5 [get_nets SUM]

get_ command returns the object may have a corresponding type and name, obejct name which you can also use the " " and "?" wildcards. If you do not meet the conditions of the object, it will return "empty collection".

  • all_ command
    according to
    the type of the corresponding position, returns all objects of the corresponding type.
remove_from_collection [all_inputs] [get_ports CLK]

This command can be one of the front bracket specified concentration thereof was removed after a set of brackets.
Command Summary:
Here Insert Picture Description

Attributes & Collections

Each type has its own unique attributes (attributes), for example,
the ports: direction, driving_cell_rise, Load, max_capacitance, etc.
Cells:. Dont_touch, is_hierarchical, is_mapped, is_sequential, etc
the DC constraint file is essentially impose constraints on the attribute object .
NOTE: After performing get_ and all_ command, DC generates the object corresponding to the set (collection), and returns the set of corresponding handle (handle) i.e. "pointer"

set foo [get_ports p*]  //foo是collection的名字
sizeof_collection $foo  //f输出foo内objection的个数
query_objects $foo  //输出foo内所有object的列表
filter_collection [get_cells *] "reg_name =~ AN*"   //从cell中过滤出以AN开头的object
foreach_in_collection cell [get_cells -hier * -filter "is_hierarchical == true"]
//相当于对符合条件的object遍历
  • Supplementary
    Q: DC concept of an array do?
    A: Yes, you can use the command "set ages (zhangsan) 23" may be set to age zhangsan assignment element 23.
    "echo $ ages (zhangsan)" to return property values.

DC as well as an array of __env__ own pre-defined with the command "array names env" can output the names of all the elements of env in fact is a collection of environment variables in this array.

Another command getenv / get_unix_variable can get the environment variables.

Released five original articles · won praise 0 · Views 625

Guess you like

Origin blog.csdn.net/qq_38453556/article/details/104021821