VLSI System Design

Project ADD: Adder Synthesis and Characterization

This project is a compulsory part of the examination for the VLSI System Design course at the University of Twente. You should have completed Project SYN before starting this one. The goals of this project are: The description below refers to various file names. These files are not available on-line. Once you have logged in, execute the command get-add to get them or copy them from the directory /home/practice/vlsisd/exercise/modules/add. Make sure that you have the following two files in the directory from which you perform the adder project:

Hardware Descriptions in VHDL

The file adder_ent.vhd contains the entity declaration for all adders. It uses a generic for the word length and has an output that has the same width as the input (the carry-out is thrown away).

The file adder_behav_arch.vhd declares an architecture for the adder that contains a behavioral description of addition. The operator '+' is simply used. This means that one leaves it up to Synopsys to decide on the adder structure: the tighter the timing constraints, the faster the structure that Synopsys will choose for initially (at the expense of more area). This initial choice (e.g. "carry-lookahead" when the constraints are tight, and "carry-ripple" when the critical path is not constrained) strongly determines the quality of the final design.

The file adder_ripple_arch.vhd, on the other hand, contains a structural description of an adder, viz. a ripple adder. It makes use of the full-adder entity and architecture as given in the file full_adder.vhd. The full-adders are instantiated using a for ... generate loop. This is a construct that is not (yet) explained in the document VHDL for Simulation and Synthesis. However, the example given in the file should be sufficient to understand the mechanism. Note that conditional generation is possible by means of an if statement. Such an if does not have an else clause.

The file reg_gen.vhd contains a description of a register with a generic word length. The file contains both the entity and architecture declarations as only one architecture for registers will be used in the whole project. The file all_hardware_gen.vhd instantiates the adder and three registers. Two registers are connected to the adder's inputs, one register is connected to the adder's output. In this way, we do not need to bother about combinatorial paths between the adder hardware and primary inputs or outputs. The critical path of the design will always start at a register and finish in a register going through the adder hardware.

The entire hardware contains a generic word length. A concrete value has to be assigned to this generic both for simulation and synthesis. For simulation, this is done by means of a configuration that also involves the testbench (see the testbench section below). The Synopsys Design Compiler tool does not support configurations; there the generic is given a value in the script that calls Design Compiler in batch mode (see the characterization section below). Also Formality requires a specical measure to assign a value to the generic before verification can take place.

Testbench and Simulation

The testbench is given by the file testbench_gen.vhd. It contains several entities: Two examples of configurations are provided as examples: When using Modelsim, you can compile all designs in the library work. Just take care of compiling files in the right order and only compiling the flattened versions of the gate-level descriptions. The library c35_CORELIB containing compiled versions of the standard cells, is located in a central directory and the project setup should find it automatically.

Exercise ADD-1: Presynthesis Simulation

Compile all files necessary to perform a pre-synthesis simulation of the 16-bit carry-ripple adder. Note that the file testbench_gen.vhd requires compilation using the VHDL-93 standard.

Verify the correctness of the computation by means of simulation.

Now verify the correctness of the carry-ripple architecture by using Formality to prove that it is equivalent to the behavioral architecture. You can operate directly on the adder leaving out the registers around it. You can proceed as explained in SYN except that you cannot use the GUI to select the top-level reference and implementations due to the presences of generics in the implementation. After having loaded the VHDL files for the reference design stored in "container" r, you go to the command-line at the bottom of the window and type there:

set_top r:/WORK/adder -param 16

This tells Formality to assign value 16 to the only top-level generic word_length of the design adder (the syntax for designs with multiple generics is somewhat more complex). WORK is the default library in which Formality "compiles" designs. For the implementation design stored in container i, you need to give the command:

set_top i:/WORK/adder -param 16

From then on, you can carry ahead with matching and verification in the usual way.

Characterization Setup

A Unix (Bourne) shell script called generate-all is available for systematically synthesizing all required designs. The script consists of three nested loops. In the outer loop the word length is varied. Possible values are contained in the shell variable WORD_LENGTHS that should be a string with word-length values separated by spaces. The middle loop iterates over all possible clock periods as given by the shell variable CLOCK_PERIODS. The inner loop, finally, varies the adder structures using the variable ADDER_STRUCTURES.

In the inner loop, a unique instance name composed of word length, clock period and adder structure is used. It is stored in the shell variable INSTANCE. The instance name is used in many places:

Exercise ADD-2: Synthesis and Simulation of New Adder Structure

Try first to understand the setup as described above. Compile the provided VHDL files, do some presynthesis simulations to become familiar with the testbench. Perform synthesis for a few cases (edit the file generate-all to set the word-length, clock-period and architecture variables). Verify the synthesized designs by performing post-synthesis simulation and formal verification. Note that the gate-level descriptions do not have a generic word length.

Write synthesizable VHDL architectures for alternative adder structures, e.g. carry-lookahead adder, carry-select adder, etc. (see the book and slides). Your description should be independent of the word-length value (if you want to keep it simple, you may assume that the word length is an integer multiple of 8). Remember that the entity for the adder is in a separate file and does not need to be modified. Your files should only contain architecture declarations.

You should elaborate on as many alternative structures as you have members in your team (1 adder for students working alone, 2 adders for teams of 2). Verify your description with presynthesis simulation, synthesize your design for a few settings of the parameters and verify the result of synthesis with post-synthesis simulation. Use formal verfication for checking both your pre-synthesis and post-synthesis designs against the behavioral reference design. You just need to modify the generate-all script for performing synthesis.

Exercise ADD-3: Time-Area Plots

Once you are confident that your VHDL code simulates and synthesizes correctly, systematically generate the hardware for the purpose of obtaining time-area plots.

The requirements are:

Use MS-Excel (or any alternative of your choice) to create separate time-area plots for each of the word lengths considered. Which of the solutions are Pareto optimal?

Deliverables

Write a short report that contains:
Last update on: Mon Feb 16 13:44:59 CET 2004 by Sabih Gerez.