How to wait few nano seconds in a Process?

A

Amit

Hello group,

Does anybody know how I can use "wait for X ns" in a process?
currently the compiler doesn't accept it in a process.

Thanks.
amit

Example:


MyProcess : process (param1, param2)
begin

if param2= '1' then
do this ...
end if;

if param1 = '0' then
WAIT FOR 2 ns <<<<<<<<<<<<<<<<<<< causes
error.
end if;
end if;


end process;
 
A

Andy

Hello group,

Does anybody know how I can use "wait for X ns" in a process?
currently the compiler doesn't accept it in a process.

Thanks.
amit

Example:

MyProcess : process (param1, param2)
begin

if param2= '1' then
do this ...
end if;

if param1 = '0' then
WAIT FOR 2 ns <<<<<<<<<<<<<<<<<<< causes
error.
end if;
end if;

end process;

You cannot have wait statements and sensitivity lists on the same
process... Those things in () after "process" are not parameters, they
are signals that the process is sensitive to (i.e. will execute when
they change).

You're not trying to synthesize this, are you?

Andy
 
A

Amit

You cannot have wait statements and sensitivity lists on the same
process... Those things in () after "process" are not parameters, they
are signals that the process is sensitive to (i.e. will execute when
they change).

You're not trying to synthesize this, are you?

Andy


Long story short, I need to know when a clock cycle ends here (in this
loop) then I can take some actions.

Any advice?

Regards,
Amit
 
A

Amit

Long story short, I need to know when a clock cycle ends here (in this
loop) then I can take some actions.

Any advice?

Regards,
Amit

Sorry, it is not a loop what I meant was in this process.

Once again thanks.
 
J

JK

Long story short, I need to know when a clock cycle ends here (in this
loop) then I can take some actions.

Any advice?

You already opened one post regarding this right???

Regards,
JK
 
M

matrixrulz2

I do not think you can wait like that in a process, everything inside
a process has to happen sequentially but the wait statement you have
cannot be implemented sequentially. The way I would do it is to
implement a tap delay line running off a clock that has a period of
2ns, using one tap would give you your required delay.

cheers
 
M

matrixrulz2

Hello group,

Does anybody know how I can use "wait for X ns" in a process?
currently the compiler doesn't accept it in a process.

Thanks.
amit

Example:

MyProcess : process (param1, param2)
begin

if param2= '1' then
do this ...
end if;

if param1 = '0' then
WAIT FOR 2 ns <<<<<<<<<<<<<<<<<<< causes
error.
end if;
end if;

end process;
 

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,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top