mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-31 03:32:29 +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
				
			
		|  | @ -86,6 +86,7 @@ struct CellTypes | |||
| 
 | ||||
| 		IdString A = "\\A", B = "\\B", EN = "\\EN", Y = "\\Y"; | ||||
| 		IdString SRC = "\\SRC", DST = "\\DST", DAT = "\\DAT"; | ||||
| 		IdString EN_SRC = "\\EN_SRC", EN_DST = "\\EN_DST"; | ||||
| 
 | ||||
| 		setup_type("$tribuf", {A, EN}, {Y}, true); | ||||
| 
 | ||||
|  | @ -102,6 +103,7 @@ struct CellTypes | |||
| 		setup_type("$equiv", {A, B}, {Y}, true); | ||||
| 		setup_type("$specify2", {EN, SRC, DST}, pool<RTLIL::IdString>(), true); | ||||
| 		setup_type("$specify3", {EN, SRC, DST, DAT}, pool<RTLIL::IdString>(), true); | ||||
| 		setup_type("$specrule", {EN_SRC, EN_DST, SRC, DST}, pool<RTLIL::IdString>(), true); | ||||
| 	} | ||||
| 
 | ||||
| 	void setup_internals_eval() | ||||
|  |  | |||
|  | @ -1218,6 +1218,21 @@ namespace { | |||
| 				return; | ||||
| 			} | ||||
| 
 | ||||
| 			if (cell->type == "$specrule") { | ||||
| 				param_bool("\\SRC_PEN"); | ||||
| 				param_bool("\\SRC_POL"); | ||||
| 				param_bool("\\DST_PEN"); | ||||
| 				param_bool("\\DST_POL"); | ||||
| 				param_bool("\\LIMIT_GT"); | ||||
| 				param("\\T_LIMIT"); | ||||
| 				port("\\SRC_EN", 1); | ||||
| 				port("\\DST_EN", 1); | ||||
| 				port("\\SRC", param("\\SRC_WIDTH")); | ||||
| 				port("\\DST", param("\\DST_WIDTH")); | ||||
| 				check_expected(); | ||||
| 				return; | ||||
| 			} | ||||
| 
 | ||||
| 			if (cell->type == "$_BUF_")    { check_gate("AY"); return; } | ||||
| 			if (cell->type == "$_NOT_")    { check_gate("AY"); return; } | ||||
| 			if (cell->type == "$_AND_")    { check_gate("ABY"); return; } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue