Skip to content

Commit 27361b7

Browse files
committed
fixed netlist documentation
1 parent c7b9ce0 commit 27361b7

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

vpr/src/base/atom_netlist.h

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,9 @@ class AtomNetlist : public Netlist<AtomBlockId, AtomPortId, AtomPinId, AtomNetId
165165
*/
166166

167167
/**
168-
* @brief Create or return an existing block in the netlist
168+
* @brief Create a new block in the netlist or returns an existing block.
169+
If a block with the specified name already exists, its associated data
170+
(model and truth table) will be overwritten with the provided data.
169171
*
170172
* @param name The unique name of the block
171173
* @param model The primitive type of the block
@@ -176,15 +178,18 @@ class AtomNetlist : public Netlist<AtomBlockId, AtomPortId, AtomPinId, AtomNetId
176178
AtomBlockId create_block(const std::string& name, const t_model* model, const TruthTable& truth_table = TruthTable());
177179

178180
/**
179-
* @brief Create or return an existing port in the netlist
181+
* @brief Create a new port in the netlist or return an existing port.
182+
* If a port with the specified name already exists for the given block,
183+
* its associated data (model) will be overwritten with the provided data.
180184
*
181185
* @param blk_id The block the port is associated with
182186
* @param model_port The model port the port is associated with
183187
*/
184188
AtomPortId create_port(const AtomBlockId blk_id, const t_model_ports* model_port);
185189

186190
/**
187-
* @brief Create or return an existing pin in the netlist
191+
* @brief Create a new pin in the netlist or return an existing pin.
192+
* If a pin with the specified ID already exists, it is returned.
188193
*
189194
* @param port_id The port this pin is associated with
190195
* @param port_bit The bit index of the pin in the port

vpr/src/base/clustered_netlist.h

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,9 @@ class ClusteredNetlist : public Netlist<ClusterBlockId, ClusterPortId, ClusterPi
175175

176176
public: //Public Mutators
177177
/**
178-
* @brief Create or return an existing block in the netlist
178+
* @brief Create a new block in the netlist or return an existing block.
179+
* If a block with the specified name already exists, its associated data
180+
* will be overwritten.
179181
*
180182
* @param name The unique name of the block
181183
* @param pb The physical representation of the block
@@ -184,7 +186,9 @@ class ClusteredNetlist : public Netlist<ClusterBlockId, ClusterPortId, ClusterPi
184186
ClusterBlockId create_block(const char* name, t_pb* pb, t_logical_block_type_ptr type);
185187

186188
/**
187-
* @brief Create or return an existing port in the netlist
189+
* @brief Create a new port in the netlist or return an existing port.
190+
* If a port with the specified name already exists for the given block,
191+
* its associated data will be overwritten.
188192
*
189193
* @param blk_id The block the port is associated with
190194
* @param name The name of the port (must match the name of a port in the block's model)
@@ -193,7 +197,8 @@ class ClusteredNetlist : public Netlist<ClusterBlockId, ClusterPortId, ClusterPi
193197
*/
194198
ClusterPortId create_port(const ClusterBlockId blk_id, const std::string& name, BitIndex width, PortType type);
195199
/**
196-
* @brief Create or return an existing pin in the netlist
200+
* @brief Create a new pin in the netlist or return an existing pin.
201+
* If a pin with the specified ID already exists, its associated data will be overwritten.
197202
*
198203
* @param port_id The port this pin is associated with
199204
* @param port_bit The bit index of the pin in the port

0 commit comments

Comments
 (0)