Forum Discussion

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

type of identifier "clock" does not agree

Hi everyone,

I have a problem due to the type of identifier "clock" as I declare as a bit type. Below is my short code:

----------------------------------------------------------------------------------------------

Package my_main_data is

Type main_vector is array (7 downto 0) of integer;

End my_main_data;

LIBRARY ieee;

USE ieee.ALL;

Use work.my_main_data.all;

Use work.my_data_types.all;

ENTITY case IS

PORT (

clock : IN bit;

Ip : IN main_vector;

Op : OUT main_vector

);

END case;

ARCHITECTURE case OF case IS

COMPONENT cone

PORT (

I: IN vector;

clk: IN bit;

O: OUT vector

);

END COMPONENT;

SIGNAL out_r1, out_r2: vector;

SIGNAL clk : bit;

BEGIN

R1: cone

PORT MAP (Ip(0), clock, out_r1(0);

PORT MAP (Ip(1), clock, out_r2(0);

End case;

------------------------------------------------------------------------------------------------

This error occur when I compile the code:

Error (10476): VHDL error at haar.vhd(62): type of identifier "clock" does not agree with its usage as "integer" type

Can anyone tell me where is my mistake..http://www.edaboard.com/images/smilies/icon_sad.gif Many thanks

2 Replies

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

    I dont beleive this is the same code you're trying to compile.

    And where is the definition of the "vector" type?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I'm not aware of a legal VHDL syntax with multiple port maps in a single component instantiation.