Prévia do material em texto
Step of 4 9.020E The law adder circuit with a 32Kx8 ROM and two XOR gates is shown in Figure 1. In this circuit, out of 16 adder bits inputs one pair of inputs is applied to one ex-or gate, which performs the operation of addition of those operand bits. The second ex-or gate is used to generate common active low chip select and output enable signal. Thus, total number of input bits to the ROM is 15. Therefore, the address bits are as follows: = 32K The total number of out bits is 8. Step 2 of 4 The design of the 28C512, 64K X 8 ROM as 32K X 8 ROM is shown in Figure 1. PCMX0 A0 A2 A3 00 PCMSUM0 A4 A6 32K 8 PCMX7 A7 ROM PCMY0 A8 A9 A10 All 07 PCMSUM7 A12 PCMY6 A13 PCMX7 A14 PCMY7 1/0 o CS/OE/VPP 1/0 Figure 1 Step 3 of 4 The and 7th elements are shown here. The remaining intermediate elements are assumed to be there did not showed due to space constraint. Step 4 of 4 The C program to generate the ROM contents as follows: #include #include extem int UlawToLinear(int in); extem int LinearToUlaw(int x); #define MINLINEAR -8159 #define MAXLINEAR 8159 void main() { int linearSum; int pcmlNX, for(e=0; e MAXINEAR) linearSum = printf ("%02x", LinearToUlaw(linearSum) } printf (" ") } } }