mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-04 13:29:12 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			10 lines
		
	
	
	
		
			226 B
		
	
	
	
		
			Verilog
		
	
	
	
	
	
			
		
		
	
	
			10 lines
		
	
	
	
		
			226 B
		
	
	
	
		
			Verilog
		
	
	
	
	
	
module demo (
 | 
						|
	input clk,
 | 
						|
	output [15:0] leds,
 | 
						|
	output unused
 | 
						|
);
 | 
						|
	localparam PRESCALE = 20;
 | 
						|
	reg [PRESCALE+3:0] counter = 0;
 | 
						|
	always @(posedge clk) counter <= counter + 1;
 | 
						|
	assign leds = 1 << counter[PRESCALE +: 4];
 | 
						|
endmodule
 |