mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-13 17:36:16 +00:00
Coding style corrections in SatHelper::dump_model_to_vcd()
This commit is contained in:
parent
61a2bf57b4
commit
32af10fa9b
1 changed files with 31 additions and 31 deletions
|
@ -643,7 +643,7 @@ struct SatHelper
|
|||
|
||||
time_t timestamp;
|
||||
struct tm* now;
|
||||
char stime[128] = {0};
|
||||
char stime[128] = {};
|
||||
time(×tamp);
|
||||
now = localtime(×tamp);
|
||||
strftime(stime, sizeof(stime), "%c", now);
|
||||
|
@ -669,7 +669,8 @@ struct SatHelper
|
|||
|
||||
fprintf(f, "$timescale 1ns\n"); // arbitrary time scale since actual clock period is unknown/unimportant
|
||||
fprintf(f, "$scope module %s $end\n", module->name.c_str());
|
||||
for (auto &info : modelInfo) {
|
||||
for (auto &info : modelInfo)
|
||||
{
|
||||
if (vcdnames.find(info.description) != vcdnames.end())
|
||||
continue;
|
||||
|
||||
|
@ -716,13 +717,12 @@ struct SatHelper
|
|||
fprintf(f, "$end\n");
|
||||
else
|
||||
fprintf(f, "#%d\n", info.timestep);
|
||||
|
||||
last_timestep = info.timestep;
|
||||
}
|
||||
|
||||
if(info.width == 1)
|
||||
if(info.width == 1) {
|
||||
fprintf(f, "%c%s\n", bitvals[value.bits[0]], vcdnames[info.description].c_str());
|
||||
else {
|
||||
} else {
|
||||
fprintf(f, "b");
|
||||
for(int k=info.width-1; k >= 0; k --) //need to flip bit ordering for VCD
|
||||
fprintf(f, "%c", bitvals[value.bits[k]]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue