Ошибка моделирования ModelSim Altera для кода, который правильно компилируется: фатальная ошибка в процессе - PullRequest
0 голосов
/ 03 мая 2019

Код, который я пишу, действительно прост, всего несколько строк, и он используется для простого светодиодного матричного дисплея.Он правильно компилируется в Quartus II, но когда я пытаюсь смоделировать его с помощью ModelSim, я получаю фатальную ошибку в определенной строке.Мой тестовый стенд также очень прост, и я попытался удалить эту строку кода или упростить ее, и симуляция запускается без проблем (хотя программа не делает то, что должна).

Я новичок в VHDL и Quartus / ModelSim, поэтому буду признателен за подробное объяснение.Вот мой код:

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
use IEEE.NUMERIC_STD.ALL;
--Entity definiton (top level entity).
entity entity is
    Port (  finalDisplay   : out     STD_LOGIC_VECTOR (11 downto 0);    
            sevenSegDisp   : out     STD_LOGIC_VECTOR (6  downto 0);    
            clkFast        : in      STD_LOGIC;                                 
            clkSlow        : in      STD_LOGIC);                                                                    
end entity;

architecture Behavioral of entity is
 --Interial signals
 signal frameCounter         : STD_LOGIC_VECTOR(8  downto 0) := (others => '0');  
 signal slowCounter          : STD_LOGIC_VECTOR(5  downto 0) := (others => '0');  
 type   display_t is array(4 downto 0) of STD_LOGIC_VECTOR(6 downto 0);
 signal currentFrame         : display_t                      :=("0000000" ,                                                          
                                                                 "0000000" ,                                                                                         
                                                                 "0000000" ,         
                                                                 "0000000" ,          
                                                                 "0000000");                                                                                      
 signal row                   : STD_LOGIC_VECTOR (4 downto 0) := "11110";             
 signal col                   : STD_LOGIC_VECTOR (6 downto 0) := "0000001";         
 signal col_mask              : STD_LOGIC_VECTOR (6 downto 0) := "0000000";        
 signal row_count             : UNSIGNED (2 downto 0)         := "001";            
 signal waveNumber            : UNSIGNED (3 downto 0)         := "0000";

begin           
    --Process Definition

displayCurrentFrame: process(clkFast)         
   begin
     if rising_edge(clkFast) then
       frameCounter <= frameCounter + 1;
            if frameCounter(4 downto 0) = "00000" then
                col <= col(5 downto 0) & col(6);
                if col = "1000000" then
                    row <= row(3 downto 0) & row(4);
                          if (to_integer(row_count) = 5) then
                                row_count <= "000";
                          end if;
                    row_count <= row_count + "1";
                    col_mask <= (currentFrame(to_integer(row_count))); --Fatal error at process displayCurrentFrame at fileName.vhd line thisLine.
                end if;
            end if;
            finalDisplay(4 downto 0) <= row;
            finalDisplay(11 downto 5) <= (col AND col_mask);
     end if;
   end process displayCurrentFrame;
end Behavioral;

Я не понимаю, что не так с этой конкретной строкой.Типы приведений / преобразований кажутся мне правильными.

...