ADDER X-SC Bedienungsanleitung Seite 74

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 87
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 73
74 CHAPTER 2. COMBINATIONAL DESIGN EXAMPLES
implemented using the leaf designs we provide with the sources of the book.
2.2 The use of Makefiles to automate the design flow
Here we will use the 4-bit multiplier design of the alliance-example directory to explain in some detail the use
of Makefiles to automate the design process and make it easier modifying files in your designs. The example we
will show here already has its own make file. We will explain here how to build your own one. At the end you
will have a Makefile almost identical to the one provided with the example. Since we worked all the text in a
tcsh shell environment, we will follow an approach similar to that used in the tutorials of Alliance. We will set
environment variables in the command line and leave the running of tools to the Makefile. First, we will obtain
a behavioral (Alliance) description from the VHDL file provided in the example. For this we use VASY. We
will set the environment variables as indicated in the original Makefile.
setenv MBK_WORK_LIB .; setenv MBK_CATAL_NAME NO_CATAL
And, we will edit the following Makefile.
ALLIANCE_BIN=$(ALLIANCE_TOP)/bin
VASY = $(ALLIANCE_BIN)/vasy
multi4.vbe : multi4.vhdl
$(VASY) -a -B -o -p -I v hdl multi4
This is a simplified version of the original Makefile, having only what is needed to run VASY. Let’s explain the
above Makefile. At the top we used what is called macros. Macros are similar to variables. They let us store
name of files, directory paths, etc. In our make file we use one macro to define the path to the bin directory in
Alliance. The se cond macro uses the first one to point to the VASY tool. In the second macro we expand the
first one by typing $(macro)
The second half of our make file defines a dependency. The multi4.vbe4 is the target and the argument after
the : is the source file needed to get the target. In other words, it has the following format target : sourcefile(s).
In the lines following this dependency definition we define the commands to generate the target using the source
file(s). In this c ase we need just one command to run VASY on the source file with the corresponding options
to obtain the behavioral Alliance description. Remember that the command lines must be preceded by a tab.
With this make file we can now run VASY as follows.
% make multi4.vbe
/usr/local/alliance/bin/vasy -a -B -o -p -I vhdl multi4
@@@@ @@@ @ @@@@ @ @@@@ @@@@
@@ @ @ @ @@ @@ @
@@ @ @@@ @@ @ @@ @
@@ @ @@@ @@@ @@ @
@@ @ @ @@ @@@@ @@
@@ @ @ @@ @@@@ @@
@@ @ @ @@ @@@ @@
@@@ @@@@@@@ @ @@ @@
@@@ @ @@ @@ @@ @@
@ @ @@ @@@ @ @@
@ @@@@ @@@@ @ @@@@ @@@@@@
VHDL Analyzer for SYnthesis
Alliance CAD System 5.0 20040928, vasy 5.0
Copyright (c) 2000-2005, ASIM/LIP6/UPMC
Author(s): Ludovic Jacomme
Contributor(s): Frederic Petrot
--> Run VHDL Compiler
--> Compile file multi4
--> Drive Alliance file multi4
We now simulate the behavioral description with the pat file provided in the example. Before that we need to
change some environment variables.
% setenv MBK_CATAL_NAME CATAL_ASIMUT_VASY
% setenv MBK_IN_LO vst
% setenv MBK_OUT_LO vst
Seitenansicht 73
1 2 ... 69 70 71 72 73 74 75 76 77 78 79 ... 86 87

Kommentare zu diesen Handbüchern

Keine Kommentare