mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-31 11:42:30 +00:00 
			
		
		
		
	Add $specrule cells for $setup/$hold/$skew specify rules
Signed-off-by: Clifford Wolf <clifford@clifford.at>
This commit is contained in:
		
							parent
							
								
									634482380c
								
							
						
					
					
						commit
						71c38d9de5
					
				
					 9 changed files with 133 additions and 6 deletions
				
			
		|  | @ -952,7 +952,7 @@ static AstModule* process_module(AstNode *ast, bool defer, AstNode *original_ast | |||
| 				if (child->type == AST_PARAMETER || child->type == AST_LOCALPARAM) | ||||
| 					continue; | ||||
| 				if (child->type == AST_CELL && child->children.size() > 0 && child->children[0]->type == AST_CELLTYPE && | ||||
| 						(child->children[0]->str == "$specify2" || child->children[0]->str == "$specify3")) | ||||
| 						(child->children[0]->str == "$specify2" || child->children[0]->str == "$specify3" || child->children[0]->str == "$specrule")) | ||||
| 					continue; | ||||
| 				blackbox_module = false; | ||||
| 				break; | ||||
|  | @ -1039,7 +1039,7 @@ static AstModule* process_module(AstNode *ast, bool defer, AstNode *original_ast | |||
| 					child->children.push_back(AstNode::mkconst_int(0, false, 0)); | ||||
| 					new_children.push_back(child); | ||||
| 				} else if (child->type == AST_CELL && child->children.size() > 0 && child->children[0]->type == AST_CELLTYPE && | ||||
| 						(child->children[0]->str == "$specify2" || child->children[0]->str == "$specify3")) { | ||||
| 						(child->children[0]->str == "$specify2" || child->children[0]->str == "$specify3" || child->children[0]->str == "$specrule")) { | ||||
| 					new_children.push_back(child); | ||||
| 				} else { | ||||
| 					delete child; | ||||
|  |  | |||
|  | @ -1538,6 +1538,12 @@ RTLIL::SigSpec AstNode::genRTLIL(int width_hint, bool sign_hint) | |||
| 				cell->setParam("\\SRC_WIDTH", Const(src_width)); | ||||
| 				cell->setParam("\\DST_WIDTH", Const(dst_width)); | ||||
| 			} | ||||
| 			if (cell->type == "$specrule") { | ||||
| 				int src_width = GetSize(cell->getPort("\\SRC")); | ||||
| 				int dst_width = GetSize(cell->getPort("\\DST")); | ||||
| 				cell->setParam("\\SRC_WIDTH", Const(src_width)); | ||||
| 				cell->setParam("\\DST_WIDTH", Const(dst_width)); | ||||
| 			} | ||||
| 		} | ||||
| 		break; | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue