Ошибка библиотеки MachX03 в Active-hdl для симуляции fpga - PullRequest
0 голосов
/ 07 февраля 2019

edit: я только что переустановил решетчатый алмаз и обновления, Active-hdl был установлен автоматически, но симуляция все равно выдает мне ту же ошибку.когда я меняю библиотеку machXO3;используйте machXO3.all;в библиотеку machXO2;использовать machXO2.all;он компилируется ..

Я пытаюсь написать тестовый стенд для простой реализации OSCH, но я не могу заставить тестовый стенд работать.

Мне удалось заставить его работать несколько месяцев назад, но я потерял файл, над которым работал.

это код VHDL, который у меня есть:

library  ieee;
use  ieee.std_logic_1164.all;

-- For Main Clock --
library machXO3;
use machXO3.all;
--------------------

entity Clock is
     port (stdby : in std_logic;
           osc_int: out std_logic
           );
end Clock;

architecture Clock_behav of Clock is

    COMPONENT OSCH
    -- synthesis translate_off
        GENERIC (NOM_FREQ: string := "2.56");
    -- synthesis translate_on
        PORT (STDBY : IN std_logic;
              OSC : OUT std_logic
                );
    END COMPONENT;

begin

    Clock: OSCH
    -- synthesis translate_off
    GENERIC MAP( NOM_FREQ => "2.56" )
    -- synthesis translate_on
    PORT MAP (  STDBY => stdby,
                OSC => osc_int
    );

end Clock_behav;

Это тестовая среда, большая часть которой была сгенерирована решетчатым бриллиантом. Я только добавил stdby <= '0'; </p>

LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
USE ieee.numeric_std.ALL;

ENTITY testbench IS
END testbench;

ARCHITECTURE behavior OF testbench IS 

    COMPONENT Clock
    PORT(
        stdby : IN std_logic;          
        osc_int : OUT std_logic
        );
    END COMPONENT;

    SIGNAL stdby :  std_logic;
    SIGNAL osc_int :  std_logic;

BEGIN

-- Please check and add your generic clause manually
    uut: Clock PORT MAP(
        stdby => stdby,
        osc_int => osc_int
    );
    stdby <= '0';

-- *** Test Bench - User Defined Section ***
   tb : PROCESS
   BEGIN
      --wait; -- will wait forever
   END PROCESS;
-- *** End Test Bench - User Defined Section ***

END;

Lattice-diamond говорит мне, что все в порядке, но когда я запускаю все вActive-HDL, для моделирования, я получаю эти ошибки:

# Error: COMP96_0059: Main.vhd : (5, 1): Library "machXO3" not found.
# Error: COMP96_0078: Main.vhd : (6, 5): Unknown identifier "machXO3".
# Compile Architecture "Clock_behav" of Entity "Clock"
# Error: COMP96_0056: Main.vhd : (15, 1): Cannot find referenced entity declaration "Clock".
# Compile failure 3 Errors 0 Warnings  Analysis time :  16.0 [ms]  

1 Ответ

0 голосов
/ 23 февраля 2019

Глядя на C: \ lscc \ diamond \ 3.10_x64 \ active-hdl \ vlib \, похоже, нет библиотеки machXO3, но есть библиотеки machxo, machxo2 и machxo3l.изменение библиотеки machXO3;используйте machXO3.all;в библиотеку machXO3l;использовать machXO3l.all;чтобы сделать небольшие изменения в тестовом стенде, все вроде бы работает нормально.

new testbench

    -- VHDL Test Bench Created from source file Clock.vhd -- Fri Feb 22 13:56:19 2019

    --
    -- Notes: 
    -- 1) This testbench template has been automatically generated using types
    -- std_logic and std_logic_vector for the ports of the unit under test.
    -- Lattice recommends that these types always be used for the top-level
    -- I/O of a design in order to guarantee that the testbench will bind
    -- correctly to the timing (post-route) simulation model.
    -- 2) To use this template as your testbench, change the filename to any
    -- name of your choice with the extension .vhd, and use the "source->import"
    -- menu in the ispLEVER Project Navigator to import the testbench.
    -- Then edit the user defined section below, adding code to generate the 
    -- stimulus for your design.
    -- 3) VHDL simulations will produce errors if there are Lattice FPGA library 
    -- elements in your design that require the instantiation of GSR, PUR, and
    -- TSALL and they are not present in the testbench. For more information see
    -- the How To section of online help.  
    --
    LIBRARY ieee;
    USE ieee.std_logic_1164.ALL;
    USE ieee.numeric_std.ALL;

    ENTITY testbench IS
    END testbench;

    ARCHITECTURE behavior OF testbench IS 

        COMPONENT Clock
        PORT(
            stdby : IN std_logic;          
            osc_int : OUT std_logic
            );
        END COMPONENT;

        SIGNAL stdby :  std_logic;
        SIGNAL osc_int :  std_logic;  
        constant PERIOD : time := 20 ns;

    BEGIN

    -- Please check and add your generic clause manually
        uut: Clock PORT MAP(
            stdby => stdby,
            osc_int => osc_int
        );


    -- *** Test Bench - User Defined Section ***
       tb : PROCESS
       BEGIN  
           stdby <= '0';  
           wait for PERIOD ;
          wait; -- will wait forever
       END PROCESS;
    -- *** End Test Bench - User Defined Section ***

    END;





...