module ioport2_msg_encode(
    input          rd_response,
    input          wr_request,
    input          rd_request,
    input          half_word,
    input  [19:0]  address,
    input  [31:0]  data,
    output [31:0]  control,
    output [63:0]  message
);
    assign control = rd_response ? {rd_response, 31'h0} : {rd_response, wr_request, rd_request, half_word, 8'h00, address};
    assign message = {control, data};
endmodule