本文整理汇总了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;
}
示例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;
}
示例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 "";
}