mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-31 19:52:31 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			9 lines
		
	
	
	
		
			183 B
		
	
	
	
		
			Verilog
		
	
	
	
	
	
			
		
		
	
	
			9 lines
		
	
	
	
		
			183 B
		
	
	
	
		
			Verilog
		
	
	
	
	
	
| module dffsr( input clk, d, clr, set, output reg q );
 | |
| 	always @( posedge clk, posedge set, posedge clr)
 | |
| 		if ( clr )
 | |
| 			q <= 0;
 | |
| 		else if (set)
 | |
| 			q <= 1;
 | |
| 		else
 | |
| 			q <= d;
 | |
| endmodule
 |