|
int | addr_to_ival (int addr) |
|
int | gen_inv (int i) |
|
void | initLUT (double offset) |
|
double | Ioffset () |
|
int | ival_to_addr (int ival) |
|
void | local_calculate () override |
|
double | offset () |
|
void | print (std::ofstream &fs, HLS, int l1=0, int l2=0, int l3=0) override |
|
void | print (std::ofstream &fs, Verilog, int l1=0, int l2=0, int l3=0) override |
|
void | set_mode (mode m) |
|
| VarInv (imathGlobals *globals, std::string name, VarBase *p1, double offset, int nbits, int n, unsigned int shift, mode m, int nbaddr=-1) |
|
void | writeLUT (std::ofstream &fs) const |
|
void | writeLUT (std::ofstream &fs, HLS) const |
|
void | writeLUT (std::ofstream &fs, Verilog) const |
|
| ~VarInv () override |
|
void | add_cut (VarCut *cut, const bool call_set_cut_var=true) |
|
void | add_delay (int i) |
|
void | add_latency (unsigned int l) |
|
void | analyze () |
|
bool | calculate () |
|
bool | calculate (int debug_level) |
|
VarBase * | cut_var () |
|
std::string | dump () |
|
void | dump_msg () |
|
double | fval () const |
|
bool | has_delay (int i) |
|
void | inputs (std::vector< VarBase * > *vd) |
|
long int | ival () const |
|
double | K () const |
|
std::map< std::string, int > | Kmap () const |
|
std::string | kstring () const |
|
int | latency () const |
|
bool | local_passes () const |
|
void | makeready () |
|
double | maxval () const |
|
double | minval () const |
|
std::string | name () const |
|
int | nbits () const |
|
std::string | op () const |
|
VarBase * | p1 () const |
|
VarBase * | p2 () const |
|
VarBase * | p3 () const |
|
void | passes (std::map< const VarBase *, std::vector< bool > > &passes, const std::map< const VarBase *, std::vector< bool > > *const previous_passes=nullptr) const |
|
int | pipe_counter () |
|
std::string | pipe_delays (const int step) |
|
void | pipe_increment () |
|
void | print_all (std::ofstream &fs, HLS) |
|
void | print_all (std::ofstream &fs, Verilog) |
|
void | print_cuts (std::map< const VarBase *, std::set< std::string > > &cut_strings, const int step, HLS, const std::map< const VarBase *, std::set< std::string > > *const previous_cut_strings=nullptr) const |
|
void | print_cuts (std::map< const VarBase *, std::set< std::string > > &cut_strings, const int step, Verilog, const std::map< const VarBase *, std::set< std::string > > *const previous_cut_strings=nullptr) const |
|
void | print_step (int step, std::ofstream &fs, HLS) |
|
void | print_step (int step, std::ofstream &fs, Verilog) |
|
void | print_truncation (std::string &t, const std::string &o1, const int ps, HLS) const |
|
void | print_truncation (std::string &t, const std::string &o1, const int ps, Verilog) const |
|
double | range () const |
|
void | reset () |
|
int | shift () const |
|
int | step () const |
|
| VarBase (imathGlobals *globals, std::string name, VarBase *p1, VarBase *p2, VarBase *p3, int l) |
|
virtual | ~VarBase () |
|
|
static void | design_print (std::vector< VarBase * > v, std::ofstream &fs, HLS) |
|
static void | design_print (std::vector< VarBase * > v, std::ofstream &fs, Verilog) |
|
static void | hls_print (std::vector< VarBase * > v, std::ofstream &fs) |
|
static std::string | itos (int i) |
|
static std::string | pipe_delay (VarBase *v, int nbits, int delay) |
|
static std::string | pipe_delay_wire (VarBase *v, std::string name_delayed, int nbits, int delay) |
|
static void | verilog_print (std::vector< VarBase * > v, std::ofstream &fs) |
|
static struct trklet::VarBase::HLS | hls |
|
static struct trklet::VarBase::Verilog | verilog |
|
Definition at line 955 of file imath.h.
trklet::VarInv::VarInv |
( |
imathGlobals * |
globals, |
|
|
std::string |
name, |
|
|
VarBase * |
p1, |
|
|
double |
offset, |
|
|
int |
nbits, |
|
|
int |
n, |
|
|
unsigned int |
shift, |
|
|
mode |
m, |
|
|
int |
nbaddr = -1 |
|
) |
| |
|
inline |
Definition at line 959 of file imath.h.
984 const std::map<std::string, int> map1 =
p1->
Kmap();
985 for (
const auto &it : map1)
986 Kmap_[it.first] = -it.second;
References addr_to_ival(), ashift_, reco::HaloData::both, gen_inv(), mps_fire::i, testProducerWithPsetDescEmpty_cfi::i1, createfilelist::int, trklet::VarBase::K(), trklet::VarBase::K_, trklet::VarBase::Kmap(), trklet::VarBase::Kmap_, visualization-live-secondInstance_cfg::m, m_, mask_, dqmiodumpmetadata::n, n_, nbaddr_, trklet::VarBase::nbits(), trklet::VarBase::nbits_, Nelements_, offset(), offset_, trklet::VarBase::op_, trklet::VarBase::p1(), trklet::VarBase::p1_, funct::pow(), trklet::VarBase::shift(), and shift_.
void VarInv::print |
( |
std::ofstream & |
fs, |
|
|
Verilog |
, |
|
|
int |
l1 = 0 , |
|
|
int |
l2 = 0 , |
|
|
int |
l3 = 0 |
|
) |
| |
|
overridevirtual |
Reimplemented from trklet::VarBase.
Definition at line 287 of file imath_Verilog.cc.
293 n1 = n1 +
"_delay" +
itos(l1);
297 t =
t +
"assign " +
t1 +
" = ";
302 fs <<
t <<
"; // address for the LUT\n";
309 fs <<
"Memory #( \n";
310 fs <<
" .RAM_WIDTH(" <<
nbits_ <<
"), // Specify RAM data width \n";
311 fs <<
" .RAM_DEPTH(" <<
Nelements_ <<
"), // Specify RAM depth (number of entries) \n";
312 fs <<
" .RAM_PERFORMANCE(\"HIGH_PERFORMANCE\"), // \"HIGH_PERFORMANCE\" = 2 clks latency \n";
313 fs <<
" .INIT_FILE() \n";
314 fs <<
" ) " <<
t2 <<
" ( \n";
315 fs <<
" .addra(" <<
itos(
nbaddr_) <<
"\'b0), // Write address bus, width determined from RAM_DEPTH \n";
316 fs <<
" .addrb(" <<
t1 <<
" ), // Read address bus, width determined from RAM_DEPTH \n";
317 fs <<
" .dina(" <<
itos(
nbits_) <<
"\'b0), // RAM input data, width determined from RAM_WIDTH \n";
318 fs <<
" .clka(clk), // Write clock \n";
319 fs <<
" .clkb(clk), // Read clock \n";
320 fs <<
" .wea(1\'b0), // Write enable \n";
321 fs <<
" .enb(1\'b1), // Read Enable, for additional power savings, disable when not in use \n";
322 fs <<
" .rstb(reset), // Output reset (does not affect memory contents) \n";
323 fs <<
" .regceb(1\'b1), // Output register enable \n";
324 fs <<
" .doutb(" <<
name_ <<
") // RAM output data, \n";
References cms::cuda::assert(), trklet::VarBase::itos(), mask_, trklet::VarBase::name(), trklet::VarBase::name_, nbaddr_, trklet::VarBase::nbits_, Nelements_, trklet::VarBase::p1_, shift_, AlCaHLTBitMon_QueryRunRegistry::string, submitPVValidationJobs::t, RandomServiceHelper::t1, and RandomServiceHelper::t2.