279 for (
auto it = module->attributes.begin(); it != module->attributes.end(); it++) {
280 f <<
stringf(
"%s" "attribute %s ", indent.c_str(), it->first.c_str());
290 std::vector<RTLIL::Wire*> sorted_wires;
291 for (
auto it : module->
wires())
292 sorted_wires.push_back(it);
295 std::vector<RTLIL::Memory*> sorted_memories;
297 sorted_memories.push_back(it.second);
300 std::vector<RTLIL::Cell*> sorted_cells;
301 for (
auto it : module->
cells())
302 sorted_cells.push_back(it);
305 std::vector<RTLIL::Process*> sorted_processes;
307 sorted_processes.push_back(it.second);
310 for (
auto it : sorted_wires)
311 if (!only_selected || design->
selected(module, it)) {
317 for (
auto it : sorted_memories)
318 if (!only_selected || design->
selected(module, it)) {
324 for (
auto it : sorted_cells)
325 if (!only_selected || design->
selected(module, it)) {
331 for (
auto it : sorted_processes)
332 if (!only_selected || design->
selected(module, it)) {
338 bool first_conn_line =
true;
340 bool show_conn = !only_selected;
344 for (
auto &c : sigs.
chunks()) {
351 if (only_selected && first_conn_line)
353 dump_conn(f, indent +
" ", it->first, it->second);
354 first_conn_line =
false;
360 f <<
stringf(
"%s" "end\n", indent.c_str());
const char * c_str() const
bool selected(T1 *module) const
RTLIL::Wire * wire(RTLIL::IdString id)
std::string stringf(const char *fmt,...)
void sort(T *array, int size, LessThan lt)
void dump_wire(std::ostream &f, std::string indent, RTLIL::Wire *wire)
const std::vector< RTLIL::SigSig > & connections() const
RTLIL::ObjRange< RTLIL::Wire * > wires()
std::map< RTLIL::IdString, RTLIL::Memory * > memories
void dump_conn(std::ostream &f, std::string indent, const RTLIL::SigSpec &left, const RTLIL::SigSpec &right)
void dump_cell(std::ostream &f, std::string indent, RTLIL::Cell *cell)
bool selected_whole_module(RTLIL::IdString mod_name) const
void dump_const(std::ostream &f, const RTLIL::Const &data, int width=-1, int offset=0, bool no_decimal=false, bool set_signed=false)
std::map< RTLIL::IdString, RTLIL::Process * > processes
RTLIL::ObjRange< RTLIL::Cell * > cells()
void append(const RTLIL::SigSpec &signal)
void dump_memory(std::ostream &f, std::string indent, RTLIL::Memory *memory)
void dump_proc(std::ostream &f, std::string indent, const RTLIL::Process *proc)
const std::vector< RTLIL::SigChunk > & chunks() const