mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-04 05:19:11 +00:00 
			
		
		
		
	Ignore $scopeinfo in write_json
This commit is contained in:
		
							parent
							
								
									f31fb95963
								
							
						
					
					
						commit
						bbe39762ad
					
				
					 1 changed files with 4 additions and 0 deletions
				
			
		| 
						 | 
					@ -192,6 +192,10 @@ struct JsonWriter
 | 
				
			||||||
		for (auto c : module->cells()) {
 | 
							for (auto c : module->cells()) {
 | 
				
			||||||
			if (use_selection && !module->selected(c))
 | 
								if (use_selection && !module->selected(c))
 | 
				
			||||||
				continue;
 | 
									continue;
 | 
				
			||||||
 | 
								// Eventually we will want to emit $scopeinfo, but currently this
 | 
				
			||||||
 | 
								// will break JSON netlist consumers like nextpnr
 | 
				
			||||||
 | 
								if (c->type == ID($scopeinfo))
 | 
				
			||||||
 | 
									continue;
 | 
				
			||||||
			f << stringf("%s\n", first ? "" : ",");
 | 
								f << stringf("%s\n", first ? "" : ",");
 | 
				
			||||||
			f << stringf("        %s: {\n", get_name(c->name).c_str());
 | 
								f << stringf("        %s: {\n", get_name(c->name).c_str());
 | 
				
			||||||
			f << stringf("          \"hide_name\": %s,\n", c->name[0] == '$' ? "1" : "0");
 | 
								f << stringf("          \"hide_name\": %s,\n", c->name[0] == '$' ? "1" : "0");
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue