微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 嵌入式设计讨论 > FPGA,CPLD和ASIC > 请教各位,我用synplify做综合,想加入自己的库文件,应该如何操作?

请教各位,我用synplify做综合,想加入自己的库文件,应该如何操作?

时间:10-02 整理:3721RD 点击:
请教各位,我用synplify做综合,想加入自己的库文件,应该如何操作?
直接 add file, 把自己的库文件 my_stupid_lib.vhd加入,是不行的,  synplify找不到

library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
library my_stupid_lib;
use my_stupid_lib.components.all;

这是自定义的库,my_stupid_lib.vhd
library ieee;
use ieee.std_logic_1164.all;
entity prim_dff is
    port (q : out std_logic;
          d : in std_logic;
          clk : in std_logic;
          r : in std_logic := '0';
          s : in std_logic := '0');
end prim_dff;
architecture beh of prim_dff is
begin
    ff : process (clk, r, s)
    begin
        if r = '1' then
            q <= '0';
        elsif s = '1' then
            q <= '1';
        elsif rising_edge(clk) then
            q <= d;
        end if;
    end process ff;
end beh;

library ieee;
use ieee.std_logic_1164.all;
package components is
   
    component prim_dff
        port (q : out std_logic;
              d : in std_logic;
              clk : in std_logic;
              r : in std_logic := '0';
              s : in std_logic := '0');
    end component;
       
end components;

@W:CD645 : mytry.vhd(6) | Ignoring undefined library my_stupid_lib
@W:CD642 : mytry.vhd(7) | Ignoring use clause - library my_stupid_lib not found ...
@E:CD213 :  mhtry.vhd(26) | Undefined identifier
这是报错

这是写的代码
报错没有发现 prim_dff, 说明用户库没有被引用

library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
library my_stupid_lib;
use my_stupid_lib.components.all;
entity S_DFF is
port(
Q :  out std_logic;
D :  in std_logic;
CLK :  in std_logic;
CLRN :  in std_logic;
PRN :  in std_logic);
end S_DFF;
architecture beh of DDFF is
begin
Q_Z11: prim_dff port map (Q, D, CLK, CLRN, PRN);
end beh;

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top