OpenCores
URL https://opencores.org/ocsvn/csa/csa/trunk

Subversion Repositories csa

[/] [csa/] [trunk/] [quartus10/] [led_cnt.v] - Rev 51

Go to most recent revision | Compare with Previous | Blame | View Log

 
// this file 
// led controler
 
module led_cnt(
                         input              clk             // clock
                       , input              rst             // reset , high active
                       , input              scan            
                       , output reg [7:0]   led
                );
 
        reg scan_l;
 
        always @(posedge clk)
                scan_l <= scan;
 
        always @(posedge clk)
                if(~rst)
                        led <= 8'hfe;
                else if (scan & ~scan_l)
                        led <= {led[0],led[7:1]};
endmodule
 

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.