data/full_repos/permissive/125742950/OutputMultiplexer.v
data/verilator_xmls/ba7f669f-9f9a-4798-b18d-e0c5da61bea8.xml
module OutputMultiplexer(Waveforms, Noise, Status, Channel0, Channel1, Channel2, Channel3);
    input[23:0] Waveforms;
    input[5:0] Noise;
    input[7:0] Status;
    output reg[5:0] Channel0;
    output reg[5:0] Channel1;
    output reg[5:0] Channel2;
    output reg[5:0] Channel3;
    
    always @ (*) begin
        casex(Status[1:0])
            2'b0x: Channel0 = 6'b000000;
            2'b10: Channel0 = Waveforms[5:0];
            2'b11: Channel0 = Noise;
        endcase
        
        casex(Status[3:2])
            2'b0x: Channel1 = 6'b000000;     
            2'b10: Channel1 = Waveforms[11:6];
            2'b11: Channel1 = Noise;
        endcase
        
        casex(Status[5:4])
            2'b0x: Channel2 = 6'b000000;    
            2'b10: Channel2 = Waveforms[17:12];
            2'b11: Channel2 = Noise;
        endcase
        
        casex(Status[7:6])
            2'b0x: Channel3 = 6'b000000;    
            2'b10: Channel3 = Waveforms[23:18];
            2'b11: Channel3 = Noise;
        endcase
    end
endmodule
module OutputMultiplexer(Waveforms, Noise, Status, Channel0, Channel1, Channel2, Channel3);

    input[23:0] Waveforms;
    input[5:0] Noise;
    input[7:0] Status;
    output reg[5:0] Channel0;
    output reg[5:0] Channel1;
    output reg[5:0] Channel2;
    output reg[5:0] Channel3;
    
    always @ (*) begin
        casex(Status[1:0])
            2'b0x: Channel0 = 6'b000000;
            2'b10: Channel0 = Waveforms[5:0];
            2'b11: Channel0 = Noise;
        endcase
        
        casex(Status[3:2])
            2'b0x: Channel1 = 6'b000000;     
            2'b10: Channel1 = Waveforms[11:6];
            2'b11: Channel1 = Noise;
        endcase
        
        casex(Status[5:4])
            2'b0x: Channel2 = 6'b000000;    
            2'b10: Channel2 = Waveforms[17:12];
            2'b11: Channel2 = Noise;
        endcase
        
        casex(Status[7:6])
            2'b0x: Channel3 = 6'b000000;    
            2'b10: Channel3 = Waveforms[23:18];
            2'b11: Channel3 = Noise;
        endcase
    end
endmodule