Foro de elhacker.net

Programación => Programación General => Mensaje iniciado por: Fox_Neo en 10 Octubre 2013, 11:33 am



Título: Programacion en VHDL
Publicado por: Fox_Neo en 10 Octubre 2013, 11:33 am
Hola gracias por leer mi duda, estoy empezando a programa en VHDL  y me da un error de compilación que no consigo corregir el código es el siguiente :
Código
  1. -------------------------------------------------------------------------------
  2. --
  3. -- Title       : demux
  4. -- Design      : 3º practica
  5. -- Author      : Manuel
  6. -- Company     : Torca
  7. --
  8. -------------------------------------------------------------------------------
  9. --
  10. -- File        : demux.vhd
  11. -- Generated   : Wed Oct  9 01:32:38 2013
  12. -- From        : interface description file
  13. -- By          : Itf2Vhdl ver. 1.22
  14. --
  15. -------------------------------------------------------------------------------
  16. --
  17. -- Description :
  18. --
  19. -------------------------------------------------------------------------------
  20.  
  21. --{{ Section below this comment is automatically maintained
  22. --   and may be overwritten
  23. --{entity {demux} architecture {demux}}
  24.  
  25. library IEEE;
  26. use IEEE.STD_LOGIC_1164.all;
  27.  use IEEE.std_logic_unsigned.all
  28. entity demux is
  29. port(
  30. D : in STD_LOGIC;
  31. S : in STD_LOGIC;
  32. Z0 : out STD_LOGIC;
  33. Z1 : out STD_LOGIC
  34.     );
  35. end demux;
  36.  
  37. --}} End of automatically maintained section
  38.  
  39. architecture demux of demux is
  40. begin
  41.  
  42. -- enter your statements here --
  43. process(D,S)
  44. begin
  45. example:
  46. if S='0' then
  47. Z0<=D;
  48. else
  49. Z1<=D;
  50. end if;
  51. end process;
  52.  
  53. end demux;
  54.  
Estoy usando el programa de Active- HDL versión estudiante
El error que me da es el siguiente:

Código:
# Error: VLM_0040: VHDL unit cannot be compiled as the target library name is not a legal VHDL identifier.
Lo que intento realizar es un demultiplexor  que realice la selección de un dato en una entrada hacia uno de los dos  canales de salida para datos de 1 bits D es la entrada, S es la señal de control, z0 y z1 son las salidas

Gracias por la ayuda


Título: Re: Programacion en VHDL
Publicado por: Fox_Neo en 10 Octubre 2013, 17:44 pm
Bueno ya lo he solucionado  lo he hecho con otro código que se me ha ocurrido mas secillo:
Código
  1. library IEEE;
  2. use IEEE.STD_LOGIC_1164.all;
  3.  
  4. entity Demux is
  5. port(
  6. s : in STD_LOGIC;
  7. d : in STD_LOGIC;
  8. z0 : out STD_LOGIC;
  9. z1 : out STD_LOGIC;
  10. )
  11. end Demux;
  12.  
  13. --}} End of automatically maintained section
  14.  
  15. architecture Demux of Demux is
  16. begin
  17.  
  18. z0<=d when (s='0')
  19. else;
  20. z1<=d when (s='1')
  21. else ;
  22.  
  23. end Demux;
  24.  
Gracias