ReadMe.md 4.07 KB
Newer Older
Johann Faerber's avatar
Johann Faerber committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
VLSI Design Project Directory Structure
=======================================

  -----------------------------------------------------------------------------
  Author(s)  : 
  johann.faerber@hs-augsburg.de, friedrich.beckmann@hs-augsburg.de
  -----------------------------------------------------------------------------
  Company    : 
  University of Applied Sciences Augsburg
  -----------------------------------------------------------------------------
  Description: 
  This VLSI Design Project Directory Structure using makefiles
  allows automating design flow for frontend tools
  like ModelSim and backend tools like Altera Quartus
  -----------------------------------------------------------------------------


Design Flow
-----------
A simplified design flow consists of

  * Design Creation
  * Functional Verification
  * Synthesis, Physical Design, Manufacture
  * Prototype Test

Makefile Targets for Verification
---------------------------------
The corresponding targets to the design flow for the functional verification
of a design with ModelSim are:

```
  "make mproject" to create a new modelsim project
  "make compile" to compile all VHDL sources in batch mode
  "make sim" to start modelsim gui with the top testbench of the project
  "make modelsim" to start modelsim with graphical user interface
  "make clean" to remove all generated files
```

e.g.
To start the graphical user interface of the ModelSim simulator with
the corresponding project, use the following command sequence:

```
cd sim/mux2to1
make sim
```

Makefile Targets for Synthesis
------------------------------
The corresponding targets to the design flow for synthesis, physical design,
manufacture of a design with Altera Quartus are:

```
  "make qproject" to create a new quartus project
  "make compile" synthesize the design
  "make prog" to configure programmable device
  "make quartus" to start quartus graphical user interface
  "make clean" to remove all generated files
```

e.g.  
To configure an FPGA on a connected prototype board with
the corresponding project, use the following command sequence:

```
cd pnr/mux2to1
make prog
```

Naming Conventions
------------------
The overall makefile for simulation is located in

sim/makefile

The top level entity of a subdesign is assigned as the project name for verification
in the makefile, e.g.

sim/mux2to1/makefile

```
# Project name for simulation
PROJECT = mux2to1
```

The corresponding testbench is assumed t_top_level_entity.vhd,
e.g. t_mux2to1.vhd and assigned in the makefile as well:

```
# Add here the testbench file
SOURCE_FILES = $(SYN_SOURCE_FILES) \
../../src/t_$(PROJECT).vhd
```


The overall makefile for synthesis is located in

pnr/makefile

A similar convention for a subdesign is used for synthesis, physical design,
manufacture in the makefile, e.g. using a DE1 prototype board

pnr/de1_mux2to1/makefile

```
# Project name for simulation
SIM_PROJECT_NAME = mux2to1
# Project name for synthesis, physical design, manufacture
PROJECT = de1_$(SIM_PROJECT_NAME)
```

The corresponding top level is assumed de1_top_level_entity_structure.vhd,
e.g. de1_mux2to1_structure.vhd and assigned in the makefile as well:

```
# Add the toplevel fpga vhdl file
SOURCE_FILES = $(SYN_SOURCE_FILES) \
../../src/$(PROJECT)_structure.vhd
```

Project Directory Structure
---------------------------
Automated design flow with makefile relies on the following directory structure:

```  
   VLSIDesignOverallProjectName
   |   
   +---src
   |       and2gate_equation.vhd
   |       invgate_equation.vhd
   |       mux2to1_structure.vhd
   |       or2gate_equation.vhd
   |       t_mux2to1.vhd
   |       de1_mux2to1_structure.vhd
   |
   +---sim
   |   |   makefile
   |   |
   |   \---mux2to1
   |           makefile
   |           makefile.sources
   |
   +---pnr
   |   |   makefile
   |   |
   |   \---de1_mux2to1
   |           de1_mux2to1_pins.tcl
   |           makefile
   |
   +---scripts
   |       de1_pin_assignments_minimumio.csv
   |       de1_pin_assignments_minimumio.tcl
   |       modelsim.ini
   |       quartus_project_settings.tcl
   |
   \---doc
           ReadMe.md
```