1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
|
module example(CLK, LD); input CLK; output [15:0] LD; wire clock; reg [15:0] leds; BUFG CLK_BUF (.I(CLK), .O(clock)); OBUF LD_BUF[15:0] (.I(leds), .O(LD)); parameter COUNTBITS = 26; reg [COUNTBITS-1:0] counter; always @(posedge CLK) begin counter <= counter + 1; if (counter[COUNTBITS-1]) leds <= 16'h8000 >> counter[COUNTBITS-2:COUNTBITS-5]; else leds <= 16'h0001 << counter[COUNTBITS-2:COUNTBITS-5]; end endmodule ove-reset-asserts.patch?h=upstream' type='application/atom+xml'/>
![]() |
index : openwrt/upstream | |
upstream openwrt | James |
aboutsummaryrefslogtreecommitdiffstats |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
|