Diferencia entre revisiones de «Lenguaje VHDL»
De WikiRobotics
(→VHDL en Linux) |
(→Introducción) |
||
| (No se muestran 7 ediciones intermedias del mismo usuario) | |||
| Línea 1: | Línea 1: | ||
== Introducción == | == Introducción == | ||
| + | (por hacer) | ||
| + | |||
== Ejemplos == | == Ejemplos == | ||
* Registro de 8 bits ([http://www.iearobotics.com/wiki/images/e/ee/Reg.tar.gz Download]) | * Registro de 8 bits ([http://www.iearobotics.com/wiki/images/e/ee/Reg.tar.gz Download]) | ||
== VHDL en Linux == | == VHDL en Linux == | ||
| − | Se pueden simular diseños hardware en VHDL bajo linux usando las herramientas gtkwave y ghdl. | + | Se pueden simular diseños hardware en VHDL bajo linux usando las herramientas [http://en.wikipedia.org/wiki/GTKWave gtkwave] y [http://ghdl.free.fr/ ghdl]. |
=== Instalación === | === 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: | 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 | $ 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 ([http://www.iearobotics.com/wiki/images/e/ee/Reg.tar.gz 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: | ||
| + | |||
| + | {| | ||
| + | | [[Imagen:Vhdl-reg-pantallazo.jpg|thumb|500px|Simulación de un registro de 8 bits en una máquina Debian/Lenny (Pinchar en la imagen para agrandar)]] | ||
| + | |} | ||
| + | |||
| + | == Licencia == | ||
| + | {|{{tablabonita}} | ||
| + | | [[Imagen:Cc logo.png]] This work is licensed under a [http://creativecommons.org/licenses/by-sa/3.0/es/ Creative Commons Attribution-ShareAlike 3.0 Spain License]. | ||
| + | |-------- | ||
| + | | [[Imagen:GPLv3-logo-red.png|left|150px]] El código está liberado bajo licencia GPLv3 | ||
| + | |} | ||
| + | |||
| + | == Autor == | ||
| + | [[Juan Gonzalez:Main|Juan González Gómez]] | ||
== Enlaces == | == Enlaces == | ||
| − | == | + | == Noticias == |
* '''26/Feb/2009''': Comenzada esta página. Añadido el registro de 8 bits | * '''26/Feb/2009''': Comenzada esta página. Añadido el registro de 8 bits | ||
Revisión actual del 04:00 26 feb 2009
Contenido
Introducción
(por hacer)
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
