It depends entirely on where you bought it. If your DS came from Best Buy and you also took out their replacement plan, the terms of that plan allowed a swap for a DSi.
Without the plan, or from any other retailer, you are looking at a standard trade-in instead, where the store credits part of the value toward the new handheld. Ask at the counter before you commit, since these offers come and go.