mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-31 11:42:30 +00:00 
			
		
		
		
	Use a dummy box file if none specified
This commit is contained in:
		
							parent
							
								
									e8e3830868
								
							
						
					
					
						commit
						c4e5310823
					
				
					 3 changed files with 10 additions and 3 deletions
				
			
		|  | @ -1027,9 +1027,6 @@ struct Abc9Pass : public Pass { | ||||||
| 			} | 			} | ||||||
| 			if (arg == "-box" && argidx+1 < args.size()) { | 			if (arg == "-box" && argidx+1 < args.size()) { | ||||||
| 				box_file = args[++argidx]; | 				box_file = args[++argidx]; | ||||||
| 				rewrite_filename(box_file); |  | ||||||
| 				if (!box_file.empty() && !is_absolute_path(box_file)) |  | ||||||
| 					box_file = std::string(pwd) + "/" + box_file; |  | ||||||
| 				continue; | 				continue; | ||||||
| 			} | 			} | ||||||
| 			if (arg == "-W" && argidx+1 < args.size()) { | 			if (arg == "-W" && argidx+1 < args.size()) { | ||||||
|  | @ -1040,6 +1037,14 @@ struct Abc9Pass : public Pass { | ||||||
| 		} | 		} | ||||||
| 		extra_args(args, argidx, design); | 		extra_args(args, argidx, design); | ||||||
| 
 | 
 | ||||||
|  | 		// ABC expects a box file for XAIG
 | ||||||
|  | 		if (box_file.empty()) | ||||||
|  | 		    box_file = "+/dummy.box"; | ||||||
|  | 
 | ||||||
|  | 		rewrite_filename(box_file); | ||||||
|  | 		if (!box_file.empty() && !is_absolute_path(box_file)) | ||||||
|  | 		    box_file = std::string(pwd) + "/" + box_file; | ||||||
|  | 
 | ||||||
| 		dict<int,IdString> box_lookup; | 		dict<int,IdString> box_lookup; | ||||||
| 		for (auto m : design->modules()) { | 		for (auto m : design->modules()) { | ||||||
| 			auto it = m->attributes.find(ID(abc_box_id)); | 			auto it = m->attributes.find(ID(abc_box_id)); | ||||||
|  |  | ||||||
|  | @ -28,3 +28,4 @@ $(eval $(call add_share_file,share,techlibs/common/dff2ff.v)) | ||||||
| $(eval $(call add_share_file,share,techlibs/common/gate2lut.v)) | $(eval $(call add_share_file,share,techlibs/common/gate2lut.v)) | ||||||
| $(eval $(call add_share_file,share,techlibs/common/cmp2lut.v)) | $(eval $(call add_share_file,share,techlibs/common/cmp2lut.v)) | ||||||
| $(eval $(call add_share_file,share,techlibs/common/cells.lib)) | $(eval $(call add_share_file,share,techlibs/common/cells.lib)) | ||||||
|  | $(eval $(call add_share_file,share,techlibs/common/dummy.box)) | ||||||
|  |  | ||||||
							
								
								
									
										1
									
								
								techlibs/common/dummy.box
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								techlibs/common/dummy.box
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1 @@ | ||||||
|  | (dummy) 1 0 0 0 | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue