ch09.2.htm
来自「介绍asci设计的一本书」· HTM 代码 · 共 3,048 行 · 第 1/5 页
HTM
3,048 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML EXPERIMENTAL 970324//EN">
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="Adobe FrameMaker 5.5/HTML Export Filter">
<TITLE> 9.2 Low-Level Design Languages</TITLE></HEAD><!--#include file="top.html"--><!--#include file="header.html"-->
<DIV>
<P>[ <A HREF="CH09.htm">Chapter start</A> ] [ <A HREF="CH09.1.htm">Previous page</A> ] [ <A HREF="CH09.3.htm">Next page</A> ]</P><!--#include file="AmazonAsic.html"--><HR></DIV>
<H1 CLASS="Heading1">
<A NAME="pgfId=3189">
</A>
9.2 <A NAME="10372">
</A>
Low-Level Design Languages</H1>
<P CLASS="BodyAfterHead">
<A NAME="pgfId=3193">
</A>
Schematics can be a very effective way to convey design information because pictures are such a powerful medium. There are two major problems with schematic entry, however. The first problem is that making changes to a schematic can be difficult. When you need to include an extra few gates in the middle of a schematic sheet, you may have to redraw the whole sheet. The second problem is that for many years there were no standards on how symbols should be drawn or how the schematic information should be stored in a netlist. These problems led to the development of design-entry tools based on text rather than graphics. As TTL gave way to PLDs, these text-based design tools became increasingly popular as <SPAN CLASS="Emphasis">
de facto</SPAN>
standards began to emerge for the format of the design files.</P>
<P CLASS="Body">
<A NAME="pgfId=30696">
</A>
PLDs are closely related to FPGAs. The major advantage of PLD tools is their low cost, their ease of use, and the tremendous amount of knowledge and number of designs, application notes, textbooks, and examples that have been built up over years of their use. It is natural then that designers would want to use PLD development systems and languages to design FPGAs and other ASICs. For example, there is a tremendous amount of PLD design expertise and working designs that can be reused. </P>
<P CLASS="Body">
<A NAME="pgfId=11150">
</A>
In the case of ASIC design it is important to use the right tool for the job. This may mean that you need to convert from a low-level design medium you have used for PLD design to one more appropriate for ASIC design. Often this is because you are merging several PLDs into a single, much larger, ASIC. The reason for covering the PLD design languages here is not to try and teach you how to use them, but to allow you to read and understand a PLD language and, if necessary, convert it to a form that you can use in another ASIC design system.</P>
<DIV>
<H3 CLASS="Heading2">
<A NAME="pgfId=3197">
</A>
9.2.1 ABEL</H3>
<P CLASS="BodyAfterHead">
<A NAME="pgfId=3201">
</A>
ABEL is a PLD programming language from Data I/O. <A HREF="#34854" CLASS="XRef">
Table 9.2</A>
shows some examples of the ABEL statements. The following example code describes a 4:1 MUX (equivalent to the LS153 TTL part): </P>
<TABLE>
<TR>
<TD ROWSPAN="1" COLSPAN="5">
<P CLASS="TableTitle">
<A NAME="pgfId=23860">
</A>
TABLE 9.2 <A NAME="34854">
</A>
ABEL.</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableFirst">
<A NAME="pgfId=23870">
</A>
<SPAN CLASS="TableHeads">
Statement</SPAN>
</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableFirst">
<A NAME="pgfId=32698">
</A>
<SPAN CLASS="TableHeads">
Example</SPAN>
</P>
</TD>
<TD ROWSPAN="1" COLSPAN="3">
<P CLASS="TableFirst">
<A NAME="pgfId=23874">
</A>
<SPAN CLASS="TableHeads">
Comment</SPAN>
</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableLeft">
<A NAME="pgfId=23880">
</A>
Module</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableLeft">
<A NAME="pgfId=23882">
</A>
<SPAN CLASS="BodyComputer">
module MyModule</SPAN>
</P>
</TD>
<TD ROWSPAN="1" COLSPAN="3">
<P CLASS="TableLeft">
<A NAME="pgfId=23884">
</A>
You can have multiple modules.</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableLeft">
<A NAME="pgfId=23890">
</A>
Title</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableLeft">
<A NAME="pgfId=23892">
</A>
<SPAN CLASS="BodyComputer">
title 'Title in a String'</SPAN>
</P>
</TD>
<TD ROWSPAN="1" COLSPAN="3">
<P CLASS="TableLeft">
<A NAME="pgfId=23894">
</A>
A string is a character series between quotes.</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableLeft">
<A NAME="pgfId=23900">
</A>
Device</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableLeft">
<A NAME="pgfId=23902">
</A>
<SPAN CLASS="BodyComputer">
MYDEV device '22V10' ;</SPAN>
</P>
</TD>
<TD ROWSPAN="1" COLSPAN="3">
<P CLASS="TableLeft">
<A NAME="pgfId=23904">
</A>
<SPAN CLASS="BodyComputer">
MYDEV</SPAN>
is Device ID for documentation.</P>
<P CLASS="TableLeft">
<A NAME="pgfId=23905">
</A>
<SPAN CLASS="BodyComputer">
22V10</SPAN>
is checked by the compiler.</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableLeft">
<A NAME="pgfId=23911">
</A>
Comment</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="Computer">
<A NAME="pgfId=23913">
</A>
"comments go between double quotes"</P>
<P CLASS="Computer">
<A NAME="pgfId=23914">
</A>
"end of line is end of comment</P>
</TD>
<TD ROWSPAN="1" COLSPAN="3">
<P CLASS="TableLeft">
<A NAME="pgfId=23916">
</A>
The end of a line signifies the end of a comment; there is no need for an end quote.</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableLeft">
<A NAME="pgfId=23922">
</A>
<SPAN CLASS="BodyComputer">
@ALTERNATE</SPAN>
</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="Computer">
<A NAME="pgfId=23924">
</A>
<SPAN CLASS="BodyComputer">
@ALTERNATE "use alternate symbols</SPAN>
</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="Table">
<A NAME="pgfId=23926">
</A>
operator</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="Table">
<A NAME="pgfId=23928">
</A>
alternate</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="Table">
<A NAME="pgfId=23930">
</A>
default</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableLeft">
<A NAME="pgfId=23932">
</A>
</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableLeft">
<A NAME="pgfId=23934">
</A>
</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="Table">
<A NAME="pgfId=23936">
</A>
<SPAN CLASS="BodyComputer">
AND </SPAN>
</P>
<P CLASS="Table">
<A NAME="pgfId=23937">
</A>
<SPAN CLASS="BodyComputer">
OR</SPAN>
</P>
<P CLASS="Table">
<A NAME="pgfId=23938">
</A>
<SPAN CLASS="BodyComputer">
NOT</SPAN>
</P>
<P CLASS="Table">
<A NAME="pgfId=23939">
</A>
<SPAN CLASS="BodyComputer">
XOR</SPAN>
</P>
<P CLASS="Table">
<A NAME="pgfId=23940">
</A>
<SPAN CLASS="BodyComputer">
XNOR</SPAN>
</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="Table">
<A NAME="pgfId=23942">
</A>
<SPAN CLASS="BodyComputer">
*</SPAN>
</P>
<P CLASS="Table">
<A NAME="pgfId=23943">
</A>
<SPAN CLASS="BodyComputer">
+</SPAN>
</P>
<P CLASS="Table">
<A NAME="pgfId=23944">
</A>
<SPAN CLASS="BodyComputer">
/</SPAN>
</P>
<P CLASS="Table">
<A NAME="pgfId=23945">
</A>
<SPAN CLASS="BodyComputer">
:+:</SPAN>
</P>
<P CLASS="Table">
<A NAME="pgfId=23946">
</A>
<SPAN CLASS="BodyComputer">
:*:</SPAN>
</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="Table">
<A NAME="pgfId=23948">
</A>
<SPAN CLASS="BodyComputer">
&</SPAN>
</P>
<P CLASS="Table">
<A NAME="pgfId=23949">
</A>
<SPAN CLASS="BodyComputer">
#</SPAN>
</P>
<P CLASS="Table">
<A NAME="pgfId=23950">
</A>
<SPAN CLASS="BodyComputer">
!</SPAN>
</P>
<P CLASS="Table">
<A NAME="pgfId=23951">
</A>
<SPAN CLASS="BodyComputer">
$</SPAN>
</P>
<P CLASS="Table">
<A NAME="pgfId=23952">
</A>
<SPAN CLASS="BodyComputer">
!$</SPAN>
</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableLeft">
<A NAME="pgfId=23954">
</A>
Pin declaration</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableLeft">
<A NAME="pgfId=23956">
</A>
MYINPUT pin 2; I3, I4 pin 3, 4 ;</P>
<P CLASS="TableLeft">
<A NAME="pgfId=23957">
</A>
/MYOUTPUT pin 22; IO3,IO4 pin 21,20 ;</P>
</TD>
<TD ROWSPAN="1" COLSPAN="3">
<P CLASS="TableLeft">
<A NAME="pgfId=23959">
</A>
Pin 22 is the IO for input on pin 2 for a 22V10.</P>
<P CLASS="TableLeft">
<A NAME="pgfId=23960">
</A>
<SPAN CLASS="BodyComputer">
MYOUTPUT</SPAN>
is active-low at the chip pin.</P>
<P CLASS="TableLeft">
<A NAME="pgfId=23961">
</A>
Signal names must start with a letter.</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableLeft">
<A NAME="pgfId=23967">
</A>
Equations</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableLeft">
<A NAME="pgfId=23969">
</A>
<SPAN CLASS="BodyComputer">
equations</SPAN>
</P>
</TD>
<TD ROWSPAN="1" COLSPAN="3">
<P CLASS="TableLeft">
<A NAME="pgfId=23971">
</A>
Defines combinational logic.</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableLeft">
<A NAME="pgfId=23977">
</A>
</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableLeft">
<A NAME="pgfId=23979">
</A>
<SPAN CLASS="BodyComputer">
IO4 = HELPER ; HELPER = /I4 ;</SPAN>
</P>
</TD>
<TD ROWSPAN="1" COLSPAN="3">
<P CLASS="TableLeft">
<A NAME="pgfId=33944">
</A>
Two-pass logic</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableLeft">
<A NAME="pgfId=23987">
</A>
Assignments</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableLeft">
<A NAME="pgfId=23989">
</A>
<SPAN CLASS="BodyComputer">
MYOUTPUT = /MYINPUT ;</SPAN>
</P>
</TD>
<TD ROWSPAN="1" COLSPAN="3">
<P CLASS="TableLeft">
<A NAME="pgfId=23991">
</A>
Equals <SPAN CLASS="BodyComputer">
'='</SPAN>
is unlocked assignment.</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableLeft">
<A NAME="pgfId=23997">
</A>
</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableLeft">
<A NAME="pgfId=23999">
</A>
<SPAN CLASS="BodyComputer">
IO3 := I4 ;</SPAN>
</P>
</TD>
<TD ROWSPAN="1" COLSPAN="3">
<P CLASS="TableLeft">
<A NAME="pgfId=24001">
</A>
Clocked assignment operator (registered IO)</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableLeft">
<A NAME="pgfId=24007">
</A>
Signal sets</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableLeft">
<A NAME="pgfId=24009">
</A>
<SPAN CLASS="BodyComputer">
D = [D0, D1, D2, D3] ; <BR>
Q = [Q0, Q1, Q2, Q3];</SPAN>
</P>
</TD>
<TD ROWSPAN="1" COLSPAN="3">
<P CLASS="TableLeft">
<A NAME="pgfId=24011">
</A>
A signal set, an ABEL bus</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableLeft">
<A NAME="pgfId=24017">
</A>
</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableLeft">
<A NAME="pgfId=24019">
</A>
<SPAN CLASS="BodyComputer">
Q := D ;</SPAN>
</P>
</TD>
<TD ROWSPAN="1" COLSPAN="3">
<P CLASS="TableLeft">
<A NAME="pgfId=24021">
</A>
4-bit-wide register</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableLeft">
<A NAME="pgfId=24027">
</A>
Suffix</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableLeft">
<A NAME="pgfId=24029">
</A>
<SPAN CLASS="BodyComputer">
MYOUTPUT.RE = CLR ;</SPAN>
</P>
</TD>
<TD ROWSPAN="1" COLSPAN="3">
<P CLASS="TableLeft">
<A NAME="pgfId=24031">
</A>
Register reset</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableLeft">
<A NAME="pgfId=24037">
</A>
</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableLeft">
<A NAME="pgfId=24039">
</A>
<SPAN CLASS="BodyComputer">
MYOUTPUT.PR = PRE ;</SPAN>
</P>
</TD>
<TD ROWSPAN="1" COLSPAN="3">
<P CLASS="TableLeft">
<A NAME="pgfId=24041">
</A>
Register preset</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableLeft">
<A NAME="pgfId=24047">
</A>
Addition</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableLeft">
<A NAME="pgfId=24049">
</A>
<SPAN CLASS="BodyComputer">
COUNT = [D0, D1, D2];</SPAN>
</P>
<P CLASS="TableLeft">
<A NAME="pgfId=24050">
</A>
<SPAN CLASS="BodyComputer">
COUNT := COUNT + 1;</SPAN>
</P>
</TD>
<TD ROWSPAN="1" COLSPAN="3">
<P CLASS="TableLeft">
<A NAME="pgfId=24052">
</A>
Can’t use <SPAN CLASS="BodyComputer">
@ALTERNATE </SPAN>
</P>
<P CLASS="TableLeft">
<A NAME="pgfId=24053">
</A>
if you use <SPAN CLASS="BodyComputer">
'+' </SPAN>
to add.</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableLeft">
<A NAME="pgfId=24059">
</A>
Enable</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableLeft">
<A NAME="pgfId=24061">
</A>
<SPAN CLASS="BodyComputer">
ENABLE IO3 = IO2;</SPAN>
</P>
<P CLASS="TableLeft">
<A NAME="pgfId=24062">
</A>
<SPAN CLASS="BodyComputer">
IO3 = MYINPUT;</SPAN>
</P>
</TD>
<TD ROWSPAN="1" COLSPAN="3">
<P CLASS="TableLeft">
<A NAME="pgfId=24064">
</A>
Three-state enable (ENABLE is a keyword).</P>
<P CLASS="TableLeft">
<A NAME="pgfId=24065">
</A>
<SPAN CLASS="BodyComputer">
IO3</SPAN>
must be a three-state pin.</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableLeft">
<A NAME="pgfId=24071">
</A>
Constants</P>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?