VPR-7.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
CheckArch.c File Reference
#include <assert.h>
#include "util.h"
#include "vpr_types.h"
#include "globals.h"
#include "OptionTokens.h"
#include "ReadOptions.h"
#include "read_xml_arch_file.h"
#include "SetupVPR.h"
+ Include dependency graph for CheckArch.c:

Go to the source code of this file.

Functions

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

Function Documentation

void CheckArch ( INP t_arch  Arch,
INP boolean  TimingEnabled 
)

Definition at line 17 of file CheckArch.c.

17  {
18  CheckSwitches(Arch, TimingEnabled);
19  CheckSegments(Arch);
20 }
static void CheckSegments(INP t_arch Arch)
Definition: CheckArch.c:51
static void CheckSwitches(INP t_arch Arch, INP boolean TimingEnabled)
Definition: CheckArch.c:22

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void CheckSegments ( INP t_arch  Arch)
static

Definition at line 51 of file CheckArch.c.

51  {
52  t_segment_inf *CurSeg;
53  int i;
54 
55  CurSeg = Arch.Segments;
56  for (i = 0; i < Arch.num_segments; i++) {
57  if (CurSeg[i].directionality == UNI_DIRECTIONAL
58  && CurSeg[i].longline == TRUE) {
59  vpr_printf(TIO_MESSAGE_ERROR, "Long lines not supported for unidirectional architectures.\n");
60  exit(1);
61  }
62  }
63 }
messagelogger vpr_printf
Definition: util.c:17
Definition: util.h:12

+ Here is the caller graph for this function:

static void CheckSwitches ( INP t_arch  Arch,
INP boolean  TimingEnabled 
)
static

Definition at line 22 of file CheckArch.c.

22  {
23  struct s_switch_inf *CurSwitch;
24  int i;
25 
26  /* Check transistors in switches won't be less than minimum size */
27  CurSwitch = Arch.Switches;
28  for (i = 0; i < Arch.num_switches; i++) {
29  /* This assumes all segments have the same directionality */
30  if (CurSwitch->buffered
31  && Arch.Segments[0].directionality == BI_DIRECTIONAL) {
32  /* Largest resistance tri-state buffer would have a minimum
33  * width transistor in the buffer pull-down and a min-width
34  * pass transistoron the output.
35  * Hence largest R = 2 * largest_transistor_R. */
36  if (CurSwitch->R > 2 * Arch.R_minW_nmos) {
37  vpr_printf(TIO_MESSAGE_ERROR, "Switch %s R value (%g) is greater than 2 * R_minW_nmos (%g).\n",
38  CurSwitch->name, CurSwitch->R, (2 * Arch.R_minW_nmos));
39  exit(1);
40  }
41  } else { /* Pass transistor switch */
42  if (CurSwitch->R > Arch.R_minW_nmos) {
43  vpr_printf(TIO_MESSAGE_ERROR, "Switch %s R value (%g) is greater than R_minW_nmos (%g).\n",
44  CurSwitch->name, CurSwitch->R, Arch.R_minW_nmos);
45  exit(1);
46  }
47  }
48  }
49 }
boolean buffered
messagelogger vpr_printf
Definition: util.c:17

+ Here is the caller graph for this function: