A base station (101, 102, 103) comprising: a downlink transmit path comprising circuitry configured to transmit at least one reference signal in one or more subframes, each subframe comprising two slots, each slot comprising S OFDM symbols, each of the S OFDM symbols comprising N resource elements; and a reference signal controller configured to: apply one orthogonal code of two orthogonal codes to an antenna port of a first set of antenna ports, if the number of layers is less than or equal to four, and apply one orthogonal code of four orthogonal codes to an antenna port of a second set of antenna ports, if the number of layers is greater than four, wherein total number of antenna ports is based on the number of layers, wherein a first antenna port within the first set is mapped on first 4 resource elements with a first orthogonal code, a second antenna port within the first set is mapped on the first 4 resource elements with a second orthogonal code, a third antenna port within the first set is mapped on second 4 resource elements with the first orthogonal code, and a fourth antenna port within the first set is mapped on the second 4 resource elements with the second orthogonal code. a downlink transmit path comprising circuitry configured to transmit at least one reference signal in one or more subframes, each subframe comprising two slots, each slot comprising S OFDM symbols, each of the S OFDM symbols comprising N resource elements; and a reference signal controller configured to: apply one orthogonal code of two orthogonal codes to an antenna port of a first set of antenna ports, if the number of layers is less than or equal to four, and apply one orthogonal code of four orthogonal codes to an antenna port of a second set of antenna ports, if the number of layers is greater than four, wherein total number of antenna ports is based on the number of layers, wherein a first antenna port within the first set is mapped on first 4 resource elements with a first orthogonal code, a second antenna port within the first set is mapped on the first 4 resource elements with a second orthogonal code, a third antenna port within the first set is mapped on second 4 resource elements with the first orthogonal code, and a fourth antenna port within the first set is mapped on the second 4 resource elements with the second orthogonal code. apply one orthogonal code of two orthogonal codes to an antenna port of a first set of antenna ports, if the number of layers is less than or equal to four, and apply one orthogonal code of four orthogonal codes to an antenna port of a second set of antenna ports, if the number of layers is greater than four, wherein total number of antenna ports is based on the number of layers, wherein a first antenna port within the first set is mapped on first 4 resource elements with a first orthogonal code, a second antenna port within the first set is mapped on the first 4 resource elements with a second orthogonal code, a third antenna port within the first set is mapped on second 4 resource elements with the first orthogonal code, and a fourth antenna port within the first set is mapped on the second 4 resource elements with the second orthogonal code.