Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion vpr/scripts/profile/parse_and_plot_detailed.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import csv
from datetime import datetime

# generate images wihtout having a window appear
# generate images without having a window appear
import matplotlib

matplotlib.use("Agg")
Expand Down
10 changes: 5 additions & 5 deletions vpr/src/draw/breakpoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
*
* This file holds the declaration of the breakpoint class, and also some of the breakpoint related functions.
*
* This class holds the definiton of type Breakpoint as well as all related functions.
* This class holds the definition of type Breakpoint as well as all related functions.
* Breakpoints can be set through the GUI anytime during placement or routing. Breakpoints can also be activated,
* deactivated, and deleted. Each breakpoint has a type (BT_MOVE_NUM, BT_TEMP_NUM, BT_FROM_BLOCK, BT_ROUTER_ITER, BT_ROUTE_NET_ID, BT_EXPRESSION) and holds the
* values for corresponding to its type, as well as a boolean variable to activate and deactivate a breakpoint. It should be noted that each breakpoint can only have one type and hold one value corresponding to that type.
* More complicated breakpoints are set using an expression. (e.g move_num > 3 && block_id == 11)
* Breakpoints can be create using 3 constructors, the default contructor that doesn't identify the type and sets a breakpoint that is never reached,
* a constructor that takes in the type and an int value, and lastly a constructor that takes in the type and the sting that holds the expression.
* Breakpoints can be create using 3 constructors, the default constructor that doesn't identify the type and sets a breakpoint that is never reached,
* a constructor that takes in the type and an int value, and lastly a constructor that takes in the type and the string that holds the expression.
* (e.g Breakpoint(BT_MOVE_NUM, 4) or Breakpoint(BT_EXPRESSION, "move_num += 3")) The == operator has also been provided which returns true when two
* breakpoints have the same type, and the same value corresponding to the type.
*/
Expand Down Expand Up @@ -69,7 +69,7 @@ class Breakpoint {
bt_route_net_id = breakpoint_value;
}

//sets the breakpoint type to BT_EXPRESSION and sets the string member bt_expression to the expresssion the user inputted. e.g Breakpoint(BT_EXPRESSION, "move_num==3")
//sets the breakpoint type to BT_EXPRESSION and sets the string member bt_expression to the expression the user inputted. e.g Breakpoint(BT_EXPRESSION, "move_num==3")
//the user can set breakpoints, during routing or placement, using an expression with the available variables and operators
Breakpoint(bp_type ty, std::string expr) {
type = ty;
Expand Down Expand Up @@ -99,7 +99,7 @@ class Breakpoint {
}
};

//breakpoint realted functions to be called from draw.cpp, place.cpp and route_timing.cpp
//breakpoint related functions to be called from draw.cpp, place.cpp and route_timing.cpp

//checks for all types of breakpoint and returns true if a breakpoint is encountered
bool check_for_breakpoints(bool in_placer);
Expand Down
2 changes: 1 addition & 1 deletion vpr/src/draw/draw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1334,7 +1334,7 @@ ezgl::color get_block_type_color(t_physical_tile_type_ptr type) {
return color;
}

//Lightens a color's luminance [0, 1] by an aboslute 'amount'
//Lightens a color's luminance [0, 1] by an absolute 'amount'
ezgl::color lighten_color(ezgl::color color, float amount) {
constexpr double MAX_LUMINANCE = 0.95; //Clip luminance so it doesn't go full white
auto hsl = color2hsl(color);
Expand Down
2 changes: 1 addition & 1 deletion vpr/src/draw/draw.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* @file draw.h
*
* The main drawing file. Contains the setup for ezgl application, ui setup, and graphis functions
* The main drawing file. Contains the setup for ezgl application, ui setup, and graphics functions
*
* This is VPR's main graphics application program. The program interacts with ezgl/graphics.hpp,
* which provides an API for displaying graphics on both X11 and Win32. The most important
Expand Down
6 changes: 3 additions & 3 deletions vpr/src/draw/draw_basic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -520,13 +520,13 @@ void draw_routing_bb(ezgl::renderer* g) {
//
//In the graphics we represent this by drawing the BB so that legal RR node start/end points
//are contained within the drawn box. Since VPR associates each x/y channel location to
//the right/top of the tile with the same x/y cordinates, this means we draw the box so that:
//the right/top of the tile with the same x/y coordinates, this means we draw the box so that:
// * The left edge is to the left of the channel at bb xmin (including the channel at xmin)
// * The bottom edge is to the below of the channel at bb ymin (including the channel at ymin)
// * The right edge is to the right of the channel at bb xmax (including the channel at xmax)
// * The top edge is to the right of the channel at bb ymax (including the channel at ymax)
//Since tile_x/tile_y correspond to the drawing coordinates the block at grid x/y's bottom-left corner
//this means we need to shift the top/right drawn co-ordinate one tile + channel width right/up so
//this means we need to shift the top/right drawn coordinate one tile + channel width right/up so
//the drawn box contains the top/right channels
double draw_xlow = draw_coords->tile_x[bb->xmin];
double draw_ylow = draw_coords->tile_y[bb->ymin];
Expand Down Expand Up @@ -617,7 +617,7 @@ void draw_routed_net(ParentNetId net_id, ezgl::renderer* g) {
draw_state->draw_rr_node[inode].color = DEFAULT_RR_NODE_COLOR;
}

// When drawing a new branch, add the parent node to the vector to ensure that the conenction is drawn.
// When drawing a new branch, add the parent node to the vector to ensure that the connection is drawn.
if (rr_nodes_to_draw.empty() && rt_node.parent().has_value()) {
rr_nodes_to_draw.push_back(rt_node.parent().value().inode);
}
Expand Down
2 changes: 1 addition & 1 deletion vpr/src/draw/draw_basic.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ void draw_routed_timing_edge_connection(tatum::NodeId src_tnode,
ezgl::renderer* g);

/* Draws any placement macros (e.g. carry chains, which require specific relative placements
* between some blocks) if the Placement Macros (in the GUI) is seelected.
* between some blocks) if the Placement Macros (in the GUI) is selected.
*/
void draw_placement_macros(ezgl::renderer* g);

Expand Down
2 changes: 1 addition & 1 deletion vpr/src/draw/draw_color.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ static constexpr ezgl::color blk_ALICEBLUE(0xF0, 0xF8, 0xFF);
//The colours used to draw block types
const std::vector<ezgl::color> block_colors{
//This first set of colours is somewhat curated to yield
//a nice colour pallette
//a nice colour palette
blk_BISQUE, //EMPTY type is usually the type with index 0, so this colour
//usually unused
blk_LIGHTGREY,
Expand Down
6 changes: 3 additions & 3 deletions vpr/src/draw/draw_debug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "draw_global.h"
#include "vtr_expr_eval.h"

//keeps track of open windows to avoid reopenning windows that are alerady open
//keeps track of open windows to avoid reopenning windows that are already open
struct open_windows {
bool debug_window = false;
bool advanced_window = false;
Expand All @@ -31,7 +31,7 @@ class DrawDebuggerGlobals {
}
};

//the global variable that holds all global variables realted to breakpoint graphics
//the global variable that holds all global variables related to breakpoint graphics
DrawDebuggerGlobals draw_debug_glob_vars;

//draws main debugger window
Expand Down Expand Up @@ -360,7 +360,7 @@ void refresh_bpList() {
gtk_widget_set_halign(checkbox, GTK_ALIGN_END);
gtk_widget_set_valign(checkbox, GTK_ALIGN_CENTER);

//button seetings
//button settings
GtkWidget* deleteButton = gtk_button_new();
GtkWidget* image = gtk_image_new_from_file("src/draw/trash.png");
gtk_button_set_image((GtkButton*)deleteButton, image);
Expand Down
4 changes: 2 additions & 2 deletions vpr/src/draw/draw_noc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ void draw_noc(ezgl::renderer* g) {
return;
}

// check that the NoC tile has a capacity greater than 0 (can we assume it always will?) and if not then we cant draw anything as the NoC tile won't be drawn
// check that the NoC tile has a capacity greater than 0 (can we assume it always will?) and if not then we can't draw anything as the NoC tile won't be drawn
/* since the vector of routers all have a reference positions on the grid to the corresponding physical tile, just use the first router in the vector and get its position, then use this to get the capacity of a noc router tile
*/
const auto& type = device_ctx.grid.get_physical_type({router_list.begin()->get_router_grid_position_x(),
Expand All @@ -54,7 +54,7 @@ void draw_noc(ezgl::renderer* g) {
// Now construct the coordinates for the markers that represent the connections between links (relative to the noc router tile position)
ezgl::rectangle noc_connection_marker_bbox = get_noc_connection_marker_bbox(noc_router_logical_type);

// only draw the noc useage if the user selected the option
// only draw the noc usage if the user selected the option
if (draw_state->draw_noc == DRAW_NOC_LINK_USAGE) {
draw_noc_usage(noc_link_colors);

Expand Down
2 changes: 1 addition & 1 deletion vpr/src/draw/draw_searchbar.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ void draw_highlight_fan_in_fan_out(const std::set<RRNodeId>& nodes);
std::set<RRNodeId> draw_expand_non_configurable_rr_nodes(RRNodeId hit_node);

/* Sets the color of all clbs, nets and rr_nodes to the default.
* as well as clearing the highlighed sub-block */
* as well as clearing the highlighted sub-block */
void deselect_all();

#endif /* NO_GRAPHICS */
4 changes: 2 additions & 2 deletions vpr/src/draw/draw_toggle_functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ void toggle_blk_internal_cbk(GtkSpinButton* self, ezgl::application* app) {
* @brief cbk function when pin util gets changed in ui; sets pin util drawing to new val
* updates draw_state->show_blk_pin_util
*
* @param self ptr to selt
* @param self ptr to self
* @param app ezgl::app
*/
void toggle_blk_pin_util_cbk(GtkComboBoxText* self, ezgl::application* app) {
Expand All @@ -286,7 +286,7 @@ void toggle_blk_pin_util_cbk(GtkComboBoxText* self, ezgl::application* app) {
* @brief cbk function when pin util gets changed in ui; sets pin util drawing to new val
* updates draw_state->show_placement_macros
*
* @param self ptr to selt
* @param self ptr to self
* @param app ezgl::app
*/
void placement_macros_cbk(GtkComboBoxText* self, ezgl::application* app) {
Expand Down
6 changes: 3 additions & 3 deletions vpr/src/draw/intra_logic_block.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ void draw_internal_init_blk() {
// and that consequently we have *one* model for each type.
bot_left = {0, 0};
if (size_t(width) > device_ctx.grid.width() || size_t(height) > device_ctx.grid.height()) {
// in this case, the clb certainly wont't fit, but this prevents
// in this case, the clb certainly won't fit, but this prevents
// an out-of-bounds access, and provides some sort of (probably right)
// value
top_right = ezgl::point2d(
Expand Down Expand Up @@ -465,7 +465,7 @@ static void draw_internal_pb(const ClusterBlockId clb_index, t_pb* pb, const ezg
}

} else {
// else (ie. has chilren, and isn't at the lowest displayed level)
// else (ie. has children, and isn't at the lowest displayed level)
// just label its type, and put it up at the top so we can see it
if (draw_state->draw_block_text) {
g->draw_text(
Expand Down Expand Up @@ -882,7 +882,7 @@ void t_selected_sub_block_info::set(t_pb* new_selected_sub_block, const ClusterB
for (auto blk_id : atom_ctx.netlist().blocks()) {
const ClusterBlockId clb = atom_ctx.lookup().atom_clb(blk_id);
const t_pb_graph_node* pb_graph_node = atom_ctx.lookup().atom_pb_bimap().atom_pb_graph_node(blk_id);
// find the atom block that corrisponds to this pb.
// find the atom block that corresponds to this pb.
if (is_in_selected_subtree(pb_graph_node, clb)) {
//Collect the sources of all nets driving this node
for (auto pin_id : atom_ctx.netlist().block_input_pins(blk_id)) {
Expand Down
2 changes: 1 addition & 1 deletion vpr/src/draw/intra_logic_block.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ void draw_selected_pb_flylines(ezgl::renderer* g);
/*
* Draws lines from the proper logical sources, to the proper logical sinks.
* If the draw state says to show all logical connections, it will,
* and if there is a selected sub-block, it will highlight it's conections
* and if there is a selected sub-block, it will highlight it's connections
*/

void draw_logical_connections(ezgl::renderer* g);
Expand Down
6 changes: 3 additions & 3 deletions vpr/src/draw/manual_moves.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ struct ManualMovesState {
/** manual moves functions **/

/**
* @brief Gets the state of the manual moves togle button and assigns it to the manual_move_enabled in the ManualMovesState struct.
* @brief Gets the state of the manual moves toggle button and assigns it to the manual_move_enabled in the ManualMovesState struct.
*
* @return True if the toggle button is active, false otherwise.
*/
Expand All @@ -94,15 +94,15 @@ void draw_manual_moves_window(const std::string& block_id);
* @brief Evaluates if the user input is valid and allowed.
*
* Sets the members from the ManualMovesState manual_moves_state variable to their respective values (block id and locations).
* @param GtkWidget* widget: Passed in for gtk callback functions (Needed due to the GTK function protoype, in GTK documentation).
* @param GtkWidget* widget: Passed in for gtk callback functions (Needed due to the GTK function prototype, in GTK documentation).
* @param GtkWidget* grid: The grid is used to extract the user input from the manual move window, to later assign to the ManualMovesState variable.
*/
void calculate_cost_callback(GtkWidget* /*widget*/, GtkWidget* grid);

/**
* @brief In -detail checking of the user's input.
*
* Checks if the user input is between the grid's dimensions, block comptaibility, if the block requested to move is valid, if the block is fixed, and if the curent location of the block is different from the location requested by the user.
* Checks if the user input is between the grid's dimensions, block comptaibility, if the block requested to move is valid, if the block is fixed, and if the current location of the block is different from the location requested by the user.
* @param block_id: The ID of the block to move used as the from block in the move generator).
* @param to: Location of where the user wants to move the block.
*
Expand Down
2 changes: 1 addition & 1 deletion vpr/src/draw/save_graphics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ void save_graphics_dialog_box(GtkWidget* /*widget*/, ezgl::application* /*app*/)

// set default values
gtk_combo_box_set_active((GtkComboBox*)combo_box, 0); // default set to pdf which has an index 0
gtk_entry_set_text((GtkEntry*)text_entry, "vpr_graphics"); // defualt text set to vpr_graphics
gtk_entry_set_text((GtkEntry*)text_entry, "vpr_graphics"); // default text set to vpr_graphics

// attach elements to the content area of the dialog
content_area = gtk_dialog_get_content_area(GTK_DIALOG(dialog));
Expand Down
4 changes: 2 additions & 2 deletions vpr/src/draw/search_bar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ GdkEvent simulate_keypress(char key, GdkWindow* window) {
/**
* @brief Turns on autocomplete
*
* This function enables the auto-complete fuctionality for the search bar.
* This function enables the auto-complete functionality for the search bar.
* Normally, this is pretty simple, but the idea is to have auto-complete appear as soon
* as the user hits the "Enter" key. To accomplish this, a fake Gdk event is created
* to simulate the user hitting a key.
Expand All @@ -514,7 +514,7 @@ GdkEvent simulate_keypress(char key, GdkWindow* window) {
* BLOCKS 1835
* BLOCK SRCH. 21840
* For second model (much larger, much longer CPU times) observed large dropoff in times from one char to two chars (about 2 times faster) but after stayed consistent
* Maybe when I ahve more time, will make a cute graph or something, no time right now
* Maybe when I have more time, will make a cute graph or something, no time right now
* MODEL 2: Strativix arch + MES_NOC (TITAN)
* NETS 577696
* NET SRCH. 4.93438e+06
Expand Down
2 changes: 1 addition & 1 deletion vpr/src/draw/ui_setup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ void basic_button_setup(ezgl::application* app) {
gtk_button_set_label(search, "Search");
g_signal_connect(search, "clicked", G_CALLBACK(search_and_highlight), app);

//button for save graphcis, created in main.ui
//button for save graphics, created in main.ui
GtkButton* save = (GtkButton*)app->get_object("SaveGraphics");
g_signal_connect(save, "clicked", G_CALLBACK(save_graphics_dialog_box),
app);
Expand Down
6 changes: 3 additions & 3 deletions vpr/src/place/initial_placement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1711,7 +1711,7 @@ static inline std::vector<ClusterBlockId> get_sorted_clusters_to_place(
// Normalize the macro size to be a number between 0 and 1.
float normalized_macro_size = macro_size / static_cast<float>(max_macro_size);

// Compute the cost. Clusters wth a higher cost will be placed first.
// Compute the cost. Clusters with a higher cost will be placed first.
// Cost is proportional to macro size since larger macros are more
// challenging to place and should be placed earlier if possible.
// Cost is inversly proportional to standard deviation, since clusters
Expand All @@ -1723,7 +1723,7 @@ static inline std::vector<ClusterBlockId> get_sorted_clusters_to_place(
// If the cluster is constrained, compute how much area its constrained
// region takes up. This will be used to place "more constrained" blocks
// first.
// TODO: The cluster constrained area can be incorperated into the cost
// TODO: The cluster constrained area can be incorporated into the cost
// somehow.
ClusterBlockId macro_head_blk = pl_macro.members[0].blk_index;
if (is_cluster_constrained(macro_head_blk)) {
Expand Down Expand Up @@ -1838,7 +1838,7 @@ static inline bool place_blocks_min_displacement(std::vector<ClusterBlockId>& cl
}

// The find_nearest_compatible_loc function above should only return
// a location which can legally accomodate the macro (if it found a
// a location which can legally accommodate the macro (if it found a
// location). Double check these to be safe.
VTR_ASSERT_SAFE(!blk_loc_registry.grid_blocks().block_at_location(centroid_loc));
VTR_ASSERT_SAFE(macro_can_be_placed(pl_macro, centroid_loc, false, blk_loc_registry));
Expand Down
2 changes: 1 addition & 1 deletion vpr/src/place/initial_placement.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ struct t_grid_empty_locs_block_type {
t_pl_loc first_avail_loc;
/*
* Number of consecutive y-locations starting (and including) from first_avail_loc
* that can accomadate blocks of the type at first_avail_loc.
* that can accommodate blocks of the type at first_avail_loc.
*/
int num_of_empty_locs_in_y_axis;
};
Expand Down
4 changes: 2 additions & 2 deletions vpr/src/place/move_generators/median_move_generator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ bool MedianMoveGenerator::get_bb_incrementally(ClusterNetId net_id,
} else {
bb_coord_new.xmax = curr_bb_coord.xmax;
}
} else { /* Move to left, old postion was not at xmax. */
} else { /* Move to left, old position was not at xmax. */
bb_coord_new.xmax = curr_bb_coord.xmax;
}

Expand Down Expand Up @@ -360,7 +360,7 @@ bool MedianMoveGenerator::get_bb_incrementally(ClusterNetId net_id,
} else {
bb_coord_new.ymax = curr_bb_coord.ymax;
}
} else { /* Move down, old postion was not at ymax. */
} else { /* Move down, old position was not at ymax. */
bb_coord_new.ymax = curr_bb_coord.ymax;
}

Expand Down
2 changes: 1 addition & 1 deletion vpr/src/place/move_generators/median_move_generator.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class PlaceMacros;
* of positions that minimize the HPWL.
*
* To calculate the median region, we iterate over all the moving block pins calculating the bounding box of each of this nets.
* Then, we push the corrdinates of these bb into two vectors and calculate its median.
* Then, we push the coordinates of these bb into two vectors and calculate its median.
*
* To get the exact location, we calculate the center of median region and find a random location in a range
* around it
Expand Down
2 changes: 1 addition & 1 deletion vpr/src/place/move_generators/simpleRL_move_generator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ t_propose_action EpsilonGreedyAgent::propose_action() {
/* Explore
* With probability epsilon, choose randomly amongst all move types */

// Cummulative epsilon action probabilty stores a CDF for all available
// Cumulative epsilon action probability stores a CDF for all available
// actions where each action has an equal probability to occur. Pick
// a random number between 0 and 1 and select the action in the CDF equal
// to or just less than the random number.
Expand Down
Loading