当前位置: 首页>>代码示例>>C++>>正文


C++ Signal::getName方法代码示例

本文整理汇总了C++中Signal::getName方法的典型用法代码示例。如果您正苦于以下问题:C++ Signal::getName方法的具体用法?C++ Signal::getName怎么用?C++ Signal::getName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Signal的用法示例。


在下文中一共展示了Signal::getName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: TestCase

	// This method is cloned from Operator, just resetting sign and exception bits
	// (because we don't have any exception support in this toy example)
	TestCase* FPSumOf3Squares::buildRandomTestCase(int i){

		TestCase *tc;
		/* Generate test cases using random input numbers */
			tc = new TestCase(this); // TODO free all this memory when exiting TestBench
			/* Fill inputs */
			for (unsigned int j = 0; j < ioList_.size(); j++) {
				Signal* s = ioList_[j]; 
				if (s->type() == Signal::in) {
					// ****** Modification: positive normal numbers with small exponents 
					mpz_class m = getLargeRandom(wF);
					mpz_class bias = (mpz_class(1)<<(wE-1)) - 1; 
					mpz_class e = getLargeRandom(wE-2) - (mpz_class(1)<<(wE-3)) + bias; // ensure no overflow
					mpz_class a = (mpz_class(1)<<(wE+wF+1)) // 01 to denote a normal number
						+ (e<<wF) + m;
					tc->addInput(s->getName(), a);
				}
			}
			/* Get correct outputs */
			emulate(tc);

			//		cout << tc->getInputVHDL();
			//    cout << tc->getExpectedOutputVHDL();

			return tc;
	}
开发者ID:jpdoyle,项目名称:flopoco,代码行数:28,代码来源:FPSumOf3Squares.cpp

示例2: main

int main( void ) {
	
	s1.setParameters( 3,2 );
	
	WRITE(2,&qfin);
	WRITE(2,&qfin);
	WRITE(2,&qfin);
	WRITE(3,&qfin2);	

	READ(3,qfout); // No data available yet
	READ(4,qfout);
	DUMP();
	READ(4,qfout);
	READ(4,qfout);
	
	cout << "Value QFOUT: " << (*qfout) << endl;
	
	READ(5,qfout);
	
	cout << "Value QFOUT: " << (*qfout) << endl;

	WRITE(7,&qfin); // READ in  9
	WRITE(8,&qfin); // READ in 10
	
	//DUMP();


	cout << "Name: \"" << s1.getName() << "\"" << endl;
	cout << "Bandwidth: " << s1.getBandwidth() << endl;
	cout << "Latency: " << s1.getLatency() << endl;

	return 0;
}
开发者ID:prabindh,项目名称:attila-sim,代码行数:33,代码来源:testSignals.cpp

示例3: getClkName

std::string  Operator::getClkName() {
    int size = getIOListSize();
    for (int i = 0; i<size; i++) {
      Signal *s = getIOListSignal(i);
      if (s->isClk() == 1) { 
        return s->getName();
      }
    }
    return "";
}
开发者ID:BBBSnowball,项目名称:PivPav,代码行数:10,代码来源:Operator.cpp


注:本文中的Signal::getName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。