Yes… I went through the graphs of XC2C128 and could see that an I/O pin can source/sink 8 mA current at 3.3v. Also since I want to multiplex 4 units of seven segment display, I can understand that in a worst case scenario, one I/O pin will have to provide current for 4 segments.
I don't quite follow this. As I see it you would have 8 pins pulling up on the segments and (optionally) the decimal point. Each pin has only a single LED. The transistors multiplex among the 4 displays so they carry as much as 8 LEDs. Still the CPLD pin only carries 1 LED.
So if I keep 1.5 mA for each segment and assume a voltage drop of 2.0v for red led of each segment, the total current through the resistor should be 6 mA and the voltage drop across it will be 3.3-2.0=1.3v. So the value of resistor will come up to be 217 or 220 ohms. Also the power handling capacity would be 1.3v X 6 mA = 7.8 mW or quarter watt resistors will do. I hope you find this correct. Also do you suppose that 1.5 mA per segment per unit of 7 segment display is enough?
I doubt that 1.5 mA will work. Digilent uses 3.5 mA (average).
Also to provide selection of seven segment unit, I am considering each common cathode terminal be connected to the collector of an npn transistor, its base being connected to an I/O pin of CPLD through a resistor. To calculate the value of resistor, I assumed BC547 with hfe=110. In the minimum case scenario, only 1 segment of a 7 segment unit will be on. It will provide 1.5 mA current through the common cathode and thereby the collector of the transistor. The value came out to be 242 Kohms. In the maximum case scenario, all 8 of a seven segment unit will be switched on. The current through the common cathode and thereby the collector of the transistor will become 10.5 mA. The resistor calculated was 34.5 K ohms. My question is which resistor value to consider. The nexyx schematic does not mention which pnp transistor was used. So I cannot back calculate for the amount of current per segment for which the resistors were calculated.
I think this is not quite right. Each transistor selects a digit and the digit MAY consist of all 8 LEDs being on at the same time. ETA: I deleted my rough calculation, it was wrong!. Suppose the multiplexing is stuck and the LEDs are fully ON. In this case, the collector current is 8 * 14 mA = 112 mA. Digilent picked 2.2k resistors so (3.3-0.7)/2200 = 1.2 mA of base current. For Hfe of 100, this is just enough.
This higher current leads to higher brightness and, sure enough, when the LEDs aren't multiplexing, they are a LOT brighter.
Clearly, you calculate the base resistor on maximum load because that is where you need maximum base current.
For a first cut, I would do just what Digilent did even though they used Common Anode.
It's also worth remembering, the CPLD pin current is 14 mA. This means there is 0.4V decrease in the 3.3V curve and this impacts the brightness somewhat. There is no issue with Iol because the transistor is handling the pull-down.
You really need to breadboard this and be certain that you are satisfied with the results before you commit to a PCB.
You calculated 8 mW dissipation, why use a resistor capable of 250 mW? The resistors that Digilent uses are about the size of a grain of sand. The transistors are in dual packages and are very small - less than an 0805 resistor and they have 6 pins. Tiny stuff mounted to the bottom of the board and contained within the area bounded by the display pins.
You probably won't go wrong simply using what Digilent uses.