Précédent   Forum du club des développeurs et IT Pro > Autres langages > Autres langages > VHDL
VHDL Forum d'entraide sur VHDL
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse
 
Outils de la discussion
Publicité
'
Vieux 16/11/2012, 12h36   #1
binome-x
Invité de passage
 
Homme
Ingénieur/Chercheur
Inscription : novembre 2007
Messages : 56
Détails du profil
Informations personnelles :
Sexe : Homme
Âge : 35
Localisation : France, Rhône (Rhône Alpes)

Informations professionnelles :
Activité : Ingénieur/Chercheur

Informations forums :
Inscription : novembre 2007
Messages : 56
Points : 1
Points : 1
Par défaut Construction d'un package

Bonjour,
je n'arrive pas à écrire un package. Voici mon code :
Code :
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
library IEEE;
use     IEEE.STD_LOGIC_1164.ALL;
use     IEEE.NUMERIC_STD.ALL;

package pck is

	type t is record f : std_logic_vector(7 downto 0);
	end record;
	
    function "-" (z : in t) return t;

end pck;


library IEEE;
use     IEEE.STD_LOGIC_1164.ALL;
use     IEEE.NUMERIC_STD.ALL;

package body pck is
    function "-" (z : in t) return t is
		variable tmp : t;
	begin
		tmp(f) := -z(f);
		return tmp;
	end "-";	
end pck;
A la compilation, Modelsim me dit :
** Error: */pck.vhd(23): (vcom-1136) Unknown identifier "f".

Quelqu'un voit le problème ?
binome-x est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 16/11/2012, 15h44   #2
titiri
Membre régulier
 
Inscription : juin 2009
Messages : 37
Détails du profil
Informations forums :
Inscription : juin 2009
Messages : 37
Points : 77
Points : 77
Bonjour,

À corriger par

Cdlt
titiri est déconnecté   Envoyer un message privé Réponse avec citation 10
Réponse Cette discussion est résolue.
Outils de la discussion

Navigation rapide


Fuseau horaire GMT +2. Il est actuellement 14h37.


 
 
 
 
Partenaires

Hébergement Web