3 비트 [FRQ (2 downto 0) 중 하나가 부호있는 비트를 저장하는 두 개의 레지스터를 추가하려고합니다.)]이고 다른 하나는 7 비트 [PHS (6 downto 0)] ...이며이 두 레지스터의 추가를 7 비트 레지스터 [PHS (6 downto 0)]에 저장해야합니다. 도움이되는 제스처에 미리 감사드립니다.오류 : /..integrator.vhd(47) : "프로세스"근처 : (VHCOM-1576) IF VHDL이 필요합니다
내가 오류가 오류 >>> ..입니다 : /..integrator.vhd(47) : 근처 "프로세스"(VCOM-1576) VHDL 여기
내 코드의 경우 기대 :
library IEEE;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
--use ieee.std_logic_unsigned.all;
entity integ is
port (
SMP_CLK : in std_logic;
RESET : in std_logic;
PHS : out signed (6 downto 0);
FRQ : in signed (2 downto 0)
);
end integ;
architecture behaviour of integ is
signal sig_FRQ : signed(2 downto 0) := (others => '0');
signal ext_FRQ : signed(6 downto 0) := (others => '0');
signal sig_PHS : signed(6 downto 0) := (others => '0');
signal temp_PHS : signed(6 downto 0) := (others => '0');
begin
sig_FRQ <=FRQ;
temp_PHS <= sig_PHS;
--PHS <=signal_PHS;
process (SMP_CLK, RESET)
begin
if sig_FRQ(2)='1' then
ext_FRQ(6 downto 3) <= b"0000";
else
ext_FRQ(6 downto 3) <= b"1111";
--end if;
if RESET='1' then
sig_PHS <= b"0000000";
elsif (rising_edge(SMP_CLK)) then
-- temp_PHS <= sig_PHS;
sig_PHS <= signed(ext_FRQ) + signed(temp_PHS);
end process;
sig_PHS => PHS;
end behaviour;
출력 포트 할당을 수정해야하지만 귀하의 제안이 많은 도움이되었습니다. 고마워. 적절한 추가를 위해 약간의 수정이 필요하지만 코드가 실행 중입니다. 시뮬레이션을 한 결과 예상대로 결과를 얻지 못했습니다. 어쨌든, 다시 한번 감사드립니다. !! –
코드의 목표는 무엇입니까? – Roman
예상대로 작동합니다. !! 어쨌든, 나는 데이터 통신을위한 FSM을 구현 중이며, 디지털 설계를 사용하는 변조 방식에 사용된다. –