data/full_repos/permissive/115920613/rtl/boards/ice40hx8k-b-evn/apple1_hx8k.v
 line:83: before: ")"
1: b"%Error: data/full_repos/permissive/115920613/rtl/boards/ice40hx8k-b-evn/apple1_hx8k.v:67: Cannot find file containing module: 'pll'\n    pll my_pll(\n    ^~~\n        ... Looked in:\n             data/full_repos/permissive/115920613/rtl/boards/ice40hx8k-b-evn,data/full_repos/permissive/115920613/pll\n             data/full_repos/permissive/115920613/rtl/boards/ice40hx8k-b-evn,data/full_repos/permissive/115920613/pll.v\n             data/full_repos/permissive/115920613/rtl/boards/ice40hx8k-b-evn,data/full_repos/permissive/115920613/pll.sv\n             pll\n             pll.v\n             pll.sv\n             obj_dir/pll\n             obj_dir/pll.v\n             obj_dir/pll.sv\n%Error: data/full_repos/permissive/115920613/rtl/boards/ice40hx8k-b-evn/apple1_hx8k.v:77: Cannot find file containing module: 'SB_IO'\n    SB_IO #(\n    ^~~~~\n%Error: data/full_repos/permissive/115920613/rtl/boards/ice40hx8k-b-evn/apple1_hx8k.v:85: Cannot find file containing module: 'SB_IO'\n    SB_IO #(\n    ^~~~~\n%Error: data/full_repos/permissive/115920613/rtl/boards/ice40hx8k-b-evn/apple1_hx8k.v:98: Cannot find file containing module: 'debounce'\n    debounce reset_button (\n    ^~~~~~~~\n%Error: data/full_repos/permissive/115920613/rtl/boards/ice40hx8k-b-evn/apple1_hx8k.v:107: Cannot find file containing module: 'debounce'\n    debounce clr_button (\n    ^~~~~~~~\n%Error: data/full_repos/permissive/115920613/rtl/boards/ice40hx8k-b-evn/apple1_hx8k.v:117: Cannot find file containing module: 'debounce'\n    debounce ps2_button (\n    ^~~~~~~~\n%Error: data/full_repos/permissive/115920613/rtl/boards/ice40hx8k-b-evn/apple1_hx8k.v:133: Cannot find file containing module: 'apple1'\n    apple1 #(\n    ^~~~~~\n%Error: Exiting due to 7 error(s)\n"
module apple1_top #(
    parameter BASIC_FILENAME      = "../../../roms/basic.hex",
    parameter FONT_ROM_FILENAME   = "../../../roms/vga_font_bitreversed.hex",
    parameter RAM_FILENAME        = "../../../roms/ram.hex",
    parameter VRAM_FILENAME       = "../../../roms/vga_vram.bin",
    parameter WOZMON_ROM_FILENAME = "../../../roms/wozmon.hex"
) (
    input  clk,


    input  uart_rx,
    output uart_tx,
    output uart_cts,


    input ps2_clk,
    input ps2_din,


    output vga_h_sync,
    output vga_v_sync,
    output reg vga_red,
    output reg vga_grn,
    output reg vga_blu,


    output [7:0] led,
    output [7:0] ledx,
    input [3:0] button
);



    wire clk25;

    wire [15:0] pc_monitor;
    assign led[7:0] = pc_monitor[7:0];
    assign ledx[7:0] = ~pc_monitor[15:8];




    pll my_pll(
        .clock_in(clk),
        .clock_out(clk25)
    );





    wire ps2__clk, ps2__din;
    SB_IO #(
        .PIN_TYPE(6'b000001),
        .PULLUP(1'b1)
    ) my_ps2_clk (
        .PACKAGE_PIN(ps2_clk),
        .D_IN_0(ps2__clk),
    );

    SB_IO #(
        .PIN_TYPE(6'b000001),
        .PULLUP(1'b1)
    ) my_ps2_din (
        .PACKAGE_PIN(ps2_din),
        .D_IN_0(ps2__din),
    );





    wire reset_n;
    debounce reset_button (
        .clk25(clk25),
        .rst(1'b0),
        .sig_in(button[0]),
        .sig_out(reset_n)
    );


    wire clr_screen_n;
    debounce clr_button (
        .clk25(clk25),
        .rst(~reset_n),
        .sig_in(button[1]),
        .sig_out(clr_screen_n)
    );


    wire ps2_toggle;
    reg ps2_select;
    debounce ps2_button (
        .clk25(clk25),
        .rst(~reset_n),
        .sig_in(button[2]),
        .sig_out(ps2_toggle)
    );



    always @(posedge ps2_toggle)
        ps2_select <= ~ps2_select;





    apple1 #(
        .BASIC_FILENAME (BASIC_FILENAME),
        .FONT_ROM_FILENAME (FONT_ROM_FILENAME),
        .RAM_FILENAME (RAM_FILENAME),
        .VRAM_FILENAME (VRAM_FILENAME),
        .WOZMON_ROM_FILENAME (WOZMON_ROM_FILENAME)
    ) my_apple1(
        .clk25(clk25),
        .rst_n(reset_n),
        .uart_rx(uart_rx),
        .uart_tx(uart_tx),
        .uart_cts(uart_cts),
        .ps2_clk(ps2__clk),
        .ps2_din(ps2__din),
        .ps2_select(ps2_select),
        .vga_h_sync(vga_h_sync),
        .vga_v_sync(vga_v_sync),
        .vga_red(vga_red),
        .vga_grn(vga_grn),
        .vga_blu(vga_blu),
        .vga_cls(~clr_screen_n),
        .pc_monitor(pc_monitor)
    );

endmodule
module apple1_top #(
    parameter BASIC_FILENAME      = "../../../roms/basic.hex",
    parameter FONT_ROM_FILENAME   = "../../../roms/vga_font_bitreversed.hex",
    parameter RAM_FILENAME        = "../../../roms/ram.hex",
    parameter VRAM_FILENAME       = "../../../roms/vga_vram.bin",
    parameter WOZMON_ROM_FILENAME = "../../../roms/wozmon.hex"
) (
    input  clk,


    input  uart_rx,
    output uart_tx,
    output uart_cts,


    input ps2_clk,
    input ps2_din,


    output vga_h_sync,
    output vga_v_sync,
    output reg vga_red,
    output reg vga_grn,
    output reg vga_blu,


    output [7:0] led,
    output [7:0] ledx,
    input [3:0] button
);




    wire clk25;

    wire [15:0] pc_monitor;
    assign led[7:0] = pc_monitor[7:0];
    assign ledx[7:0] = ~pc_monitor[15:8];




    pll my_pll(
        .clock_in(clk),
        .clock_out(clk25)
    );





    wire ps2__clk, ps2__din;
    SB_IO #(
        .PIN_TYPE(6'b000001),
        .PULLUP(1'b1)
    ) my_ps2_clk (
        .PACKAGE_PIN(ps2_clk),
        .D_IN_0(ps2__clk),
    );

    SB_IO #(
        .PIN_TYPE(6'b000001),
        .PULLUP(1'b1)
    ) my_ps2_din (
        .PACKAGE_PIN(ps2_din),
        .D_IN_0(ps2__din),
    );





    wire reset_n;
    debounce reset_button (
        .clk25(clk25),
        .rst(1'b0),
        .sig_in(button[0]),
        .sig_out(reset_n)
    );


    wire clr_screen_n;
    debounce clr_button (
        .clk25(clk25),
        .rst(~reset_n),
        .sig_in(button[1]),
        .sig_out(clr_screen_n)
    );


    wire ps2_toggle;
    reg ps2_select;
    debounce ps2_button (
        .clk25(clk25),
        .rst(~reset_n),
        .sig_in(button[2]),
        .sig_out(ps2_toggle)
    );



    always @(posedge ps2_toggle)
        ps2_select <= ~ps2_select;





    apple1 #(
        .BASIC_FILENAME (BASIC_FILENAME),
        .FONT_ROM_FILENAME (FONT_ROM_FILENAME),
        .RAM_FILENAME (RAM_FILENAME),
        .VRAM_FILENAME (VRAM_FILENAME),
        .WOZMON_ROM_FILENAME (WOZMON_ROM_FILENAME)
    ) my_apple1(
        .clk25(clk25),
        .rst_n(reset_n),
        .uart_rx(uart_rx),
        .uart_tx(uart_tx),
        .uart_cts(uart_cts),
        .ps2_clk(ps2__clk),
        .ps2_din(ps2__din),
        .ps2_select(ps2_select),
        .vga_h_sync(vga_h_sync),
        .vga_v_sync(vga_v_sync),
        .vga_red(vga_red),
        .vga_grn(vga_grn),
        .vga_blu(vga_blu),
        .vga_cls(~clr_screen_n),
        .pc_monitor(pc_monitor)
    );

endmodule