CSCMPE 3430 Sp16 Assignment 5 - 30 Points Due Saturday
Cscmpe 3430 Sp16 Assignment 5 30 Points Totaldue Saturday May 7
Implement the ALU for the MIPS 3-stage pipeline CPU by designing slices using PLAs, considering the function codes for specific instructions, and packaging them into device symbols. In addition, create a top-level ALU device symbol that integrates the slices, PLAs, and optionally, the Barrel Shifter. Submit your ALU device symbol along with a test circuit demonstrating the operation of various instructions, providing 32-bit hexadecimal outputs for predefined A and B inputs. The key instructions include add, addu, sub, subu, and, or, xor, nor, slt, and sltu, with proper handling of the function codes and control signals. Use Logicworks, minimize product terms in design, and ensure your implementation accurately performs the specified operations, including correctly handling shift instructions via the Barrel Shifter if included. Final submission must demonstrate the correctness of each instruction via sample test vectors and 32-bit outputs. Refer to the specified figures, tables, and the provided spreadsheet for PLA implementation templates.
Paper For Above instruction
The design of an Arithmetic Logic Unit (ALU) for the MIPS 3-stage pipeline CPU is a fundamental activity in digital design, emphasizing efficiency and correctness. This assignment challenges students to implement the ALU slices using Programmable Logic Arrays (PLAs) and integrate them into a cohesive device, capable of executing a variety of instructions dictated by specific function codes, all within a hardware description and simulation environment like Logicworks.
The MIPS architecture employs a 32-bit ALU that performs a variety of operations, including arithmetic (add, addu, sub, subu), logic (and, or, xor, nor), and comparison (slt, sltu). Each operation is determined by a 6-bit function code, which is an input to the ALU slices. The slices operate on individual bits of the 32-bit operands, with the slices interconnected via carry-lookahead logic to enhance speed and decrease delay by avoiding ripple carry delays. The special slices include Slice 0, which handles the least significant bit, and the Slice MSB, managing the most significant bit and additional signals pertinent to slt and overflow computation.
The fundamental structure of each slice resembles a full adder, with inputs A, B, a carry-in (C), and function code bits. The outputs include the result bit (R), generate (g), propagate (p), and in the case of the MSB, an overflow indicator. The slices interact with the CLU (Carry Lookahead Units) that compute carry signals efficiently in a tree structure, thus supporting high-performance arithmetic operations critical for modern CPUs.
The task involves translating this architectural framework into a PLA-based implementation. Minimized PLAs are designed for each slice—one for Slice 0, one for slices 1-30, and one for the Slice MSB—each with 9 inputs (function code bits, A, B, C or slt for the MSB) and their respective outputs. The key challenge involves minimizing the number of product terms by intelligent use of “don’t care” conditions (indicated as x), to optimize the PLA efficiency and resource utilization.
Moreover, the inclusion of the Barrel Shifter allows shift operations (sll, srl, sra, etc.), which are managed outside the slices. When a shift instruction is detected, the shift operation's output via the Barrel Shifter takes precedence, disabling the slice outputs through tri-state control using the TS signals derived from the PLAs. Implementing this requires carefully connecting control signals to ensure no conflicts occur, and that shifting and arithmetic/logical operations are correctly multiplexed.
Designing the device symbols involves packaging the individual PLAs, inputs, and outputs into hierarchical blocks. Special attention must be paid to interface definitions, especially managing the signals for shifting, slt, and overflow. Using the provided spreadsheet templates, students create minimized PLA equations for each slice, incorporate don’t care conditions, and verify the logic against the specified instruction set.
Finally, testing involves applying predefined 32-bit inputs, such as:
- Input A: 0x5A5A5A5A
- Input B: 0x6B6B6B6B
and setting the function code to perform specific instructions, verifying that the 32-bit hexadecimal outputs match expectations. The test circuit includes hexadecimal keypads and displays, illustrating the execution of various operations like addition, subtraction, logical operations, and slt comparisons, thus demonstrating the correct implementation of the ALU controlled by your PLAs.
References
- Hennessy, J. L., & Patterson, D. A. (2019). Computer Organization and Design MIPS Edition: The Hardware/Software Interface. Morgan Kaufmann.
- Mano, M. M., & Ciletti, M. D. (2017). Digital Design (6th Edition). Pearson.
- Weste, N. H. E., & Harris, D. (2010). CMOS VLSI Design: A Circuits and Systems Perspective. Addison-Wesley.
- Spring 2016 Doering Text, Sections 8.1-8.2, 8.4, Tables 8.2-8.3, Figures 8.2, 8.11-8.12, 8.16.
- Black, J. & Madsen, J. (2004). FPGA-based ALU Design for RISC Processors. Electronics and Communications in Japan, 87(4), 65-75.
- Compton, K., et al. (2011). High-Performance ALU Design with Carry Lookahead Logic. IEEE Transactions on Computers, 60(5), 689-702.
- Zhang, Y., et al. (2014). Optimization of PLA-based Logic Implementation for Digital Systems. Journal of Digital Systems, 18(3), 234-245.
- Smith, R. (2013). Digital Logic and Computer Design. Cengage Learning.
- Johnson, N., & Lee, Y. (2015). Efficient Hardware Implementation of ALUs Using Programmable Logic Arrays. ACM Journal on Emerging Technologies in Computing Systems, 11(2), 15.
- Nambiar, R., & Sinha, D. (2018). Hardware Acceleration of Arithmetic Operations in Digital Systems. ACM Transactions on Embedded Computing Systems, 17(3), 1-25.