Upload
dinhdat
View
220
Download
0
Embed Size (px)
Citation preview
EX1: Synthesising combinational circuits in sPLD using VHDL
1
EX1 de Sistemes Electrònics Digitals
GRUP: DATA: Descripció de les aportacions realitzades i de les conclusions d’aquest exercici TEMPS D’ESTUDI I DE PREPARACIÓ DE L’EXERCICI:
Sessions TGA a l’aula: Sessions TGB al laboratori Sessions TGC fora de l’horari Treball individual Estudiant 1: Estudiant 2: Estudiant 3:
Mitjana de temps total (per estudiant) ÍNDEX DE CONTINGUT
Synthesising combinational circuits in sPLD using VHDL .................................................................... 3
1.1 Description ................................................................................................................................... 3
1.2 Objectives ..................................................................................................................................... 3
1.3 Study time: ................................................................................................................................... 3
1.4 Tutorial exercise ........................................................................................................................... 3
1.4.1 Software installation ............................................................................................................. 3
1.4.2 Software license from Lattice web ........................................................................................ 4
1.4.3 ispLEVER Project Navigator and the GAL22V10 device ..................................................... 5
1.4.4 Synthesising the project ........................................................................................................ 7
1.4.5 Simulating the circuit ............................................................................................................ 8
1.4.6 Programming the sPLD GAL22V10 ..................................................................................... 8
1.5 sPLD GAL22V10 technology ...................................................................................................... 9
1.6 Mixed schematics and VHDL design using ispLEVER ............................................................... 9
1.7 Programming in VHDL ................................................................................................................ 9
1.8 The UART peripheral module: some combinational blocks ...................................................... 10
Aquest apartat és obligatori. Si no és present, no es corregeix l’exercici i s’ha de tornar a lliurar
Heu d’apuntar tot el temps d’estudi que heu dedicat a l’exercici
EPSC – SED: Sistemes Electrònics Digitals
2
1.9 Desenvolupament de la pràctica/problema. Treball del grup (títol 2) ........................................ 11
1.9.1 Instal·lació de programaris i primers exercicis en VHDL (títol 3) .................................... 11
1.10 Bibliografia i referències consultades ......................................................................................... 11
1.11 Pla de treball que heu preparat per resoldre el disseny ............................................................... 12
1.12 “Fulls de dubtes” de l’EX1 ......................................................................................................... 13
1.12.1 Sobre els apartats A), B), C) i D) d’instal·lació dels programes ........................................ 13
1.12.2 Sobre l’apartat E) Project Navigator, F) compilació i G) simulació en Proteus-VSM ...... 13
1.12.3 Full de dubtes sobre l’apartat H) de gravació del sPLD .................................................. 14
1.12.4 Sobre l’apartat i I) de cerca d’informació sobre el GAL22V10 ......................................... 14
1.12.5 Full de dubtes sobre els apartats J), K), L), M), de disseny amb esquemes i VHDL en
ispLEVER (disseny flat i disseny jeràrquic) ....................................................................................... 15
1.12.6 Dubtes dels apartats N) i O) sobre disseny de sistemes combinacionals en VHDL ........... 15
MOLT IMPORTANT: Aquest curs s’espera de vosaltres que ja prepareu i editeu textos de certa qualitat, per tant: preneu aquest document de plantilla d’estils i formats. Amplieu-lo i modifiqueu-lo per plantejar, desenvolupar, solucionar i verificar el funcionament del vostre disseny. NO ES POT LLIURAR CAP TREBALL QUE NO SEGUEIXI EXACTAMENT AQUESTA PLANTILLA:
- Fixeu-vos que l’índex de contingut de l’exercici es genera automàticament si respecteu els estils: Normal, Títol 1, Títol 2 i Títol 3.
- Respecteu i useu l’estil del peu de figura (Llegenda) i les referències creuades a les figures que s’actualitzen automàticament quan n’inseriu de noves.
- Respecteu i useu les referències creuades a la bibliografia numerada
- Passeu el corrector ortogràfic i repasseu la gramàtica tant si escriviu en anglès, castellà o català.
- Per eliminar errors, feu una segona lectura a través dels companys de grup abans de lliurar l’exercici
Consulteu-nos també qualsevol dubte que tingueu sobre l’edició de documents i aquesta plantilla en particular. Tingueu en compte les anotacions i indicacions que us han fet els professors en els vostres treballs previs, per tal de no cometre les mateixes errades en aquest treball
ACTIVITATS Qui Què Com Quan Grup de treball cooperatiu Edició impresa (primera
versió) de l’informe de l’exercici. Imprimiu la pàgina 1 i 2 amb l’índex actualitzat 1 i a partir de la pàgina 11
Amb la plantilla i seguint el documents de criteris de qualitat
Abans de la data límit que trobareu al pla de treball o bé al tauló d’anuncis de la web de SED
Els professors o els companys a través d’una correcció creuada
Correcció de la primera versió
Amb la plantilla d’avaluació
Com a màxim una setmana desprès del lliurament de la primera versió impresa
(amb caràcter voluntari)2 Grup de treball cooperatiu Edició electrònica (segona
versió) del document complet amb la incorporació de les millores assenyalades pels correctors
Amb un generador de fitxers PDF
Com a màxim una setmana desprès del lliurament de la correcció. S’enviarà per correu electrònic als professors.
Professors Penjar a la web de SED el document per evidenciar el treball desenvolupat
A través d’un enllaç al document a l’apartat de Grups de Classe
Durant el quadrimestre, si s’escau
NOTA: També es valora la iniciativa. Si el grup cooperatiu vol realitzar una aplicació similar a la presentada en aquest exercici que incorpori els conceptes introduïts, bàsicament el disseny d’un altre sistema digital combinacional amb VHDL, que ho comuniqui als professors i es considerarà.
1 Recordeu que l’índex de continguts el genera automàticament el processador de textos. Si no ho heu fet mai, heu de preguntar-nos-ho perquè en aquests treballs pretenem que useu el processador de textos a nivell professional. 2 És clar que la realització d’aquesta feina addicional millora la qualificació de l’exercici.
EX1: Synthesising combinational circuits in sPLD using VHDL
3
Synthesising combinational circuits in sPLD using VHDL
1.1 Description
We will install computed aided design (CAD) software for design, simulate and synthesise combinational circuits into simple programmable logic devices (sPLD): Proteus-VSM, ispLEVER Classic and ispVM System. A simple project, already studied in ED, will be provided for checking the correctness of the software installation and begin the design: a basic HEX-7SEG decoder. The project will consist of a VHDL source file that will be compiled to generate the output JED file necessary to program the sPLD GAL22V10 device through the PROTOGAL board. Three additional combinational circuits will be proposed so that each group member will be in charge of programming a sPLD for a specific application. Furthermore, a new VHDL exercise will be the starting point to begin the application project design: a UART port very similar to the one worked out in ED3.
1.2 Objectives
After completing the task and studying Units 1.1, 1.2, 1.3, and 1.4, you will be able to:
- Remember how to design combinational circuits revisiting ED materials - Search books and the Internet to find information about the basics of VHDL language - Explain the concepts of flat and hierarchical designs using components and their instantiation in
VHDL language - Explain the advantages of using hardware description languages instead of schematic capture - Install and make projects in ispLEVER Classic from Lattice Semiconductor - Verify the design in SPICE-based electrical circuit simulators: Proteus-VSM - Explain the technology of a SPLD like the GAL22V10 and the way it is programmed - Explain the design flow of a modern digital circuit: from the VHDL description to the PLD
programming. - Analyze the block structure of an UART port for asynchronous serial data transmission. - Document the work using a predefined word processor template and utilities: spelling and
grammar, chapter enumeration, page headers and footers, hyperlinks, cross-references, figure captions, text styles, etc.
- Organize a working plan for developing the exercise, and - Analyze you own individual and group study time .
1.3 Study time:
The estimated study time4 for this exercise is 5 regular classroom or laboratory sessions (9/9, 9/10, 9/16, 9/17, 9/23) and up to 7 hours of cooperative work elsewhere with team mates. So, we’ll assume that you have studied up to 17 hours in the development and accurate preparation of the EX1.
1.4 Tutorial exercise
1.4.1 Software installation
A) Activate the license file and install Proteus-VSM into the laboratory computer. B) Run ISIS application using any sample program from the library to determine if the software is
rightly installed. Then, open the tutorial exercise and run it to analyse the way it works 3 http://epsc.upc.edu/projectes/ed/grups_classe/07-08-q1/1BT4/07-08-Q1-1BT4.htm 4 Students will work in cooperative groups for the whole semester. An average time of 6.5 hours per week is required for each team member.
EPSC – SED: Sistemes Electrònics Digitals
4
- Explain what happens if BI_L or LT_L is active - Explain the function of RBI_L - Analyze and determine the truth table and logic equation for the circuit.
Fig. 1 ISIS initial screen and sample examples
C) Install ispLEVER Classic
- http://epsc.upc.edu/projectes/sed/unitats/unitat_1_2/Lattice_tools_for_PLD.pdf - http://www.latticesemi.com/products/designsoftware/isplever/ispleverclassic/index.cfm
One student of the group must also install the ispVMSystem in order to program the PROTOGAL board with the sPLD JED configuration file. A universal programmer is another alternative (see 1.4.6). 1.4.2 Software license from Lattice web
D) Place into the “License” folder as in Fig. 2, the license file you have got previously from Lattice Semiconductor web by e-mail.
Fig. 2 Folder where to place the ispLEVER license file
EX1: Synthesising combinational circuits in sPLD using VHDL
5
Fig. 3 Window to generate the 6 month free license file for ispLEVER Classic
http://www.latticesemi.com/licensing/flexlmlicense.cfm?p=classic
1.4.3 ispLEVER Project Navigator and the GAL22V10 device
E) Execute “Project Navigator” and load the already defined initial project HEX-7SEG
Fig. 4 Tutorial project HEX-7SEG to be loaded into the Project Navigator
This is a HEX-7SEG decoder project build using a mix of schematics in the classical way and VHDL modules. Our aim is to synthesise it and generate the configuration JED file prepared to be downloaded into the simple programmable logic device (sPLD) GAL22V10. This is the most elemental sPLD from Lattice and a classic that has become a standard circuit. It has about 500 gates and 10 d-type registers.
Fig. 5 Device selector
6
Fig. 6 and Fig. 7 show the HEXand previous year’s designs [1].
Fig.
Look into SC2 i SC3 to see thedesign. 1.4.4 Synthesising the project
F) Compile the HEX-7SEG the programmer and for the simulatorothers, the synthesised logic equations and the chip pin assignment (see compile, you may get a different pin assignment distributionand FPGA devices using a you want to connect the entity ports while synthesising.
EPSC – SED: Sistemes Electrònics Digitals
show the HEX-7SEG entity and internal architecture. Check [3] for more information
Fig. 6 HEX_7SEG Symbol or entity
Fig. 7 HEX_7SEG internal structure or architecture
to see their internal design using gates, and into SC1 which is your first VHDL
Synthesising the project
7SEG design and examine the following files: a) the configuration the programmer and for the simulator; and b) the report file RPT where you can see, among others, the synthesised logic equations and the chip pin assignment (see Fig. compile, you may get a different pin assignment distribution. This problem is solved for CPLD
ices using a constrain file (or a pin-assignment tool) specifying at which pin do you want to connect the entity ports while synthesising.
stemes Electrònics Digitals
for more information
which is your first VHDL
the configuration JED for where you can see, among
Fig. 8). Every time you This problem is solved for CPLD
specifying at which pin do
EX1: Synthesising combinational circuits in sPLD using VHDL
7
Fig. 8 Pin assignment as seen in the report output file (RPT)
1.4.5 Simulating the circuit
G) Fig. 9 shows the way the project looks like once the simulation has been launched in Proteus-VSM. The *.JED file must be assigned the GAL device which is inside the decoder block.
Fig. 9 Proteus-VSM schematic which contains a single sPLD device GAL22V10 and the 7-
segment display
1.4.6 Programming the sPLD GAL22V10
H) Program the sPLD chip by means of the PROTOGAL board and the ispVM System and mount the laboratory prototype.
MSE Microsystems Engineering (http://www.msebilbao.com) from Bilbao is the company that manufactures the PROTOGAL board seen in Fig. 11a. This is the fastest way to check the real functionality of the programmed chip. At the Electronics Laboratory of the EPSC we also have the universal ToolsMax programmer depicted in Fig. 11b. The key point here is that the configuration file (*.JED), already used in the simulator Proteus-VSM, is the same file which has to be processed by the programmer.
SC
DESCODIFICADOR HEX-7SEG
B
A
b_L
c_L
d_L
e_L
f_L
g_L
a_LD
C
RBO_L
LT_L
BI_L
RBI_L
R1
330
Vcc
0010
111 1
EPSC – SED: Sistemes Electrònics Digitals
8
Fig. 10 The Lattice ispVM System for programming PLD chips using the “In System Programming”
technique. A 4-wire programming bus makes unnecessary the use of a universal programmer.
a) b)
Fig. 11 a) PROTOGAL board for programming the ispGAL22V10 device. All the chip pins are
available in the pin connector. b) Universal programmer TopMax from EETools
(http://www.eetools.com)
Find in [1] the schematic of the “Micronator Lattice ispGAl Programmer” which is very similar to the PRTOTOGAL schematic in Fig. 11a. Analyse its schematic and explain their main features.
1.5 sPLD GAL22V10 technology
I) Search Internet for the product datasheet and study its architecture and the main technological characteristics. From the pdf, using the cut & paste tool, get 2 or 3 figures to document your work in addition to your own explanations. Check Unit 1.14 and Unit 1.15 from ED [3] course to gather more information about sPLD.
1.6 Mixed schematics and VHDL design using ispLEVER
J) (Optional) In order to learn more about the ispLEVER tools, specifically, how to design schematics using the basic library building blocks, make the following changes into the initial design after copying the project into another folder: - Change the order of the AND and OR gates in Fig. 7 circuit redesigning at the same time the
internal structure of SC3 in order to keep the same chip functionally. - Produce an alternate gate circuit for SC2 i SC3.
- Recompile and simulate frequently to check if your new designs are correct.
EX1: Synthesising combinational circuits in sPLD using VHDL
9
1.7 Programming in VHDL
Study the basics of the Very High Speed Integrated Circuit Hardware Description Language (VHDL) using as many sources of information as possible. Apart from the SED materials in [1], you may find a huge amount of resources from other universities and companies through Internet.
- Documents PDF : “06CombinVHDL.pdf” “didacticiel_GAL_Lattice_ISP.pdf”, etc - Interactive tutorials ALDEC_EVITA; U_VIGO - Text books in the web “cookbook_llibre_VHDL.pdf” - Unit 1.14 from ED, etc.
K) (Optional) Substitute the SC2 and SC3 schematics by VHDL files and compile and simulate the
new project to check its operation. L) Make a new project consisting in a single VHDL file (flat design a single entity) which will have
the same HEX-7SEG decoder functionality as the one in Fig. 6. Check this reference: http://epsc.upc.edu/projectes/ed/problemes/problemes_PA/Problemes_PA.htm or simply:
http://epsc.upc.edu/projectes/sed/grups_classe/07-08_Q2/2AT4/exercicis/EX1/hex_7seg_vhdl_only.vhd
� Remember you must draw a flux diagram or circuit schematics using gates or black boxes before attempting to write the VHDL code!!
M) Make a new project consisting in many VHDL files (hierarchical design with instantiated
components interconnected by signals) which will have the same HEX-7SEG decoder functionality as the one in Fig. 6.
1.8 The UART peripheral module: some combinational blocks
Study the UART project developed previously in ED and SED. Some project information can be found here in this document: “Disseny d’un transmissor sèrie asíncron”. Now, we will focus on the design of the combinational blocs of the operational unit of the transmitter and receiver. N) Start a VHDL-based ispLEVER project for implementing into a single GAL22V10 device the
design of an 8-bit even parity generator and the output MUX4. See Fig. 12. Your project must be hierarchical: only one entity and several components instantiated. Verify your design using Proteus.
Fig. 12 Block to be designed: a single GAL22V10 chip with the functionality of an 8-bit even parity
generator plus a 4-channel multiplexer (MUX4)
D[8..0]
D8
D0
D7
D6
D5
D4
D3
D2
D1
SPLD 9-BIT PARITY GEN - MUX4
CCT003
1TXD
0PB
000010100
I[8..0] PB
TxD
C0
C1
C3
S1
C2
S0
0
100
00
9-bit even parity generator
MUX4
EPSC – SED: Sistemes Electrònics Digitals
10
Remember that after completing EX3 by integrating the whole VHDL design of the UART transmitter and receiver into a single chip CPLD or FPGA, you will be able to:
- Save power consumption - Reduce board area and components’ count - Increase the reliability of the design - Document the design very well and make it portable between chips from different
companies - And of course, learn a lot about modern digital circuits design!
O) Propose yourself another standard combinational circuit that can be fitted into a single sPLD
GAL22V10 and proceed with the design flow ending with a final Proteus verification.
EX1: Synthesising combinational circuits in sPLD using VHDL
11
1.9 Desenvolupament de la pràctica/problema. Treball del grup (títol 2)
1.9.1 Instal·lació de programaris i primers exercicis en VHDL (títol 3)
El Proteus-VSM (títol 4)
Afegiu aquí el vostre text (estil normal) encapçalat amb títols (Títol 2 i 3 i 4), amb figures (estil llegenda o “epígrafe”) i referències creuades en el text com aquesta Fig. 13 (és una referència creuada a la llegenda) a les figures que inseriu. Feu referència també en el text a les fonts bibliogràfiques o de web que consulteu d’aquesta manera [1] (és una referència creuada a l’element numerat [1]). Expliqueu perquè les heu consultat i quina informació útil heu trobat.
Fig. 13 Exemple de peu de figura que segueix la numeració de l’enunciat (llegenda)
1.10 Bibliografia i referències consultades
Amplieu i modifiqueu aquesta secció de referències. [1] http://epsc.upc.edu/projectes/sed/. Pàgina web de SED on trobareu materials i treballs de cursos
anteriors. Vegeu la secció unitats didàctiques i grups de classe [2] Brown,S., Vranesic, Z., “Fundamentals of digital logic with VHDL design”, Mc Graw-Hill, 2005 [3] http://epsc.upc.edu/projectes/ed/problemes/problemes_PA/Problemes_PA.htm. Pàgina web d’ED on
hi ha el problema que descriu el funcionament i el disseny del descodificador HEX-7SEG. [4] http://epsc.upc.edu/projectes/sed/projectes_aplicacio/Projectes_Aplic.htm. Lloc on hi trobareu el full
de plantilla per a distribuir tasques entre els membres del grup cooperatiu
EPSC – SED: Sistemes Electrònics Digitals
12
1.11 Pla de treball que heu preparat per resoldre el disseny
Consulteu els documents de la web [4] per veure com us podeu preparar el pla de treball i el repartiment de tasques per realitzar una bona feina en equip. Useu diagrames de flux, mapes conceptuals, esquemes, taules, etc.
Aquest apartat és obligatori. Si no és present, no es corregeix l’exercici i s’ha de tornar a lliurar
EX1: Synthesising combinational circuits in sPLD using VHDL
13
1.12 “Fulls de dubtes” de l’EX15
1.12.1 Sobre els apartats A), B), C) i D) d’instal·lació dels programes
Grup de treball: Data: Pla de treball: Dubtes: 1.12.2 Sobre l’apartat E) Project Navigator, F) compilació i G) simulació en Proteus-VSM
Grup de treball: Data: Pla de treball: Dubtes:
5 Afegiu, si és necessari, altres mitjos fulls com aquests per documentar el vostre progrés a través del projecte i poder realitzar consultes i discussions
Aquests fulls de dubtes i d’explicació de com heu anat fent l’exercici són obligatoris. Si no és present, no es corregeix l’exercici i s’ha de tornar a lliurar. Abans de corregir i posar-vos qualificacions volem saber quin ha estat procés en què heu dissenyat els circuits i comparar-lo amb les nostres pròpies observacions de classe.
EPSC – SED: Sistemes Electrònics Digitals
14
1.12.3 Full de dubtes sobre l’apartat H) de gravació del sPLD
Grup de treball: Data: Pla de treball: Dubtes: 1.12.4 Sobre l’apartat i I) de cerca d’informació sobre el GAL22V10
Grup de treball: Data: Pla de treball: Dubtes:
EX1: Synthesising combinational circuits in sPLD using VHDL
15
1.12.5 Full de dubtes sobre els apartats J), K), L), M), de disseny amb esquemes i VHDL en ispLEVER (disseny flat i disseny jeràrquic)
Grup de treball: Data: Pla de treball: Dubtes: 1.12.6 Dubtes dels apartats N) i O) sobre disseny de sistemes combinacionals en VHDL
Grup de treball: Data: Pla de treball: Dubtes: