mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-04 05:19:11 +00:00 
			
		
		
		
	Merge pull request #1117 from bwidawsk/more-home
Add a few more filename rewrites
This commit is contained in:
		
						commit
						c9949dba99
					
				
					 2 changed files with 5 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -545,6 +545,7 @@ void Backend::extra_args(std::ostream *&f, std::string &filename, std::vector<st
 | 
			
		|||
		}
 | 
			
		||||
 | 
			
		||||
		filename = arg;
 | 
			
		||||
		rewrite_filename(filename);
 | 
			
		||||
		std::ofstream *ff = new std::ofstream;
 | 
			
		||||
		ff->open(filename.c_str(), std::ofstream::trunc);
 | 
			
		||||
		yosys_output_files.insert(filename);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -659,6 +659,7 @@ struct SatHelper
 | 
			
		|||
 | 
			
		||||
	void dump_model_to_vcd(std::string vcd_file_name)
 | 
			
		||||
	{
 | 
			
		||||
		rewrite_filename(vcd_file_name);
 | 
			
		||||
		FILE *f = fopen(vcd_file_name.c_str(), "w");
 | 
			
		||||
		if (!f)
 | 
			
		||||
			log_cmd_error("Can't open output file `%s' for writing: %s\n", vcd_file_name.c_str(), strerror(errno));
 | 
			
		||||
| 
						 | 
				
			
			@ -761,6 +762,7 @@ struct SatHelper
 | 
			
		|||
 | 
			
		||||
	void dump_model_to_json(std::string json_file_name)
 | 
			
		||||
	{
 | 
			
		||||
		rewrite_filename(json_file_name);
 | 
			
		||||
		FILE *f = fopen(json_file_name.c_str(), "w");
 | 
			
		||||
		if (!f)
 | 
			
		||||
			log_cmd_error("Can't open output file `%s' for writing: %s\n", json_file_name.c_str(), strerror(errno));
 | 
			
		||||
| 
						 | 
				
			
			@ -1505,6 +1507,7 @@ struct SatPass : public Pass {
 | 
			
		|||
					{
 | 
			
		||||
						if (!cnf_file_name.empty())
 | 
			
		||||
						{
 | 
			
		||||
							rewrite_filename(cnf_file_name);
 | 
			
		||||
							FILE *f = fopen(cnf_file_name.c_str(), "w");
 | 
			
		||||
							if (!f)
 | 
			
		||||
								log_cmd_error("Can't open output file `%s' for writing: %s\n", cnf_file_name.c_str(), strerror(errno));
 | 
			
		||||
| 
						 | 
				
			
			@ -1608,6 +1611,7 @@ struct SatPass : public Pass {
 | 
			
		|||
 | 
			
		||||
			if (!cnf_file_name.empty())
 | 
			
		||||
			{
 | 
			
		||||
				rewrite_filename(cnf_file_name);
 | 
			
		||||
				FILE *f = fopen(cnf_file_name.c_str(), "w");
 | 
			
		||||
				if (!f)
 | 
			
		||||
					log_cmd_error("Can't open output file `%s' for writing: %s\n", cnf_file_name.c_str(), strerror(errno));
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue