NAME

Liberty::Parser - Parser for Synopsys Liberty(.lib).

VERSION

Version 0.02

SYNOPSIS

  use Liberty::Parser;
  my $p = new Liberty::Parser;
  my $g_func  = $p->read_file("func.lib");

DESCRIPTION

Liberty::Parser is indeed a Perl wrapper for Synopsys Open Liberty Project.

BASIC FUNTIONS

new

To new a Liberty::Parser object.

read_file :*group : (string filename)

Read the liberty format file and return a group handle.

locate_cell : *group : (*group, string cell_name)

Return the handle of group type `cell'.

locate_port : *group : (*group, string port_name)

Return the handle of group type `port'.

locate_group : *group : (*group, string group_name)

Return the handle of group type `cell'.

get_group_name : string : (*group)

Return the group name while input a group handle. Example:

  print $p->get_group_name($g_func);

get_group_names : array : (*group G)

Return the handle of group type `cell'. Example:

 my @j = $p->get_group_names ($f_cell);
 dump_array(\@j);

get_group_type : string : (*group G)

Return the type name of the group G. Example:

 print $p->get_group_type($g);

get_attr_name : string : (*attr A)

Return the attribute name while input a attribute handle.

get_attr_type : string : (*attr A)

Return the attribute type while input a attribute handle.

get_value_type : string : (*attr)

Return the value type of attribute A.

get_attr_with_value : string : (*group, string attr_name)

Return a string with attriubte name and attribute value.

Print all attributes of a group G.

Print timing arc of group G(must be a pin type group.)

Print groups contained in group G in format "type:name". Example:

 $p->print_groups($g);

is_var :

Return the handle of group type `cell'.

COMPLEX FUNTIONS

extract_group : string : (*group G, int indent)

Return the whole content of the group G.

extract_group_1 : string : (*group G, int indent)

Return the "surface" of the group G.

all_attrs : string : (*group G, int indent)

Return the handle of group type `cell'.

SEE ALSO

OpenSource Liberty Project

http://www.opensourceliberty.org

AUTHOR

yorkwu, <yorkwuo@gmail.com>

COPYRIGHT AND LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.5 or, at your option, any later version of Perl 5 you may have available.