Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
12 years ago

Error (10802)

Hi

When I try to compile I have this:

Error (10802): VHDL Unconstrained Array error at ide_sd.vhd(7): formal "ID_INIT_FILE" must be constrained

Need some help please:confused:

The code :

library ieee;

use ieee.std_logic_1164.all;

use ieee.numeric_std.all;

-- the ocide controller uses unsigned from here

--use ieee.std_logic_arith.unsigned;

entity ide_sd is

generic

(

-- when emulating devices accessed using lba mode

-- - use the *default* values

lba_mode : boolean := true;

cylinder_bits : integer := 16;

head_bits : integer := 4;

sector_bits : integer := 8;

id_init_file : string

);

port

(

-- clocking, reset

clk : in std_logic;

clk_ena : in std_logic;

rst : in std_logic;

-- ide interface

iordy0_cf : out std_logic;

rdy_irq_cf : out std_logic;

cd_cf : out std_logic;

a_cf : in std_logic_vector(2 downto 0);

nce_cf : in std_logic_vector(2 downto 1);

d_i : out std_logic_vector(15 downto 0);

d_o : in std_logic_vector(15 downto 0);

d_oe : in std_logic;

nior0_cf : in std_logic;

niow0_cf : in std_logic;

non_cf : in std_logic;

nreset_cf : in std_logic;

ndmack_cf : in std_logic;

dmarq_cf : out std_logic;

-- sd/mmc interface

clk_25m : in std_logic;

sd_dat_i : in std_logic_vector(3 downto 0);

sd_dat_o : out std_logic_vector(3 downto 0);

sd_dat_oe : out std_logic;

sd_cmd_i : in std_logic;

sd_cmd_o : out std_logic;

sd_cmd_oe : out std_logic;

sd_clk : out std_logic

);

end entity ide_sd;

2 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    the string is an array type, and needs to be constrained. Im guessing when you instantiated this component you did not assign the ID_INIT_FILE generic?

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I made this change :

    ID_INIT_FILE : string := "identifydevice.hex"

    Now it compile well

    Thanks