mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-31 03:32:29 +00:00 
			
		
		
		
	Refactor
This commit is contained in:
		
							parent
							
								
									4167b15de5
								
							
						
					
					
						commit
						40db2f2eb6
					
				
					 1 changed files with 8 additions and 1 deletions
				
			
		|  | @ -30,15 +30,22 @@ YOSYS_NAMESPACE_BEGIN | ||||||
| 
 | 
 | ||||||
| #define log_debug log | #define log_debug log | ||||||
| 
 | 
 | ||||||
|  | static void parse_aiger_ascii(RTLIL::Design *design, std::istream &f, std::string clk_name); | ||||||
|  | 
 | ||||||
| void parse_aiger(RTLIL::Design *design, std::istream &f, std::string clk_name) | void parse_aiger(RTLIL::Design *design, std::istream &f, std::string clk_name) | ||||||
| { | { | ||||||
|     std::string header; |     std::string header; | ||||||
|     f >> header; |     f >> header; | ||||||
|     if (header != "aag") { |     if (header == "aag") | ||||||
|  |         return parse_aiger_ascii(design, f, clk_name); | ||||||
|  |     else { | ||||||
|         log_error("Unsupported AIGER file!\n"); |         log_error("Unsupported AIGER file!\n"); | ||||||
|         return; |         return; | ||||||
|     } |     } | ||||||
|  | } | ||||||
| 
 | 
 | ||||||
|  | static void parse_aiger_ascii(RTLIL::Design *design, std::istream &f, std::string clk_name) | ||||||
|  | { | ||||||
|     int M, I, L, O, A; |     int M, I, L, O, A; | ||||||
|     int B=0, C=0, J=0, F=0; // Optional in AIGER 1.9
 |     int B=0, C=0, J=0, F=0; // Optional in AIGER 1.9
 | ||||||
|     if (!(f >> M >> I >> L >> O >> A)) { |     if (!(f >> M >> I >> L >> O >> A)) { | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue