Skip to content

Commit c19e95f

Browse files
committed
fixed PR suggestions
1 parent 0664ad9 commit c19e95f

File tree

2 files changed

+13
-19
lines changed

2 files changed

+13
-19
lines changed

vpr/src/base/atom_netlist.h

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

167167
/**
168-
* @brief Create a new block in the netlist or returns an existing block.
169-
If a block with the specified name already exists, the existing block's ID is returned
170-
and no new block is created.
168+
* @brief Create a new block in the netlist.
169+
*
170+
* @note If a block with the specified name already exists, the function will crash.
171171
*
172172
* @param name The unique name of the block
173173
* @param model The primitive type of the block
@@ -178,18 +178,17 @@ class AtomNetlist : public Netlist<AtomBlockId, AtomPortId, AtomPinId, AtomNetId
178178
AtomBlockId create_block(const std::string& name, const t_model* model, const TruthTable& truth_table = TruthTable());
179179

180180
/**
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-
* the existing port's ID is returned, and no new port is created.
181+
* @brief Create a new port in the netlist.
182+
*
183+
* @note If a port with the specified name already exists for the given block, the function will crash.
184184
*
185185
* @param blk_id The block the port is associated with
186186
* @param model_port The model port the port is associated with
187187
*/
188188
AtomPortId create_port(const AtomBlockId blk_id, const t_model_ports* model_port);
189189

190190
/**
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, and no new pin is created.
191+
* @brief Create a new pin in the netlist.
193192
*
194193
* @param port_id The port this pin is associated with
195194
* @param port_bit The bit index of the pin in the port
@@ -200,7 +199,7 @@ class AtomNetlist : public Netlist<AtomBlockId, AtomPortId, AtomPinId, AtomNetId
200199
AtomPinId create_pin(const AtomPortId port_id, BitIndex port_bit, const AtomNetId net_id, const PinType pin_type, bool is_const = false);
201200

202201
/**
203-
* @brief Create an empty, or return an existing net in the netlist
202+
* @brief Create a net in the netlist
204203
*
205204
* @param name The unique name of the net
206205
*/

vpr/src/base/clustered_netlist.h

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

176176
public: //Public Mutators
177177
/**
178-
* @brief Create a new block in the netlist or return an existing block.
179-
* If a block with the specified name already exists, the existing block's ID is returned,
180-
* and no new block is created.
178+
* @brief Create a new block in the netlist.
181179
*
182180
* @param name The unique name of the block
183181
* @param pb The physical representation of the block
@@ -186,9 +184,7 @@ class ClusteredNetlist : public Netlist<ClusterBlockId, ClusterPortId, ClusterPi
186184
ClusterBlockId create_block(const char* name, t_pb* pb, t_logical_block_type_ptr type);
187185

188186
/**
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-
* the existing port's ID is returned, and no new port is created.
187+
* @brief Create a new port in the netlist.
192188
*
193189
* @param blk_id The block the port is associated with
194190
* @param name The name of the port (must match the name of a port in the block's model)
@@ -197,9 +193,8 @@ class ClusteredNetlist : public Netlist<ClusterBlockId, ClusterPortId, ClusterPi
197193
*/
198194
ClusterPortId create_port(const ClusterBlockId blk_id, const std::string& name, BitIndex width, PortType type);
199195
/**
200-
* @brief Create a new pin in the netlist or return an existing pin.
201-
* If a pin with the specified ID already exists, the existing pin's ID is returned,
202-
* and no new pin is created.
196+
* @brief Create a new pin in the netlist.
197+
* @note If a pin with the specified ID already exists, the function will crash.
203198
*
204199
* @param port_id The port this pin is associated with
205200
* @param port_bit The bit index of the pin in the port
@@ -211,7 +206,7 @@ class ClusteredNetlist : public Netlist<ClusterBlockId, ClusterPortId, ClusterPi
211206
ClusterPinId create_pin(const ClusterPortId port_id, BitIndex port_bit, const ClusterNetId net_id, const PinType pin_type, int pin_index, bool is_const = false);
212207

213208
/**
214-
* @brief Create an empty, or return an existing net in the netlist
209+
* @brief Create a net in the netlist
215210
*
216211
* @param name The unique name of the net
217212
*/

0 commit comments

Comments
 (0)