Bonjour,
je n'arrive pas à écrire un package. Voici mon code :
A la compilation, Modelsim me dit :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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;
** Error: */pck.vhd(23): (vcom-1136) Unknown identifier "f".
Quelqu'un voit le problème ?
Partager