[English] | 繁體中文
This repository contains four programming lab assignments for the "Introduction to Computer-aided VLSI Design" course. Below are the topic descriptions and implementation methods for each lab.
Write a program to find the minimum set of test patterns (Minimum Test Pattern Set) capable of detecting all Stuck-At Faults (including Stuck-At-0 and Stuck-At-1) for a specific logic circuit.
Implemented using C++ with a Greedy Algorithm.
- First, simulate the circuit with all 16 different input vectors (from 0 to 15), recording which nodes' Stuck-At faults can be detected by each input (building a Fault Dictionary).
- Using a greedy strategy, iteratively select the input vector that covers the "maximum number of currently undetected faults."
- Repeat this process until all Stuck-At Faults are covered, thereby obtaining the optimal Minimum Test Pattern Set.
Implement the List Scheduling algorithm used in High-Level Synthesis (HLS) using C/C++. The program must be able to read given Data Flow Graphs (including DFG1, DFG2, and an RGB to YUV DFG) and perform scheduling under specified computational resource constraints (e.g., specific numbers of adders and multipliers).
Wrote the List Scheduling program using C++.
- The program reads the DFG nodes (Operations) and dependencies from a text file.
- Uses Depth-First Search (DFS) to calculate the Critical Path Priority for each node (the longest path to the output; the longer the path, the higher the priority).
- In each Cycle, places all nodes whose dependencies are satisfied (Ready) into a Ready Queue, and sorts them according to Priority.
- Based on the currently available ALU resources (number of Multipliers and Adders), preferentially schedules operations with the highest Priority, completing Resource-Constrained Scheduling.
Implement the Register Transfer Level (RTL) design of an RGB to YUV conversion circuit using Verilog HDL. The design must be divided into a Datapath and a Controller (Finite State Machine), and its functionality must be verified using Synopsys VCS and Verdi with a provided Testbench.
Based on the scheduling and resource allocation results from Lab 2, used a Structural Design approach for hardware description:
- Datapath: Wrote individual sub-modules, including
Multipliper.v,Add.v,MUX2.v,MUX3.v,MUX4.v,Register.v, andROM.v, instantiated them inDatapath.v, and wired them together. - Controller: Implemented a Finite State Machine (FSM) in
Controller.v, outputting corresponding Control Signals (such as MUX selection signals, Register Load signals) based on the current state to control the computation flow in the Datapath. - Integrated everything into a top-level module in
RGB2YUV.v, and performed verification by reading an image through the Testbench.
Perform Logic Synthesis on the Lab 3 RGB to YUV RTL circuit using Synopsys Design Compiler (DC). Two architectures need to be synthesized separately:
- Version 1: Uses 1 Multiplier and 1 Adder.
- Version 2: Uses 3 Multipliers and 3 Adders.
Therefore, the scheduling results from Lab 2 are also required. Finally, compare the Timing, Area, Power, and the number of execution Cycles spent on both versions.
Wrote TCL scripts to specify the synthesis constraints (Constraints, SDC), and used Design Compiler to convert the RTL code into a Gate-level Netlist:
- Setup and synthesized both Version 1 (fewer resources, requires more Cycles to finish calculating one Pixel) and Version 2 (more resources, fewer computation Cycles).
- Analyzed the PPA (Power, Performance, Area) trade-offs between the two architectures using the Reports generated by Design Compiler.
- Compiled and compared the differences in hardware costs and computational efficiency between the resource-constrained architecture (Version 1) and the highly parallel architecture (Version 2), summarizing them in the lab report.