Rules | Recent posts | topic RSS | Search | Register  | Log in

error using generic

 
Post new topic  Reply to topic    EDAboard.com Forum Index -> PLD, SPLD, GAL, CPLD, FPGA Design
Author Message
gck



Joined: 17 Oct 2006
Posts: 136
Helped: 4


Post28 Aug 2008 11:00   error using generic

I have written following code.

entity and_m is

generic (
delay : TIME );

port (
in1, in2 : in std_logic;
op : out std_logic);

end and_m;

architecture and_m_arc of and_m is

begin -- and_m_arc

op <= in1 and in2 after delay;

end and_m_arc;


This code is getting compiled but when I am trying to simulate in modelsim
its giving error as"Generic 'delay' has not been given a value."

Is it necessary to initialize the generic.
I tried to do that also but still it gives error. Please help me.
Back to top
salma ali bakr



Joined: 27 Jan 2006
Posts: 943
Helped: 79


Post28 Aug 2008 11:21   Re: error using generic

you have to give your generic a value!!

for ex: generic ( delay : time := 1 ns);

it shouldn't give an error then!!
Back to top
Post new topic  Reply to topic    EDAboard.com Forum Index -> PLD, SPLD, GAL, CPLD, FPGA Design
Page 1 of 1 All times are GMT + 1 Hour


Abuse
Administrator
Moderators
topic RSS 
sitemap