You are on page 1of 7

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/3050655

From AHPL to VHDL: a course in hardware description languages

Article  in  IEEE Transactions on Education · December 2000


DOI: 10.1109/13.883357 · Source: IEEE Xplore

CITATIONS READS
15 829

1 author:

Assim Sagahyroon
American University of Sharjah
80 PUBLICATIONS   500 CITATIONS   

SEE PROFILE

All content following this page was uploaded by Assim Sagahyroon on 13 October 2014.

The user has requested enhancement of the downloaded file.


IEEE TRANSACTIONS ON EDUCATION, VOL. 43, NO. 4, NOVEMBER 2000 449

From AHPL to VHDL: A Course in Hardware


Description Languages
Assim A. Sagahyroon

Abstract—As the size and complexity of digital systems increase, RTL description until it meets the desired functionality.
more CAD tools are introduced in the hardware design process; a Most design bugs are eliminated at this point. This will
recent addition to this process is the use of hardware description significantly cut down design cycle time.
languages (HDLs). Historically, HDL-based design courses have
been taught mostly at the graduate level. Undergraduate courses • Designing with HDLs is analogous to computer program-
have mainly emphasized the principles of digital systems design, ming. A textual description with comments is an easier
at both the logic and architectural levels. The laboratory compo- way to develop and debug circuits. Gate-level schematics
nent of these courses often introduces the students to graphical de- can be very cumbersome for very complex digital design.
sign capture tools and their associated simulators. However, within A recent survey [2], “VHDL University Education Report,”
the past few years industry has been moving away from graphical
design captures and is more openly adopting HDL-based design was performed by Texas Instruments of Dallas, Toshiba of
methodologies. Based on these industry shifts, one can easily con- Tokyo, and VHDL International (VI). Ninety-one university
clude that HDLs are becoming an integral part of the design au- electrical engineering departments were contacted in the United
tomation environments; this in turn requires the updating of the States. Seventy-one responded. The survey was designed to
curricula, either by incorporating new courses or by updating ex- assess the following:
isting ones. Specifically, courses that introduce undergraduates to
HDLs in general and a standard language such as VHDL or Verilog • The degree to which undergraduate students were exposed
are becoming essential in preparing future engineers. This paper to HDLs and a language-based design metholody.
discusses an HDL-based design course offered at Northern Arizona • The amount of training available today, along with how
University (NAU). The course is used as a vehicle to introduce NAU much is required.
students to the underlying concepts behind modeling, simulating,
and verifying digital systems design using hardware description • What source material is used to teach HDLs.
languages. • Barriers to increasing undergraduate students’ knowledge
Index Terms—Hardware description languages (HDLs), VHDL. of HDLs.
The survey concluded that undergraduate students working
toward a B.S. degree in electrical engineering receive little
I. INTRODUCTION training in HDL, and at many institutions in the United States,
HDL training is not available. A statistical summary of the
W ITHIN the past few years, industry has been moving
away from graphical design captures and is more openly
adopting hardware description language (HDL)-based design
findings of the survey is shown in Table I.
Clearly, there is an urgent need to add to or increase the
methodologies. Based on these industry shifts, one can easily amount of HDL training available to undergraduates majoring
conclude that HDLs are rapidly becoming an integral part of in electrical or computer engineering.
design automation environments; this in turn requires updating
of curricula, either by incorporating new courses or by modi- II. HDL-BASED COURSES
fying the contents of some of the existing courses to reflect the
advents in very large-scale integration (VLSI) design method- In a previous article [3], the different issues that are rele-
ologies. vant to the introduction of HDL-based courses into the cur-
Compared to schematic-based design, HDLs provide de- riculum are addressed. Issues such as the level of preparation,
signers with the following advantages [1]: prerequisites, degree of complexity, and resources were pre-
sented and analyzed. It is concluded that an introductory course
• Designs can be transcribed at various levels of abstraction.
in HDL-based logic design should emphasize breadth rather
Designers can write their register transfer language (RTL)
than depth. It should provide the students with a working knowl-
descriptions without choosing a specific fabrication tech-
edge of a broad variety of HDL-based design approaches and
nology. Logic synthesis tools can automatically convert
hence give the student a global understanding of HDL-based
the design to any fabrication technology.
design.
• Describing designs in HDLs allows functional verification
An effective undergraduate design course based on HDLs can
of the design early in the design cycle. Because designers
be formulated by starting with a language, or a subset of notations
work at the RTL level, they can optimize and modify the
in a language, from which derivation of hardware is clear. That
is, HDLs should be introduced to the students using a simple
Manuscript received July 22, 1998; revised July 19, 2000. language whose constructs have a clear one-to-one hardware
The author is with the Department of Mathematics and Computer Science,
California State University, Hayward, CA 94542 USA. correspondence. The CSE 420 course (Advanced Digital Design)
Publisher Item Identifier S 0018-9359(00)10082-2. at Northern Arizona University (NAU) uses the AHPL [4]
0018–9359/00$10.00 © 2000 IEEE
450 IEEE TRANSACTIONS ON EDUCATION, VOL. 43, NO. 4, NOVEMBER 2000

TABLE I
TRAINING IN HDL IN THE USA

language with favorable results. This language introduces the data registers and logic. The control section will cause register
students to the concepts of register, transfer description, structural transfers to take place in the data section by sending signals
modeling, and simple concurrency techniques. Moreover, with on a set of control lines. In some cases the sequencing of
a clear one-to-one mapping between the language constructs control will be influenced by branching information fed back
and the hardware, the students learn how to describe finite from the data section [4].
state machines in a procedural fashion and how to control The following is an example that illustrates modeling in
the flow of data among registers and buses. Based on this AHPL:
introductory exposure, the course can then smoothly transit
to a more powerful language with complex and sophisticated AHPLMODULE: SAMPLE
constructs such as the IEEE standard VHDL language. VHDL MEMORY: INREG[8]; OUTREG[8]; CNT[3].
is a broad language with a rich set of constructs that can be EXINPUTS: X[8]; ready.
used with different goals in mind. For example, it can be used
for synthesis of digital circuits, verification and validation of OUTPUTS: Z[8].
digital designs, test vector generation, or simulation of digital CLUNITS: INC[3].
systems.
In the second phase of NAUs course, to introduce the VHDL 1 /(I);
language and its underlying concepts, the simulation component
of the language is heavily emphasized. The ability to construct CNT
simulation models using VHDL of a variety of building blocks 2 INREG X
can be an invaluable teaching aid and a stepping-stone to a more CNT INC(CNT);
advanced application of the language, such as in synthesis and
testing.
3 OUTREG INREG
A. A Hardware Programming Language (AHPL)
AHPL is a register transfer language developed at the Univer- ENDSEQUENCE
sity of Arizona to be used as an educational tool to teach digital Z = OUTREG.
systems design. The language is simple and easy to learn, yet END.
powerful enough to model simple and complex digital systems.
However, AHPL lacks certain constructs and features that have The given AHPL sequence describes a simple system that re-
little pedagogical significance, but are necessary for efficient re- ceives an eight-bit vector X and makes it available as an output
alization and testing of digital systems [5]. after a delay determined by a three-bit counter, CNT[3]. As
The language uses an implicit clock for synchronizing as- shown in the given example, the AHPL description of a module
signment of data to registers and flip-flops, but does not provide consists of a name, a list of declarations, a control sequence, a
support for asynchronous circuits. Data types in AHPL are list of individual connection statements, and a termination. The
fixed and restricted to bits, vectors of bits, and arrays of bits. control sequence consists of a series of action statements such
Procedures or functions are only allowed in the context of as register transfers or bus routes, followed by a branch. For ex-
combinational logic units. Assignment of values to buses and ample, in the given description, at control step 3, the contents of
registers occurs at the same time without delay, because they register INREG are copied into register OUTREG and an uncon-
are synchronized with an implicit clock. The utility of AHPL ditional branch to step 1 ( (1)) will take place. AHPL main-
is based on the fact that most digital systems can be parti- tains a small library of combinational logic units that are used
tioned into a control section and a data section containing repeatedly in various digital systems. The INCREMENT (INC)
SAGAHYROON: FROM AHPL TO VHDL: A COURSE IN HARDWARE DESCRIPTION LANGUAGES 451

function used in step 2 of the AHPLMODULE shown above III. COURSE DESCRIPTION
is a good example. The transfer CNT INC(CNT) has the effect All undergraduate students at Northern Arizona University
of increasing the number stored in register CNT by 1 at the ar- majoring in computer science and engineering (CSE) or elec-
rival of a clock-triggering edge. The list of statements between trical engineering (EE) are required to take the following intro-
the keywords ENDSEQUENCE and END will be active every ductory computer hardware courses:
clock period regardless of the control state or step.
CSE 247 Introductory Digital Logic Design;
Clock-level simulation of AHPL descriptions can be ac-
CSE 355 Microprocessors;
complished using the function-level simulator HPSIM2 [13].
CSE 366 Computer Architecture.
HPSIM is a function-level simulator that interprets the AHPL
Computer Architecture is a core course for CSE majors and a
description and executes the connections, branches, and register
technical elective for EE majors. Additional technical electives
transfers. Users can verify the correctness of their design by
in the computer systems design area are listed below:
analyzing the results provided in an output file that shows
the contents of the various components at every clock period. CSE 410 Logic Design Theory;
HPSIM will be discussed further in a later section. For a CSE 420 Advanced Digital Design;
thorough discussion of AHPL and its simulator, readers are CSE 440 Embedded Control;
referred to references [4] and [13]. The complete package of CSE 450 Parallel Computing;
AHPL tools may be obtained by contacting the Department EGR
of Electrical and Computer Engineering at the University of 482 Introduction to VLSI Design.
Arizona. In the fall of 1997, the department became a participant of the
Mentor Graphics Higher Education Program. Mentor Graphics
offers an extremely attractive university program, where schools
B. The VHDL Language: An Overview
can acquire their CAD tools for a discounted annual fee. The de-
Currently, one of the most widely accepted and used HDLs partment laboratory facility consists of more than 30 Sun Sparc-
by the design community is VHDL. Partly in reaction to the stations running Solaris operating systems on a UNIX platform.
proliferation of HDLs and partly due to its own needs, in 1980 An agreement with Mentor Graphics provided for a total of 10
the Department of Defense (DoD) initiated the development licenses. The average enrollment in technical electives is about
of VHDL [6]–[8] as part of its very high-speed integrated cir- 20 students. Students work in pairs to model, simulate, and test
cuits (VHSIC) program; thus the name VHDL-VHSIC HDL. their designs.
The overall objective of this effort was to design a single lan- In a digital system of design process, students learn how to
guage that will allow the design, description, and simulation of design systems, from requirements analysis, to specification of
hardware at various levels ranging from behavioral to structural. the requirements, to functional design, to register level design,
Moreover, the intent was to make VHDL the standard HDL in to logic design, to circuit design, and then to physical design.
all DoD hardware design projects and to use the language as These design stages use hardware descriptions at various levels
a means of communicating designs from one contractor to an- of abstraction. A widely used representation that depicts the dif-
other. The criteria used in designing VHDL included indepen- ferent levels of abstractions in a digital system is the Y-chart
dence of the language from any specific technology, design en- [10], [11], shown in Fig. 1.
vironment, or design methods. Consequently, it should be pos- It is apparent from the chart that a system can be described
sible to integrate the language into any combination of environ- and the functionality verified at different levels of abstraction.
ment, technology, and methodology. At most of these levels, the designer need not worry about the
In 1987, VHDL was approved by the IEEE as the standard physical implementation or target technology.
language for designing and modeling hardware. Subsequently, The advanced digital design course (CSE 420) discusses
many computer-aided engineering companies, as well as uni- modeling using HDLs at the behavioral and structural levels.
versities, channeled resources into developing tools based on The topics covered in the course are summarized as follows:
VHDL. Today, VHDL is supported by nearly all design automa- • design Conventions;
tion tools and is widely used in the design cycle for simulation, • introduction to a Hardware Programming Language
synthesis, and testing. (AHPL);
Due to the strong presence of VHDL in the IC design cycle • modeling in AHPL;
and design automation industry, an undergraduate design course • introduction to VHDL;
based on HDLs should place heavy emphasis on covering as • VHDL Modeling Concepts;
much of the VHDL language as possible. However, VHDL can • structural Modeling in VHDL;
easily be classified as a complex language with a rich set of con- • dataflow Modeling Using VHDL;
current and sequential constructs, many of which do not have a • behavioral Modeling in VHDL;
unique hardware correspondence. Furthermore, there are con- • subprograms; Packages and Libraries;
structs in VHDL with no clear hardware mapping. As a result, • modeling of Test Benches;
transition to a language such as VHDL from block diagrams and • basic Input–Output.
schematics can easily be too large a step for many students. To As pointed out earlier, VHDL is a broad language with a rich
circumvent this problem, the students are introduced to AHPL set of constructs. For students with a hardware background, it
first and then progressed to the more powerful VHDL. would be more natural to start with structural modeling. Such
452 IEEE TRANSACTIONS ON EDUCATION, VOL. 43, NO. 4, NOVEMBER 2000

• sequence Detector;
• nine-bit UP/DOWN Counter.
The multiplier design is repeated intentionally to provide the
students with an opportunity to compare the two languages and
their constructs. Such an experience allows the students to ap-
preciate the power and sophistication built into the VHDL lan-
guage.
In general, the projects were chosen to cover all the funda-
mental topics concerned with the design, modeling, and ver-
ification of digital systems using HDLs. For example, in the
Comparator assignment, students learn hierarchical design tech-
niques and the use of VHDL higher level constructs to define
repetitive hardware structures. In the Sequence Detector project,
they use processes and wait statements to model sequential or
time-sensitive behavior. The UP–DOWN counter is a problem
Fig. 1. Y-Chart. that was given in a design contest [12] for designers who use
either VHDL or Verilog. The problem specifies the design of a
nine-bit up-by-three and down-by-five counter with even parity,
models are essentially textual equivalents of schematics and carry, borrow, and counter values as outputs where all output
cover the preliminaries of the language. Concepts such as design signals are flip-flop outputs.
configuration and use of packages can be postponed until later To simulate and test their VHDL designs, students use the
in the course. Following structural models, dataflow (or register QuickHDL-VHDL simulator from Mentor Graphics. Fig. 2
transfer) models can be introduced. These models provide ex- shows a screen capture of a typical simulation run. QuickHDL
posure to a larger set of language constructs while maintaining is a simulation tool for models written in either VHDL or
some level of correspondence with hardware. At this point in the Verilog. It can be used to model and test a system quickly
course, the majority of language constructs have been covered. at a high level of abstraction. This keeps the analysis of a
The next topic, behavioral modeling, makes use of the same design manageable and allows the user to identify and correct
constructs as used in dataflow models plus a few more in a many design problems or errors before they propagate to the
less structured way. This effectively covers most of the VHDL lower gate-level implementations or the breadboard level. The
language in a way that builds on top of previous logic design graphical user interface of QuickHDL consists of a startup
courses. Students are required to complete homework assign- window, which appears after the simulator is invoked, and other
ments from the textbooks [4], [6] as well as performing simu- windows that may be used during the simulation (see Fig. 2).
lation-based exercises using the Mentor Graphics environment. These windows are as follows [14].
Initially (up to approximately a third of the semester), and until
• The initial Startup Window lets the student set up the en-
the students have had adequate exposure to the languages, es-
vironment when invoke the application is invoked.
pecially VHDL, they are instructed to solve the various assign-
• The QuickHDL Main Window is that from which all sub-
ments manually. They are subsequently introduced to the design
sequent windows are available.
automation platform and are permitted to use it to verify their
• The Source Window displays the VHDL or Verilog source
designs.
code for the design in read-only mode.
Students are assigned the following set of laboratory exer-
• The Structure Window displays the hierarchy of structural
cises:
VHDL elements such as component instances, packages,
• design of a Magnitude Comparator (AHPL); blocks, and generated statements.
• multiplier (AHPL). • The Dataflow Window displays a signal or process in the
In these exercises, students make use of the HPSIM func- center of the window and also shows the current process
tion-level simulator included in the AHPL package. Two input when single-stepping or when QuickHDL encounters a
files required by HPSIM are an AHPL description of the circuit breakpoint.
and a communication file. The communication file is used to • The List Window shows the simulation of selected signals.
assign initial values to external lines, set the clock limit, and • The Wave Window displays waveforms, names, and cur-
specify what is to be included in the final output listing. In rent values for the signals selected.
essence, the output generated by HPSIM is a simulation report • The Process Window displays a list of processes that are
that reflects the contents of the various hardware units at every scheduled to run during the current simulation cycle.
clock cycle. Students are required to analyze this output and • The Variables Window shows the constants, generics, and
verify the functionality of their designs. variables in the current process and their current values.
The rest of the exercises are all VHDL based. The class de- • The Signals Window shows the names and current values
signs, simulates, and tests the following circuits: of signals in the region currently selected in the structure
• multiplier; window.
• 16-bit Arithmetic and Logic Unit; • The Schematic Window displays a schematic that corre-
• 16-bit Comparator; sponds to your design.
SAGAHYROON: FROM AHPL TO VHDL: A COURSE IN HARDWARE DESCRIPTION LANGUAGES 453

Fig. 2. QuickHDL Windows.

Clearly, the QuickHDL environment provides the students IV. CONCLUSION


with a powerful tool that allows an in-depth analysis and a clear
understanding of a particular design. Students react very pos- Today’s engineers are expected to utilize highly integrated
design environments that support HDL, standard cell, field pro-
itively to the graphical interface and no doubt it assists in en-
grammable gate arrays, and mixed-signal VLSI designs. They
hancing and accelerating their understanding of the underlying
need to be able to model real designs, simulate them, and verify
concepts in digital design.
their correctness in a relatively short period of time. To ac-
In the last two laboratory assignments, rather than interac-
complish this, designers are replacing the traditional schematic-
tively inputting the initial values of the different lines, students
based design entry tools with hardware description languages
are required to develop test benches. These benches are used to
such as VHDL and Verilog as the preferred design mediums.
verify the VHDL code without entering simulation commands Therefore, the need to train future engineers in HDL-based de-
and variable values every time a change is made. In each of the sign techniques is considerable, and modern engineering cur-
projects, students work in pairs and are required to submit a lab ricula must reflect the advances made in VLSI design method-
report that includes the following items: ologies. To address this need and provide NAU’s undergradu-
• a problem description; ates with some of the required skills, the faculty have revised
• fully documented entity and architectural descriptions of one of the senior-elective courses at the Department of Electrical
the design modules; Engineering and Computer Science. The modified contents of
• trace demos (timing waveforms) showing inputs and cor- the course expose the students to the concepts of digital design
responding outputs; modeling at various levels of abstractions using hardware de-
• simulation reports; sign languages. Students learn how to use HDLs to write their
• analysis and discussion of the results. circuit description without choosing a specific fabrication tech-
454 IEEE TRANSACTIONS ON EDUCATION, VOL. 43, NO. 4, NOVEMBER 2000

nology, and they learn how logic synthesis tools can be used to [8] M. Shahdad, “An overview of VHDL language and technology,” in Proc.
easily convert the designs to future technologies. Students un- 23rd ACM/IEEE Design Automat. Conf., 1986.
[9] M. T. O’Keefe, J. Lindenlaub, S. Ban, and T. Waheln, “Introducing
derstand the importance of functionally verifying their designs VLSI computer-aded design into the EE curriculum: A case study,”
early in the design cycle and hence achieving a significant time IEEE Trans. Educ., vol. 32, Aug. 1989.
reduction in the design flow. [10] D. Gajski, Silicon Compilation. Reading, MA: Addison-Wesley, 1988.
[11] S. Yolamanchili, VHDL Starter’s Guide. Englewood Cliffs, NJ: Pren-
In summary, the revised course, which makes use of the tice-Hall, 1998.
Mentor Graphics suite of tools, has provided undergraduate [12] K. C. Chang, Digital Design and Modeling with VHDL and Syn-
students with valuable hands-on design opportunities and thesis. Los Alamitos, CA: IEEE Comput. Soc. Press, 1997.
[13] HPSIM User’s Manual, Univ. Arizona, Dept. Elect. Comput. Eng..
enhanced their knowledge and expertise in the domain of [14] QuickHDL User’s and Reference Manual, Mentor Graphics, 1996.
ASIC’s design.

REFERENCES
[1] S. Palnitlear, Verilog HDL. Englewood Cliffs, NJ: Prentice-Hall, 1996.
[2] VHDL International, “VHDL International University Usage Survey,” Assim A. Sagahyroon received the B.S degree in electrical engineering from
VHDL International, Santa Clara, CA, 1995. the University of Khartoum, Sudan, in 1981, the M.S degree in electrical en-
[3] A. Sagahyroon and M. Massourni, “On the use of HDLs in teaching gineering from Northwestern University, Evanston, IL, in 1984, and the Ph.D.
VLSI design courses,” in ASEE/IEEE Frontiers Educ. Conf., Salt Lake degree from University of Arizona, Tucson, in 1989.
City, UT, 1996. From 1989 to 1992, he was with the Department of Electrical Engineering,
[4] F. J. Hill and G. R. Peterson, Digital Systems: Hardware Organization University of Khartoum. During the 1992 to 1993 academic year, he joined the
and Design, 3rd ed, NY: Wiley, 1987. Department of Electrical and Computer Engineering, University of Arizona, as
[5] S. M. Sait, “Integrating UAHPL-DA systems with VLSI design tools to a Visiting Faculty. In 1993, he joined the Department of Computer Science and
support VLSI DA courses,” IEEE Trans. Educ., vol. 35, pp. 321–329, Engineering at Northern Arizona University, where he became an Associate Pro-
Nov. 1992. fessor in February 1999. He is currently with the Department of Mathematics
[6] Z. Navabi, VHDL Analysis and Modeling of Digital Systems, NY: Mc- and Computer Science at California State University, Hayward. His interests in-
Graw-Hill, 1993. cludeVLSI design and testing, computer architecture, and design for low power.
[7] IEEE Standard VHDL Language Reference Manual, IEEE std 1076- Dr. Sagahyroon is a member of Etta Kappa Nu and the IEEE Computer So-
1987, 1988. ciety.

View publication stats

You might also like