mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-31 11:42:30 +00:00 
			
		
		
		
	Add additional cells sim models for core 7-series primatives.
Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
This commit is contained in:
		
							parent
							
								
									0deaccbaae
								
							
						
					
					
						commit
						5e0339855f
					
				
					 1 changed files with 57 additions and 0 deletions
				
			
		|  | @ -30,10 +30,15 @@ module GND(output G); | |||
| endmodule | ||||
| 
 | ||||
| module IBUF(output O, input I); | ||||
|   parameter IOSTANDARD = "default"; | ||||
|   parameter IBUF_LOW_PWR = 0; | ||||
|   assign O = I; | ||||
| endmodule | ||||
| 
 | ||||
| module OBUF(output O, input I); | ||||
|   parameter IOSTANDARD = "default"; | ||||
|   parameter DRIVE = 12; | ||||
|   parameter SLEW = "SLOW"; | ||||
|   assign O = I; | ||||
| endmodule | ||||
| 
 | ||||
|  | @ -41,6 +46,42 @@ module BUFG(output O, input I); | |||
|   assign O = I; | ||||
| endmodule | ||||
| 
 | ||||
| module BUFGCTRL( | ||||
|     output O, | ||||
|     input I0, input I1, | ||||
|     input S0, input S1, | ||||
|     input CE0, input CE1, | ||||
|     input IGNORE0, input IGNORE1); | ||||
| 
 | ||||
| parameter INIT_OUT = 0; | ||||
| parameter PRESELECT_I0 = 0; | ||||
| parameter PRESELECT_I1 = 0; | ||||
| parameter IS_CE0_INVERTED = 0; | ||||
| parameter IS_CE1_INVERTED = 0; | ||||
| parameter IS_S0_INVERTED = 0; | ||||
| parameter IS_S1_INVERTED = 0; | ||||
| parameter IS_IGNORE0_INVERTED = 0; | ||||
| parameter IS_IGNORE1_INVERTED = 0; | ||||
| 
 | ||||
| wire I0_internal = ((CE0 ^ IS_CE0_INVERTED) ? I0 : INIT_OUT); | ||||
| wire I1_internal = ((CE1 ^ IS_CE1_INVERTED) ? I1 : INIT_OUT); | ||||
| wire S0_true = (S0 ^ IS_S0_INVERTED); | ||||
| wire S1_true = (S1 ^ IS_S1_INVERTED); | ||||
| 
 | ||||
| assign O = S0_true ? I0_internal : (S1_true ? I1_internal : INIT_OUT); | ||||
| 
 | ||||
| endmodule | ||||
| 
 | ||||
| module BUFHCE(output O, input I, input CE); | ||||
| 
 | ||||
| parameter INIT_OUT = 0; | ||||
| parameter CE_TYPE = "SYNC"; | ||||
| parameter IS_CE_INVERTED = 0; | ||||
| 
 | ||||
| assign O = ((CE ^ IS_CE_INVERTED) ? I : INIT_OUT); | ||||
| 
 | ||||
| endmodule | ||||
| 
 | ||||
| // module OBUFT(output O, input I, T); | ||||
| //   assign O = T ? 1'bz : I; | ||||
| // endmodule | ||||
|  | @ -98,6 +139,22 @@ module LUT6(output O, input I0, I1, I2, I3, I4, I5); | |||
|   assign O = I0 ? s1[1] : s1[0]; | ||||
| endmodule | ||||
| 
 | ||||
| module LUT6_2(output O6, output O5, input I0, I1, I2, I3, I4, I5); | ||||
|   parameter [63:0] INIT = 0; | ||||
|   wire [31: 0] s5 = I5 ? INIT[63:32] : INIT[31: 0]; | ||||
|   wire [15: 0] s4 = I4 ?   s5[31:16] :   s5[15: 0]; | ||||
|   wire [ 7: 0] s3 = I3 ?   s4[15: 8] :   s4[ 7: 0]; | ||||
|   wire [ 3: 0] s2 = I2 ?   s3[ 7: 4] :   s3[ 3: 0]; | ||||
|   wire [ 1: 0] s1 = I1 ?   s2[ 3: 2] :   s2[ 1: 0]; | ||||
|   assign O6 = I0 ? s1[1] : s1[0]; | ||||
| 
 | ||||
|   wire [15: 0] s5_4 = I4 ? INIT[31:16] : INIT[15: 0]; | ||||
|   wire [ 7: 0] s5_3 = I3 ?   s4[15: 8] :   s4[ 7: 0]; | ||||
|   wire [ 3: 0] s5_2 = I2 ?   s3[ 7: 4] :   s3[ 3: 0]; | ||||
|   wire [ 1: 0] s5_1 = I1 ?   s2[ 3: 2] :   s2[ 1: 0]; | ||||
|   assign O5 = I0 ? s5_1[1] : s5_1[0]; | ||||
| endmodule | ||||
| 
 | ||||
| module MUXCY(output O, input CI, DI, S); | ||||
|   assign O = S ? CI : DI; | ||||
| endmodule | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue