parse error, unexpected PORT, expecting OPENPAR or TICK or LSQBRACK

Joined
May 22, 2007
Messages
1
Reaction score
0
i got that error on the line after begin check it out:


signal C : std_logic_vector(3 downto 0);

begin
halfadder port map(A(0), B(0), S(0), c => C(0));
fulladder port map(A(1), B(1), C(0), S(1), Cout => C(1));
fulladder port map(A(2), B(2), C(1), S(2), Cout => C(2));
fulladder port map(A(3), B(3), C(2), S(3), Cout => Cout);
end Behavioral;

any suggestions?
 
Joined
Jan 29, 2009
Messages
152
Reaction score
0
you must add a label to each instance, like:
Code:
begin
ha: halfadder port map(A(0), B(0), S(0), c => C(0));
fa1: fulladder port map(A(1), B(1), C(0), S(1), Cout => C(1));
fa2: fulladder port map(A(2), B(2), C(1), S(2), Cout => C(2));
fa3: fulladder port map(A(3), B(3), C(2), S(3), Cout => Cout);
end Behavioral;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top