CMS 3D CMS Logo

Macros | Functions | Variables
vlib.cc File Reference
#include <L1Trigger/CSCCommonTrigger/interface/vlib.h>

Go to the source code of this file.

Macros

#define binop(op, cop)
 
#define compop(op, cop)
 
#define dbgmsg(a)   std::cerr << a << " Set breakpoint at " << __FILE__ << ":" << __LINE__ << "\n";
 
#define unop(op, cop)
 

Functions

std::ostream & operator<< (std::ostream &stream, Signal s)
 
Signal rand (Signal arg)
 
Signal ror (Signal arg)
 
Signal rxor (Signal arg)
 

Variables

globcontrol glc
 
char const * obnames []
 

Macro Definition Documentation

#define binop (   op,
  cop 
)
Value:
Signal Signal::op (Signal arg) \
{ \
int ln = h - l; \
int aln = arg.h - arg.l; \
t.init((ln > aln) ? ln : aln, 0, ""); \
t.r = t.mask & (getval() cop arg.getval()); \
return t; \
}
A arg
Definition: Factorize.h:37
return(e1-e2)*(e1-e2)+dp *dp
Definition: vlib.h:39

Definition at line 337 of file vlib.cc.

#define compop (   op,
  cop 
)
Value:
Signal Signal::op (Signal arg) \
{ \
t.init(""); \
t.r = (getval() cop arg.getval()); \
return t; \
}
A arg
Definition: Factorize.h:37
return(e1-e2)*(e1-e2)+dp *dp
Definition: vlib.h:39

Definition at line 409 of file vlib.cc.

#define dbgmsg (   a)    std::cerr << a << " Set breakpoint at " << __FILE__ << ":" << __LINE__ << "\n";
#define unop (   op,
  cop 
)
Value:
Signal Signal::op () \
{ \
t.init(h, l, ""); \
t.r = mask & (cop getval()); \
}
return(e1-e2)*(e1-e2)+dp *dp
Definition: vlib.h:39

Definition at line 303 of file vlib.cc.

Function Documentation

std::ostream& operator<< ( std::ostream &  stream,
Signal  s 
)

Definition at line 616 of file vlib.cc.

References Signal::getr(), and Signal::setprintable().

617 {
618  stream << s.getr();
619  s.setprintable(0);
620  return stream;
621 }
rval getr()
Definition: vlib.h:61
void setprintable(int p)
Definition: vlib.h:79
Signal rand ( Signal  arg)

Definition at line 442 of file vlib.cc.

References Signal::getval(), Signal::init(), Signal::mask, Signal::printable, Signal::r, and lumiQTWidget::t.

Referenced by EcalTrivialObjectAnalyzer::analyze(), SiStripDetVOffFakeBuilder::analyze(), SiStripFedCablingBuilderFromDb::buildFecCablingFromDetIds(), HFCherenkov::computeNPE(), HFCherenkov::computeNPEinPMT(), HFCherenkov::computeNPhTrapped(), HiCentralityBiasFilter::filter(), EcalTestDevDB::generateEcalADCToGeVConstant(), EcalTestDevDB::generateEcalGainRatios(), EcalTestDevDB::generateEcalIntercalibConstants(), EcalTestDevDB::generateEcalPedestals(), EcalTestDevDB::generateEcalTBWeights(), HCAL_HLX::TCPReceiver::GenerateRandomData(), Exhume::Event::GetLastSeed(), Qjets::GetNextDistance(), HcalAssistant::getRandomQuote(), cond::auth::KeyGenerator::make(), cond::auth::KeyGenerator::makeWithRandomSize(), Phase2TrackerDigitizerAlgorithm::pixel_inefficiency(), SiPixelDigitizerAlgorithm::pixel_inefficiency(), CSCCrosstalkConditions::prefillCrosstalk(), CSCFakeCrosstalkConditions::prefillCrosstalk(), CSCFakeDBCrosstalk::prefillDBCrosstalk(), CSCFakeDBGains::prefillDBGains(), CSCFakeDBPedestals::prefillDBPedestals(), CSCGainsConditions::prefillGains(), CSCFakeGainsConditions::prefillGains(), CSCFakePedestalsConditions::prefillPedestals(), L1ExtraParticleMapProd::produce(), EcalTrivialConditionRetriever::produceEcalIntercalibConstants(), EcalTrivialConditionRetriever::produceEcalIntercalibConstantsMC(), EcalTrivialConditionRetriever::produceEcalLaserAlphas(), EcalTrivialConditionRetriever::produceEcalLaserAPDPNRatios(), EcalTrivialConditionRetriever::produceEcalLaserAPDPNRatiosRef(), EcalTrivialConditionRetriever::produceEcalLinearCorrections(), EcalTrivialConditionRetriever::produceEcalTimeCalibConstants(), ESTrivialConditionRetriever::produceESIntercalibConstants(), edm::DataMixingSiPixelMCDigiWorker::putSiPixel(), cond::randomChar(), L1RCT::randomInput(), L1RCTReceiverCard::randomInput(), CmsShowCommon::randomizeColors(), emtf::shuffle(), and HcalLutManager::test_xml_access().

443 {
444  Signal t;
445  rval tr;
446 #ifdef VGEN
447  t.name = "&" + arg.lb + arg.name + arg.rb;
448  arg.printable = 0;
449 #else
450  t.init("");
451 #endif
452  tr = (arg.getval()) & arg.mask;
453  t.r = (tr == arg.mask) ? 1 : 0;
454  return t;
455 }
rval mask
Definition: vlib.h:152
rval r
Definition: vlib.h:144
void init(int, int, const char *)
Definition: vlib.cc:239
rval getval()
Definition: vlib.cc:481
int printable
Definition: vlib.h:169
unsigned long long int rval
Definition: vlib.h:22
Definition: vlib.h:39
Signal ror ( Signal  arg)

Definition at line 427 of file vlib.cc.

References Signal::init(), Signal::printable, Signal::r, and lumiQTWidget::t.

428 {
429  Signal t;
430  rval tr;
431 #ifdef VGEN
432  t.name = "|" + arg.lb + arg.name + arg.rb;
433  arg.printable = 0;
434 #else
435  t.init("");
436 #endif
437  tr = (arg.getval()) & arg.mask;
438  t.r = (tr != 0) ? 1 : 0;
439  return t;
440 }
rval mask
Definition: vlib.h:152
rval r
Definition: vlib.h:144
void init(int, int, const char *)
Definition: vlib.cc:239
rval getval()
Definition: vlib.cc:481
int printable
Definition: vlib.h:169
unsigned long long int rval
Definition: vlib.h:22
Definition: vlib.h:39
Signal rxor ( Signal  arg)

Definition at line 457 of file vlib.cc.

References Signal::getval(), Signal::h, mps_fire::i, Signal::init(), Signal::l, Signal::mask, Signal::printable, Signal::r, and lumiQTWidget::t.

458 {
459  Signal t;
460  rval tr;
461  int i;
462 #ifdef VGEN
463  t.name = "^" + arg.lb + arg.name + arg.rb;
464  arg.printable = 0;
465 #else
466  t.init("");
467 #endif
468  tr = (arg.getval()) & arg.mask;
469  t.r = 0;
470  for (i = 0; i < arg.h-arg.l+1; ++i)
471  {
472  t.r = ((tr & 1) != 0) ? !t.r : t.r;
473  tr = tr >> 1;
474  }
475  t.r = t.r & 1;
476  return t;
477 }
rval mask
Definition: vlib.h:152
rval r
Definition: vlib.h:144
void init(int, int, const char *)
Definition: vlib.cc:239
rval getval()
Definition: vlib.cc:481
int h
Definition: vlib.h:150
int printable
Definition: vlib.h:169
int l
Definition: vlib.h:150
unsigned long long int rval
Definition: vlib.h:22
Definition: vlib.h:39

Variable Documentation

Verilog++ SP.

Author
A. Madorsky

Definition at line 6 of file vlib.cc.

Referenced by CmsShowCommonPopup::getColorSetColors().

char const* obnames[]
Initial value:
=
{
"none " ,
"reg " ,
"wire " ,
"input " ,
"output " ,
"inout " ,
"num " ,
"temp "
}

Definition at line 8 of file vlib.cc.

Referenced by Signal::clock(), Signal::initreg(), Signal::inout(), Signal::input(), Signal::output(), and Signal::wire().