Verilog to Routing - VPR
|
General API for VPR. More...
#include <cstdio>
#include <cstring>
#include <ctime>
#include <chrono>
#include <cmath>
#include <sstream>
#include "vtr_assert.h"
#include "vtr_math.h"
#include "vtr_log.h"
#include "vtr_version.h"
#include "vtr_time.h"
#include "vtr_path.h"
#include "vpr_types.h"
#include "vpr_utils.h"
#include "globals.h"
#include "atom_netlist.h"
#include "read_netlist.h"
#include "check_netlist.h"
#include "read_blif.h"
#include "draw.h"
#include "place_and_route.h"
#include "pack.h"
#include "place.h"
#include "SetupGrid.h"
#include "setup_clocks.h"
#include "stats.h"
#include "read_options.h"
#include "echo_files.h"
#include "read_xml_arch_file.h"
#include "SetupVPR.h"
#include "ShowSetup.h"
#include "CheckArch.h"
#include "CheckSetup.h"
#include "rr_graph.h"
#include "pb_type_graph.h"
#include "route_common.h"
#include "timing_place_lookup.h"
#include "route_export.h"
#include "vpr_api.h"
#include "read_sdc.h"
#include "power.h"
#include "pack_types.h"
#include "lb_type_rr_graph.h"
#include "read_activity.h"
#include "net_delay.h"
#include "AnalysisDelayCalculator.h"
#include "timing_info.h"
#include "netlist_writer.h"
#include "RoutingDelayCalculator.h"
#include "check_route.h"
#include "constant_nets.h"
#include "atom_netlist_utils.h"
#include "cluster.h"
#include "pack_report.h"
#include "timing_graph_builder.h"
#include "timing_reports.h"
#include "tatum/echo_writer.hpp"
#include "read_route.h"
#include "read_place.h"
#include "arch_util.h"
#include "log.h"
#include "iostream"
Functions | |
static void | free_complex_block_types () |
static void | free_device (const t_det_routing_arch &routing_arch) |
Free architecture data structures. More... | |
static void | free_circuit () |
static void | get_intercluster_switch_fanin_estimates (const t_vpr_setup &vpr_setup, const t_arch &arch, const int wire_segment_length, int *opin_switch_fanin, int *wire_switch_fanin, int *ipin_switch_fanin) |
void | vpr_print_title () |
Display general VPR information. More... | |
void | vpr_print_args (int argc, const char **argv) |
void | vpr_initialize_logging () |
void | vpr_init (const int argc, const char **argv, t_options *options, t_vpr_setup *vpr_setup, t_arch *arch) |
Initialize VPR. More... | |
void | vpr_init_with_options (const t_options *options, t_vpr_setup *vpr_setup, t_arch *arch) |
Initialize VPR with options. More... | |
bool | vpr_flow (t_vpr_setup &vpr_setup, t_arch &arch) |
void | vpr_create_device (t_vpr_setup &vpr_setup, const t_arch &arch) |
Create the device (grid + rr graph) More... | |
void | vpr_create_device_grid (const t_vpr_setup &vpr_setup, const t_arch &Arch) |
Allocs globals: chan_width_x, chan_width_y, device_ctx.grid. More... | |
void | vpr_setup_clock_networks (t_vpr_setup &vpr_setup, const t_arch &Arch) |
bool | vpr_pack_flow (t_vpr_setup &vpr_setup, const t_arch &arch) |
Perform, load or skip the packing stage. More... | |
bool | vpr_pack (t_vpr_setup &vpr_setup, const t_arch &arch) |
Perform packing. More... | |
void | vpr_load_packing (t_vpr_setup &vpr_setup, const t_arch &arch) |
Loads a previous packing. More... | |
bool | vpr_place_flow (t_vpr_setup &vpr_setup, const t_arch &arch) |
Perform, load or skip the placement stage. More... | |
void | vpr_place (t_vpr_setup &vpr_setup, const t_arch &arch) |
Perform placement. More... | |
void | vpr_load_placement (t_vpr_setup &vpr_setup, const t_arch &arch) |
RouteStatus | vpr_route_flow (t_vpr_setup &vpr_setup, const t_arch &arch) |
Perform, load or skip the routing stage. More... | |
RouteStatus | vpr_route_fixed_W (t_vpr_setup &vpr_setup, const t_arch &arch, int fixed_channel_width, std::shared_ptr< SetupHoldTimingInfo > timing_info, std::shared_ptr< RoutingDelayCalculator > delay_calc, ClbNetPinsMatrix< float > &net_delay) |
Perform routing at a fixed channel width) More... | |
RouteStatus | vpr_route_min_W (t_vpr_setup &vpr_setup, const t_arch &arch, std::shared_ptr< SetupHoldTimingInfo > timing_info, std::shared_ptr< RoutingDelayCalculator > delay_calc, ClbNetPinsMatrix< float > &net_delay) |
Perform routing to find the minimum channel width. More... | |
RouteStatus | vpr_load_routing (t_vpr_setup &vpr_setup, const t_arch &, int fixed_channel_width, std::shared_ptr< SetupHoldTimingInfo > timing_info, ClbNetPinsMatrix< float > &net_delay) |
Loads a previous routing. More... | |
void | vpr_create_rr_graph (t_vpr_setup &vpr_setup, const t_arch &arch, int chan_width_fac) |
Create routing graph at specified channel width. More... | |
void | vpr_init_graphics (const t_vpr_setup &vpr_setup, const t_arch &arch) |
void | vpr_close_graphics (const t_vpr_setup &) |
static void | free_atoms () |
static void | free_placement () |
static void | free_routing () |
void | vpr_free_vpr_data_structures (t_arch &Arch, t_vpr_setup &vpr_setup) |
void | vpr_free_all (t_arch &Arch, t_vpr_setup &vpr_setup) |
void | vpr_read_options (const int argc, const char **argv, t_options *options) |
Read in user options. More... | |
void | vpr_setup_vpr (t_options *Options, const bool TimingEnabled, const bool readArchFile, t_file_name_opts *FileNameOpts, t_arch *Arch, t_model **user_models, t_model **library_models, t_netlist_opts *NetlistOpts, t_packer_opts *PackerOpts, t_placer_opts *PlacerOpts, t_annealing_sched *AnnealSched, t_router_opts *RouterOpts, t_analysis_opts *AnalysisOpts, t_det_routing_arch *RoutingArch, std::vector< t_lb_type_rr_node > **PackerRRGraph, std::vector< t_segment_inf > &Segments, t_timing_inf *Timing, bool *ShowGraphics, int *GraphPause, bool *SaveGraphics, std::string *GraphicsCommands, t_power_opts *PowerOpts) |
Read in arch and circuit. More... | |
void | vpr_check_arch (const t_arch &Arch) |
Check inputs are reasonable. More... | |
void | vpr_check_setup (const t_packer_opts &PackerOpts, const t_placer_opts &PlacerOpts, const t_router_opts &RouterOpts, const t_det_routing_arch &RoutingArch, const std::vector< t_segment_inf > &Segments, const t_timing_inf &Timing, const t_chan_width_dist &Chans) |
Verify settings don't conflict or otherwise not make sense. More... | |
void | vpr_show_setup (const t_vpr_setup &vpr_setup) |
Show current setup. More... | |
bool | vpr_analysis_flow (t_vpr_setup &vpr_setup, const t_arch &Arch, const RouteStatus &route_status) |
Perform or skips the analysis stage. More... | |
void | vpr_analysis (t_vpr_setup &vpr_setup, const t_arch &Arch, const RouteStatus &route_status) |
Perform post-implementation analysis. More... | |
void | vpr_power_estimation (const t_vpr_setup &vpr_setup, const t_arch &Arch, const SetupTimingInfo &timing_info, const RouteStatus &route_status) |
Pperforms power estimation. More... | |
void | vpr_print_error (const VprError &vpr_error) |
Prints user file or internal errors for VPR. More... | |
General API for VPR.
Other software tools should generally call just the functions defined here For advanced/power users, you can call functions defined elsewhere in VPR or modify the data structures directly at your discretion but be aware that doing so can break the correctness of VPR
|
static |
|
static |
|
static |
|
static |
Free architecture data structures.
|
static |
|
static |
|
static |
Since the parameters of a switch may change as a function of its fanin, to get an estimation of inter-cluster delays we need a reasonable estimation of the fan-ins of switches that connect clusters together. These switches are 1) opin to wire switch 2) wire to wire switch 3) wire to ipin switch We can estimate the fan-in of these switches based on the Fc_in/Fc_out of a logic block, and the switch block Fs value
void vpr_analysis | ( | t_vpr_setup & | vpr_setup, |
const t_arch & | Arch, | ||
const RouteStatus & | route_status | ||
) |
Perform post-implementation analysis.
bool vpr_analysis_flow | ( | t_vpr_setup & | vpr_setup, |
const t_arch & | Arch, | ||
const RouteStatus & | route_status | ||
) |
Perform or skips the analysis stage.
void vpr_check_arch | ( | const t_arch & | Arch | ) |
Check inputs are reasonable.
void vpr_check_setup | ( | const t_packer_opts & | PackerOpts, |
const t_placer_opts & | PlacerOpts, | ||
const t_router_opts & | RouterOpts, | ||
const t_det_routing_arch & | RoutingArch, | ||
const std::vector< t_segment_inf > & | Segments, | ||
const t_timing_inf & | Timing, | ||
const t_chan_width_dist & | Chans | ||
) |
Verify settings don't conflict or otherwise not make sense.
void vpr_close_graphics | ( | const t_vpr_setup & | ) |
void vpr_create_device | ( | t_vpr_setup & | vpr_setup, |
const t_arch & | arch | ||
) |
Create the device (grid + rr graph)
void vpr_create_device_grid | ( | const t_vpr_setup & | vpr_setup, |
const t_arch & | Arch | ||
) |
Allocs globals: chan_width_x, chan_width_y, device_ctx.grid.
Create the device grid.
Depends on num_clbs, pins_per_clb
void vpr_create_rr_graph | ( | t_vpr_setup & | vpr_setup, |
const t_arch & | arch, | ||
int | chan_width_fac | ||
) |
Create routing graph at specified channel width.
bool vpr_flow | ( | t_vpr_setup & | vpr_setup, |
t_arch & | arch | ||
) |
void vpr_free_all | ( | t_arch & | Arch, |
t_vpr_setup & | vpr_setup | ||
) |
void vpr_free_vpr_data_structures | ( | t_arch & | Arch, |
t_vpr_setup & | vpr_setup | ||
) |
void vpr_init | ( | const int | argc, |
const char ** | argv, | ||
t_options * | options, | ||
t_vpr_setup * | vpr_setup, | ||
t_arch * | arch | ||
) |
Initialize VPR.
void vpr_init_graphics | ( | const t_vpr_setup & | vpr_setup, |
const t_arch & | arch | ||
) |
void vpr_init_with_options | ( | const t_options * | options, |
t_vpr_setup * | vpr_setup, | ||
t_arch * | arch | ||
) |
Initialize VPR with options.
void vpr_initialize_logging | ( | ) |
void vpr_load_packing | ( | t_vpr_setup & | vpr_setup, |
const t_arch & | arch | ||
) |
Loads a previous packing.
void vpr_load_placement | ( | t_vpr_setup & | vpr_setup, |
const t_arch & | arch | ||
) |
Loads a previous placement
RouteStatus vpr_load_routing | ( | t_vpr_setup & | vpr_setup, |
const t_arch & | , | ||
int | fixed_channel_width, | ||
std::shared_ptr< SetupHoldTimingInfo > | timing_info, | ||
ClbNetPinsMatrix< float > & | net_delay | ||
) |
Loads a previous routing.
bool vpr_pack | ( | t_vpr_setup & | vpr_setup, |
const t_arch & | arch | ||
) |
Perform packing.
bool vpr_pack_flow | ( | t_vpr_setup & | vpr_setup, |
const t_arch & | arch | ||
) |
Perform, load or skip the packing stage.
void vpr_place | ( | t_vpr_setup & | vpr_setup, |
const t_arch & | arch | ||
) |
Perform placement.
bool vpr_place_flow | ( | t_vpr_setup & | vpr_setup, |
const t_arch & | arch | ||
) |
Perform, load or skip the placement stage.
void vpr_power_estimation | ( | const t_vpr_setup & | vpr_setup, |
const t_arch & | Arch, | ||
const SetupTimingInfo & | timing_info, | ||
const RouteStatus & | route_status | ||
) |
Pperforms power estimation.
It relies on the placement/routing results, as well as the critical path. Power estimation can be performed as part of a full or partial flow. More information on the power estimation functions of VPR can be found here: http://docs.verilogtorouting.org/en/latest/vtr/power_estimation/
void vpr_print_args | ( | int | argc, |
const char ** | argv | ||
) |
void vpr_print_error | ( | const VprError & | vpr_error | ) |
Prints user file or internal errors for VPR.
void vpr_print_title | ( | ) |
Display general VPR information.
void vpr_read_options | ( | const int | argc, |
const char ** | argv, | ||
t_options * | options | ||
) |
Read in user options.
RouteStatus vpr_route_fixed_W | ( | t_vpr_setup & | vpr_setup, |
const t_arch & | arch, | ||
int | fixed_channel_width, | ||
std::shared_ptr< SetupHoldTimingInfo > | timing_info, | ||
std::shared_ptr< RoutingDelayCalculator > | delay_calc, | ||
ClbNetPinsMatrix< float > & | net_delay | ||
) |
Perform routing at a fixed channel width)
RouteStatus vpr_route_flow | ( | t_vpr_setup & | vpr_setup, |
const t_arch & | arch | ||
) |
Perform, load or skip the routing stage.
RouteStatus vpr_route_min_W | ( | t_vpr_setup & | vpr_setup, |
const t_arch & | arch, | ||
std::shared_ptr< SetupHoldTimingInfo > | timing_info, | ||
std::shared_ptr< RoutingDelayCalculator > | delay_calc, | ||
ClbNetPinsMatrix< float > & | net_delay | ||
) |
Perform routing to find the minimum channel width.
void vpr_setup_clock_networks | ( | t_vpr_setup & | vpr_setup, |
const t_arch & | Arch | ||
) |
void vpr_setup_vpr | ( | t_options * | Options, |
const bool | TimingEnabled, | ||
const bool | readArchFile, | ||
t_file_name_opts * | FileNameOpts, | ||
t_arch * | Arch, | ||
t_model ** | user_models, | ||
t_model ** | library_models, | ||
t_netlist_opts * | NetlistOpts, | ||
t_packer_opts * | PackerOpts, | ||
t_placer_opts * | PlacerOpts, | ||
t_annealing_sched * | AnnealSched, | ||
t_router_opts * | RouterOpts, | ||
t_analysis_opts * | AnalysisOpts, | ||
t_det_routing_arch * | RoutingArch, | ||
std::vector< t_lb_type_rr_node > ** | PackerRRGraph, | ||
std::vector< t_segment_inf > & | Segments, | ||
t_timing_inf * | Timing, | ||
bool * | ShowGraphics, | ||
int * | GraphPause, | ||
bool * | SaveGraphics, | ||
std::string * | GraphicsCommands, | ||
t_power_opts * | PowerOpts | ||
) |
Read in arch and circuit.
void vpr_show_setup | ( | const t_vpr_setup & | vpr_setup | ) |
Show current setup.