mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-04 05:19:11 +00:00 
			
		
		
		
	Split module ports, 20 per line
This commit is contained in:
		
							parent
							
								
									d8f6d7b18d
								
							
						
					
					
						commit
						ff8e999a71
					
				
					 1 changed files with 2 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -2062,6 +2062,7 @@ void dump_module(std::ostream &f, std::string indent, RTLIL::Module *module)
 | 
			
		|||
	dump_attributes(f, indent, module->attributes, '\n', /*modattr=*/true);
 | 
			
		||||
	f << stringf("%s" "module %s(", indent.c_str(), id(module->name, false).c_str());
 | 
			
		||||
	bool keep_running = true;
 | 
			
		||||
	int cnt = 0;
 | 
			
		||||
	for (int port_id = 1; keep_running; port_id++) {
 | 
			
		||||
		keep_running = false;
 | 
			
		||||
		for (auto wire : module->wires()) {
 | 
			
		||||
| 
						 | 
				
			
			@ -2070,6 +2071,7 @@ void dump_module(std::ostream &f, std::string indent, RTLIL::Module *module)
 | 
			
		|||
					f << stringf(", ");
 | 
			
		||||
				f << stringf("%s", id(wire->name).c_str());
 | 
			
		||||
				keep_running = true;
 | 
			
		||||
				if (cnt==20) { f << stringf("\n"); cnt = 0; } else cnt++;
 | 
			
		||||
				continue;
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue