Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > Test process behaviour

Reply
Thread Tools

Test process behaviour

 
 
Peter
Guest
Posts: n/a
 
      02-09-2012
Hi,

I have used VHDL for some years but still get confused sometimes...

I have a testbench with a process calling a number of procedures. Each
procedure represents a test case. One procedure is supposed to inject
a fault by forcing a line low to see if fault flags are set in the
design. The problem is that this procedure mess up all remaining test
even if it is not called from the main process!? The SCL line goes U
when the bus_error_test1 is declared. But not called....

procedure bus_error_test1 is
begin
scl <= '0'; -- Fault injection
Write(SLVADR,"00011011");
.....
end bus_error_test1;
....

begin -- Start of main process

Reset;
check_default_reg; -- A number of different tests
ram_test;
ic_tx1; -- All of them report errors because of
the not called procedure
......

ic_rxtx3;
ic_rx;
--bus_error_test1; -- Procedure made as comment, but still
mess up remaining tests

I am sure You VHDL gurus can explain this behaviour. Its like a
software subroutine that executes despite its not called??

Regards Peter
 
Reply With Quote
 
 
 
 
Allan Herriman
Guest
Posts: n/a
 
      02-09-2012
On Thu, 09 Feb 2012 01:53:08 -0800, Peter wrote:

> Hi,
>
> I have used VHDL for some years but still get confused sometimes...
>
> I have a testbench with a process calling a number of procedures. Each
> procedure represents a test case. One procedure is supposed to inject a
> fault by forcing a line low to see if fault flags are set in the design.
> The problem is that this procedure mess up all remaining test even if it
> is not called from the main process!? The SCL line goes U when the
> bus_error_test1 is declared. But not called....
>
> procedure bus_error_test1 is begin scl <= '0';
> -- Fault injection Write(SLVADR,"00011011");
> ....
> end bus_error_test1;
> ...
>
> begin -- Start of main process
>
> Reset;
> check_default_reg; -- A number of different tests ram_test;
> ic_tx1; -- All of them report errors because of
> the not called procedure .....
>
> ic_rxtx3;
> ic_rx;
> --bus_error_test1; -- Procedure made as comment, but still mess
> up remaining tests
>
> I am sure You VHDL gurus can explain this behaviour. Its like a software
> subroutine that executes despite its not called??



The process has a driver for that signal if any of its procedures makes
an assignment to the signal. The process drives the leftmost value,
which is 'U', until another value is given, but since you never call the
procedure that gives it a value, it stays at 'U'.

Fix: put an assignment in at the first line of the process:

SCL <= 'Z';

Regards,
Allan
 
Reply With Quote
 
 
 
 
Peter
Guest
Posts: n/a
 
      02-09-2012
On 9 Feb, 11:36, Allan Herriman <(E-Mail Removed)> wrote:
> On Thu, 09 Feb 2012 01:53:08 -0800, Peter wrote:
> > Hi,

>
> > I have used VHDL for some years but still get confused sometimes...

>
> > I have a testbench with a process calling a number of procedures. Each
> > procedure represents a test case. One procedure is supposed to inject a
> > fault by forcing a line low to see if fault flags are set in the design..
> > The problem is that this procedure mess up all remaining test even if it
> > is not called from the main process!? The SCL line goes U when the
> > bus_error_test1 is declared. But not called....

>
> > procedure bus_error_test1 is begin scl <= '0';
> > * * * * * * -- Fault injection Write(SLVADR,"00011011");
> > ....
> > end bus_error_test1;
> > ...

>
> > begin -- Start of main process

>
> > Reset;
> > check_default_reg; * * * -- A number of different tests ram_test;
> > ic_tx1; * * * * * * * * * * * *-- All of them report errors because of
> > the not called procedure .....

>
> > ic_rxtx3;
> > ic_rx;
> > --bus_error_test1; * * * * -- Procedure made as comment, but still mess
> > up remaining tests

>
> > I am sure You VHDL gurus can explain this behaviour. Its like a software
> > subroutine that executes despite its not called??

>
> The process has a driver for that signal if any of its procedures makes
> an assignment to the signal. *The process drives the leftmost value,
> which is 'U', until another value is given, but since you never call the
> procedure that gives it a value, it stays at 'U'.
>
> Fix: put an assignment in at the first line of the process:
>
> SCL <= 'Z';
>
> Regards,
> Allan- Dölj citerad text -
>
> - Visa citerad text -


Clever...

Thanks a lot!

Regards Peter
 
Reply With Quote
 
 
 
Reply

Thread Tools

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
debugger behaviour different to execution behaviour Andy Chambers Java 1 05-14-2007 09:51 AM
TEST TEST Test...Blah Blah Blah generalbatguano@pacbell.net Computer Support 2 09-15-2006 03:47 AM
TEST TEST Test...Blah Blah Blah Generalbatguano@pacbell.net Computer Support 6 09-13-2006 01:53 AM
TEST TEST TEST Gazwad Computer Support 2 09-05-2003 07:32 PM
test test test test test test test Computer Support 2 07-02-2003 06:02 PM



Advertisments