VLSI System Design

Project SYN: Introduction to VHDL Synthesis

This project is a compulsory first part of the examination for the VLSI System Design course at the University of Twente. 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-gcd to get them or copy them from the directory /home/practice/vlsisd/exercise/modules/gcd.

The Synopsys Logic Synthesis Tools

Synopsys is a major developer of computer-aided design tools for logic synthesis (and many other tools). The University of Twente has access to these tools through its membership of Europractice, an initiative of the European Union that provides IC design facilities to universities and research institutes.

The tool that is relevant for this project is the Design Compiler. It has two user interfaces:

The Standard-Cell Library

The cell library that is used in this project, is the 0.35 micron 3.3 Volt CMOS library of Austria Microsystems. Its data book is accessible on the Internet. Please consult this information to understand the components that the synthesizer has put into your design.

The university has access to this library through its Europractice membership. As a non-disclosure agreement was signed with Europractice, students are not supposed to disclose any information on this library other than what is already publicly accessible through the Internet.

Getting Started

The hardware to be synthesized is the GCD machine that was already used in in project VHD. Many source files of that project will be reused here. You should, therefore, continue to work in the same directory and the same Modelsim project. New files that should be present in your directory, are (some explanation follows later on):

Synthesis Setup

A Unix (Bourne/bash) shell script called generate-design is available for systematically synthesizing all required designs. The script first assigns values to a number of shell variables and then takes these values to perform synthesis. From the variable settings, an instance name stored in variable INSTANCE is derived. The instance name is used in many places: During the invocation of Synopsys in the shell script many different Synopsys commands are used. Comments give a short explanation for each of them. If you need more information: The script generates a log file for each design that has been synthesized. You have to study this file to collect data on area and timing. Warnings and error messages generated during synthesis can also be found in this file. Study them carefully as they contain information on possible problems with your design.

Exercise SYN-1: Multi-Bit Multiplexer Synthesis

Make sure that the settings in the file generate-design are correct for synthesizing the design int_mux as given in the file int-mux.vhd. Note: this design is purely combinational and does not have a clock signal. As the synthesis script specifies a clock, a warning in the log file will occur. You can ignore it.

Run the script. Then study both the log file and the VHDL files produced. Due to the simplicity of the design, the hierarchical and flattened netlists are identical.

Which standard cells do you find in the synthesized design? Check their functionality in the data book.

Exercise SYN-2: Multi-Bit Register Synthesis

Repeat Exercise SYN-1 for the register as given in the file int-reg.vhd. You will just need to comment and uncomment some lines in generate-design before running the script.

Exercise SYN-3: Synthesis of the GCD rtl Architecture and Post-Synthesis Simulation

Modify the generate-design script for synthesizing the rtl architecture of the gcd circuit. For this exercise, it is sufficient that you synthesize the design for one clock period, say 10 ns. Examine the restulting flattened VHDL netlist. What are the names of the entity and architecture contained in the file?

Compile the flattened VHDL description. This description will be called the post-synthesis description of the VHDL. Before you can simulate this description, you should create a new configuration of the testbench that uses your post-synthesis model as the design under verification.

Simulate the design. Make sure that the SDF file is taken into account (see the section on gate-level simulations in the Modelsim Manual). If everything went well, the waveforms that you observe should be (almost) identical to those of the pre-synthesis simulation. There are some minor differences, though: there will be a delay between a clock edge and a signal transition that is supposed to take place at the clock edge. Show this effect by selecting relevant signals in Modelsim's Wave window and zooming to the right time scale. Print the resulting waveform plot. Note: Modelsim's time resolution should be set to picoseconds to be able to see the effect. In case of troubles, make sure that the variable 'resolution' (with a lower-case 'r') has value 'ps' in the "mpf" file, the file that describes your Modelsim project. If you modify this file, you will need to restart vsim.

Formal Verification with Formality

Formality is a tool that can prove the logic equivalence of two designs. The first design is called the reference and the second the implementation. Both designs can be either a register-transfer level description or a gate-level description.

One of the most common uses of Formality is to check whether the synthesis to gate level has succeeed. Synthesis fails, for example, when the user has written non-synthesizable code. Another application is to compare two different but equivalent register-transfer level descriptions.

The principle of Formality is to compute a canonical form (unique representation) of the logic that is needed to obtain the primary outputs and the "next states" of memory elements. This is done in both the reference as the implementation designs and then the corresponding canoncial forms are checked for equality. A first condition for being able to perform the comparison is that there is a one-to-one matching of outputs and memory elements in both designs. In most cases, Formality is able to carry out the matching automatically using the correspondence in the names used. A user can, however, also provide a matching if the tool fails.

The next exercise is an introduction to the use of Formality.

Exercise SYN-4: Introduction to Formality

Make sure that the setup file .synopsys_fm.setup is in your directory (this file e.g. loads information on the standard-cell library) and then start Formality with the command formality. A GUI (graphical user interface) will show up, in which you can see the six steps to be performed sequentially (the final "debug" step is only necessary when the verification has failed).

Time-Constrained Synthesis

You have already seen that one of the parameters to be set for logic synthesis is the clock period. Given a clock period, the synthesis tool tries to manipulate the longest combinational path (starting and ending in a register) to fit the given clock period. The supplied value for the clock period is first reduced to accommodate for the setup and hold times of the registers. Such an approach to synthesis is called time-constrained synthesis.

Synopsys operates approximately as follows. It first estimates the time available for complex functions such as arithmetic operators. It has a library of alternative implementations for these functions (think e.g. of different structures for adders; the faster structures require more hardware). The library is called Design Ware (DW, the abbreviation shows up in the hierarchical VHDL that is generated by Synopsys). After having composed all necessary logic with cells from the target standard-cell library, it checks whether the timing constraints are met. If this is the case, it stops. If the constraints are violated, it starts manipulating the logic in order to shorten the critical paths. This results in more area in general. This type of manipulation of the logic is an iterative process. It stops either as soon as the timing constraints have been met or when Synopsys judges that all possibilities to decrease the critical paths have been exhausted.

The log files contain the outputs of the Synopsys report_reference (the cells used, their areas and the total area) and report_timing (critical path) commands. The term slack refers to difference between the critical-path length and the timing constraint. A negative slack means that the timing constraints have not been met. Because Synopsys tries all kind of transformations and then gives up when it does not find a solution, the area figures reported then are not reliable. They should not be taken into account in the analyses.

In order to explore the design space for a single VHDL description of some circuit, one can synthesize it for different clock periods and then collect the time-area pairs reported by Synopsys (and recorded in the log file by the script generate-design). Solutions for which the timing constraint was not met, should be ignored.

Time-Area Trade-Off for GCD

The procedure just mentioned has been applied to the two architectures of the GCD circuit: rtl and structure. The time-area pairs that are meaningful, have been collected in the table below.

There are a few points to take into account:

architecture rtl
architecture structure
constraint rtl timertl area
constraintstruc timestruc area
2.5 2.5 24400



3 3.0 22000
3 6.0 20600
4 3.7 17300
4 6.9 21900
5 4.0 17100
5 9.8 17600
6 5.9 16200
6 10.7 17500
7 6.6 15900



Pareto Optimality

Each solution to the design problem that is considered here, has two figures of merit to be minimized: time and area. Such a solution will be denoted by (t, a). By varying either the input VHDL architecture or the clock period constraint, one gets different solutions. Because of the two figures of merit, it is not possible to decide which of the solutions is the best one. However, it is possible to make a statement about one solution being inferior to another one. A solution (t1, a1) is said to be inferior to (t2, a2) if t1 is larger than t2 and a1 is larger than a2.

A solution that is not inferior to any other solution in the solution set is called to be Pareto optimal. There may be multiple solutions that are Pareto optimal in a solution set.

The contents of the table above have been used for a time-area plot shown in the figure below. The figure also contains plots for two other solutions called better and clever. The VHDL code belonging to these solutions is not disclosed to you. Finally, the Pareto points of all solutions have been indicated in the figure.

time-area plot

Exercise SYN-5: Alternative GCD Architecture

Note: If you do not succeed to find an architecture that improves the design, just take an architecture that is different than the one provided.

Deliverables

Prepare a short report that contains:
Last update on: Mon Feb 16 17:41:11 CET 2004 by Sabih Gerez.