SRC/route_breadth_first.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

boolean try_breadth_first_route (struct s_router_opts router_opts, t_ivec **fb_opins_used_locally, int width_fac)

Function Documentation

boolean try_breadth_first_route ( struct s_router_opts  router_opts,
t_ivec **  fb_opins_used_locally,
int  width_fac 
)

Definition at line 31 of file route_breadth_first.c.

00034 {
00035 
00036 /* Iterated maze router ala Pathfinder Negotiated Congestion algorithm,  *
00037  * (FPGA 95 p. 111).  Returns TRUE if it can route this FPGA, FALSE if   *
00038  * it can't.                                                             */
00039 
00040     float pres_fac;
00041     boolean success, is_routable, rip_up_local_opins;
00042     int itry, inet;
00043 
00044 /* Usually the first iteration uses a very small (or 0) pres_fac to find  *
00045  * the shortest path and get a congestion map.  For fast compiles, I set  *
00046  * pres_fac high even for the first iteration.                            */
00047 
00048     pres_fac = router_opts.first_iter_pres_fac;
00049 
00050     for(itry = 1; itry <= router_opts.max_router_iterations; itry++)
00051         {
00052 
00053             for(inet = 0; inet < num_nets; inet++)
00054                 {
00055                     if(net[inet].is_global == FALSE)
00056                         {       /* Skip global nets. */
00057 
00058                             pathfinder_update_one_cost(trace_head[inet], -1,
00059                                                        pres_fac);
00060 
00061                             is_routable =
00062                                 breadth_first_route_net(inet,
00063                                                         router_opts.
00064                                                         bend_cost);
00065 
00066                             /* Impossible to route? (disconnected rr_graph) */
00067 
00068                             if(!is_routable)
00069                                 {
00070                                     printf("Routing failed.\n");
00071                                     return (FALSE);
00072                                 }
00073 
00074                             pathfinder_update_one_cost(trace_head[inet], 1,
00075                                                        pres_fac);
00076 
00077                         }
00078                 }
00079 
00080             /* Make sure any FB OPINs used up by subblocks being hooked directly     *
00081              * to them are reserved for that purpose.                                 */
00082 
00083             if(itry == 1)
00084                 rip_up_local_opins = FALSE;
00085             else
00086                 rip_up_local_opins = TRUE;
00087 
00088             reserve_locally_used_opins(pres_fac, rip_up_local_opins,
00089                                        fb_opins_used_locally);
00090 
00091             success = feasible_routing();
00092             if(success)
00093                 {
00094                     printf
00095                         ("Successfully routed after %d routing iterations.\n",
00096                          itry);
00097                     return (TRUE);
00098                 }
00099 
00100             if(itry == 1)
00101                         pres_fac = router_opts.initial_pres_fac;
00102             else
00103                         pres_fac *= router_opts.pres_fac_mult;
00104 
00105                 pres_fac = min (pres_fac, HUGE_FLOAT / 1e5);
00106 
00107             pathfinder_update_cost(pres_fac, router_opts.acc_fac);
00108         }
00109 
00110     printf("Routing failed.\n");
00111     return (FALSE);
00112 }

Here is the call graph for this function:

Here is the caller graph for this function:


Generated on Tue Jan 5 15:26:05 2010 for VPR5.0 by  doxygen 1.6.1