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.

Problem with initializing variables in VHDL

Status
Not open for further replies.

smileysam

Member level 4
Joined
Feb 19, 2006
Messages
76
Helped
12
Reputation
24
Reaction score
3
Trophy points
1,288
Activity points
1,830
1) whenebver i initialise the variabe , it gives a warning that its is not initialised and is ignored.
2) does not recognise signal or variables of type TIME
b<=a after 20ns; -- gives an error .. it cannot recognize "n";
3) Can someone explain RTL in a few lines .
 

Re: doubts in vhdl

Hi,

Kindly try like this
b <= a after 20 ns;

Regards,

N.Muralidhara
 

doubts in vhdl

where do you originally declare the variables and signals ?
 

Re: doubts in vhdl

varibale declaration ..... after architecture and before the begin statement.
 

Re: doubts in vhdl

Hello,

apart from the syntax error (missing space with 20 ns) as you referred to RTL: This kind of delay statements are for simulation only, they can't be synthesized to hardware respectively used for register transfer level description.

Regards,
Frank
 

Re: doubts in vhdl

Hello,
Concerning point (1), variables can only be declared inside a process. It can not be intialized inside an architecture outside the process. If you want to declare something at the architecture level, use signals instead.
 

Re: doubts in vhdl

smileysam said:
varibale declaration ..... after architecture and before the begin statement.

the signals should only be there...

as for the variables, they come before the begin keyword of a process statement (so they have to be declared inside a certain process)

P1: process (A)

variable X : .....;

begin
....

end process;

///////////

as for RTL, it means synthesizable code...or code that can be implemented actually with components....the delay statements, for example, aren't synthesizable!
 

doubts in vhdl

Hi,
1- Variable must be declared and assigned a default value in the package file
2- Space between the time space value and the time unit is missing. (20 ns;)
3- Read more.
 

Re: doubts in vhdl

master_picengineer said:
Hi,
1- Variable must be declared and assigned a default value in the package file

it can also be declared and defined inside a process statement
you don't have to use packages ;)
 

Re: doubts in vhdl

salma ali bakr said:
master_picengineer said:
Hi,
1- Variable must be declared and assigned a default value in the package file

it can also be declared and defined inside a process statement
you don't have to use packages ;)

Hi Salma,
Yes you 're right but this depend on the tools used. I agree with you for DC but for modelsim packages are needed.
 

Re: doubts in vhdl

mmm
i don't get what you mean
it's all VHDL at the end :)
DC is for synthesis
Modelsim is for simulation
i don't see the relation!!!
 

Re: doubts in vhdl

salma ali bakr said:
mmm
i don't get what you mean
it's all VHDL at the end :)
DC is for synthesis
Modelsim is for simulation
i don't see the relation!!!

It's a bad exemple of tools. I should said modelsim and NCSim for simulation if you want (since simulable code don't imply that it is synthesisable).
VHDL is a language it's usage depend on the tools.
Suppose you have a synthesisable code. This imply that this code it is simulable. Unfortunately this is not always true is u r using Modelsim for simulation and DC for synthesis.
 

Re: doubts in vhdl

yah...i know that
but VHDL doesn't depend on the tool..it's just a way to describe the circuit...whatever the tool is...

i don't see the link of mentioning packages and their relation with the tools...it's irrelevant! that's just my point :) correct me if i'm wrong plz
 

doubts in vhdl

You're right. But, my experience with Modelsim 5.7 tough me that variables must be declared with their default value in the package file.
 

Re: doubts in vhdl

hehe

ok...modelsim can be annoying sometimes :D
 

doubts in vhdl

Hi,
Variable will be declared and assigned in the package file
 

Re: doubts in vhdl

whenever an event has to be carried out at the network level....
say an addition/subtraction/division or any event....
high level abstractions are used to define the processor architecture...
this is known as register transfer level description...
it describes the operation of a system without reference to specific components....


regards
kazzam.....
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top