Forum Discussion

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

Block Design file issue

Hi,

I'm trying to use a block design file (.bdf) inside a (.vhd) file. I just want to connect the input of the block inside my block file (.bdf) to the input declared in the entity within the (.vhd) file. Somehow, I need to include the .bdf file in the .vhd file, but the way I'm doing it does not work (as shown below) :

For example :

library ieee;

use ieee.std_logic_1164.all;

library altera_mf;

use altera_mf.all;

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

entity pll is

port(

clock_in : in std_logic;

clock_out : out std_logic

);

end pll;

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

architecture pll_arch of pll is

begin

-- clk_in and clk_out are the PLL input and output pins respectively in the altpll

megafunction.

pll_instantiation : pll_block.bdf port map( clk_in => clock_in, clk_out => clock_out );

end pll_arch;

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

Can we do that with QUARTUS 6.1g? - I've tried to find some info, but could not.

Regards and thanks for your help.

6 Replies

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

    There is another way to deal with the problem, you can create symble files for your current file,and you create a new block diagram ,then insert the inst you just create,and link the ports.

    library altera_mf;

    use altera_mf.all;

    If the current project contains altera_mf.all , there is no need to use the lines above.

    Hope it can help you!

    Good luck!
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Thanks for answering,

    I'll try that and I let you know when I get results.

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

    Usually, if you already have a bdf/bsf file, it would be good to connect them in top level bdf file. You could create block symbol for all other design files (written in any HDL) using "Quartus II > FILE > Create/_Update > Create Symbol files for current file" and then connect them in top level bdf file as is recommended by hapyang.

    Alternatively, if you want to go HDL way, you can generate VHDL file for the bdf/bsf file using "Quartus II > FILE > Create/_Update > Create HDL Design file for current file" and then use the newly generated HDL file along with your code.

    Although both methods can be used, I feel that 1st method should be more effective.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Thanks for answering,

    I'm a newbie to Quartus II. I have not idea what's a symbol file is and how to interconnet all these files together. I only know VHDL and the traditional ways used with a standard software as I've used before using Quartus. And since Altera did not provide simple examples on how to do that for starter users, I'll have to struggle like anybody else has done before me.

    I'll try your way and I let you know when I get results. But before, I'll have to learn what these all new files types are exactly and implement my very simple study project whit them.

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

    Thanks Hapyang and BD SLS for your advices. I finally got to understand what are Block and Symbol files by reading and trying some of my complex projects I'm working on. Everything works fine.

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

    Thanks your advice. I finally got to understand what are Block and Symbol files by reading and trying some of my complex projects I'm working on. Everything works fine.

    Regards