In this paper, we propose a novel and flexible codeword assignment technique for a Code Division Multiple Access (CDMA) based Network-on-Chip (NoC). This approach allows bandwidth to be reallocated to ports dynamically on an as-needed basis. In this way, more of the available system bandwidth can be utilized under practical traffic conditions. In addition, wormhole routing is applied to minimize the hardware overhead of the technique. Our switch has been synthesized using 0.13μm CMOS high-speed ASIC library. Synthesis results and performance analysis data are provided.