File: floorplan.v

package info (click to toggle)
nextpnr 0.7-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 23,908 kB
  • sloc: cpp: 219,642; python: 21,427; ansic: 10,274; sh: 779; makefile: 493; tcl: 116; vhdl: 44; objc: 42
file content (22 lines) | stat: -rw-r--r-- 484 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
module top(output LED1, LED2, LED3, LED4, LED5);
    localparam N = 31;
    wire [N:0] x;
    assign x[0] = x[N];

    genvar ii;
    generate

    for (ii = 0; ii < N; ii = ii + 1) begin
        (* ringosc *)
        SB_LUT4 #(.LUT_INIT(1)) lut_i(.I0(x[ii]), .I1(), .I2(), .I3(), .O(x[ii+1]));
    end
    endgenerate

    assign clk = x[N];


    reg [19:0] ctr;
    always @(posedge clk)
        ctr <= ctr + 1'b1;
    assign {LED5, LED4, LED3, LED2, LED1} = ctr[19:15];
endmodule