1 #ifndef _VPPC_SIM_LIB_H_FILE_
2 #define _VPPC_SIM_LIB_H_FILE_
15 #define ull unsigned int
16 #define dull unsigned long long
17 #define sull 32 // size of unsigned __int32
18 #define sdull 64 // size of double variable
19 #define mull (0xffffffffUL) // max value
20 #define mdull (0xffffffffffffffffULL)
22 #define max_temp_sig 64 // has to be power of 2
23 #define temp_i_mask (max_temp_sig - 1) // temp signal index mask
25 #define const__p const_s_p
28 #define repeat(a) for (int __rep_counter__ = 0; __rep_counter__ < a; __rep_counter__++)
29 #define Swrite(cl, ...) Sfwrite(stdout_sig, cl, ##__VA_ARGS__)
30 #define Sdisplay(cl, ...) Sfwrite(stdout_sig, (std::string)cl + "\n", ##__VA_ARGS__)
31 #define Sfdisplay(fd,cl, ...) Sfwrite(fd, (std::string)cl + "\n", ##__VA_ARGS__)
42 void bw(
size_t ih,
size_t il);
61 void bw(
size_t h,
size_t l);
friend void clk_drive(signal_ &clk, unsigned int v)
void Sfwrite(signal_ &fd, std::string format,...)
signal_ & operator[](unsigned int i)
signal_ & operator,(signal_ &arg)
signal_ & operator|(signal_ &arg)
void attach(signal_ &src)
signal_ Sfopen(std::string fname, std::string mode="w")
signal_ & operator%=(signal_ &arg)
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
signal_ & operator()(unsigned int hn, unsigned int ln)
signal_ & operator+=(signal_ &arg)
unsigned int operator-(signal_ &arg)
void add_dim(size_t h, size_t l)
signal_ & const_s(size_t sz, unsigned long long val)
signal_ & operator-=(signal_ &arg)
friend unsigned int uand(signal_ &)
int Ssscanf(signal_ &line, std::string format,...)
void bw(size_t ih, size_t il)
int Sfgets(signal_ &line, signal_ &fd)
unsigned int operator--(int)
void set_ull(size_t bnum, size_t bcnt, unsigned int val)
signal_ & operator&(signal_ &arg)
void add_dim(size_t h, size_t l)
unsigned int get_ull(size_t bnum)
signal_ & const_l(size_t sz, size_t count,...)
unsigned int operator++(int)
signal_ & bm(unsigned int sn, unsigned int lng)
friend unsigned int uor(signal_ &)
signal_ & operator^=(signal_ &arg)
signal_ & operator/=(signal_ &arg)
friend signal_ & const_l(size_t sz, size_t count,...)
signal_ & operator=(signal_ &oth)
friend signal_ & const_s(size_t sz, unsigned long long val)
unsigned int const_(size_t sz, unsigned int val)
friend unsigned int uxor(signal_ &)
signal_storage & operator[](unsigned int i)
unsigned int operator%(signal_ &arg)
void Sreadmemh(std::string fname, signal_ &dest, size_t adr=0)
unsigned int operator<=(signal_ &arg)
friend bool posedge(signal_ &)
signal_ & operator|=(signal_ &arg)
signal_ & const_s_p(size_t sz, unsigned long long val)
unsigned int operator==(signal_ &arg)
unsigned int operator/(signal_ &arg)
friend signal_ & const_s_p(size_t sz, unsigned long long val)
friend unsigned int const_(size_t sz, unsigned int val)
unsigned int operator+(signal_ &arg)
void Sfclose(signal_ &fd)
unsigned int operator>(signal_ &arg)
unsigned int operator>=(signal_ &arg)
signal_ & const_l_p(size_t sz, size_t count,...)
friend signal_ & const_l_p(size_t sz, size_t count,...)
signal_ & operator^(signal_ &arg)
void bw(size_t h, size_t l)
friend bool negedge(signal_ &)
unsigned int operator!=(signal_ &arg)
void set_storage(signal_storage *st)
unsigned int operator<(signal_ &arg)
signal_ & bp(unsigned int sn, unsigned int lng)
signal_ & operator&=(signal_ &arg)