Skip to content

Grouping

SJulianS edited this page Oct 13, 2020 · 16 revisions

A grouping is a loose collection of gates, nets, and modules. The elements within a grouping do not need to stand in any kind of relationship to each other and do not have to be connected. In contrast to modules, groupings do not allow for any kind of hierarchization and each element of the netlist can be in at most one grouping at the same time. Each grouping comes with a unique ID and a name.

Within the GUI, groupings can be managed using the Groupings Widget. The user can create, manipulate, and remove groupings from within the GUI using either GUI functionalities or the provided Python bindings.

GUI

Code

A grouping can be created by calling create_grouping on the current netlist. The ID cannot be changed by the user and may only be read by calling the get_id function from C++ or Python. Read and write access to the name is provided by the get_name and set_name functions respectively.

Some example Python code is given below:

g = netlist.create_grouping("example_grouping")   # create a new grouping going by the name "example_grouping"
print(g.get_name())                               # print the name of the grouping
print(g.get_id())                                 # print the ID of the grouping

To retrieve a grouping from the netlist that corresponds to a known ID, the get_grouping_by_id command can be executed on the netlist. Furthermore, a grouping may be deleted using delete_grouping.

g = netlist.get_grouping_by_id(3)                 # get the grouping with ID 3 from the netlist
netlist.delete_grouping(g)                        # delete the grouping

Clone this wiki locally