Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

What's wrong with my VHDL code

Status
Not open for further replies.

deepu_s_s

Full Member level 5
Joined
Mar 24, 2007
Messages
305
Helped
15
Reputation
30
Reaction score
5
Trophy points
1,298
Activity points
3,021
unexpected architecture, expecting semicolon

Hello friends,
I am doing a very basic design in VHDL. i am simply designing a ROM of 8 rows and each row of 4 bits in width. Can anyone help me in correcting my code. I am getting the error

ERROR:HDLParsers:164 - "H:/vhdl_practice/ROM_Exapmle.vhd" Line 9. parse error, unexpected INTEGER_LITERAL, expecting SEMICOLON or CLOSEPAR


Here is my code


library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
use work.rom1.ALL;


entity ROM_Exapmle is
port (address_in : IN integer 0 to 7;
data_out : OUT std_logic_vector(0 to 3));
end ROM_Exapmle;

architecture Behavioral of ROM_Exapmle is
signal RO : memory;
begin
data_out <= RO(address_in);

end Behavioral;

and the package code is

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;


package rom1 is
type memory is array(7 downto 0) of std_logic_vector(3 downto 0);

end rom1;



i corrected the code by putting the semicolon. But i am getting the same error message.

The line which as the error is port (address_in : IN integer 0 to 7;



pls help me friends

Thanks and Regards
Deepak
 

vhdl semicolon

correct me if i'm wrong, but don't you need a 'range' keyword in there?
 

vhdl wrong index type

Hi friend,
I tried without giving the RANGE keyword. But i am getting the same error message....

Thanx and regards
Deepak

Added after 24 minutes:

ok friends,
Thank you very much. I got the synthesis sucessful
 

i got code wrong i need code for zero hour

deepu_s_s said:
ok friends,
Thank you very much. I got the synthesis sucessful

Oh oh ooh!...That's ok friend, but could you just tell what correction in that has solved you?....It could help many people here to understand the error synthesis!...Thanks
 

vhdl unexpected semicolon

everything is correct my friend, i didnt put a semicolon
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top