gateware

A collection of little open source FPGA hobby projects
git clone http://frotz.net/git/gateware.git
Log | Files | Refs | README

icebreaker_diags.sv (366B)


      1 
      2 module top(
      3 	input osc12m,
      4 	output [7:0]pmod1a,
      5 	output [7:0]pmod1b,
      6 	output [7:0]pmod2,
      7 	output led_red,
      8 	output led_grn,
      9 	input button
     10 	);
     11 
     12 reg [31:0]count;
     13 
     14 always_ff @(posedge osc12m)
     15 	count <= count + 32'h1;
     16 
     17 assign pmod1a = count[7:0];
     18 assign pmod1b = count[7:0];
     19 assign pmod2 = count[7:0];
     20 
     21 assign led_grn = count[20];
     22 assign led_red = count[21];
     23 
     24 endmodule