mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-04 13:29:12 +00:00 
			
		
		
		
	
							parent
							
								
									eab3c1432b
								
							
						
					
					
						commit
						d361f5ab79
					
				
					 1 changed files with 21 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -398,6 +398,26 @@ module SRL16E (
 | 
			
		|||
  endgenerate
 | 
			
		||||
endmodule
 | 
			
		||||
 | 
			
		||||
module SRLC16E (
 | 
			
		||||
  output Q,
 | 
			
		||||
  output Q15,
 | 
			
		||||
  input A0, A1, A2, A3, CE, CLK, D
 | 
			
		||||
);
 | 
			
		||||
  parameter [15:0] INIT = 16'h0000;
 | 
			
		||||
  parameter [0:0] IS_CLK_INVERTED = 1'b0;
 | 
			
		||||
 | 
			
		||||
  reg [15:0] r = INIT;
 | 
			
		||||
  assign Q15 = r[15];
 | 
			
		||||
  assign Q = r[{A3,A2,A1,A0}];
 | 
			
		||||
  generate
 | 
			
		||||
    if (IS_CLK_INVERTED) begin
 | 
			
		||||
      always @(negedge CLK) if (CE) r <= { r[14:0], D };
 | 
			
		||||
    end
 | 
			
		||||
    else
 | 
			
		||||
      always @(posedge CLK) if (CE) r <= { r[14:0], D };
 | 
			
		||||
  endgenerate
 | 
			
		||||
endmodule
 | 
			
		||||
 | 
			
		||||
module SRLC32E (
 | 
			
		||||
  output Q,
 | 
			
		||||
  output Q31,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue