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.

VHDL Code Error.Please Help.Urgent.

Status
Not open for further replies.

bandanjot

Newbie level 1
Joined
Jun 21, 2008
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,291
The first few lines of my code are:

library IEEE;
use IEEE.STD_LOGIC_1164.all;
use IEEE.STD_LOGIC_arith.all;
use STD.TEXTIO.all;
use work.all;
constant MEM_SIZE: integer:= 4095; -- memory size


The error I am getting on my compilation:

gsm.vhd(6): near "constant": expecting: ARCHITECTURE CONFIGURATION ENTITY LIBRARY PACKAGE USE

I have checked numerous times , and I guess problem is with the line in which I define my constants. Can there by a problem in defining my libraries?? Are these libraries (eg. IEEE ,STD,work) available ?.
 

and I guess problem is with the line in which I define my constants.
The error meassage says very clearly, that a constant defintion isn't allowed in this place. That's the whole story.

Depending on what you are trying to achieve here, the constant definition can be used either inside the architecture part of a design unit or in a package header. Alternatively a generic constant in an entity definition can be a solution.

Consult a VHDL textbook or design examples/templates usually available with VHDL tools.
 

Define constant in package or package body and then call that package in your program
 

declare constant in architecture part or in the pacakage of the design
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top