summaryrefslogtreecommitdiff
path: root/src/mkm_test1.v
blob: 64f1b5d99873b045e1e87083efbae7590ba61726 (plain) (blame)
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
module mkm_test1
(
    output [3:0] leds   // {red, yellow, green, blue}
                        // PCB: | BLUE | RED | YELLOW | GREEN |
);

    wire clk_osc_hf;    // 48 MHz
    
    SB_HFOSC #
    (
        .CLKHF_DIV  ("0b00")
    )
    SB_HFOSC_inst
    (
        .CLKHFPU    (1'b1),
        .CLKHFEN    (1'b1),
        .CLKHF      (clk_osc_hf)
    ) /* synthesis ROUTE_THROUGH_FABRIC = 0 */;
    
    reg [26:0] cnt = 27'd0;
    
    always @(posedge clk_osc_hf)
        //
        cnt <= cnt + 1'b1;
        
    assign leds = cnt[26:23];

endmodule