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

Reply

VHDL - Procedure calls in process

 
Thread Tools Search this Thread
Old 01-03-2005, 11:11 PM   #1
Default Procedure calls in process


Hello all,

I'm trying to understand a weird behavior I'm observing in the simulator.
First I must say it's for a test bench so I don't "really" care about
optimality or synthesis.

I'm calling a procedure from a continuous process (no sensitivitylist) and
the result for the first "iteration" is not what I expect, while all the
others are OK.

The result can be seen here :

http://www.246tnt.com/files/wave.png

It shows two runs of the process that I would expect to be identical ... I've run
the simulation thru both modelsim and simili with same results.

Here is the code snippet : (note it's just a test, not at all real PCI ... )

-- PCI Scenario
process

type dataseq_t is array(integer range <>) of std_logic_vector(31 downto 0);

-- PCI Read sequence

-- PCI Write sequence
procedure pci_do_write(
w : in integer;
data : in test_t
) is
begin
pci_frame_n <= '0';
pci_ad <= data(0);
wait for 100 ns;
pci_frame_n <= '1';
pci_ad <= data(1);
wait for 100 ns;
pci_frame_n <= 'Z';
pci_ad <= data(2);
end procedure;

constant ts : dataseq_t(0 to 2) := ( x"12345678", x"9ABCDEF0", x"13FF005A" );
begin

-- Reset
wait for 10 ns;
pci_do_write(2, ts);
wait for 200 ns;

end process;


Thanks for any insight ...

Sylvain


Sylvain Munaut
  Reply With Quote
Old 01-03-2005, 11:29 PM   #2
Jim Lewis
 
Posts: n/a
Default Re: Procedure calls in process
Sylvain,
Is there another driver of pci_ad? Looks to me like there
is and it is not turned tristated until well into your
first pci write cycle. One thing you may want to try is
initializing all sources for pci_ad to all 'Z'.

Regards,
jim

> Hello all,
>
> I'm trying to understand a weird behavior I'm observing in the simulator.
> First I must say it's for a test bench so I don't "really" care about
> optimality or synthesis.
>
> I'm calling a procedure from a continuous process (no sensitivitylist) and
> the result for the first "iteration" is not what I expect, while all the
> others are OK.
>
> The result can be seen here :
>
> http://www.246tnt.com/files/wave.png
>
> It shows two runs of the process that I would expect to be identical ...
> I've run
> the simulation thru both modelsim and simili with same results.
>
> Here is the code snippet : (note it's just a test, not at all real PCI
> ... )
>
> -- PCI Scenario
> process
>
> type dataseq_t is array(integer range <>) of std_logic_vector(31
> downto 0);
>
> -- PCI Read sequence
>
> -- PCI Write sequence
> procedure pci_do_write(
> w : in integer;
> data : in test_t
> ) is
> begin
> pci_frame_n <= '0';
> pci_ad <= data(0);
> wait for 100 ns;
> pci_frame_n <= '1';
> pci_ad <= data(1);
> wait for 100 ns;
> pci_frame_n <= 'Z';
> pci_ad <= data(2);
> end procedure;
>
> constant ts : dataseq_t(0 to 2) := ( x"12345678", x"9ABCDEF0",
> x"13FF005A" );
> begin
>
> -- Reset
> wait for 10 ns;
> pci_do_write(2, ts);
> wait for 200 ns;
>
> end process;
>
>
> Thanks for any insight ...
>
> Sylvain



--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~
Jim Lewis
Director of Training private.php?do=newpm&u=
SynthWorks Design Inc. http://www.SynthWorks.com
1-503-590-4787

Expert VHDL Training for Hardware Design and Verification
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~


Jim Lewis
  Reply With Quote
Old 01-04-2005, 09:55 PM   #3
Sylvain Munaut
 
Posts: n/a
Default Re: Procedure calls in process
Hi Jim

> Is there another driver of pci_ad? Looks to me like there
> is and it is not turned tristated until well into your
> first pci write cycle. One thing you may want to try is
> initializing all sources for pci_ad to all 'Z'.



Damn, I missed the obvious ! Since I was modifying my simple
test bench to make it more "advanced", I just forgot that there
was the PCI target core I'm working on plugged in ... And it
reacted to those "weird" test signals ...


Sylvain


Sylvain Munaut
  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
Asynchronous process from asp.net page button click event? Ritha Software 0 09-29-2009 03:20 PM
Recycle Worker Process Not Working JAB Software 0 09-04-2008 05:22 PM
MCITP and stored procedure permissions Darrilgibson@gmail.com MCITP 5 06-07-2008 12:37 PM
A+ Exam Revision Update Process Starting John P. Dearing A+ Certification 6 02-10-2006 01:44 AM
Re: Home service calls Rick Blythin A+ Certification 0 07-17-2003 10:41 PM




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