mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-31 19:52:31 +00:00 
			
		
		
		
	Cleanup ecp5 boxes
This commit is contained in:
		
							parent
							
								
									96db05aaef
								
							
						
					
					
						commit
						b2046a2114
					
				
					 4 changed files with 31 additions and 35 deletions
				
			
		|  | @ -1,43 +1,36 @@ | ||||||
| # NB: Inputs/Outputs must be ordered alphabetically | # NB: Box inputs/outputs must each be in the same order | ||||||
| #     (with exceptions for carry in/out) | #     as their corresponding module definition | ||||||
|  | #     (with exceptions detailed below) | ||||||
| 
 | 
 | ||||||
| # Box 1 : CCU2C (2xCARRY + 2xLUT4) | # Box 1 : CCU2C (2xCARRY + 2xLUT4) | ||||||
| # Outputs: S0, S1, COUT | #   (Exception: carry chain input/output must be the | ||||||
| #   (NB: carry chain input/output must be last | #        last input and output and the entire bus has been | ||||||
| #        input/output and bus has been moved | #        moved there overriding the otherwise | ||||||
| #        there overriding the otherwise |  | ||||||
| #        alphabetical ordering) | #        alphabetical ordering) | ||||||
| # name  ID   w/b   ins    outs | # name  ID   w/b   ins    outs | ||||||
| CCU2C   1      1   9      3 | CCU2C   1      1   9      3 | ||||||
| 
 | #A0  B0   C0    D0   A1   B1   C1   D1   CIN | ||||||
| #A0   A1   B0   B1   C0    C1  D0   D1   CIN | 379  379  275   141  -    -    -    -    257 # S0 | ||||||
| 379  -    379  -    275   -    141  -    257 | 630  630  526   392  379  379  275  141  273 # S1 | ||||||
| 630  379  630  379  526   275  392  141  273 | 516  516  412   278  516  516  412  278   43 # COUT | ||||||
| 516  516  516  516  412   412  278  278  43 |  | ||||||
| 
 | 
 | ||||||
| # Box 2 : TRELLIS_DPR16X4_COMB (16x4 dist ram) | # Box 2 : TRELLIS_DPR16X4_COMB (16x4 dist ram) | ||||||
| # Outputs: DO0, DO1, DO2, DO3 |  | ||||||
| # name               ID  w/b   ins   outs | # name               ID  w/b   ins   outs | ||||||
| $__ABC9_DPR16X4_COMB  2     0   8    4 | $__ABC9_DPR16X4_COMB  2     0   8    4 | ||||||
| 
 | #$D0  $D1  $D2  $D3  RAD0   RAD1   RAD2   RAD3 | ||||||
| #A0   A1   A2   A3   RAD0   RAD1   RAD2   RAD3 | 0     0    0    0    141    379    275    379 # DO0 | ||||||
| 0     0    0    0    141    379    275    379 | 0     0    0    0    141    379    275    379 # DO1 | ||||||
| 0     0    0    0    141    379    275    379 | 0     0    0    0    141    379    275    379 # DO2 | ||||||
| 0     0    0    0    141    379    275    379 | 0     0    0    0    141    379    275    379 # DO3 | ||||||
| 0     0    0    0    141    379    275    379 |  | ||||||
| 
 | 
 | ||||||
| # Box 3 : PFUMX (MUX2) | # Box 3 : PFUMX (MUX2) | ||||||
| # Outputs: Z |  | ||||||
| # name  ID   w/b   ins    outs | # name  ID   w/b   ins    outs | ||||||
| PFUMX   3    1     3      1 | PFUMX   3    1     3      1 | ||||||
| 
 |  | ||||||
| #ALUT  BLUT  C0 | #ALUT  BLUT  C0 | ||||||
| 98     98    151 | 98     98    151 # Z | ||||||
| 
 | 
 | ||||||
| # Box 4 : L6MUX21 (MUX2) | # Box 4 : L6MUX21 (MUX2) | ||||||
| # Outputs: Z |  | ||||||
| # name   ID   w/b   ins    outs | # name   ID   w/b   ins    outs | ||||||
| L6MUX21  4    1     3      1 | L6MUX21  4    1     3      1 | ||||||
| 
 |  | ||||||
| #D0    D1    SD | #D0    D1    SD | ||||||
| 140    141   148 | 140    141   148 # Z | ||||||
|  |  | ||||||
|  | @ -1,24 +1,27 @@ | ||||||
| // --------------------------------------- | // --------------------------------------- | ||||||
| 
 | 
 | ||||||
|  | // Attach a (combinatorial) black-box onto the output | ||||||
|  | //   of this LUTRAM primitive to capture its | ||||||
|  | //   asynchronous read behaviour | ||||||
| module TRELLIS_DPR16X4 ( | module TRELLIS_DPR16X4 ( | ||||||
| 	input  [3:0] DI, | 	(* techmap_autopurge *) input  [3:0] DI, | ||||||
| 	input  [3:0] WAD, | 	(* techmap_autopurge *) input  [3:0] WAD, | ||||||
| 	input        WRE, | 	(* techmap_autopurge *) input        WRE, | ||||||
| 	input        WCK, | 	(* techmap_autopurge *) input        WCK, | ||||||
| 	input  [3:0] RAD, | 	(* techmap_autopurge *) input  [3:0] RAD, | ||||||
| 	output [3:0] DO | 	output [3:0] DO | ||||||
| ); | ); | ||||||
| 	parameter WCKMUX = "WCK"; | 	parameter WCKMUX = "WCK"; | ||||||
| 	parameter WREMUX = "WRE"; | 	parameter WREMUX = "WRE"; | ||||||
| 	parameter [63:0] INITVAL = 64'h0000000000000000; | 	parameter [63:0] INITVAL = 64'h0000000000000000; | ||||||
|     wire [3:0] \$DO ; |     wire [3:0] $DO; | ||||||
| 
 | 
 | ||||||
|     TRELLIS_DPR16X4 #( |     TRELLIS_DPR16X4 #( | ||||||
|       .WCKMUX(WCKMUX), .WREMUX(WREMUX), .INITVAL(INITVAL) |       .WCKMUX(WCKMUX), .WREMUX(WREMUX), .INITVAL(INITVAL) | ||||||
|     ) _TECHMAP_REPLACE_ ( |     ) _TECHMAP_REPLACE_ ( | ||||||
|       .DI(DI), .WAD(WAD), .WRE(WRE), .WCK(WCK), |       .DI(DI), .WAD(WAD), .WRE(WRE), .WCK(WCK), | ||||||
|       .RAD(RAD), .DO(\$DO ) |       .RAD(RAD), .DO($DO) | ||||||
|     ); |     ); | ||||||
| 
 | 
 | ||||||
|     \$__ABC9_DPR16X4_COMB do (.A(\$DO ), .S(RAD), .Y(DO)); |     $__ABC9_DPR16X4_COMB do (.$DO($DO), .RAD(RAD), .DO(DO)); | ||||||
| endmodule | endmodule | ||||||
|  |  | ||||||
|  | @ -1,5 +1,5 @@ | ||||||
| // --------------------------------------- | // --------------------------------------- | ||||||
| 
 | 
 | ||||||
| (* abc9_box_id=2 *) | (* abc9_box_id=2 *) | ||||||
| module \$__ABC9_DPR16X4_COMB (input [3:0] A, S, output [3:0] Y); | module \$__ABC9_DPR16X4_COMB (input [3:0] $DO, RAD, output [3:0] DO); | ||||||
| endmodule | endmodule | ||||||
|  |  | ||||||
|  | @ -1,5 +1,5 @@ | ||||||
| // --------------------------------------- | // --------------------------------------- | ||||||
| 
 | 
 | ||||||
| module \$__ABC9_DPR16X4_COMB (input [3:0] A, S, output [3:0] Y); | module \$__ABC9_DPR16X4_COMB (input [3:0] $DO, RAD, output [3:0] DO); | ||||||
|     assign Y = A; |     assign DO = $DO; | ||||||
| endmodule | endmodule | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue