mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-30 19:22:31 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			11 lines
		
	
	
	
		
			166 B
		
	
	
	
		
			Verilog
		
	
	
	
	
	
			
		
		
	
	
			11 lines
		
	
	
	
		
			166 B
		
	
	
	
		
			Verilog
		
	
	
	
	
	
| module dlatchsr( input d, set, clr, en, output reg q );
 | |
| 	always @* begin
 | |
| 		if ( clr )
 | |
| 			q = 0;
 | |
| 		else if (set)
 | |
| 			q = 1;
 | |
| 		else
 | |
| 			if (en)
 | |
| 				q = d;
 | |
| 	end
 | |
| endmodule
 |