⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 checkarch.c

📁 用于学术研究的FPGA布局布线软件VPR
💻 C
字号:
#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"/******** Function Prototypes ********/static void CheckSwitches(IN t_arch Arch,			  IN boolean TimingEnabled);static void CheckSegments(IN t_arch Arch);/******** Function Implementations ********/voidCheckArch(IN t_arch Arch,	  IN boolean TimingEnabled){	CheckSwitches(Arch, TimingEnabled);	CheckSegments(Arch);}static voidCheckSwitches(IN t_arch Arch,	      IN boolean TimingEnabled){    struct s_switch_inf *CurSwitch;    int i;    /* Check transistors in switches won't be less than minimum size */    CurSwitch = Arch.Switches;    for(i = 0; i < Arch.num_switches; i++)	{		/* This assumes all segments have the same directionality */		if(CurSwitch->buffered && Arch.Segments[0].directionality == BI_DIRECTIONAL)		{		    /* Largest resistance tri-state buffer would have a minimum 		     * width transistor in the buffer pull-down and a min-width 		     * pass transistoron the output.  		     * Hence largest R = 2 * largest_transistor_R. */		    if(CurSwitch->R > 2 * Arch.R_minW_nmos)			{			    printf(ERRTAG				   "Switch %s R value (%g) is greater than "				   "2 * R_minW_nmos (%g).\n", CurSwitch->name,				   CurSwitch->R, (2 * Arch.R_minW_nmos));			    exit(1);			}		}	    else		{		/* Pass transistor switch */		    if(CurSwitch->R > Arch.R_minW_nmos)			{			    printf(ERRTAG				   "Switch %s R value (%g) is greater than "				   "R_minW_nmos (%g).\n", CurSwitch->name,				   CurSwitch->R, Arch.R_minW_nmos);			    exit(1);			}		}	}}static void CheckSegments(IN t_arch Arch) {	t_segment_inf *CurSeg;    int i;    CurSeg = Arch.Segments;    for(i = 0; i < Arch.num_segments; i++)	{		if(CurSeg[i].directionality == UNI_DIRECTIONAL && CurSeg[i].longline == TRUE) {			printf("Long lines not supported for unidirectional architectures\n");			exit(1);		}	}}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -