mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-04 13:29:12 +00:00 
			
		
		
		
	Add "synth_sf2 -vlog", fix "synth_sf2 -edif"
Signed-off-by: Clifford Wolf <clifford@clifford.at>
This commit is contained in:
		
							parent
							
								
									54dc33b905
								
							
						
					
					
						commit
						841ca74c90
					
				
					 1 changed files with 17 additions and 2 deletions
				
			
		| 
						 | 
					@ -44,6 +44,10 @@ struct SynthSf2Pass : public ScriptPass
 | 
				
			||||||
		log("        write the design to the specified EDIF file. writing of an output file\n");
 | 
							log("        write the design to the specified EDIF file. writing of an output file\n");
 | 
				
			||||||
		log("        is omitted if this parameter is not specified.\n");
 | 
							log("        is omitted if this parameter is not specified.\n");
 | 
				
			||||||
		log("\n");
 | 
							log("\n");
 | 
				
			||||||
 | 
							log("    -vlog <file>\n");
 | 
				
			||||||
 | 
							log("        write the design to the specified Verilog file. writing of an output file\n");
 | 
				
			||||||
 | 
							log("        is omitted if this parameter is not specified.\n");
 | 
				
			||||||
 | 
							log("\n");
 | 
				
			||||||
		log("    -json <file>\n");
 | 
							log("    -json <file>\n");
 | 
				
			||||||
		log("        write the design to the specified JSON file. writing of an output file\n");
 | 
							log("        write the design to the specified JSON file. writing of an output file\n");
 | 
				
			||||||
		log("        is omitted if this parameter is not specified.\n");
 | 
							log("        is omitted if this parameter is not specified.\n");
 | 
				
			||||||
| 
						 | 
					@ -65,13 +69,14 @@ struct SynthSf2Pass : public ScriptPass
 | 
				
			||||||
		log("\n");
 | 
							log("\n");
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	string top_opt, edif_file, json_file;
 | 
						string top_opt, edif_file, vlog_file, json_file;
 | 
				
			||||||
	bool flatten, retime;
 | 
						bool flatten, retime;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	void clear_flags() YS_OVERRIDE
 | 
						void clear_flags() YS_OVERRIDE
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		top_opt = "-auto-top";
 | 
							top_opt = "-auto-top";
 | 
				
			||||||
		edif_file = "";
 | 
							edif_file = "";
 | 
				
			||||||
 | 
							vlog_file = "";
 | 
				
			||||||
		json_file = "";
 | 
							json_file = "";
 | 
				
			||||||
		flatten = true;
 | 
							flatten = true;
 | 
				
			||||||
		retime = false;
 | 
							retime = false;
 | 
				
			||||||
| 
						 | 
					@ -93,6 +98,10 @@ struct SynthSf2Pass : public ScriptPass
 | 
				
			||||||
				edif_file = args[++argidx];
 | 
									edif_file = args[++argidx];
 | 
				
			||||||
				continue;
 | 
									continue;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
								if (args[argidx] == "-vlog" && argidx+1 < args.size()) {
 | 
				
			||||||
 | 
									vlog_file = args[++argidx];
 | 
				
			||||||
 | 
									continue;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
			if (args[argidx] == "-json" && argidx+1 < args.size()) {
 | 
								if (args[argidx] == "-json" && argidx+1 < args.size()) {
 | 
				
			||||||
				json_file = args[++argidx];
 | 
									json_file = args[++argidx];
 | 
				
			||||||
				continue;
 | 
									continue;
 | 
				
			||||||
| 
						 | 
					@ -192,7 +201,13 @@ struct SynthSf2Pass : public ScriptPass
 | 
				
			||||||
		if (check_label("edif"))
 | 
							if (check_label("edif"))
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			if (!edif_file.empty() || help_mode)
 | 
								if (!edif_file.empty() || help_mode)
 | 
				
			||||||
				run(stringf("write_edif %s", help_mode ? "<file-name>" : edif_file.c_str()));
 | 
									run(stringf("write_edif -gndvccy %s", help_mode ? "<file-name>" : edif_file.c_str()));
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							if (check_label("vlog"))
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								if (!vlog_file.empty() || help_mode)
 | 
				
			||||||
 | 
									run(stringf("write_verilog %s", help_mode ? "<file-name>" : vlog_file.c_str()));
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if (check_label("json"))
 | 
							if (check_label("json"))
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue