data/full_repos/permissive/174323821/target/mister/jtframe_joymux.v
 line:49: before: "("
1: b"%Error: data/full_repos/permissive/174323821/target/mister/jtframe_joymux.v:69: Cannot find file containing module: 'joy_db15'\njoy_db15 u_db15\n^~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/174323821/target/mister,data/full_repos/permissive/174323821/joy_db15\n             data/full_repos/permissive/174323821/target/mister,data/full_repos/permissive/174323821/joy_db15.v\n             data/full_repos/permissive/174323821/target/mister,data/full_repos/permissive/174323821/joy_db15.sv\n             joy_db15\n             joy_db15.v\n             joy_db15.sv\n             obj_dir/joy_db15\n             obj_dir/joy_db15.v\n             obj_dir/joy_db15.sv\n%Error: Exiting due to 1 error(s)\n"
module jtframe_joymux(
    input             rst,
    input             clk,
    output reg        show_osd,


    input      [ 6:0] USER_IN,
    output     [ 6:0] USER_OUT,


    input             db15_en,
    input      [15:0] joyusb_1,
    input      [15:0] joyusb_2,
    output reg [15:0] joymux_1,
    output reg [15:0] joymux_2
);

parameter BUTTONS = 2;


localparam START_BIT  = 6+(BUTTONS-2);
localparam COIN_BIT   = 7+(BUTTONS-2);


wire [15:0] joydb15_1,joydb15_2;
wire        joy_din, joy_clk, joy_load;

assign USER_OUT = db15_en ? { 5'h1f, joy_clk, joy_load } : 7'h7f;
assign joy_din  = USER_IN[5];

function [15:0] assign_joy(
    input [15:0] joydb,
    input [15:0] joyusb
);
    if( db15_en ) begin
        assign_joy = 0;
        assign_joy[BUTTONS+3:0] = joydb[BUTTONS+3:0];
        assign_joy[COIN_BIT]    = joydb[11];
        assign_joy[START_BIT]   = joydb[10];
    end else begin
        assign_joy = joyusb;
    end
endfunction

always @(posedge clk) begin
    joymux_1 <= assign_joy( joydb15_1, joyusb_1 );
    joymux_2 <= assign_joy( joydb15_2, joyusb_2 );
    show_osd <= db15_en & ((joydb15_1[10] & joydb15_1[6]) | (joydb15_2[10]&joydb15_2[6]));
end

joy_db15 u_db15
(
  .clk       ( clk       ),
  .JOY_CLK   ( joy_clk   ),
  .JOY_DATA  ( joy_din   ),
  .JOY_LOAD  ( joy_load  ),
  .joystick1 ( joydb15_1 ),
  .joystick2 ( joydb15_2 )    
);

endmodule
module jtframe_joymux(
    input             rst,
    input             clk,
    output reg        show_osd,


    input      [ 6:0] USER_IN,
    output     [ 6:0] USER_OUT,


    input             db15_en,
    input      [15:0] joyusb_1,
    input      [15:0] joyusb_2,
    output reg [15:0] joymux_1,
    output reg [15:0] joymux_2
);


parameter BUTTONS = 2;


localparam START_BIT  = 6+(BUTTONS-2);
localparam COIN_BIT   = 7+(BUTTONS-2);


wire [15:0] joydb15_1,joydb15_2;
wire        joy_din, joy_clk, joy_load;

assign USER_OUT = db15_en ? { 5'h1f, joy_clk, joy_load } : 7'h7f;
assign joy_din  = USER_IN[5];

function [15:0] assign_joy(
    input [15:0] joydb,
    input [15:0] joyusb
);
    if( db15_en ) begin
        assign_joy = 0;
        assign_joy[BUTTONS+3:0] = joydb[BUTTONS+3:0];
        assign_joy[COIN_BIT]    = joydb[11];
        assign_joy[START_BIT]   = joydb[10];
    end else begin
        assign_joy = joyusb;
    end
endfunction

always @(posedge clk) begin
    joymux_1 <= assign_joy( joydb15_1, joyusb_1 );
    joymux_2 <= assign_joy( joydb15_2, joyusb_2 );
    show_osd <= db15_en & ((joydb15_1[10] & joydb15_1[6]) | (joydb15_2[10]&joydb15_2[6]));
end

joy_db15 u_db15
(
  .clk       ( clk       ),
  .JOY_CLK   ( joy_clk   ),
  .JOY_DATA  ( joy_din   ),
  .JOY_LOAD  ( joy_load  ),
  .joystick1 ( joydb15_1 ),
  .joystick2 ( joydb15_2 )    
);

endmodule