mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-31 11:42:30 +00:00 
			
		
		
		
	Fix Liberty issue
This commit is contained in:
		
							parent
							
								
									dd487ca8a1
								
							
						
					
					
						commit
						654e92e04e
					
				
					 4 changed files with 63 additions and 0 deletions
				
			
		|  | @ -251,6 +251,13 @@ LibertyAst *LibertyParser::parse() | |||
| 			// instead of the ';' too..
 | ||||
| 			if ((tok == ';') || (tok == 'n')) | ||||
| 				break; | ||||
| 			else if (tok == '[') { | ||||
| 				while (tok != ']') { | ||||
| 					tok = lexer(str); | ||||
| 				} | ||||
| 				ast->value += '[' + str + ']'; | ||||
| 				continue; | ||||
| 			} | ||||
| 			else | ||||
| 				error(); | ||||
| 			continue; | ||||
|  |  | |||
							
								
								
									
										43
									
								
								tests/liberty/liberty_define.lib
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										43
									
								
								tests/liberty/liberty_define.lib
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,43 @@ | |||
| library (liberty_define) { | ||||
|   delay_model : "table_lookup" ; | ||||
|   simulation : false ; | ||||
|   capacitive_load_unit (1,pF) ; | ||||
|   leakage_power_unit : "1pW" ; | ||||
|   current_unit : "1A" ; | ||||
|   pulling_resistance_unit : "1kohm" ; | ||||
|   time_unit : "1ns" ; | ||||
|   voltage_unit : "1v" ; | ||||
|   library_features : "report_delay_calculation" ; | ||||
|   input_threshold_pct_rise : 50 ; | ||||
|   input_threshold_pct_fall : 50 ; | ||||
|   output_threshold_pct_rise : 50 ; | ||||
|   output_threshold_pct_fall : 50 ; | ||||
|   slew_lower_threshold_pct_rise : 30 ; | ||||
|   slew_lower_threshold_pct_fall : 30 ; | ||||
|   slew_upper_threshold_pct_rise : 70 ; | ||||
|   slew_upper_threshold_pct_fall : 70 ; | ||||
|   slew_derate_from_library : 1.0 ; | ||||
|   nom_process : 1.0 ; | ||||
|   nom_temperature : 85.0 ; | ||||
|   nom_voltage : 0.75 ; | ||||
|   type (bus8) { | ||||
|     base_type : "array"; | ||||
|     data_type : "bit"; | ||||
|     bit_width : 8; | ||||
|     bit_from : 7; | ||||
|     bit_to : 0; | ||||
|   } | ||||
|   define (original_pin, pin, string) ; | ||||
|   cell (not_cell) { | ||||
|     bus (A) { | ||||
|       capacitance : 1 ; | ||||
|       bus_type : "bus8" ; | ||||
|       direction : "input" ; | ||||
|     } | ||||
|     pin (Y) { | ||||
|       function : !A[0] ; | ||||
|       direction : "output" ; | ||||
|       original_pin : A[0] ; | ||||
|     } | ||||
|   } | ||||
| } | ||||
							
								
								
									
										8
									
								
								tests/liberty/liberty_define.lib.filtered.ok
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								tests/liberty/liberty_define.lib.filtered.ok
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,8 @@ | |||
| library(liberty_define) { | ||||
|   cell(not_cell) { | ||||
|     pin(Y) { | ||||
|       function : !A[0] ; | ||||
|       direction : output ; | ||||
|     } | ||||
|   } | ||||
| } | ||||
							
								
								
									
										5
									
								
								tests/liberty/liberty_define.lib.verilogsim.ok
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								tests/liberty/liberty_define.lib.verilogsim.ok
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,5 @@ | |||
| module not_cell (A, Y); | ||||
|   input A; | ||||
|   output Y; | ||||
|   assign Y = !A[0]; // !A[0] | ||||
| endmodule | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue