mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-04 05:19:11 +00:00 
			
		
		
		
	Added $dffe cell type
This commit is contained in:
		
							parent
							
								
									fad9cec47b
								
							
						
					
					
						commit
						f1764b4fe9
					
				
					 4 changed files with 54 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -1216,6 +1216,25 @@ end
 | 
			
		|||
 | 
			
		||||
endmodule
 | 
			
		||||
 | 
			
		||||
// --------------------------------------------------------
 | 
			
		||||
 | 
			
		||||
module \$dffe (CLK, EN, D, Q);
 | 
			
		||||
 | 
			
		||||
parameter WIDTH = 0;
 | 
			
		||||
parameter CLK_POLARITY = 1'b1;
 | 
			
		||||
parameter EN_POLARITY = 1'b1;
 | 
			
		||||
 | 
			
		||||
input CLK, EN;
 | 
			
		||||
input [WIDTH-1:0] D;
 | 
			
		||||
output reg [WIDTH-1:0] Q;
 | 
			
		||||
wire pos_clk = CLK == CLK_POLARITY;
 | 
			
		||||
 | 
			
		||||
always @(posedge pos_clk) begin
 | 
			
		||||
	if (EN == EN_POLARITY) Q <= D;
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
endmodule
 | 
			
		||||
 | 
			
		||||
// --------------------------------------------------------
 | 
			
		||||
`ifndef SIMLIB_NOSR
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -59,7 +59,7 @@ module _90_simplemap_various;
 | 
			
		|||
endmodule
 | 
			
		||||
 | 
			
		||||
(* techmap_simplemap *)
 | 
			
		||||
(* techmap_celltype = "$sr $dff $adff $dffsr $dlatch" *)
 | 
			
		||||
(* techmap_celltype = "$sr $dff $dffe $adff $dffsr $dlatch" *)
 | 
			
		||||
module _90_simplemap_registers;
 | 
			
		||||
endmodule
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue