|
VPR-6.0
|
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Functions | |
| void | update_screen (int priority, char *msg, enum pic_type pic_on_screen_val, boolean crit_path_button_enabled) |
| void | alloc_draw_structs (void) |
| void | init_draw_coords (float clb_width) |
| void | set_graphics_state (boolean show_graphics_val, int gr_automode_val, enum e_route_type route_type) |
| void alloc_draw_structs | ( | void | ) |
Allocate the structures needed to draw the placement and routing. Set up the default colors for blocks and nets.
Definition at line 482 of file draw.c.
{
tile_x = (float *)my_malloc((nx + 2) * sizeof(float));
tile_y = (float *)my_malloc((ny + 2) * sizeof(float));
net_color = (enum color_types *)
my_malloc(num_nets * sizeof(enum color_types));
block_color = (enum color_types *)
my_malloc(num_blocks * sizeof(enum color_types));
x_rr_node_left = (float *) my_malloc(num_rr_nodes*sizeof(float));
x_rr_node_right = (float *) my_malloc(num_rr_nodes*sizeof(float));
y_rr_node_top = (float *) my_malloc(num_rr_nodes*sizeof(float));
y_rr_node_bottom = (float *) my_malloc(num_rr_nodes*sizeof(float));
rr_node_color = (enum color_types *) my_malloc(num_rr_nodes*sizeof(enum color_types));
deselect_all(); /* Set initial colors */
}
Here is the call graph for this function:
Here is the caller graph for this function:| void init_draw_coords | ( | float | width_val | ) |
Load the arrays containing the left and bottom coordinates of the clbs forming the FPGA. tile_width_val sets the width and height of a drawn clb.
Definition at line 508 of file draw.c.
{
int i;
int j;
if(!show_graphics)
return; /* -nodisp was selected. */
if(num_rr_nodes != old_num_rr_nodes)
{
x_rr_node_left = (float *) my_realloc(x_rr_node_left, (num_rr_nodes)*sizeof(float));
x_rr_node_right = (float *) my_realloc(x_rr_node_right, (num_rr_nodes)*sizeof(float));
y_rr_node_top = (float *) my_realloc(y_rr_node_top, (num_rr_nodes)*sizeof(float));
y_rr_node_bottom = (float *) my_realloc(y_rr_node_bottom, (num_rr_nodes)*sizeof(float));
rr_node_color = (enum color_types *) my_realloc(rr_node_color, (num_rr_nodes)*sizeof(enum color_types));
for (i = 0; i < num_rr_nodes; i++)
{
x_rr_node_left[i] = -1;
x_rr_node_right[i] = -1;
y_rr_node_top[i] = -1;
y_rr_node_bottom[i] = -1;
rr_node_color[i] = BLACK;
}
}
tile_width = width_val;
pin_size = 0.3;
for(i = 0; i < num_types; ++i)
{
pin_size =
min(pin_size,
(tile_width / (4.0 * type_descriptors[i].num_pins)));
}
j = 0;
for(i = 0; i < (nx + 1); i++)
{
tile_x[i] = (i * tile_width) + j;
j += chan_width_y[i] + 1; /* N wires need N+1 units of space */
}
tile_x[nx + 1] = ((nx + 1) * tile_width) + j;
j = 0;
for(i = 0; i < (ny + 1); ++i)
{
tile_y[i] = (i * tile_width) + j;
j += chan_width_x[i] + 1;
}
tile_y[ny + 1] = ((ny + 1) * tile_width) + j;
init_world(0.0,
tile_y[ny + 1] + tile_width, tile_x[nx + 1] + tile_width, 0.0);
}
Here is the call graph for this function:
Here is the caller graph for this function:| void set_graphics_state | ( | boolean | show_graphics_val, |
| int | gr_automode_val, | ||
| enum e_route_type | route_type | ||
| ) |
Sets the static show_graphics and gr_automode variables to the desired values. They control if graphics are enabled and, if so, how often the user is prompted for input.
Definition at line 182 of file draw.c.
{
show_graphics = show_graphics_val;
gr_automode = gr_automode_val;
draw_route_type = route_type;
}
Here is the caller graph for this function:| void update_screen | ( | int | priority, |
| char * | msg, | ||
| enum pic_type | pic_on_screen_val, | ||
| boolean | crit_path_button_enabled | ||
| ) |
Updates the screen if the user has requested graphics. The priority value controls whether or not the Proceed button must be clicked to continue. Saves the pic_on_screen_val to allow pan and zoom redraws.
Definition at line 197 of file draw.c.
{
if(!show_graphics) /* Graphics turned off */
return;
/* If it's the type of picture displayed has changed, set up the proper *
* buttons. */
if(pic_on_screen != pic_on_screen_val)
{
if(pic_on_screen_val == PLACEMENT && pic_on_screen == NO_PICTURE)
{
create_button("Window", "Toggle Nets", toggle_nets);
}
else if(pic_on_screen_val == ROUTING
&& pic_on_screen == PLACEMENT)
{
create_button("Toggle Nets", "Toggle RR", toggle_rr);
create_button("Toggle RR", "Tog Defects", toggle_defects);
create_button("Toggle RR", "Congestion",
toggle_congestion);
if(crit_path_button_enabled)
{
create_button("Congestion", "Crit. Path",
highlight_crit_path);
}
}
else if(pic_on_screen_val == PLACEMENT
&& pic_on_screen == ROUTING)
{
destroy_button("Toggle RR");
destroy_button("Congestion");
if(crit_path_button_enabled)
{
destroy_button("Crit. Path");
}
}
else if(pic_on_screen_val == ROUTING
&& pic_on_screen == NO_PICTURE)
{
create_button("Window", "Toggle Nets", toggle_nets);
create_button("Toggle Nets", "Toggle RR", toggle_rr);
create_button("Toggle RR", "Tog Defects", toggle_defects);
create_button("Tog Defects", "Congestion",
toggle_congestion);
if(crit_path_button_enabled)
{
create_button("Congestion", "Crit. Path",
highlight_crit_path);
}
}
}
/* Save the main message. */
my_strncpy(default_message, msg, BUFSIZE);
pic_on_screen = pic_on_screen_val;
update_message(msg);
drawscreen();
if(priority >= gr_automode)
{
event_loop(highlight_blocks, drawscreen);
}
else
{
flushinput();
}
}
Here is the call graph for this function:
Here is the caller graph for this function: