1
Xilinx Vivado와 함께 VHDL의 MIPS 형 CPU에서 작업하고 있습니다. 나는 이렇게 가고 내 BranchControl 모듈의 구성 요소를 가지고 :VHDL 엔티티 포트가 구성 요소 포트 유형과 일치하지 않습니다.
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity BranchControl is
Port (PL : in STD_LOGIC;
BC : in STD_LOGIC_VECTOR(3 downto 0);
PC : in STD_LOGIC_VECTOR (31 downto 0);
AD : in STD_LOGIC_VECTOR (31 downto 0);
Flags : in STD_LOGIC_VECTOR(3 downto 0);
PCLoad : out STD_LOGIC;
PCValue : out STD_LOGIC_VECTOR (31 downto 0));
end BranchControl;
architecture Behavioral of branchcontrol is
signal Z,N,P,C,V, T: std_logic;
begin
Z <= Flags(3); -- zero flag
N <= Flags(2); -- negative flag
P <= not N and not Z; -- positive flag
C <= FLags(1); -- carry flag
V <= Flags(0); -- overflow flag
T <=
'1' when (PL = '1') and (BC = "0000") and (Flags = "XXXX") else -- B
'1' when (PL = '1') and (BC = "0010") and (Flags = "1XXX") else -- BEQ
'1' when (PL = '1') and (BC = "0011") and (Flags = "0XXX") else -- BNE
'1' when (PL = '1') and (BC = "0100") and (Flags = "00XX") else -- BGT
'1' when (PL = '1') and (BC = "0101") and (Flags = "11XX") else -- BGE
'1' when (PL = '1') and (BC = "0110") and (Flags = "01XX") else -- BLT
'1' when (PL = '1') and (BC = "0111") and (Flags = "11XX") else -- BLE
'0';
with T select
PCValue <= PC+AD when '1',
PC when others;
PCLoad <= T;
end Behavioral;
내가 BranchControl 구성 요소를 테스트하는 시뮬레이션을 쓰고, 내가 의도대로 작동되어 있는지 확인합니다. 나는 이것을 이해 것과,
INFO: [VRFC 10-163] Analyzing VHDL file "/home/meurer/src/acomp/L02/Project2/Project2.srcs/sim_1/new/BranchControl.vhd" into library xil_defaultlib
INFO: [VRFC 10-307] analyzing entity BranchControl
INFO: [VRFC 10-163] Analyzing VHDL file "/home/meurer/src/acomp/L02/Project2/Project2.srcs/sim_1/new/SimulBranchControl.vhd" into library xil_defaultlib
INFO: [VRFC 10-307] analyzing entity SimulBranchControl
ERROR: [VRFC 10-719] formal port/generic <ipl> is not declared in <branchcontrol> [/home/meurer/src/acomp/L02/Project2/Project2.srcs/sim_1/new/SimulBranchControl.vhd:43]
ERROR: [VRFC 10-704] formal pl has no actual or default value [/home/meurer/src/acomp/L02/Project2/Project2.srcs/sim_1/new/SimulBranchControl.vhd:43]
ERROR: [VRFC 10-1504] unit behavioral ignored due to previous errors [/home/meurer/src/acomp/L02/Project2/Project2.srcs/sim_1/new/SimulBranchControl.vhd:8]
INFO: [VRFC 10-240] VHDL file /home/meurer/src/acomp/L02/Project2/Project2.srcs/sim_1/new/SimulBranchControl.vhd ignored due to errors
지금 : 나는 시도하고 Vivado에서 시뮬레이션을 실행할 때, 나는 정교 단계에서 오류의 집합을 얻을 몇 가지 이유를 들어
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity SimulBranchControl is
end SimulBranchControl;
architecture Behavioral of SimulBranchControl is
component BranchControl is
Port (PL : in STD_LOGIC;
BC : in STD_LOGIC_VECTOR(3 downto 0);
PC : in STD_LOGIC_VECTOR (31 downto 0);
AD : in STD_LOGIC_VECTOR (31 downto 0);
Flags : in STD_LOGIC_VECTOR(3 downto 0);
PCLoad : out STD_LOGIC;
PCValue : out STD_LOGIC_VECTOR (31 downto 0));
end component;
signal iPL : STD_LOGIC;
signal iBC : STD_LOGIC_VECTOR(3 downto 0);
signal iPC : STD_LOGIC_VECTOR(31 downto 0);
signal iAD : STD_LOGIC_VECTOR(31 downto 0);
signal iFlags : STD_LOGIC_VECTOR(3 downto 0);
signal clock : std_logic := '0';
begin
process
begin
wait for 50 ns;
clock <= not clock;
end process;
process
begin
wait until clock'event and clock='0';
iPL<='1'; iBC<="0010"; iPC<=x"00000000"; iAD<=x"00000001"; iFlags<="0000";
end process;
BC0: BranchControl port map(iPL=>PL, iBC=>BC, iPC=>PC, iAD=>AD, iFlags=>Flags);
end Behavioral;
: 여기 내 시뮬레이션입니다 내 엔터티 BranchControl
과 Simulation의 내 구성 요소에 호환되지 않는 선언이 있음을 의미하지만 이것이 사실인지 어떻게 볼 수 없는지 그들은 정확히 동일합니다. Vivado의 screenshot은 오류입니다.
왜 이런 일이 발생합니까? 내가 도대체 뭘 잘못하고있는 겁니까?
형식적 연결과 함께 엔티티 선언 이름 (공식 포트)은 실제 신호 이름과 관련되며 다른 신호 기호 이름과는 관련이 없습니다. (예 : 'iPL => PL'은 BC0 인스턴스화 포트 맵 연관 목록에서 'PL => iPL'이어야 함). – user1155120
X 비트 (오류)에 대해'플래그 '를 테스트하는 이유는 무엇입니까? 나는 네가 상관하지 않는다는 것을 의미한다고 생각하지만, 맞다. do not care는'? ='또는'std_match (...)'가 필요하다. – Paebbels