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 [] = {"none ", "reg ", "wire ", "input ", "output ", "inout ", "num ", "temp "}
 

Macro Definition Documentation

#define binop (   op,
  cop 
)
Value:
Signal Signal::op(Signal arg) { \
Signal t; \
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; \
}
rval getval()
Definition: vlib.cc:415
A arg
Definition: Factorize.h:36
return((rh^lh)&mask)
int h
Definition: vlib.h:145
int l
Definition: vlib.h:145
Definition: vlib.h:28

Definition at line 294 of file vlib.cc.

#define compop (   op,
  cop 
)
Value:
Signal Signal::op(Signal arg) { \
Signal t; \
t.init(""); \
t.r = (getval() cop arg.getval()); \
return t; \
}
rval getval()
Definition: vlib.cc:415
A arg
Definition: Factorize.h:36
return((rh^lh)&mask)
Definition: vlib.h:28

Definition at line 352 of file vlib.cc.

#define dbgmsg (   a)    std::cerr << a << " Set breakpoint at " << __FILE__ << ":" << __LINE__ << "\n";
#define unop (   op,
  cop 
)
Value:
Signal Signal::op() { \
Signal t; \
t.init(h, l, ""); \
t.r = mask & (cop getval()); \
return t; \
}
rval mask
Definition: vlib.h:147
rval getval()
Definition: vlib.cc:415
int h
Definition: vlib.h:145
int l
Definition: vlib.h:145
Definition: vlib.h:28

Definition at line 265 of file vlib.cc.

Function Documentation

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

Definition at line 538 of file vlib.cc.

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

538  {
539  stream << s.getr();
540  s.setprintable(0);
541  return stream;
542 }
rval getr()
Definition: vlib.h:52
void setprintable(int p)
Definition: vlib.h:74
Signal rand ( Signal  arg)

Definition at line 379 of file vlib.cc.

References Signal::getval(), Signal::init(), Signal::mask, Signal::printable, Signal::r, and OrderedSet::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(), cond::randomChar(), L1RCT::randomInput(), L1RCTReceiverCard::randomInput(), CmsShowCommon::randomizeColors(), emtf::shuffle(), and HcalLutManager::test_xml_access().

379  {
380  Signal t;
381  rval tr;
382 #ifdef VGEN
383  t.name = "&" + arg.lb + arg.name + arg.rb;
384  arg.printable = 0;
385 #else
386  t.init("");
387 #endif
388  tr = (arg.getval()) & arg.mask;
389  t.r = (tr == arg.mask) ? 1 : 0;
390  return t;
391 }
rval mask
Definition: vlib.h:147
rval r
Definition: vlib.h:140
void init(int, int, const char *)
Definition: vlib.cc:208
rval getval()
Definition: vlib.cc:415
int printable
Definition: vlib.h:164
unsigned long long int rval
Definition: vlib.h:21
Definition: vlib.h:28
Signal ror ( Signal  arg)

Definition at line 365 of file vlib.cc.

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

365  {
366  Signal t;
367  rval tr;
368 #ifdef VGEN
369  t.name = "|" + arg.lb + arg.name + arg.rb;
370  arg.printable = 0;
371 #else
372  t.init("");
373 #endif
374  tr = (arg.getval()) & arg.mask;
375  t.r = (tr != 0) ? 1 : 0;
376  return t;
377 }
rval mask
Definition: vlib.h:147
rval r
Definition: vlib.h:140
void init(int, int, const char *)
Definition: vlib.cc:208
rval getval()
Definition: vlib.cc:415
int printable
Definition: vlib.h:164
unsigned long long int rval
Definition: vlib.h:21
Definition: vlib.h:28
Signal rxor ( Signal  arg)

Definition at line 393 of file vlib.cc.

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

393  {
394  Signal t;
395  rval tr;
396  int i;
397 #ifdef VGEN
398  t.name = "^" + arg.lb + arg.name + arg.rb;
399  arg.printable = 0;
400 #else
401  t.init("");
402 #endif
403  tr = (arg.getval()) & arg.mask;
404  t.r = 0;
405  for (i = 0; i < arg.h - arg.l + 1; ++i) {
406  t.r = ((tr & 1) != 0) ? !t.r : t.r;
407  tr = tr >> 1;
408  }
409  t.r = t.r & 1;
410  return t;
411 }
rval mask
Definition: vlib.h:147
rval r
Definition: vlib.h:140
void init(int, int, const char *)
Definition: vlib.cc:208
rval getval()
Definition: vlib.cc:415
int h
Definition: vlib.h:145
int printable
Definition: vlib.h:164
int l
Definition: vlib.h:145
unsigned long long int rval
Definition: vlib.h:21
Definition: vlib.h:28

Variable Documentation

Verilog++ SP.

Author
A. Madorsky

Definition at line 5 of file vlib.cc.

Referenced by CmsShowCommonPopup::getColorSetColors().

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