mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-31 03:32:29 +00:00 
			
		
		
		
	Added $alu cell type
This commit is contained in:
		
							parent
							
								
									88db09255b
								
							
						
					
					
						commit
						4724d94fbc
					
				
					 5 changed files with 67 additions and 3 deletions
				
			
		|  | @ -108,6 +108,8 @@ struct CellTypes | |||
| 		for (auto type : std::vector<RTLIL::IdString>({"$mux", "$pmux"})) | ||||
| 			setup_type(type, {"\\A", "\\B", "\\S"}, {"\\Y"}, true); | ||||
| 
 | ||||
| 		setup_type("$alu", {"\\A", "\\B", "\\CI", "\\BI"}, {"\\X", "\\Y", "\\CO"}, true); | ||||
| 
 | ||||
| 		setup_type("$assert", {"\\A", "\\EN"}, std::set<RTLIL::IdString>(), true); | ||||
| 	} | ||||
| 
 | ||||
|  |  | |||
|  | @ -557,6 +557,20 @@ namespace { | |||
| 				return; | ||||
| 			} | ||||
| 
 | ||||
| 			if (cell->type == "$alu") { | ||||
| 				param_bool("\\A_SIGNED"); | ||||
| 				param_bool("\\B_SIGNED"); | ||||
| 				port("\\A", param("\\A_WIDTH")); | ||||
| 				port("\\B", param("\\B_WIDTH")); | ||||
| 				port("\\CI", 1); | ||||
| 				port("\\BI", 1); | ||||
| 				port("\\X", param("\\Y_WIDTH")); | ||||
| 				port("\\Y", param("\\Y_WIDTH")); | ||||
| 				port("\\CO", param("\\Y_WIDTH")); | ||||
| 				check_expected(); | ||||
| 				return; | ||||
| 			} | ||||
| 
 | ||||
| 			if (cell->type == "$logic_not") { | ||||
| 				param_bool("\\A_SIGNED"); | ||||
| 				port("\\A", param("\\A_WIDTH")); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue