data/full_repos/permissive/201797126/prewish5k_top.v
 line:32 column:21: Illegal character "'"
1: b"%Error: data/full_repos/permissive/201797126/prewish5k_top.v:116: Duplicate declaration of signal: 'led_b'\n                                                                : ... note: ANSI ports must have type declared with the I/O (IEEE 1800-2017 23.2.2.2)\n    wire led_b, led_r;\n         ^~~~~\n        data/full_repos/permissive/201797126/prewish5k_top.v:18: ... Location of original declaration\n    output led_b,                \n           ^~~~~\n%Error: data/full_repos/permissive/201797126/prewish5k_top.v:116: Duplicate declaration of signal: 'led_r'\n    wire led_b, led_r;\n                ^~~~~\n        data/full_repos/permissive/201797126/prewish5k_top.v:19: ... Location of original declaration\n    output led_r,                \n           ^~~~~\n%Error: Exiting due to 2 error(s)\n"
module prewish5k_top(
    input the_button,
    input i_bit7,
    input i_bit6,
    input i_bit5,
    input i_bit4,
    input i_bit3,
    input i_bit2,
    input i_bit1,
    input i_bit0,
    output the_led,
    output led_b,
    output led_r,
    output o_led0,
    output o_led1,
    output o_led2,
    output o_led3
    );




    wire button_internal;
    wire button_acthi;
    SB_IO #(
        .PIN_TYPE(6'b 0000_01),
        .PULLUP(1'b 1)
    ) button_input(
        .PACKAGE_PIN(the_button),
        .D_IN_0(button_internal)
    );
    assign button_acthi = ~button_internal;



    wire[7:0] dip_swicth;

    SB_IO #(.PIN_TYPE(6'b 0000_01),.PULLUP(1'b 1)) bit7_input(.PACKAGE_PIN(i_bit7),.D_IN_0(dip_swicth[7]));
    SB_IO #(.PIN_TYPE(6'b 0000_01),.PULLUP(1'b 1)) bit6_input(.PACKAGE_PIN(i_bit6),.D_IN_0(dip_swicth[6]));
    SB_IO #(.PIN_TYPE(6'b 0000_01),.PULLUP(1'b 1)) bit5_input(.PACKAGE_PIN(i_bit5),.D_IN_0(dip_swicth[5]));
    SB_IO #(.PIN_TYPE(6'b 0000_01),.PULLUP(1'b 1)) bit4_input(.PACKAGE_PIN(i_bit4),.D_IN_0(dip_swicth[4]));
    SB_IO #(.PIN_TYPE(6'b 0000_01),.PULLUP(1'b 1)) bit3_input(.PACKAGE_PIN(i_bit3),.D_IN_0(dip_swicth[3]));
    SB_IO #(.PIN_TYPE(6'b 0000_01),.PULLUP(1'b 1)) bit2_input(.PACKAGE_PIN(i_bit2),.D_IN_0(dip_swicth[2]));
    SB_IO #(.PIN_TYPE(6'b 0000_01),.PULLUP(1'b 1)) bit1_input(.PACKAGE_PIN(i_bit1),.D_IN_0(dip_swicth[1]));
    SB_IO #(.PIN_TYPE(6'b 0000_01),.PULLUP(1'b 1)) bit0_input(.PACKAGE_PIN(i_bit0),.D_IN_0(dip_swicth[0]));




	wire clk;
	SB_HFOSC u_hfosc (
		.CLKHFPU(1'b1),
		.CLKHFEN(1'b1),
		.CLKHF(clk)
	);

    /
    wire led_b, led_r;


    reg led_r_reg = 0;
    reg led_g_reg = 0;
    reg led_b_reg = 0;
    SB_RGBA_DRV rgb (
      .RGBLEDEN (1'b1),
      .RGB0PWM  (led_g_reg),
      .RGB1PWM  (led_b_reg),
      .RGB2PWM  (led_r_reg),
      .CURREN   (1'b1),
      .RGB0     (the_led),
      .RGB1     (led_b),
      .RGB2     (led_r)
    );
    defparam rgb.CURRENT_MODE = "0b1";
    defparam rgb.RGB0_CURRENT = "0b000001";
    defparam rgb.RGB1_CURRENT = "0b000001";
    defparam rgb.RGB2_CURRENT = "0b000001";









    parameter CTRL_MASK_CLK_BITS=30;
    wire led_outwire;
    prewish5k_controller
        #(.NEWMASK_CLK_BITS(CTRL_MASK_CLK_BITS),.BLINKY_MASK_CLK_BITS(CTRL_MASK_CLK_BITS-7))
        controller(
        .i_clk(clk),
        .button_internal(button_acthi),
        .dip_switch(dip_swicth),
        .the_led(led_outwire),
        .o_led0(o_led0),
        .o_led1(o_led1),
        .o_led2(o_led2),
        .o_led3(o_led3)
    );
    parameter PWMbits = 3;
    reg[PWMbits-1:0] pwmctr = 0;
    always @(posedge clk) begin



        led_g_reg <= (&pwmctr) & led_outwire;
        pwmctr <= pwmctr + 1;
    end

endmodule
module prewish5k_top(
    input the_button,
    input i_bit7,
    input i_bit6,
    input i_bit5,
    input i_bit4,
    input i_bit3,
    input i_bit2,
    input i_bit1,
    input i_bit0,
    output the_led,
    output led_b,
    output led_r,
    output o_led0,
    output o_led1,
    output o_led2,
    output o_led3
    );





    wire button_internal;
    wire button_acthi;
    SB_IO #(
        .PIN_TYPE(6'b 0000_01),
        .PULLUP(1'b 1)
    ) button_input(
        .PACKAGE_PIN(the_button),
        .D_IN_0(button_internal)
    );
    assign button_acthi = ~button_internal;



    wire[7:0] dip_swicth;

    SB_IO #(.PIN_TYPE(6'b 0000_01),.PULLUP(1'b 1)) bit7_input(.PACKAGE_PIN(i_bit7),.D_IN_0(dip_swicth[7]));
    SB_IO #(.PIN_TYPE(6'b 0000_01),.PULLUP(1'b 1)) bit6_input(.PACKAGE_PIN(i_bit6),.D_IN_0(dip_swicth[6]));
    SB_IO #(.PIN_TYPE(6'b 0000_01),.PULLUP(1'b 1)) bit5_input(.PACKAGE_PIN(i_bit5),.D_IN_0(dip_swicth[5]));
    SB_IO #(.PIN_TYPE(6'b 0000_01),.PULLUP(1'b 1)) bit4_input(.PACKAGE_PIN(i_bit4),.D_IN_0(dip_swicth[4]));
    SB_IO #(.PIN_TYPE(6'b 0000_01),.PULLUP(1'b 1)) bit3_input(.PACKAGE_PIN(i_bit3),.D_IN_0(dip_swicth[3]));
    SB_IO #(.PIN_TYPE(6'b 0000_01),.PULLUP(1'b 1)) bit2_input(.PACKAGE_PIN(i_bit2),.D_IN_0(dip_swicth[2]));
    SB_IO #(.PIN_TYPE(6'b 0000_01),.PULLUP(1'b 1)) bit1_input(.PACKAGE_PIN(i_bit1),.D_IN_0(dip_swicth[1]));
    SB_IO #(.PIN_TYPE(6'b 0000_01),.PULLUP(1'b 1)) bit0_input(.PACKAGE_PIN(i_bit0),.D_IN_0(dip_swicth[0]));




	wire clk;
	SB_HFOSC u_hfosc (
		.CLKHFPU(1'b1),
		.CLKHFEN(1'b1),
		.CLKHF(clk)
	);

    /
    wire led_b, led_r;


    reg led_r_reg = 0;
    reg led_g_reg = 0;
    reg led_b_reg = 0;
    SB_RGBA_DRV rgb (
      .RGBLEDEN (1'b1),
      .RGB0PWM  (led_g_reg),
      .RGB1PWM  (led_b_reg),
      .RGB2PWM  (led_r_reg),
      .CURREN   (1'b1),
      .RGB0     (the_led),
      .RGB1     (led_b),
      .RGB2     (led_r)
    );
    defparam rgb.CURRENT_MODE = "0b1";
    defparam rgb.RGB0_CURRENT = "0b000001";
    defparam rgb.RGB1_CURRENT = "0b000001";
    defparam rgb.RGB2_CURRENT = "0b000001";









    parameter CTRL_MASK_CLK_BITS=30;
    wire led_outwire;
    prewish5k_controller
        #(.NEWMASK_CLK_BITS(CTRL_MASK_CLK_BITS),.BLINKY_MASK_CLK_BITS(CTRL_MASK_CLK_BITS-7))
        controller(
        .i_clk(clk),
        .button_internal(button_acthi),
        .dip_switch(dip_swicth),
        .the_led(led_outwire),
        .o_led0(o_led0),
        .o_led1(o_led1),
        .o_led2(o_led2),
        .o_led3(o_led3)
    );
    parameter PWMbits = 3;
    reg[PWMbits-1:0] pwmctr = 0;
    always @(posedge clk) begin



        led_g_reg <= (&pwmctr) & led_outwire;
        pwmctr <= pwmctr + 1;
    end

endmodule