Skip to content

Commit bdf1391

Browse files
authored
Merge pull request #11 from w0lek/ipa_end_user_doc_develop
update calc_critical_path doc
2 parents 3b2eb6a + 97ad7f7 commit bdf1391

File tree

10 files changed

+59
-49
lines changed

10 files changed

+59
-49
lines changed

doc/src/api/vpr/server.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ server::TaskResolver
3939
.. doxygenfunction:: server::calc_critical_path
4040
:project: vpr
4141

42+
.. doxygenenum:: e_timing_report_detail
43+
:project: vpr
44+
4245
comm::Telegram
4346
--------------
4447

@@ -77,4 +80,4 @@ Compression utils
7780
:project: vpr
7881

7982
.. doxygenfunction:: try_decompress
80-
:project: vpr
83+
:project: vpr

doc/src/vpr/command_line_usage.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1826,6 +1826,9 @@ The following options are used to enable power estimation in VPR.
18261826

18271827
Server Mode Options
18281828
^^^^^^^^^^^^^^^^^^^^^^^^
1829+
1830+
If VPR is in server mode, it listens on a socket for commands from a client. Currently, this is used to enable interactive timing analysis and visualization of timing paths in the VPR UI under the control of a separate client.
1831+
18291832
The following options are used to enable server mode in VPR.
18301833

18311834
.. seealso:: :ref:`server_mode` for more details.
Binary file not shown.

doc/src/vtr/server_mode/comm_telegram_body_structure.svg

100755100644
Lines changed: 27 additions & 27 deletions
Loading

doc/src/vtr/server_mode/index.rst

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
Server Mode
44
================
55

6-
VTR provides the ability to run in server mode using the following command-line arguments.
6+
If VPR is in server mode, it listens on a socket for commands from a client. Currently, this is used to enable interactive timing analysis and visualization of timing paths in the VPR UI under the control of a separate client.
7+
VPR provides the ability to run in server mode using the following command-line arguments.
78

89
.. code-block:: none
910
@@ -23,7 +24,14 @@ The telegram header contains helper information required to properly extract the
2324

2425
Communication telegram structure.
2526

26-
27+
.. note:: The telegram body itself could be compressed with zlib to minimize the amount of data transferred over the socket.
28+
This compression is applied to the response of the 'get critical path report' request. The compressor ID byte in the telegram header signals whether the telegram body is compressed.
29+
When the compressor ID is null, the telegram body is not compressed. If the compressor ID is 'z', it means the body is compressed with zlib.
30+
31+
.. note:: The checksum field contains the telegram body checksum. This checksum is used to validate the consistency of the telegram body during the dispatching phase.
32+
If checksums are mismatched, the telegram is considered invalid and is skipped in processing.
33+
34+
2735
.. _fig_comm_telegram_body_structure:
2836

2937
.. figure:: comm_telegram_body_structure.*
@@ -37,11 +45,8 @@ The telegram header contains helper information required to properly extract the
3745
- 0 - command id for **get critical path**
3846
- 1 - command id for **highlight selected path elements**
3947

40-
JOB_ID - is unique id for a task.
48+
JOB_ID is a unique ID for a task. It is used to associate the request with the response by matching the same JOB_ID. Each new client request should increment the JOB_ID value; otherwise, it will not be clear which request the current response belongs to.
4149

42-
.. note:: The telegram body itself could be compressed with zlib to minimize the amount of data transferred over the socket.
43-
This compression is applied to the response of the 'get critical path report' request.
44-
The compressor ID byte in the telegram header signals whether the telegram body is compressed.
4550

4651
Get critical path timing report example
4752
---------------------------------------
@@ -58,8 +63,8 @@ Get critical path timing report example
5863
:linenos:
5964
6065
{
61-
"CMD": "0",
6266
"JOB_ID": "1",
67+
"CMD": "0",
6368
"OPTIONS": "int:path_num:1;string:path_type:setup;string:details_level:netlist;bool:is_flat_routing:0"
6469
}
6570
@@ -169,8 +174,8 @@ Draw selected critical path elements example
169174
:linenos:
170175
171176
{
172-
"CMD": "1",
173177
"JOB_ID": "2",
178+
"CMD": "1",
174179
"OPTIONS": "string:path_elements:0#10,11,12,13,14,15,20,21,22,23,24,25;string:high_light_mode:crit path flylines delays;bool:draw_path_contour:1"
175180
}
176181

vpr/src/base/vpr_context.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ struct NocContext : public Context {
568568
* @brief State relating to server mode
569569
*
570570
* This should contain only data structures that
571-
* related to server state.
571+
* relate to the vpr server state.
572572
*/
573573
struct ServerContext : public Context {
574574
/**
@@ -601,7 +601,8 @@ struct ServerContext : public Context {
601601
/**
602602
* @brief Stores the flag indicating whether to draw the critical path contour.
603603
*
604-
* If the flag is set to true, the non-selected critical path elements will be drawn as a contour, while selected elements will be drawn as usual.
604+
* If True, the entire path will be rendered with some level of transparency, regardless of the selection of path elements. However, selected path elements will be drawn in full color.
605+
* This feature is helpful in visual debugging, to see how the separate path elements are mapped into the whole path.
605606
*/
606607
bool draw_crit_path_contour = false;
607608

vpr/src/draw/draw_basic.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ void draw_crit_path(ezgl::renderer* g);
113113
* and indexes map. It is primarily used in server mode, where items are drawn upon request.
114114
*
115115
* @param paths The vector of TimingPath objects representing the critical paths.
116-
* @param indexes The map of sets, where map keys are path indices and each set contains the indices of sub-path elements to draw.
116+
* @param indexes The map of sets, where the map keys are path indices in std::vector<tatum::TimingPath>, and each set contains the indices of the data_arrival_path elements ( @ref tatum::TimingPath ) to draw.
117117
* @param g Pointer to the ezgl::renderer object on which the elements will be drawn.
118118
*/
119119
void draw_crit_path_elements(const std::vector<tatum::TimingPath>& paths, const std::map<std::size_t, std::set<std::size_t>>& indexes, bool draw_crit_path_contour, ezgl::renderer* g);

vpr/src/server/bytearray.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
namespace comm {
1111

1212
/**
13-
* @brief ByteArray as a simple wrapper over std::vector<char>
13+
* @brief ByteArray is a simple wrapper over std::vector<char> that provides a user-friendly interface for manipulating array data..
1414
*/
1515
class ByteArray : public std::vector<char> {
1616
public:

vpr/src/server/gateio.h

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ namespace server {
2727
* Operable only with a single client. As soon as client connection is detected
2828
* it begins listening on the specified port number for incoming client requests,
2929
* collects and encapsulates them into tasks (see @ref Task).
30-
* The incoming tasks are extracted and handled by the top-level logic @ref TaskResolver in main thread.
30+
* The incoming tasks are extracted and handled by the top-level logic @ref TaskResolver in the main thread.
3131
* Once the tasks are resolved by the @ref TaskResolver, they are returned to be sent back to the client app as a response.
32-
* Extraction and puting @ref Task is taken from main thread inside @ref server::update.
32+
* Moving @ref Task across threads happens in @ref server::update.
3333
*
3434
* @note
3535
* - The GateIO instance should be created and managed from the main thread, while its internal processing
@@ -154,9 +154,7 @@ class GateIO
154154
GateIO& operator=(GateIO&&) = delete;
155155

156156
/**
157-
* @brief Checks if the port listening process is currently running.
158-
*
159-
* This method returns a boolean indicating whether the port listening process is currently running.
157+
* @brief Returns a bool indicating whether or not the port listening process is currently running.
160158
*
161159
* @return True if the port listening process is running, false otherwise.
162160
*/
@@ -186,7 +184,7 @@ class GateIO
186184
/**
187185
* @brief Prints log messages for the GateIO.
188186
*
189-
* @note Must be called from main thread since it's invoke std::cout.
187+
* @note Must be called from the main thread since it's invoke std::cout.
190188
* Calling this method from other threads may result in unexpected behavior.
191189
*/
192190
void print_logs();

vpr/src/server/pathhelper.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ using CritPathsResultPtr = std::shared_ptr<CritPathsResult>;
4040
* @brief Calculates the critical path.
4141
4242
* This function calculates the critical path based on the provided parameters.
43-
* @param type The type of the critical path.
44-
* @param crit_path_num The max number of the critical path.
45-
* @param details_level The level of detail for the timing report.
43+
* @param type The type of the critical path. Must be either "setup" or "hold".
44+
* @param crit_path_num The max number of critical paths to record.
45+
* @param details_level The level of detail for the timing report. See @ref e_timing_report_detail.
4646
* @param is_flat_routing Indicates whether flat routing should be used.
4747
* @return A `CritPathsResultPtr` which is a pointer to the result of the critical path calculation (see @ref CritPathsResult).
4848
*/

0 commit comments

Comments
 (0)