mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-31 03:32:29 +00:00 
			
		
		
		
	Add "synth_ice40 -nodffe"
Signed-off-by: Clifford Wolf <clifford@clifford.at>
This commit is contained in:
		
							parent
							
								
									5ca91ca019
								
							
						
					
					
						commit
						81a457c4a6
					
				
					 1 changed files with 11 additions and 2 deletions
				
			
		|  | @ -62,6 +62,9 @@ struct SynthIce40Pass : public ScriptPass | ||||||
| 		log("    -nocarry\n"); | 		log("    -nocarry\n"); | ||||||
| 		log("        do not use SB_CARRY cells in output netlist\n"); | 		log("        do not use SB_CARRY cells in output netlist\n"); | ||||||
| 		log("\n"); | 		log("\n"); | ||||||
|  | 		log("    -nodffe\n"); | ||||||
|  | 		log("        do not use SB_DFFE* cells in output netlist\n"); | ||||||
|  | 		log("\n"); | ||||||
| 		log("    -nobram\n"); | 		log("    -nobram\n"); | ||||||
| 		log("        do not use SB_RAM40_4K* cells in output netlist\n"); | 		log("        do not use SB_RAM40_4K* cells in output netlist\n"); | ||||||
| 		log("\n"); | 		log("\n"); | ||||||
|  | @ -79,7 +82,7 @@ struct SynthIce40Pass : public ScriptPass | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	string top_opt, blif_file, edif_file; | 	string top_opt, blif_file, edif_file; | ||||||
| 	bool nocarry, nobram, flatten, retime, abc2, vpr; | 	bool nocarry, nodffe, nobram, flatten, retime, abc2, vpr; | ||||||
| 
 | 
 | ||||||
| 	virtual void clear_flags() YS_OVERRIDE | 	virtual void clear_flags() YS_OVERRIDE | ||||||
| 	{ | 	{ | ||||||
|  | @ -87,6 +90,7 @@ struct SynthIce40Pass : public ScriptPass | ||||||
| 		blif_file = ""; | 		blif_file = ""; | ||||||
| 		edif_file = ""; | 		edif_file = ""; | ||||||
| 		nocarry = false; | 		nocarry = false; | ||||||
|  | 		nodffe = false; | ||||||
| 		nobram = false; | 		nobram = false; | ||||||
| 		flatten = true; | 		flatten = true; | ||||||
| 		retime = false; | 		retime = false; | ||||||
|  | @ -138,6 +142,10 @@ struct SynthIce40Pass : public ScriptPass | ||||||
| 				nocarry = true; | 				nocarry = true; | ||||||
| 				continue; | 				continue; | ||||||
| 			} | 			} | ||||||
|  | 			if (args[argidx] == "-nodffe") { | ||||||
|  | 				nodffe = true; | ||||||
|  | 				continue; | ||||||
|  | 			} | ||||||
| 			if (args[argidx] == "-nobram") { | 			if (args[argidx] == "-nobram") { | ||||||
| 				nobram = true; | 				nobram = true; | ||||||
| 				continue; | 				continue; | ||||||
|  | @ -209,7 +217,8 @@ struct SynthIce40Pass : public ScriptPass | ||||||
| 		if (check_label("map_ffs")) | 		if (check_label("map_ffs")) | ||||||
| 		{ | 		{ | ||||||
| 			run("dffsr2dff"); | 			run("dffsr2dff"); | ||||||
| 			run("dff2dffe -direct-match $_DFF_*"); | 			if (!nodffe) | ||||||
|  | 				run("dff2dffe -direct-match $_DFF_*"); | ||||||
| 			run("techmap -D NO_SB_LUT4 -map +/ice40/cells_map.v"); | 			run("techmap -D NO_SB_LUT4 -map +/ice40/cells_map.v"); | ||||||
| 			run("opt_expr -mux_undef"); | 			run("opt_expr -mux_undef"); | ||||||
| 			run("simplemap"); | 			run("simplemap"); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue