mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-31 03:32:29 +00:00 
			
		
		
		
	added resource sharing of $macc cells
This commit is contained in:
		
							parent
							
								
									c3e779a65f
								
							
						
					
					
						commit
						3e4b0cac8d
					
				
					 2 changed files with 270 additions and 3 deletions
				
			
		|  | @ -45,6 +45,9 @@ struct Macc | |||
| 			if (SIZE(port.in_a) == 0 && SIZE(port.in_b) == 0) | ||||
| 				continue; | ||||
| 
 | ||||
| 			if (SIZE(port.in_a) < SIZE(port.in_b)) | ||||
| 				std::swap(port.in_a, port.in_b); | ||||
| 
 | ||||
| 			if (SIZE(port.in_a) == 1 && SIZE(port.in_b) == 0 && !port.is_signed && !port.do_subtract) { | ||||
| 				bit_ports.append(port.in_a); | ||||
| 				continue; | ||||
|  | @ -224,6 +227,12 @@ struct Macc | |||
| 
 | ||||
| 		return true; | ||||
| 	} | ||||
| 
 | ||||
| 	Macc(RTLIL::Cell *cell = nullptr) | ||||
| 	{ | ||||
| 		if (cell != nullptr) | ||||
| 			from_cell(cell); | ||||
| 	} | ||||
| }; | ||||
| 
 | ||||
| YOSYS_NAMESPACE_END | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue