VPR-7.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
vpr/SRC/main.c File Reference
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <time.h>
#include "vpr_api.h"
+ Include dependency graph for vpr/SRC/main.c:

Go to the source code of this file.

Functions

int main (int argc, char **argv)
 

Function Documentation

int main ( int  argc,
char **  argv 
)

VPR is a CAD tool used to conduct FPGA architecture exploration. It takes, as input, a technology-mapped netlist and a description of the FPGA architecture being investigated. VPR then generates a packed, placed, and routed FPGA (in .net, .place, and .route files respectively) that implements the input netlist.

This file is where VPR starts execution.

Key files in VPR:

  1. libarchfpga/physical_types.h - Data structures that define the properties of the FPGA architecture
  2. vpr_types.h - Very major file that defines the core data structures used in VPR. This includes detailed architecture information, user netlist data structures, and data structures that describe the mapping between those two.
  3. globals.h - Defines the global variables used by VPR. VPR program Generate FPGA architecture given architecture description Pack, place, and route circuit into FPGA architecture Electrical timing analysis on results

Overall steps

  1. Initialization
  2. Pack
  3. Place-and-route and timing analysis
  4. Clean up

Definition at line 33 of file vpr/SRC/main.c.

33  {
34  t_options Options;
35  t_arch Arch;
36  t_vpr_setup vpr_setup;
37  clock_t entire_flow_begin,entire_flow_end;
38 
39  entire_flow_begin = clock();
40 
41  /* Read options, architecture, and circuit netlist */
42  vpr_init(argc, argv, &Options, &vpr_setup, &Arch);
43 
44  /* If the user requests packing, do packing */
45  if (vpr_setup.PackerOpts.doPacking) {
46  vpr_pack(vpr_setup, Arch);
47  }
48 
49  if (vpr_setup.PlacerOpts.doPlacement || vpr_setup.RouterOpts.doRouting) {
50  vpr_init_pre_place_and_route(vpr_setup, Arch);
51  vpr_place_and_route(vpr_setup, Arch);
52 #if 0
53  if(vpr_setup.RouterOpts.doRouting) {
55  }
56 #endif
57  }
58 
59  if (vpr_setup.PowerOpts.do_power) {
60  vpr_power_estimation(vpr_setup, Arch);
61  }
62 
63  entire_flow_end = clock();
64 
65  #ifdef CLOCKS_PER_SEC
66  vpr_printf(TIO_MESSAGE_INFO, "The entire flow of VPR took %g seconds.\n", (float)(entire_flow_end - entire_flow_begin) / CLOCKS_PER_SEC);
67  #else
68  vpr_printf(TIO_MESSAGE_INFO, "The entire flow of VPR took %g seconds.\n", (float)(entire_flow_end - entire_flow_begin) / CLK_PER_SEC);
69  #endif
70 
71  /* free data structures */
72  vpr_free_all(Arch, Options, vpr_setup);
73 
74  /* Return 0 to single success to scripts */
75  return 0;
76 }
boolean doRouting
Definition: vpr_types.h:712
boolean doPacking
Definition: vpr_types.h:614
t_power_opts PowerOpts
Definition: vpr_types.h:1048
void vpr_init_pre_place_and_route(INP t_vpr_setup vpr_setup, INP t_arch Arch)
Definition: vpr_api.c:236
boolean do_power
Definition: vpr_types.h:1022
void vpr_pack(INP t_vpr_setup vpr_setup, INP t_arch arch)
Definition: vpr_api.c:372
void vpr_free_all(INOUTP t_arch Arch, INOUTP t_options options, INOUTP t_vpr_setup vpr_setup)
Definition: vpr_api.c:781
t_trace * vpr_resync_post_route_netlist_to_TI_CLAY_v1_architecture(INP const t_arch *arch)
Definition: vpr_api.c:865
struct s_placer_opts PlacerOpts
Definition: vpr_types.h:1039
void vpr_power_estimation(t_vpr_setup vpr_setup, t_arch Arch)
Definition: vpr_api.c:1424
struct s_packer_opts PackerOpts
Definition: vpr_types.h:1038
struct s_router_opts RouterOpts
Definition: vpr_types.h:1041
messagelogger vpr_printf
Definition: util.c:17
void vpr_init(INP int argc, INP char **argv, OUTP t_options *options, OUTP t_vpr_setup *vpr_setup, OUTP t_arch *arch)
Definition: vpr_api.c:161
boolean doPlacement
Definition: vpr_types.h:651
void vpr_place_and_route(INP t_vpr_setup vpr_setup, INP t_arch arch)
Definition: vpr_api.c:426

+ Here is the call graph for this function: