Go Back   Velocity Reviews > Newsgroups > VHDL
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

VHDL - wait for statement inside a process

 
Thread Tools Search this Thread
Old 05-19-2008, 01:58 PM   #1
Default wait for statement inside a process


Hi all,

I've trying to simulate a simple state machine with VHDL code below:

Code:
library ieee; use ieee.std_logic_1164.all; entity p82 is port(a, c, clk, rst: in std_logic; x: out std_logic); end p82; architecture behavior of p82 is type state is (stateA, stateB); signal pr_state, nx_state: state; begin -----Lower Section-------- process(rst, clk) begin if(rst='1') then pr_state<=stateA; elsif(clk'event and clk='1') then pr_state<=nx_state; end if; end process; ---Upper Section---------- process(a, c, pr_state) begin case pr_state is when stateA => x<=a; wait for 10ns;-->ERROR x<=c; nx_state<=stateB; when stateB => x<=c; wait for 10ns;--->ERROR x<=a; nx_state<=stateA; end case; end process; end behavior;

But, the compiler gives error: "A wait statement is illegal for a process with a sensitivity list." But I need to make delays on those points. How can I solve this problem?

Regards


carbon9
carbon9 is offline   Reply With Quote
Old 05-19-2008, 09:02 PM   #2
jeppe
Senior Member
 
Join Date: Mar 2008
Location: Denmark
Posts: 245
Default
How about using a 100 MHz clock for the simulation - then you will be able to include the wait for 10 ns as states.


jeppe
jeppe is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cisco VPN Restrict Access by IP ? samirise Hardware 1 12-16-2007 03:17 PM
Spoke to Spoke Enhanced Config (ASA-PIX) NEED HELP ASAP!! T-Mak Hardware 1 10-27-2006 11:56 AM
Cisco 1841 and Pix506e VPN aimeruko General Help Related Topics 0 09-26-2006 08:50 AM
PIX 506e config via PDM mbvales General Help Related Topics 1 08-29-2006 10:54 AM
A+ Exam Revision Update Process Starting John P. Dearing A+ Certification 6 02-10-2006 01:44 AM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46