1 #ifndef ORIGEN_HELPERS_INCLUDED
2 #define ORIGEN_HELPERS_INCLUDED
7 #include "../origen.hpp"
25 int64_t
toInt(
string,
int = 0);
26 uint64_t
toUInt(
string,
int = 0);
27 vector<string>
split(
const string&,
char);
28 void split(
const string&,
char, vector<string>&);
29 string toHex(
const uint64_t&);
30 string toStr(
const uint64_t&);
34 bool isPass(
double, LIMIT);
39 string lpad(
string,
int,
char);
40 string rpad(
string,
int,
char);
44 uint64_t
flip(uint64_t,
int);
45 string ltrim(
string,
const char* remove_chars =
" \n\t\r\f\v");
46 string rtrim(
string,
const char* remove_chars =
" \n\t\r\f\v");
47 string trim(
string,
const char* remove_chars =
" \n\t\r\f\v");
LIMIT noLimits()
Returns a LIMIT object with no limits enabled.
Definition: console.cpp:22
void logFunctionalTest(string name, int site, bool passed, string pattern)
Prints the result of a functional test to the console.
Definition: console.cpp:25
string downcase(string base)
Definition: misc.cpp:149
string checksum16bits(const string &mystring)
Definition: misc.cpp:425
double getUnitMultiplier(const string &units)
Definition: misc.cpp:366
string lpad(string base, int length, char fill)
Definition: misc.cpp:158
int second()
Get the Second.
Definition: time.cpp:58
string toStr(const uint64_t &val)
Definition: misc.cpp:132
bool isEven(uint64_t number)
Returns true if the given number is even.
Definition: misc.cpp:175
uint64_t flip(uint64_t input, int size)
Definition: misc.cpp:8
void initializeSites()
Definition: misc.cpp:344
int hour()
Get the Hour.
Definition: time.cpp:48
bool pinExists(const string &pinName)
Definition: misc.cpp:310
string trim(string str, const char *remove_chars)
Definition: misc.cpp:50
uint64_t toUInt(string str, int base)
See toInt, but returns an unsigned 64-bit integer.
Definition: misc.cpp:96
string upcase(string base)
Definition: misc.cpp:141
vector< string > split(const string &str, char delim)
Definition: misc.cpp:22
string toHex(const uint64_t &val)
Definition: misc.cpp:123
void logParametricTest(string name, int site, double result, LIMIT limits, string pin)
Prints the result of a parametric test to the console.
Definition: console.cpp:7
string extractPinsFromGroup(const string &groupname)
Supply a pin alias name and get the name of the physical pin returned.
Definition: misc.cpp:325
int day()
Get the Day.
Definition: time.cpp:43
int month()
Get the Month.
Definition: time.cpp:37
string getLabelFromBurst(const string &burst, const string &port)
Definition: misc.cpp:406
void reverseOverlaySubroutine(string subroutinePattern, string pin, uint64_t data, int size)
Same as overlaySubroutine but the data is applied in reverse order.
Definition: misc.cpp:238
bool isOdd(uint64_t number)
Returns true if the given number is odd.
Definition: misc.cpp:178
void synchronize(double timeout)
Definition: misc.cpp:292
string rpad(string base, int length, char fill)
Definition: misc.cpp:168
double calculateFrequency(const ARRAY_I &captureData, double periodInNs)
Definition: misc.cpp:272
void overlaySubroutineOutput(string subroutinePattern, string pin, uint64_t data, int size, int loOutputIndex, int hiOutputIndex)
Definition: misc.cpp:183
string ltrim(string str, const char *remove_chars)
Definition: misc.cpp:40
void initTime(bool reset)
Definition: time.cpp:23
int numberOfOnes(uint32_t i)
Returns the number of 1's (bits that are set) in the given 32-bit number.
Definition: misc.cpp:263
string rtrim(string str, const char *remove_chars)
Definition: misc.cpp:45
double calculatePeriod(const ARRAY_I &captureData, double periodInNs)
Definition: misc.cpp:286
string hiStr(LIMIT limits)
Definition: console.cpp:55
void overlaySubroutine(string subroutinePattern, string pin, uint64_t data, int size)
Definition: misc.cpp:214
int minute()
Get the Minute.
Definition: time.cpp:53
string loStr(LIMIT limits)
Definition: console.cpp:37
bool isPass(double val, LIMIT limits)
Returns true if the result is within the given limits.
Definition: console.cpp:71
int64_t toInt(string str, int base)
Definition: misc.cpp:66
int numberOfZeros(uint32_t i)
Returns the number of 0's (bits that are not set) in the given 32-bit number.
Definition: misc.cpp:270