case (RSel)
      4'b0000:begin
                R1e = 1'b0;   R2e = 1'b0;  R3e = 1'b0;  R4e = 1'b0;  
              end
      4'b0001:begin
                R1e = 1'b0;   R2e = 1'b0;  R3e = 1'b0;  R4e = 1'b1; 
              end
      4'b0010:begin
                R1e = 1'b0;   R2e = 1'b0;  R3e = 1'b1;  R4e = 1'b0; 
              end
      4'b0011:begin
                R1e = 1'b0;   R2e = 1'b0;  R3e = 1'b1;  R4e = 1'b1; 
              end
      4'b0100:begin
                R1e = 1'b0;   R2e = 1'b1;  R3e = 1'b0;  R4e = 1'b0;
              end
      4'b0101:begin
                R1e = 1'b0;   R2e = 1'b1;  R3e = 1'b0;  R4e = 1'b1;  
              end
      4'b0110:begin
                R1e = 1'b0;   R2e = 1'b1;  R3e = 1'b1;  R4e = 1'b0; 
              end
      4'b0111:begin
                R1e = 1'b0;   R2e = 1'b1;  R3e = 1'b1;  R4e = 1'b1;  
              end
      4'b1000:begin
                R1e = 1'b1;   R2e = 1'b0;  R3e = 1'b0;  R4e = 1'b0;  
              end
      4'b1001:begin
                R1e = 1'b1;   R2e = 1'b0;  R3e = 1'b0;  R4e = 1'b1;
              end
      4'b1010:begin
                R1e = 1'b1;   R2e = 1'b0;  R3e = 1'b1;  R4e = 1'b0; 
              end
      4'b1011:begin
                R1e = 1'b1;   R2e = 1'b0;  R3e = 1'b1;  R4e = 1'b1; 
              end
      4'b1100:begin
                R1e = 1'b1;   R2e = 1'b1;  R3e = 1'b0;  R4e = 1'b0; 
              end
      4'b1101:begin
                R1e = 1'b1;   R2e = 1'b1;  R3e = 1'b0;  R4e = 1'b1; 
              end
      4'b1110:begin
                R1e = 1'b1;   R2e = 1'b1;  R3e = 1'b1;  R4e = 1'b0; 
              end
      4'b1111:begin
                R1e = 1'b1;   R2e = 1'b1;  R3e = 1'b1;  R4e = 1'b1;
              end
     
    endcase
    
    case (TSel)
          4'b0000:begin
                    T1e = 1'b0;  T2e = 1'b0; T3e = 1'b0;  T4e = 1'b0;
                  end
          4'b0001:begin
                    T1e = 1'b0;  T2e = 1'b0; T3e = 1'b0;  T4e = 1'b1;
                  end
          4'b0010:begin
                    T1e = 1'b0;  T2e = 1'b0; T3e = 1'b1;  T4e = 1'b0;
                  end
          4'b0011:begin
                    T1e = 1'b0;  T2e = 1'b0; T3e = 1'b1;  T4e = 1'b1;
                  end
          4'b0100:begin
                    T1e = 1'b0;  T2e = 1'b1; T3e = 1'b0;  T4e = 1'b0;
                  end
          4'b0101:begin
                    T1e = 1'b0;  T2e = 1'b1; T3e = 1'b0;  T4e = 1'b1;
                  end
          4'b0110:begin
                    T1e = 1'b0;  T2e = 1'b1; T3e = 1'b1;  T4e = 1'b0;
                  end
          4'b0111:begin
                    T1e = 1'b0;  T2e = 1'b1; T3e = 1'b1;  T4e = 1'b1;
                  end
          4'b1000:begin
                    T1e = 1'b1;  T2e = 1'b0; T3e = 1'b0;  T4e = 1'b0;
                  end
          4'b1001:begin
                    T1e = 1'b1;  T2e = 1'b0; T3e = 1'b0;  T4e = 1'b1;
                  end
          4'b1010:begin
                    T1e = 1'b1;  T2e = 1'b0; T3e = 1'b1;  T4e = 1'b0;
                  end
          4'b1011:begin
                    T1e = 1'b1;  T2e = 1'b0; T3e = 1'b1;  T4e = 1'b1;
                  end
          4'b1100:begin
                    T1e = 1'b1;  T2e = 1'b1; T3e = 1'b0;  T4e = 1'b0;
                  end
          4'b1101:begin
                    T1e = 1'b1;  T2e = 1'b1; T3e = 1'b0;  T4e = 1'b1; 
                  end
          4'b1110:begin
                    T1e = 1'b1;  T2e = 1'b1; T3e = 1'b1;  T4e = 1'b0;
                  end
          4'b1111:begin
                    T1e = 1'b1;  T2e = 1'b1; T3e = 1'b1;  T4e = 1'b1;
                  end
        endcase

Just write assign {R1e, R2e, R3e, R4e} = Rsel assign {T1e, T2e, T3e, T4e} = Tsel

By dawidogg, 2023-04-01 16:40:34