VHDL for Logic Synthesis - Andrew Rushton - E-Book

VHDL for Logic Synthesis E-Book

Andrew Rushton

4,9
71,99 €

oder
-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.
Mehr erfahren.
Beschreibung

Making VHDL a simple and easy-to-use hardware description language Many engineers encountering VHDL (very high speed integrated circuits hardware description language) for the first time can feel overwhelmed by it. This book bridges the gap between the VHDL language and the hardware that results from logic synthesis with clear organisation, progressing from the basics of combinational logic, types, and operators; through special structures such as tristate buses, register banks and memories, to advanced themes such as developing your own packages, writing test benches and using the full range of synthesis types. This third edition has been substantially rewritten to include the new VHDL-2008 features that enable synthesis of fixed-point and floating-point hardware. Extensively updated throughout to reflect modern logic synthesis usage, it also contains a complete case study to demonstrate the updated features. Features to this edition include: * a common VHDL subset which will work across a range of different synthesis systems, targeting a very wide range of technologies * a design style that results in long design lifetimes, maximum design reuse and easy technology retargeting * a new chapter on a large scale design example based on a digital filter from design objective and design process, to testing strategy and test benches * a chapter on writing test benches, with everything needed to implement a test-based design strategy * extensive coverage of data path design, including integer, fixed-point and floating-point arithmetic, logic circuits, shifters, tristate buses, RAMs, ROMs, state machines, and decoders Focused specifically on logic synthesis, this book is for professional hardware engineers using VHDL for logic synthesis, and digital systems designers new to VHDL but familiar with digital systems. It offers all the knowledge and tools needed to use VHDL for logic synthesis. Organised in themed chapters and with a comprehensive index, this complete reference will also benefit postgraduate students following courses on microelectronics or VLSI/ semiconductors and digital design.

Sie lesen das E-Book in den Legimi-Apps auf:

Android
iOS
von Legimi
zertifizierten E-Readern

Seitenzahl: 758

Veröffentlichungsjahr: 2011

Bewertungen
4,9 (16 Bewertungen)
15
1
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



Contents

Cover

Title Page

Copyright

Preface

List of Figures

List of Tables

Chapter 1: Introduction

1.1 The VHDL Design Cycle

1.2 The Origins of VHDL

1.3 The Standardisation Process

1.4 Unification of VHDL Standards

1.5 Portability

Chapter 2: Register-Transfer Level Design

2.1 The RTL Design Stages

2.2 Example Circuit

2.3 Identify the Data Operations

2.4 Determine the Data Precision

2.5 Choose Resources to Provide

2.6 Allocate Operations to Resources

2.7 Design the Controller

2.8 Design the Reset Mechanism

2.9 VHDL Description of the RTL Design

2.10 Synthesis Results

Chapter 3: Combinational Logic

3.1 Design Units

3.2 Entities and Architectures

3.3 Simulation Model

3.4 Synthesis Templates

3.5 Signals and Ports

3.6 Initial Values

3.7 Simple Signal Assignments

3.8 Conditional Signal Assignments

3.9 Selected Signal Assignment

3.10 Worked Example

Chapter 4: Basic Types

4.1 Synthesisable Types

4.2 Standard Types

4.3 Standard Operators

4.4 Type Bit

4.5 Type Boolean

4.6 Integer Types

4.7 Enumeration Types

4.8 Multi-Valued Logic Types

4.9 Records

4.10 Arrays

4.11 Aggregates, Strings and Bit-Strings

4.12 Attributes

4.13 More on Selected Signal Assignments

Chapter 5: Operators

5.1 The Standard Operators

5.2 Operator Precedence

5.3 Boolean Operators

5.4 Comparison Operators

5.5 Shifting Operators

5.6 Arithmetic Operators

5.7 Concatenation Operator

Chapter 6: Synthesis Types

6.1 Synthesis Type System

6.2 Making the Packages Visible

6.3 Logic Types – Std_Logic_1164

6.4 Numeric Types – Numeric_Std

6.5 Fixed-Point Types – Fixed_Pkg

6.6 Floating-Point Types – Float_Pkg

6.7 Type Conversions

6.8 Constant Values

6.9 Mixing Types in Expressions

6.10 Top-Level Interface

Chapter 7: Std_Logic_Arith

7.1 The Std_Logic_Arith Package

7.2 Contents of Std_Logic_Arith

7.3 Type Conversions

7.4 Constant Values

7.5 Mixing Types in Expressions

Chapter 8: Sequential VHDL

8.1 Processes

8.2 Signal Assignments

8.3 Variables

8.4 If Statements

8.5 Case Statements

8.6 Latch Inference

8.7 Loops

8.8 Worked Example

Chapter 9: Registers

9.1 Basic D-Type Register

9.2 Simulation Model

9.3 Synthesis Model

9.4 Register Templates

9.5 Register Types

9.6 Clock Types

9.7 Clock Gating

9.8 Data Gating

9.9 Asynchronous Reset

9.10 Synchronous Reset

9.11 Registered Variables

9.12 Initial Values

Chapter 10: Hierarchy

10.1 The Role of Components

10.2 Indirect Binding

10.3 Direct Binding

10.4 Component Packages

10.5 Parameterised Components

10.6 Generate Statements

10.7 Worked Examples

Chapter 11: Subprograms

11.1 The Role of Subprograms

11.2 Functions

11.3 Operators

11.4 Type Conversions

11.5 Procedures

11.6 Declaring Subprograms

11.7 Worked Example

Chapter 12: Special Structures

12.1 Tristates

12.2 Finite State Machines

12.3 RAMs and Register Banks

12.4 Decoders and ROMs

Chapter 13: Test Benches

13.1 Test Benches

13.2 Combinational Test Bench

13.3 Verifying Responses

13.4 Clocks and Resets

13.5 Other Standard Types

13.6 Don't Care Outputs

13.7 Printing Response Values

13.8 Using TextIO to Read Data Files

13.9 Reading Standard Types

13.10 TextIO Error Handling

13.11 TextIO for Synthesis Types

13.12 TextIO for User-Defined Types

13.13 Worked Example

Chapter 14: Libraries

14.1 The Library

14.2 Library Names

14.3 Library Work

14.4 Standard Libraries

14.5 Organising Your Files

14.6 Incremental Compilation

Chapter 15: Case Study

15.1 Specification

15.2 System-Level Design

15.3 RTL Design

15.4 Trial Synthesis

15.5 Testing the Design

15.6 Floating-Point Version

15.7 Final Synthesis

15.8 Generic Version

15.9 Conclusions

Appendix A: Package Listings

A.1 Package Standard

A.2 Package Standard_Additions

A.3 Package Std_Logic_1164

A.4 Package Std_Logic_1164_Additions

A.5 Package Numeric_Std

A.6 Package Numeric_Std_Additions

A.7 Package Fixed_Float_Types

A.8 Package Fixed_Pkg

A.9 Package Float_Pkg

A.10 Package TextIO

A.11 Package Standard_Textio_Additions

A.12 Package Std_Logic_Arith

A.13 Package Math_Real

Appendix B: Syntax Reference

B.1 Keywords

B.2 Design Units

B.3 Concurrent Statements

B.4 Sequential Statements

B.5 Expressions

B.6 Declarations

References

Index

This edition first published 2011

© 2011 John Wiley & Sons, Ltd.

Registered office

John Wiley & Sons Ltd, The Atrium, Southern Gate, Chichester, West Sussex, PO19 8SQ, United Kingdom

For details of our global editorial offices, for customer services and for information about howto apply for permission to reuse the copyright material in this book please see our website at www.wiley.com.

The right of the author to be identified as the author of this work has been asserted in accordance with the Copyright, Designs and Patents Act 1988.

All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording or otherwise, except as permitted by the UK Copyright, Designs and Patents Act 1988, without the prior permission of the publisher.

Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not be available in electronic books.

Designations used by companies to distinguish their products are often claimed as trademarks. All brand names and product names used in this book are trade names, service marks, trademarks or registered trademarks of their respective owners. The publisher is not associated with any product or vendor mentioned in this book. This publication is designed to provide accurate and authoritative information in regard to the subject matter covered. It is sold on the understanding that the publisher is not engaged in rendering professional services. If professional advice or other expert assistance is required, the services of a competent professional should be sought.

Library of Congress Cataloging-in-Publication Data

Rushton, Andrew.

VHDL for logic synthesis / Andrew Rushton. – 3rd ed.

p. cm.

Includes index.

Summary: “Macrocycles: Construction, Chemistry and Nanotechnology Applications is an essential introduction this important class of molecules and describes how to synthesise them, their chemistry, how they can be used as nanotechnology building blocks, and their applications”– Provided by publisher.

ISBN 978-0-470-68847-2 (hardback)

1. VHDL (Computer hardware description language) 2. Logic design–Data processing. 3. Computer-aided design. I. Title.

TK7885.7.R87 2011

621.39′5–dc22

2010045678

A catalogue record for this book is available from the British Library.

Print ISBN: 9780470688472

E-PDF ISBN: 9780470977927

O-book ISBN: 9781119995852

E-Pub ISBN: 9780470977972

Preface

The motivation for writing this book originally came from my own frustration at the lack of a synthesis-orientated book when I was learning VHDL. Not only was there a lack of information on the synthesis subset, but I found that most books on VHDL had a common problem: they described absolutely everything in an indiscriminate way, and left the reader to sort out which bits were relevant and useful. It was extremely difficult to deduce the synthesis subset from this approach.

In this book, I cover the features of VHDL that you need to know for logic synthesis, from a hardware designer's viewpoint. Each feature of the language is explained in hardware terms and the mapping from VHDL to hardware is shown. Furthermore, only the synthesisable features are presented and so there is no possibility of confusion between synthesisable and non-synthesisable features.

The exception to this rule is the chapter on test benches. Even hardware designers using the language exclusively for logic synthesis will have to write test benches and since these are not synthesised, the whole language becomes available (but not necessarily useful). So the test bench chapter introduces those parts of the language that are relevant and useful for writing test benches.

The reason that a book like this is necessary is that VHDL is a very large and clumsy language. It suffers from design-by-committee and as a result is difficult to learn, has many useless features, and I can say from my own experience, is extremely difficult to implement. I am not a champion of VHDL, but I recognise that it is still probably the best hardware description language for logic synthesis that we have. I hope that, by sharing what I have learnt of the language and how it is used for synthesis, I can help you avoid the many pitfalls that lie in wait.

I have this perspective on VHDL because I started my career as an Electronics Engineer, specialising in Digital Systems Design and gaining a BSc and PhD from the Department of Electronics at Southampton University, UK, in 1983 and 1987 respectively. However, I then moved into software engineering, but using my hardware background to develop software within the Electronics Design Automation industry. I have been working on VHDL and Electronic Design Automation using VHDL since 1988.

Initially I worked on logic synthesis systems, first for Plessey Research Roke Manor which is now a part of Siemens' UK operation. Then, in 1992 our then manager and CEO-to-be Jim Douglas arranged a management buyout of the synthesis technology that we had developed, supported by venture-capital funding from MTI Partners. Thus was born TransEDA Limited. He took with him the key engineers for the project, and so I became one of the founder members of the new company. I was Research Manager for the new company and continued working on the logic synthesis project.

Our intention was to develop our in-house logic synthesis tool to commercial standard and sell it under the name TransGate. One of my first tasks was to help develop a VHDL front-end to the tool to replace the existing proprietary language front-end. I was very proud of the results that we achieved – TransGate had a very comprehensive support for the language, competitive with the best in the market at the time and considerably better than the majority of tools.

When we first released TransGate, we expected that engineers would take to VHDL easily, so we concentrated on the purely technical aspects of developing the synthesis algorithms. However, it gradually became apparent from feedback that users were experiencing problems with using VHDL for logic synthesis due to the learning curve associated with what was, at that time, a completely new hardware design paradigm.

As a consequence of this realisation, in 1992 I developed a new training course, offered as a public or on-site course and called ‘VHDL for Hardware Design’. This course was based on my inside knowledge of how VHDL is interpreted by a synthesiser and also on the practical problem solving that I had been involved with as part of the company's customer support programme.

The first edition of this book, published in 1995 by McGraw-Hill, grew out of that training course. Much of the text and some of the examples were taken straight from the course. However, there is far more to a book than can be covered in a three-day long training course, so the book covered more material in far more detail than was possible in the training course.

Furthermore, at the time of writing the first edition, there was an international standardisation effort to define a standard set of arithmetic packages and common interpretation and subset for VHDL for logic synthesis. Although this standardisation was still some way from completion at the time, nevertheless there were some aspects of logic synthesis from VHDL that had a wide consensus and this was used to inform the writing of the book.

Back at TransEDA, we were finding that the logic synthesis market niche was not only already occupied but comprehensively filled by well-established companies and we made little progress in selling our synthesis tools.

Fortunately, we branched off into code coverage tools and created a niche for ourselves in this market instead. I became the lead systems developer for the VHDLCover system. Through this project, which involved a lot of collaboration with customers, I gained experience of scores of large synthesisable VHDL designs involving hundreds of designers working in many different styles.

This change in direction of our company had a strong influence on the second edition of this book that was published in 1998 by John Wiley and Sons. Three years had passed and the standards committee had at last ratified a standard for the synthesis packages. Furthermore, exposure to many other designers' work allowed me to take a broader view of the use of synthesis and its place in the design cycle. This made the book more user-orientated than the first edition, which did tend to dwell too much on the way that synthesisers worked. I think that the change in emphasis (slight though it was) improved the book significantly.

I left TransEDA in 1999, and since I left the company has gone bust, unfortunately disbanding the development team. However, the code coverage technology and the company name has been bought out and so TransEDA still sells VHDLCover but now under the name VN-Cover.

After TransEDA, I joined Southampton University and became a founding member of the university spin-off company Leaf-Mould Enterprises (LME). LME was formed with the intention of developing commercial behavioural synthesis systems using VHDL and based on a research programme within my old department, the Department of Electronics and Computer Science. I was responsible for the VHDL library manager, compiler and assembler which produced the concurrent assembly code from which behavioural synthesis was performed. Unfortunately, funding problems led to the demise of LME in 2001.

Since then I have become a self-employed consultant, working in a diversified range of fields: programmer, Web applications designer, systems engineer and counsellor.

It is 12 years since the publication of the second edition and it is interesting to see what has changed in the field of synthesis. The main change is that designers are moving on to system-level synthesis using C-like languages such as System Verilog, SystemC and Handel-C. However, there is clearly still a role for logic synthesis using VHDL for those who need more control over their design or, for that matter, as the synthesis engine for higher-level tools. There are now a plethora of logic synthesis tools available, for both ASIC and FPGA design.

However, VHDL itself has hardly changed at all for most of that time, with just minor tweaks to the language in 2000 and 2002. Then, in 2008, a major update was published to address a wide range of problems and to expand the range of pre-defined packages delivered with the language. Many of these changes affect synthesis. So, the time has come for a third edition of the book to reflect these changes. I have updated the whole book to reflect the current position, where the full VHDL-2008 standard is not yet available in any commercial tool, either for simulation or for synthesis, but some of the synthesis-specific features are gradually becoming available, either incorporated into the synthesis tools or as downloadable add-ons.

Andrew Rushton, London, 2010

List of Figures

Figure 1.1 The VHDL-based hardware design cycle

Figure 2.1 Cross-product calculator – data-flow diagram

Figure 2.2 Adder – balanced tree

Figure 2.3 Adder – skewed tree

Figure 2.4 Cross-product calculator – datapath

Figure 2.5 Cross-product calculator – controller

Figure 3.1 Adder tree circuit

Figure 3.2 Hardware mapping of conditional signal assignment

Figure 3.3 Multi-way conditional signal assignment

Figure 3.4 Redundant branch in conditional signal assignment

Figure 3.5 Parity generator interface

Figure 4.1 Using boolean as a comparison result

Figure 4.2 Intermediate value precisions

Figure 4.3 Multi-way selected signal assignment

Figure 5.1 Basic and operator

Figure 5.2 Selecting and operator

Figure 5.3 Reducing and operator

Figure 5.4 Four-bit equality

Figure 5.5 Four-bit less-than circuit

Figure 5.6 Array equality for arrays of equal length

Figure 5.7 Array less-than operator

Figure 5.8 Shift-left logical (sll) by 4 bits

Figure 5.9 Shift-left arithmetic (sla) by 4 bits

Figure 5.10 Rotate-left (rol) by 1 bit

Figure 5.11 Abs operator

Figure 5.12 Mapping of modulo-4 operator

Figure 5.13 Unsigned and signed modulo-4

Figure 5.14 Mapping of remainder operator

Figure 6.1 Signed resize to a larger size

Figure 6.2 Unsigned resize to a larger size

Figure 6.3 Signed resize to a smaller size

Figure 6.4 Unsigned resize to a smaller size

Figure 6.5 Fixed-point storage format

Figure 6.6 Floating-point storage format

Figure 8.1 Multiplexer interpretation of if statement

Figure 8.2 Multi-branch if statement

Figure 8.3 Incomplete if statement

Figure 8.4 Latch inference

Figure 8.5 Latched multiplexer

Figure 8.6 Interpretation of a for loop

Figure 8.7 Exit statement

Figure 8.8 Next statement

Figure 8.9 BCD to 7-segment decoder

Figure 8.10 Segment positions

Figure 8.11 Segment encodings

Figure 9.1 Simple combinational circuit

Figure 9.2 Registered circuit

Figure 9.3 Clock gating circuit

Figure 9.4 Data gating circuit

Figure 9.5 Asynchronous reset

Figure 9.6 Asynchronous reset to a value

Figure 9.7 Synchronous reset

Figure 9.8 Synchronous reset to a value

Figure 10.1 Target circuit

Figure 10.2 The two layers of indirect binding

Figure 10.3 For-generate circuit

Figure 10.4 Four-bit PRBS generator

Figure 10.5 Systole interface

Figure 10.6 Internal structure of the systole

Figure 10.7 Data flow of the systolic multiplier

Figure 10.8 Interface to the shift register

Figure 10.9 Internal structure of the systolic multiplier

Figure 12.1 Tristate driver

Figure 12.2 Tristate multiplexer using two drivers

Figure 12.3 Tristate multiplexer using one driver

Figure 12.4 Finite state machine

Figure 12.5 Signature detector state-transition diagram

Figure 12.6 Single-process finite state machine

Figure 13.1 Registered multiplexer

Figure 14.1 Project directory structure

Figure 14.2 Project subdirectory contents

Figure 15.1 Pass-band diagram for the low-pass filter

Figure 15.2 Block diagram of the FIR filter

Figure 15.3 Block diagram of the filter hardware

Figure 15.4 Actual frequency response of the low-pass filter

List of Tables

Table 2.1 Scheduling and allocation for cross-product calculator

Table 2.2 Controller operations per clock cycle

Table 2.3 Comparison of synthesis results

Table 3.1 Event processing of adder tree

Table 3.2 Parity-generator functions

Table 4.1 Synthesisable types

Table 4.2 Standard types

Table 6.1 The synthesis type system

Table 6.2 Std_Logic_1164 types

Table 6.3 The meanings of the std_logic values

Table 6.4 Shift operators

Table 6.5 Shift and rotate operators for fixed_pkg

Table 6.6 Calculating result sizes for arithmetic operators

Table 6.7 Result sizes for arithmetic operators with identical input sizes

Table 6.8 Options controlling floating-point modes

Table 6.9 Results of classification function classfp

Table 6.10 Bit-preserving type conversions in fixed_pkg

Table 6.11 Bit-preserving type conversions in float_pkg

Table 6.12 Type conversion functions in numeric_std

Table 6.13 Type conversion functions in fixed_pkg

Table 6.14 Type conversion functions in float_pkg

Table 7.1 Type-conversion functions in std_logic_arith

Table 7.2 Permutations of types for all arithmetic operators

Table 7.3 Integer permutations for add, subtract

Table 7.4 Std_ulogic permutations for add, subtract

Table 10.1 Tap points for maximal-length PRBS generators

Table 11.1 Built-in operators for each type

Table 15.1 Filter coefficients for the low-pass filter

Table 15.2 Conversion of real coefficients to fixed-point

Table 15.3 Maximum error for different fixed-point sizes

Table 15.4 Maximum error for different floating-point sizes

Table 15.5 Synthesis results for the low-pass filter

Chapter 1

Introduction

This chapter looks at the way in which VHDL is used in digital systems design, the historical reasons why VHDL was created and the international project to maintain and upgrade the language.

1.1 The VHDL Design Cycle

From its conception, VHDL was intended to support all levels of the hardware design cycle. This is clear from the preface of the Language Reference Manual (LRM) (IEEE-1076, 2008) which defines the language, from which the following quote has been taken:

VHDL is a formal notation intended for use in all phases of the creation of electronic systems. Because it is both machine readable and human readable, it supports the development, verification, synthesis, and testing of hardware designs; the communication of hardware design data; and the maintenance, modification, and procurement of hardware.

The key phrase is ‘all phases’. This means that VHDL is intended to cover every level of the design cycle from system specification to netlist. As a result, the language is rather large and cumbersome. However, this does not necessarily make it difficult to learn. It is best to think of VHDL as a hybrid language, containing features appropriate to one or more of the stages of the design cycle, so that each stage is in effect covered by a separate language that also happens to be a subset of the whole. Each subset is relatively easy to learn, provided there is guidance as to what is in, and what is not in, that subset.

In the idealised design process, there are three subsets in use – since there are three stages that use VHDL. These are: system modelling (specification phase), register-transfer level (RTL) modelling (design phase) and netlist (implementation phase).

In addition to these VHDL-based phases, there will be an initial requirements phase that is conventionally in plain (human) language. Thus, there are three stages of transformation of a design: from requirements to specification, from specification to design and from design to implementation. The first two phases are carried out by human designers, the last phase is now largely performed by synthesis.

Figure 1.1 illustrates this idealised design cycle.

Figure 1.1 The VHDL-based hardware design cycle.

Typically, the system model will be a VHDL model that represents the algorithm to be performed without any hardware implementation in mind. The purpose is to create a simulation model that can be used as a formal specification of the design and that can be run in a simulator to check its functionality. This specification can also be used to confirm with a customer that the requirements have been fully understood.

The system model is then transformed into a register-transfer level (RTL) design in preparation for synthesis. The transformation is aimed at a particular hardware implementation but at this stage, at a coarse-grain level. In particular, the timing is specified at the clock cycle level at this stage of the design process. Also, the particular hardware resources to be used in the implementation are specified at the block level.

The final stage of the design cycle is to synthesise the RTL design to produce a netlist, which should meet the area constraints and timing requirements of the implementation. Of course, in practice, this may not be the case, so modifications will be required which will impact on the earlier stages of the design process. However, this process is the basic, idealised, design process using VHDL and logic synthesis.

1.2 The Origins of VHDL

VHDL originated from the American Department of Defense, who recognised that they had a problem in their hardware procurement programmes. The problem was that they were receiving designs in proprietary hardware description languages, which meant that, not only was it impossible to transfer design data to other companies for second sourcing, but also there was no guarantee that these languages would survive for the life expectancy of the hardware they described.

The solution was to have a single, standard hardware description language, with a guaranteed future. Specification of such a language went ahead as part of the Very-High Speed Integrated Circuits programme (VHSIC) in the early 1980s. For this reason, the language was later named the VHSIC Hardware Description Language (VHDL).

If the language had remained merely a requirement for military procurement, it would quite possibly have remained an obscure language of interest only to DoD contractors. However, the importance of the language development, and especially the importance of standardisation of the language, was recognised by the larger electronic engineering community and so the formative language was passed into the public domain by placing it in the hands of the IEEE in 1986. The IEEE proceeded to consolidate the language into a standard that was ratified as IEEE standard number 1076 in 1987. This standard is encapsulated in the VHDL Language Reference Manual (LRM).

1.3 The Standardisation Process

Part of the standardisation process was to define a standard way of upgrading the language periodically. Thus, there is a built-in requirement for the language to be re-standardised every five years. However, in practice updates have been irregular and driven by a desire to improve the language according to demand rather than this arbitrary 5-year cycle. Because the language has changed over the years, it is sometimes important to differentiate between versions. This is done in this book by referring to the year in which the standard was ratified by the IEEE. For example, the original standard, IEEE standard number 1076, ratified in 1987, is usually referred to as VHDL-1987. Subsequent revisions of the standard will be referred to in a similar way according to their year of ratification.

Here is a summary of the different versions and the features that affect the use of the language for synthesis:

VHDL-1987The original standard.VHDL-1993Added extended identifiers, xnor and shift operators, direct instantiation of components, improved I/O for writing test benches.Most of the synthesis subset of VHDL is based on VHDL-1993.VHDL-2000 (minor revision)Nothing of relevance to synthesis.VHDL-2002 (minor revision)Nothing of relevance to synthesis.VHDL-2008Added fixed-point and floating-point packages.Added generic types and packages, enabling the use of generics to define reusable packages and subprograms. Enhanced versions of conditionals. Reading of out ports. Improved I/O for writing test benches.Unification of VHDL standards.

As you can see, there are only three versions of VHDL relevant to synthesis: VHDL-1987, VHDL-1993 and VHDL-2008. VHDL-1993 was the last revision to add features useful for synthesis. So VHDL-2008 is the first significant change in 15 years. A lot has been added in VHDL-2008 (Ashenden and Lewis, 2008) and most of it has some relevance to synthesis.

However, synthesis tool vendors are historically slow to adopt new language features. This is for good reasons – the focus of synthesis is the quality of the synthesised circuit and effectiveness of the synthesis optimisations, not the list of language features supported. This means that it is expected that several years will pass before the more significant changes in VHDL-2008 are implemented by synthesis tools and many never will be. In effect, synthesis users are still using VHDL-1993 and will continue to do so for the foreseeable future.

As a consequence, this book is based mainly on VHDL-1993. However, the more recent extensions are discussed where relevant, particularly with regard to the new fixed-point and floating-point packages added in VHDL-2008 but that have been made available as VHDL-1993 compatibility packages so that they can be used immediately on synthesisers that do not yet support the rest of VHDL-2008.

1.4 Unification of VHDL Standards

One of the largest changes in the VHDL-2008 standard is the unification of the many standards that define parts of the language and its environment.

The management of the standardisation process is down to the VHDL Analysis and Standardisation Group (VASG), part of the IEEE standardisation structure. In addition to the main standardisation process of the language itself, there are a number of working-groups working on standardisation of the ways in which VHDL is used. In the past, these working-groups have published standards of their own. For example, there was a group working on using VHDL for analogue modelling (VHDL-AMS – VHDL Analogue and Mixed-Signal – standard 1076.1), a group working on standard synthesisable numeric packages (VHDL Synthesis Package – standard 1076.3 (1997)), a group working on accelerating gate-level simulation (VITAL – the VHDL Initiative Towards ASIC Libraries – standard 1076.4), and a group working on the standard interpretation of VHDL for logic synthesis (VHDL Synthesis Interoperability – standard 1076.6). In addition, the 9-value logic type std_logic that is almost universally used for synthesis was developed as a completely different IEEE standard (VHDL Multivalue Logic Packages – standard 1164).

This separation of the standardisation of the various application domains of VHDL was effective in the early days of language development, because it allowed the subgroups to get on with their work independently of the main VHDL standardisation process and furthermore meant that they could publish their standards when ready, rather than waiting for the next formal release of the VHDL standard. However, this separation has become a problem as the working-groups' work has become mature, stable and in common use. For example, a release of a new standard for VHDL could leave the subgroups' standards lagging behind, compatible with the previous version and lacking the new language features.

So, in VHDL-2008, those working group standards that are specific to synthesis have been partly merged into the VHDL standard itself. Standard 1076 now includes the standard logic types (1164), the standard numeric types (1076.3) and some parts of the standard synthesis interpretation (1076.6). This doesn't make any difference to the user, but it does formalise these parts of the language as an integral part of VHDL and ensures that they stay in step with language developments in the future.

As you can probably imagine, this makes the Language Reference Manual (IEEE-1076, 2008) quite massive.

1.5 Portability

Synthesisable RTL designs can have a long life span due to their technology independence. The same design can be targeted at different technologies, revised and targeted at a newer technology and so on for many years after the original design was written. It is a wise designer who plans for the long-term support of their designs. It is therefore good practice to write using a safe, common style of VHDL that can be expected to be supported for years to come, rather than use ‘clever’ tool-specific tricks that might not continue to be supported.

Also, it is not unusual for a company to change their preferred tools, or for a designer to be obliged to use a different synthesis tool because a different technology is being targeted. So it is good practice to write using a portable subset of synthesisable VHDL that will work across many different tools.

The problem with this principle is that synthesis relies on an interpretation of VHDL according to a set of templates, and historically each synthesis vendor has developed their own set of templates. This means that in practice, each synthesis tool supports a slightly different subset of VHDL. However, there has always been a lot of overlap between these subsets and this book attempts to identify the common denominator.

To make life more complicated, the IEEE Design Automation Standards Committee have specified a synthesis standard for VHDL (IEEE- 1076.6, 2004) that seems to be a superset rather than a subset of the VHDL supported by commercial tools. Therefore, adhering to the standard does not mean that a design will be synthesisable with any specific synthesis tool. It also seems unlikely that any single tool will implement every detail of this standard.

It is recommended that a subset is used that is common to all synthesis tools. As a consequence, this book focuses on the common subset and avoids the more obscure tool-specific features of VHDL, even if those obscure features are in the synthesis standard.

Chapter 2

Register-Transfer Level Design

Logic synthesis works on register-transfer level (RTL) designs. What logic synthesis offers is an automated route from an RTL design to a gate-level design.

For this reason, it is important that the user of logic synthesis is familiar with RTL design to the extent that it is second nature. This chapter has been included because many designers have never used RTL design formally. This chapter serves as a simple introduction to RTL design for those readers not familiar with it. It is not meant to be a comprehensive study but it does touch on all the main issues that a designer encounters when using the method.

RTL is a medium-level design methodology that can be used for any digital system. Its use is not restricted to logic synthesis: it is equally useful for hand-crafted designs. It is an essential part of the top-down digital design process.

Register-transfer level design is a grand name for a simple concept. In RTL design, a circuit is described as a set of registers and a set of transfer functions describing the flow of data between the registers. The registers are implemented directly as flip-flops, whilst the transfer functions are implemented as blocks of combinational logic.

This division of the design into registers and transfer functions is an important part of the design process and is the main objective of the hardware designer using synthesis. The synthesis style of VHDL has a direct one-to-one relationship with the registers and transfer functions in the design.

RTL is inherently a synchronous design methodology, and this is apparent in the design of all synthesis tools.

This chapter outlines the basic steps in the RTL methodology. It is recommended that these basic steps are used when designing for logic synthesis. To illustrate the connection between RTL and logic synthesis, the examples will be written in VHDL. You are not expected to understand the full details of the VHDL at this stage, but all the VHDL used will be covered in later chapters.

2.1 The RTL Design Stages

The basis of RTL design is that circuits can be thought of as a set of registers and a set of transfer functions defining the datapaths between registers. The method gives a clear way of thinking about these datapaths and trying different circuit architectures while still at an abstract level.

The first stage of the design is to specify at a system level (i.e. not RTL) what is to be achieved by the circuit. Typically this will be a set of arithmetic and logic operations on data coming in at the primary inputs of the circuit. At this stage there is no hardware implementation in mind; the purpose is just to create a simulation model that can then be used as the formal specification of the design. At this stage the system-level model looks more like software than hardware. The system-level model can also be used to confirm with a customer that their design requirements have been understood. Even at this early stage in the design, long before the RTL design process is complete, it is possible to write a VHDL model for simulation purposes only (not intended to be synthesisable). This is a worthwhile exercise since it tests the understanding of the problem and allows the algorithm to be checked for correctness. Later, this VHDL model can be used for comparison with the completed RTL design to verify the correctness of the design procedure. This ability to cross-check different representations of a design in the same design language using the same simulator is a powerful feature of VHDL.

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!