mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-31 19:52:31 +00:00 
			
		
		
		
	aiger: -xaiger to return $_FF_ flops
This commit is contained in:
		
							parent
							
								
									722540dbf9
								
							
						
					
					
						commit
						4017cc6380
					
				
					 1 changed files with 2 additions and 15 deletions
				
			
		|  | @ -787,21 +787,8 @@ void AigerReader::post_process() | |||
| 		log_assert(q->port_input); | ||||
| 		q->port_input = false; | ||||
| 
 | ||||
| 		Cell* ff; | ||||
| 		int clock_index = mergeability[i]; | ||||
| 		if (clock_index & 1) { | ||||
| 			ff = module->addCell(NEW_ID, ID($_DFF_N_)); | ||||
| 			clock_index--; | ||||
| 		} | ||||
| 		else | ||||
| 			ff = module->addCell(NEW_ID, ID($_DFF_P_)); | ||||
| 		auto r = mergeability_to_clock.insert(clock_index); | ||||
| 		if (r.second) | ||||
| 			r.first->second = module->addWire(NEW_ID); | ||||
| 		ff->setPort(ID::C, r.first->second); | ||||
| 		ff->setPort(ID::D, d); | ||||
| 		ff->setPort(ID::Q, q); | ||||
| 		log_assert(GetSize(q) == 1); | ||||
| 		Cell* ff = module->addFfGate(NEW_ID, d, q); | ||||
| 		ff->attributes[ID::abc9_mergeability] = mergeability[i]; | ||||
| 		q->attributes[ID::init] = initial_state[i]; | ||||
| 	} | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue