Write a behavioral VHDL or Verilog program for a multibit parity function with the same number of inputs as your answer to Exercise 6.85. Use a for loop to perform the 11-bit XOR operation, and target the design to an XC9500 CPLD. Does the final, fitted circuit have just two levels of delay and use the same number of macrocells as in Exercise 6.85 ?
Based on your answer for Exercise 6.83, determine the number of inputs in the largest XOR (parity) function that can be designed in just two levels of XC9500 macrocells, again assuming that "steered" product terms from other macrocells are not used. Draw a block diagram showing how the function is partitioned into macrocells; how many are used?
Exercise 6.83
Study the structure of the Xilinx XC9500 CPLD macrocell in Figure 9-41, and determine the largest number of inputs that can be accommodated in an XOR (parity) function that fits in a single macrocell, assuming that "steered" product terms from other macrocells are not used (they are slower). Describe which macrocell resources are used to achieve this result and how they are used. Hint: Using most HDL tools, you can write and synthesize HDL programs for 2-, 3-, 4-, and 5-input XOR functions and look at the resulting, fitted equations.
![27_27fb98fa-9846-4448-84af-5d887464a12e.png](https://secure.tutorsglobe.com/CMSImages/27_27fb98fa-9846-4448-84af-5d887464a12e.png)
![459_b341f0ba-c6d7-448c-b69f-671877c878f6.png](https://secure.tutorsglobe.com/CMSImages/459_b341f0ba-c6d7-448c-b69f-671877c878f6.png)