How to wait few nano seconds in a Process?

A

Amit

Guest
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;
 
On May 7, 3:31 pm, Amit <amit.ko...@gmail.com> wrote:
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
 
On May 7, 1:34 pm, Andy <jonesa...@comcast.net> wrote:
On May 7, 3:31 pm, Amit <amit.ko...@gmail.com> wrote:



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

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
 
On May 7, 1:47 pm, Amit <amit.ko...@gmail.com> wrote:
On May 7, 1:34 pm, Andy <jonesa...@comcast.net> wrote:



On May 7, 3:31 pm, Amit <amit.ko...@gmail.com> wrote:

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

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.
 
On May 8, 1:47 am, Amit <amit.ko...@gmail.com> wrote:
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
 
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
 
On May 8, 8:31 am, Amit <amit.ko...@gmail.com> wrote:
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;
 

Welcome to EDABoard.com

Sponsor

Back
Top