mirror of https://github.com/YosysHQ/yosys.git
Use digit separators for large decimal integers
This commit is contained in:
parent
8f00c1824f
commit
8e2038c419
|
|
@ -90,11 +90,11 @@ int gettimeofday(struct timeval *tv, struct timezone *tz)
|
||||||
QueryPerformanceFrequency(&freq);
|
QueryPerformanceFrequency(&freq);
|
||||||
QueryPerformanceCounter(&counter);
|
QueryPerformanceCounter(&counter);
|
||||||
|
|
||||||
counter.QuadPart *= 1000000;
|
counter.QuadPart *= 1'000'000;
|
||||||
counter.QuadPart /= freq.QuadPart;
|
counter.QuadPart /= freq.QuadPart;
|
||||||
|
|
||||||
tv->tv_sec = long(counter.QuadPart / 1000000);
|
tv->tv_sec = long(counter.QuadPart / 1000000);
|
||||||
tv->tv_usec = counter.QuadPart % 1000000;
|
tv->tv_usec = counter.QuadPart % 1'000'000;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
@ -135,7 +135,7 @@ static void logv_string(std::string_view format, std::string str) {
|
||||||
initial_tv = tv;
|
initial_tv = tv;
|
||||||
if (tv.tv_usec < initial_tv.tv_usec) {
|
if (tv.tv_usec < initial_tv.tv_usec) {
|
||||||
tv.tv_sec--;
|
tv.tv_sec--;
|
||||||
tv.tv_usec += 1000000;
|
tv.tv_usec += 1'000'000;
|
||||||
}
|
}
|
||||||
tv.tv_sec -= initial_tv.tv_sec;
|
tv.tv_sec -= initial_tv.tv_sec;
|
||||||
tv.tv_usec -= initial_tv.tv_usec;
|
tv.tv_usec -= initial_tv.tv_usec;
|
||||||
|
|
|
||||||
|
|
@ -570,7 +570,7 @@ static void select_op_expand(RTLIL::Design *design, const std::string &arg, char
|
||||||
ct.setup(design);
|
ct.setup(design);
|
||||||
|
|
||||||
if (pos < int(arg.size()) && arg[pos] == '*') {
|
if (pos < int(arg.size()) && arg[pos] == '*') {
|
||||||
levels = 1000000;
|
levels = 1'000'000;
|
||||||
pos++;
|
pos++;
|
||||||
} else
|
} else
|
||||||
if (pos < int(arg.size()) && '0' <= arg[pos] && arg[pos] <= '9') {
|
if (pos < int(arg.size()) && '0' <= arg[pos] && arg[pos] <= '9') {
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ struct OptMuxtreeWorker
|
||||||
RTLIL::Module *module;
|
RTLIL::Module *module;
|
||||||
SigMap assign_map;
|
SigMap assign_map;
|
||||||
int removed_count;
|
int removed_count;
|
||||||
int glob_evals_left = 10000000;
|
int glob_evals_left = 10'000'000;
|
||||||
|
|
||||||
struct bitinfo_t {
|
struct bitinfo_t {
|
||||||
// Is bit directly used by non-mux cells or ports?
|
// Is bit directly used by non-mux cells or ports?
|
||||||
|
|
|
||||||
|
|
@ -40,10 +40,10 @@ int bindec(unsigned char v)
|
||||||
r += (~((v & 2) - 1)) & 10;
|
r += (~((v & 2) - 1)) & 10;
|
||||||
r += (~((v & 4) - 1)) & 100;
|
r += (~((v & 4) - 1)) & 100;
|
||||||
r += (~((v & 8) - 1)) & 1000;
|
r += (~((v & 8) - 1)) & 1000;
|
||||||
r += (~((v & 16) - 1)) & 10000;
|
r += (~((v & 16) - 1)) & 10'000;
|
||||||
r += (~((v & 32) - 1)) & 100000;
|
r += (~((v & 32) - 1)) & 100'000;
|
||||||
r += (~((v & 64) - 1)) & 1000000;
|
r += (~((v & 64) - 1)) & 1'000'000;
|
||||||
r += (~((v & 128) - 1)) & 10000000;
|
r += (~((v & 128) - 1)) & 10'000'000;
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue