Forum Discussion

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

use verlog ip in vhdl

I'm trying to use a verilog ip in a vhdl file, first component declaration , then instantiation ... But I keep getting : design library work does not contain ... although I added the file to my project ?

What am I doing wrong ?


architecture arch of touchtop_01 is
...
component i2c_touch_config is
   port (
      iCLK : out std_logic ;
      iRSTN : out std_logic ;
      iTRIG : out std_logic ;
      oREADY : in std_logic;
      oREG_X1 : in std_logic_vector(9 downto 0);
      oREG_Y1 : in std_logic_vector(8 downto 0);
      oREG_X2 : in std_logic_vector(9 downto 0);
      oREG_Y2 : in std_logic_vector(8 downto 0);
      oREG_TOUCH_COUNT : in std_logic_vector(1 downto 0);
      oREG_GESTURE : in std_logic_vector(7 downto 0);
      I2C_SCLK : in std_logic;
      I2C_SDAT : inout std_logic 
      
      
   );
end component ;
    
    begin
    
     terasictouch :  entity work.i2c_touch_config
                   port map (
                   iCLK => iCLK ,
                iRSTN => iRSTN,
                iTRIG => iTRIG,
                oREADY => oREADY,
                oREG_X1 => oREG_X1,
                oREG_Y1 => oREG_Y1,
                oREG_X2 => oREG_X2,
                oREG_Y2 => oREG_Y2,
                oREG_TOUCH_COUNT => oREG_TOUCH_COUNT,
                oREG_GESTURE => oREG_GESTURE,
                I2C_SCLK => I2C_SCLK,
                I2C_SDAT => I2C_SDAT
                   
                   ) ;
...

4 Replies

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

    --- Quote Start ---

    What am I doing wrong ?

    --- Quote End ---

    Have you added the i2c_touch_config.v source to the project?

    And because you have a component declaration, you do not need to use

    
    terasictouch :  entity work.i2c_touch_config
    

    You can just use

    
    terasictouch :  i2c_touch_config
    

    Cheers,

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

    --- Quote Start ---

    And because you have a component declaration, you do not need to use

    terasictouch : entity work.i2c_touch_config

    --- Quote End ---

    Should be better phrased "you must not use". Because the entity work. syntax causes the error.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hallo!

    I want to do the same but i think i've another problem.

    It seems to me that the i2c_touch_config.v file isn correct. Or I'am not clever enought.

    There is no effect of the output pins.

    If i'm touch the screen or not, the oREG_TOUCH_COUNT always shows "11".

    By the way the value "11" is not possible.

    The Registers for the touchpositions are set to the maximuml value too.

    Is there something i havent done ?