3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-06-06 06:03:23 +00:00

Added log_cell()

This commit is contained in:
Clifford Wolf 2014-07-20 10:35:47 +02:00
parent 15fd615da5
commit a6174aaf5e
2 changed files with 17 additions and 0 deletions

View file

@ -213,3 +213,18 @@ const char *log_id(std::string str)
string_buf.push_back(str);
return string_buf.back().c_str();
}
void log_cell(RTLIL::Cell *cell, std::string indent)
{
char *ptr;
size_t size;
FILE *f = open_memstream(&ptr, &size);
ILANG_BACKEND::dump_cell(f, indent, cell);
fputc(0, f);
fclose(f);
log("%s", ptr);
free(ptr);
}