Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some overview to the RRGraphView doxygen documentation #2745

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

treelin611
Copy link

Description

  • Add high level comments on RRGraphView class
  • Reformat comment to be doxygen-compatible

Related Issue

@github-actions github-actions bot added the lang-cpp C/C++ code label Sep 24, 2024
Copy link
Contributor

@vaughnbetz vaughnbetz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks very good, thanks!

libs/librrgraph/src/base/rr_graph_builder.h Outdated Show resolved Hide resolved
libs/librrgraph/src/base/rr_graph_builder.h Outdated Show resolved Hide resolved
libs/librrgraph/src/base/rr_graph_view.h Outdated Show resolved Hide resolved
* @file
* @brief The RRGraphView encapsulates a read-only routing resource graph, providing clients with tailored frame views of the object.
*
* The RRGraphView represents the full frame view of the routing resource graph, offering several advantages:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you'll have to explain what this means a bit more, or shorten/delete it. Is this saying that as the RRGraphView allows all the RRGraph data to be viewed, it can be used by multiple clients, which saves memory?

Copy link
Author

@treelin611 treelin611 Sep 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just rewrote the overview section according to "possible solution" in this link: #2361.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That looks great ... thanks!

Copy link
Author

@treelin611 treelin611 Sep 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem! A small bug has also been fixed. The PR should be ready now.

Copy link
Contributor

@tangxifan tangxifan Sep 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@treelin611 You may refer to the following text when adding the fundamental description
@vaughnbetz Please advise if the following description is accurate enough

* A Routing Resource Graph (RRGraph or RRG) is a directed graph (has many cycles),
* which consists of a number of nodes and edges.
*
* Node
* ----
* Each node represents a routing resource, which could be
* 1. a routing track in X-direction or Y-direction (CHANX or CHANY)
* 2. an input or an output of a logic block (IPIN or OPIN)
* 3. a virtual source or sink node (SOURCE or SINK), which are starting/ending points of routing trees.
*
* Edge
* ----
* Each edge represents a switch between routing resources, which could be
* 1. a multiplexer
* 2. a tri-state buffer
* 3. a pass gate
* 4. a non-configurable (can not be turned off) buffer
* 5. a short (metal connection that can not be turned off
*
* Note: Multiplexers are the most common type
*
* The switch information are categorized in the rr_switch_inf of RRGraph class.
* rr_switch_inf is created to minimize memory footprint of RRGraph classs
* While the RRG could contain millions (even much larger) of edges, there are only
* a limited number of types of switches.
* Hence, we use a flyweight pattern to store switch-related information that differs
* only for types of switches (switch type, drive strength, R, C, etc.).
* Each edge stores the ids of the switch that implements it so this additional information
* can be easily looked up.
*
* Note: All the switch-related information, such as R, C, should be placed in rr_switch_inf
* but NOT directly in the edge-related data of RRGraph.
* If you wish to create a new data structure to represent switches between routing resources,
* please follow the flyweight pattern by linking your switch ids to edges only!

@github-actions github-actions bot added the docs Documentation label Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation lang-cpp C/C++ code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants