2009-10-25 3 views
1

4 x 4 비트 곱셈기에서 작업하면서 "오류 (10500) : lab_6.vhd (33) 근처에서 VHDL 구문 오류가 발생했습니다."후 "예상") "또는", ""20 번. 문제는 after 문 뒤에 ")"또는 ","있습니다. 다음은 코드입니다.오류 10500, 의미가 없습니다

library ieee; 
use ieee.std_logic_1164.all; 

entity lab_6 is 
port(x, y :in std_logic_vector(0 to 3); 
    f :out std_logic_vector(0 to 7)); 
end lab_6; 

architecture lab_6_arch of lab_6 is 
signal sigand0, sigand1, sigand2, sigand3, sigand4, sigand5, sigand6, sigand7, sigand8, sigand9, sigand10, sigand11, sigand12, sigand13, sigand14, sigand15: std_logic; 
signal sigha0, sigha1, sigha2, sigha3, sigha4, sigha5, sigha6, sigha7: std_logic; 
signal sigfa0, sigfa1, sigfa2, sigfa3, sigfa4, sigfa5, sigfa6, sigfa7, sigfa8, sigfa9, sigfa10, sigfa11, sigfa12, sigfa13, sigfa14, sigfa15: std_logic; 
component fa is 
port(x : in std_logic_vector(0 to 2); 
    f : out std_logic_vector(0 to 1)); 
end component; 

component a_n_d is 
port(x : in std_logic_vector (0 to 1); 
    f : out std_logic); 
end component; 

component ha is 
port(x :in std_logic_vector(0 to 1); 
    f :out std_logic_vector(0 to 1)); 
end component; 

begin 

module1: a_n_d 
port map(x(0) => x(0), 
    y(0) => x(1), 
    f => sigand0 after 3 ns); 
f(0)<= sigand0; 

module2_1: a_n_d 
port map(x(1) => x(0), 
    y(0) => x(1), 
    f => sigand1 after 3 ns); 
module2_2: a_n_d 
port map(x(0) => x(0), 
    y(1) => x(1), 
    f => sigand2 after 3 ns); 
module2_3:ha 
port map(sigand1 => x(0), 
    sigand2 => x(1), 
    f(0)=> sigha0 after 4 ns, 
    f(1)=> sigha1 after 4 ns); 
f(1)<=sigha0; 

module3_1: a_n_d 
port map(x(2) => x(0), 
    y(0) => x(1), 
    f => sigand3 after 3 ns); 
module3_2: a_n_d 
port map(x(1) => x(0), 
    y(1) => x(1), 
    f => sigand4 after 3 ns); 
module3_3: a_n_d 
    port map(x(0) => x(0), 
    y(2) => x(1), 
    f => sigand5 after 3 ns); 
module3_4:fa 
port map(sigand3 => x(0), 
    sigand4=> x(1), 
    sigha1=>x(2), 
    f(0)=> sigfa0 after 8 ns, 
    f(1)=> sigfa1 after 8 ns); 
module3_5:ha 
port map(sigfa0 => x(0), 
    sigand5=> x(1), 
    f(0)=> sigha2 after 4 ns, 
    f(1)=> sigha3 after 4 ns); 
f(2) <= sigha2; 

module4_1: a_n_d 
port map(x(3) => x(0), 
    y(0) => x(1), 
    f => sigand6 after 3 ns); 
module4_2: a_n_d 
port map(x(2) => x(0), 
    y(1) => x(1), 
    f => sigand7 after 3 ns); 
module4_3: a_n_d 
port map(x(1) => x(0), 
    y(2) => x(1), 
    f => sigand8 after 3 ns); 
module4_4: a_n_d 
port map(x(0) => x(0), 
    y(3) => x(1), 
    f => sigand9 after 3 ns); 
module4_5:fa 
port map(sigand6 => x(0), 
    sigand7=> x(1), 
    sigfa1=>x(2), 
    f(0)=> sigfa2 after 8 ns, 
    f(1)=> sigfa3 after 8 ns); 
module4_6:fa 
port map(sigand8 => x(0), 
    sigfa2=> x(1), 
    sigha3=>x(2), 
    f(0)=> sigfa4 after 8 ns, 
    f(1)=> sigfa5 after 8 ns); 
module4_7:ha 
port map(sigfa4 => x(0), 
    sigand5=> x(1), 
    f(0)=> sigha4 after 4 ns, 
    f(1)=> sigha5 after 4 ns); 
f(3)<=sigha4; 

module5_1: a_n_d 
port map(x(3) => x(0), 
    y(1) => x(1), 
    f => sigand10 after 3 ns); 
module5_2: a_n_d 
port map(x(2) => x(0), 
    y(2) => x(1), 
    f => sigand11 after 3 ns); 
module5_3: a_n_d 
port map(x(1) => x(0), 
    y(3) => x(1), 
    f => sigand12 after 3 ns); 

module5_4:ha 
port map(sigfa3 => x(0), 
    sigand10=> x(1), 
    f(0)=> sigha6 after 4 ns, 
    f(1)=> sigha7 after 4 ns); 

module5_5:fa 
port map(sigand11 => x(0), 
    sigha6=> x(1), 
    sigfa5=>x(2), 
    f(0)=> sigfa6 after 8 ns, 
    f(1)=> sigfa7 after 8 ns); 
module5_6:fa 
port map(sigand12 => x(0), 
    sigfa6=> x(1), 
    sigha5=>x(2), 
    f(0)=> sigfa8 after 8 ns, 
    f(1)=> sigfa9 after 8 ns); 
f(4)<=sigfa8; 

module6_1: a_n_d 
port map(x(3) => x(0), 
    y(2) => x(1), 
    f => sigand13 after 3 ns); 
module6_2: a_n_d 
port map(x(2) => x(0), 
    y(3) => x(1), 
    f => sigand14 after 3 ns); 
module6_3:fa 
port map(sigand13 => x(0), 
    sigha7=> x(1), 
    sigfa7=>x(2), 
    f(0)=> sigfa10 after 8 ns, 
    f(1)=> sigfa11 after 8 ns); 
module6_4:fa 
port map(sigand14 => x(0), 
    sigfa9=> x(1), 
    sigfa10=>x(2), 
    f(0)=> sigfa12 after 8 ns, 
    f(1)=> sigfa13 after 8 ns); 
f(5)<=sigfa12; 

module7_1: a_n_d 
    port map(x(3) => x(0), 
    y(3) => x(1), 
    f => sigand15 after 3 ns); 
module7_2:fa 
    port map(sigand15 => x(0), 
    sigfa11=> x(1), 
    sigfa13=>x(2), 
    f(0)=> sigfa14 after 8 ns, 
    f(1)=> sigfa15 after 8 ns); 
f(6)<=sigfa14; 
f(7)<=sigfa15; 
end lab_6_arch; 

감사합니다.

+0

atleast 마크 라인 33 주시겠습니까? –

+0

화살표가 잘못된 방향으로 가고 있습니까? –

+0

@ Matt : 매번 after 문의 후에 오류가 발생합니다. @ pst : 예, 화살표가 바르게 가고 있습니다. –

답변

0

(참고 :. 내가 VHDL, 난 그냥 내가 Qualis VHDL Quick Reference Card에서 발견 무엇에 의해거야 모르는)

선 (33)는 여기에 나타납니다

module2_1: a_n_d 
port map(x(1) => x(0), 
    y(0) => x(1), 
    f => sigand1 after 3 ns);  <-- line 33 

그것은 것으로 나타납니다 after 절은 <=이 아닌 => 인 문에만 사용할 수 있습니다. 본질적으로 오류가 발생한다는 것은 컴파일러 이 그 시점에 after을 볼 것으로 예상하지 않고 대신 예상했던 것 (대개 도움이되지 않음)을 보여준 것을 의미합니다.

+0

고마워,하지만 난 여전히 그 줄에서 오류가 발생합니다. 이 일을 고치려고 노력한 다섯 번째 난센스 오류 일 때 좌절감을 느낍니다. –

+0

여전히 오류가 발생하지만 무엇이 변경 되었습니까? –

+0

할당 연산자의 방향이 변경되었습니다. 나는 친구에게도 물어 봄으로써 그 실수를 고쳤다. 그래도 고마워. –

1

당신은 포트 맵 내의 문을 사용할 수 없습니다, 포트지도는 신호 포트 (또는 바깥 쪽 계층 구조의 포트)를 결합하는 데 사용됩니다

<component_identifier>: <component_name> 
port map(
    <port_name> => <assigned_signal>, 
    ... 
) 

대신 할 수있는 지연은 무엇 F에 sigand0의 할당 (0) : 도움이

module1: a_n_d 
    port map(x(0) => x(0), 
       y(0) => x(1), 
       f => sigand0); 

f(0) <= sigand0 after 3 ns; 

희망!

관련 문제