Diferencia entre revisiones de «Lenguaje VHDL»
De WikiRobotics
(→Simulando un registro) |
|||
| Línea 18: | Línea 18: | ||
* Lanzar la simulación: | * Lanzar la simulación: | ||
$ make simulate | $ make simulate | ||
| + | ghdl -i --workdir=work *.vhd | ||
| + | ghdl -m --workdir=work reg_tb | ||
| + | analyze reg_tb.vhd | ||
| + | analyze reg.vhd | ||
| + | elaborate reg_tb | ||
| + | ./reg_tb --wave=simulacion/reg_tb.ghw | ||
| + | reg_tb.vhd:106:6:@25585ns:(report note): Simulacion correcta | ||
| + | gtkwave simulacion/reg_tb.ghw simulacion/reg_tb.cfg & | ||
| + | |||
| + | GTKWave Analyzer v3.1.10 (w)1999-2008 BSI | ||
| + | |||
| + | [0] start time. | ||
| + | [25600000000] end time. | ||
| + | Warning: encountered 8 glitches across 8 glitch regions. | ||
| + | |||
| + | Se abrirá el Gtkwave con los resultados de la simulación: | ||
== Licencia == | == Licencia == | ||
Revisión del 03:54 26 feb 2009
Contenido
Introducción
Ejemplos
- Registro de 8 bits (Download)
VHDL en Linux
Se pueden simular diseños hardware en VHDL bajo linux usando las herramientas gtkwave y ghdl.
Instalación
Su instalación es inmediata en Debian y Ubuntu. Seleccionar mediante Synaptic los paquetes gtkwave y ghdl o bien usar la siguiente línea de comando:
$ apt-get install ghdl gtkwave
Simulando un registro
Para comprobar que las herramientas están correctamente instaladas vamos a simular un registro de 8 bits. Para ello seguir los siguientes pasos:
- Descargar el ejemplo (Reg.tar.gz)
- Descomprimirlo y entrar en el directorio reg
$ tar vzxf Reg.tar.gz $ cd reg
- Lanzar la simulación:
$ make simulate ghdl -i --workdir=work *.vhd ghdl -m --workdir=work reg_tb analyze reg_tb.vhd analyze reg.vhd elaborate reg_tb ./reg_tb --wave=simulacion/reg_tb.ghw reg_tb.vhd:106:6:@25585ns:(report note): Simulacion correcta gtkwave simulacion/reg_tb.ghw simulacion/reg_tb.cfg & GTKWave Analyzer v3.1.10 (w)1999-2008 BSI [0] start time. [25600000000] end time. Warning: encountered 8 glitches across 8 glitch regions.
Se abrirá el Gtkwave con los resultados de la simulación:
Licencia
| |
El código está liberado bajo licencia GPLv3
|
Autor
Enlaces
Noticias
- 26/Feb/2009: Comenzada esta página. Añadido el registro de 8 bits
