SRC/CheckArch.c File Reference

#include <assert.h>
#include "util.h"
#include "vpr_types.h"
#include "globals.h"
#include "OptionTokens.h"
#include "ReadOptions.h"
#include "xml_arch.h"
#include "SetupVPR.h"
Include dependency graph for CheckArch.c:

Go to the source code of this file.

Functions

static void CheckSwitches (IN t_arch Arch, IN boolean TimingEnabled)
static void CheckSegments (IN t_arch Arch)
void CheckArch (IN t_arch Arch, IN boolean TimingEnabled)

Function Documentation

void CheckArch ( IN t_arch  Arch,
IN boolean  TimingEnabled 
)

Definition at line 19 of file CheckArch.c.

00021 {
00022         CheckSwitches(Arch, TimingEnabled);
00023         CheckSegments(Arch);
00024 }

Here is the call graph for this function:

Here is the caller graph for this function:

static void CheckSegments ( IN t_arch  Arch  )  [static]

Definition at line 67 of file CheckArch.c.

00067                                           {
00068         t_segment_inf *CurSeg;
00069     int i;
00070 
00071     CurSeg = Arch.Segments;
00072     for(i = 0; i < Arch.num_segments; i++)
00073         {
00074                 if(CurSeg[i].directionality == UNI_DIRECTIONAL && CurSeg[i].longline == TRUE) {
00075                         printf("Long lines not supported for unidirectional architectures\n");
00076                         exit(1);
00077                 }
00078         }
00079 }

Here is the caller graph for this function:

static void CheckSwitches ( IN t_arch  Arch,
IN boolean  TimingEnabled 
) [static]

Definition at line 27 of file CheckArch.c.

00029 {
00030     struct s_switch_inf *CurSwitch;
00031     int i;
00032 
00033     /* Check transistors in switches won't be less than minimum size */
00034     CurSwitch = Arch.Switches;
00035     for(i = 0; i < Arch.num_switches; i++)
00036         {
00037                 /* This assumes all segments have the same directionality */
00038                 if(CurSwitch->buffered && Arch.Segments[0].directionality == BI_DIRECTIONAL)
00039                 {
00040                     /* Largest resistance tri-state buffer would have a minimum 
00041                      * width transistor in the buffer pull-down and a min-width 
00042                      * pass transistoron the output.  
00043                      * Hence largest R = 2 * largest_transistor_R. */
00044                     if(CurSwitch->R > 2 * Arch.R_minW_nmos)
00045                         {
00046                             printf(ERRTAG
00047                                    "Switch %s R value (%g) is greater than "
00048                                    "2 * R_minW_nmos (%g).\n", CurSwitch->name,
00049                                    CurSwitch->R, (2 * Arch.R_minW_nmos));
00050                             exit(1);
00051                         }
00052                 }
00053             else
00054                 {               /* Pass transistor switch */
00055                     if(CurSwitch->R > Arch.R_minW_nmos)
00056                         {
00057                             printf(ERRTAG
00058                                    "Switch %s R value (%g) is greater than "
00059                                    "R_minW_nmos (%g).\n", CurSwitch->name,
00060                                    CurSwitch->R, Arch.R_minW_nmos);
00061                             exit(1);
00062                         }
00063                 }
00064         }
00065 }

Here is the caller graph for this function:


Generated on Tue Jan 5 15:25:17 2010 for VPR5.0 by  doxygen 1.6.1