mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-26 17:29:23 +00:00 
			
		
		
		
	dfflibmap: allow gzipped liberty files
This commit is contained in:
		
							parent
							
								
									813f909460
								
							
						
					
					
						commit
						218ec3fc05
					
				
					 1 changed files with 5 additions and 3 deletions
				
			
		|  | @ -19,6 +19,7 @@ | |||
| 
 | ||||
| #include "kernel/yosys.h" | ||||
| #include "kernel/sigtools.h" | ||||
| #include "kernel/gzip.h" | ||||
| #include "libparse.h" | ||||
| #include <string.h> | ||||
| #include <errno.h> | ||||
|  | @ -632,11 +633,12 @@ struct DfflibmapPass : public Pass { | |||
| 		for (auto path : liberty_files) { | ||||
| 			std::ifstream f; | ||||
| 			f.open(path.c_str()); | ||||
| 			if (f.fail()) | ||||
| 			std::istream* ff = uncompressed(&f, path); | ||||
| 			if (ff->fail()) | ||||
| 				log_cmd_error("Can't open liberty file `%s': %s\n", path.c_str(), strerror(errno)); | ||||
| 			LibertyParser p(f); | ||||
| 			LibertyParser p(*ff); | ||||
| 			merged.merge(p); | ||||
| 			f.close(); | ||||
| 			delete ff; | ||||
| 		} | ||||
| 
 | ||||
| 		find_cell(merged.cells, ID($_DFF_N_), false, false, false, false, false, false, dont_use_cells); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue