Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > Multiple source tolerated by Modelsim

Reply
Thread Tools

Multiple source tolerated by Modelsim

 
 
ALuPin
Guest
Posts: n/a
 
      07-09-2004
Hi,

I have the following question:

Given one signal "l_data" which is created in a clock synchronous process.

As an concurrent assignment I have the following:

l_data_help <= l_data;
l_data_help(4) <= NOT l_data(4);

When compiling that Modelsim does NOT show any warning although it is
a multiple source.

Am I right?

Rgds
 
Reply With Quote
 
 
 
 
Jonathan Bromley
Guest
Posts: n/a
 
      07-09-2004
On 9 Jul 2004 06:51:28 -0700, (ALuPin) wrote:

>Given one signal "l_data" which is created in a clock synchronous process.
>
>As an concurrent assignment I have the following:
>
>l_data_help <= l_data;
>l_data_help(4) <= NOT l_data(4);
>
>When compiling that Modelsim does NOT show any warning although it is
>a multiple source.
>
>Am I right?


If l_data_help is a STD_LOGIC_VECTOR then there is no problem with
multiple drivers on it; however, your code will always drive it to
'U' or 'X'.

Similarly, if the elements of l_data_help are of ANY resolved type,
your code is legal (but probably not useful).

On the other hand, if the elements of l_data_help are of unresolved
type, the simulator should detect the error at elaboration time.
At compile time it is NOT required to detect the error, although
it wll probably give a warning in this case where both drivers
exist in the same design unit.

As an experiment, try re-defining l_data and l_data_help to be
STD_ULOGIC_VECTOR instead of STD_LOGIC_VECTOR.
--
Jonathan Bromley, Consultant

DOULOS - Developing Design Know-how
VHDL, Verilog, SystemC, Perl, Tcl/Tk, Verification, Project Services

Doulos Ltd. Church Hatch, 22 Market Place, Ringwood, BH24 1AW, UK
Tel: +44 (0)1425 471223 mail:
Fax: +44 (0)1425 471573 Web: http://www.doulos.com

The contents of this message may contain personal views which
are not the views of Doulos Ltd., unless specifically stated.
 
Reply With Quote
 
 
 
 
Nicolas Matringe
Guest
Posts: n/a
 
      07-09-2004
Jonathan Bromley a écrit:

> On the other hand, if the elements of l_data_help are of unresolved
> type, the simulator should detect the error at elaboration time.
> At compile time it is NOT required to detect the error, although
> it wll probably give a warning in this case where both drivers
> exist in the same design unit.
>
> As an experiment, try re-defining l_data and l_data_help to be
> STD_ULOGIC_VECTOR instead of STD_LOGIC_VECTOR.


ModelSim won't give any warning or error at compile time (I've already
posted about this a few weeks ago)
I didn't know at the time that the error detection was due at
elaboration time.

--
____ _ __ ___
| _ \_)/ _|/ _ \ Adresse de retour invalide: retirez le -
| | | | | (_| |_| | Invalid return address: remove the -
|_| |_|_|\__|\___/

 
Reply With Quote
 
Jonathan Bromley
Guest
Posts: n/a
 
      07-09-2004
On Fri, 09 Jul 2004 16:57:55 +0200, Nicolas Matringe
<> wrote:

>Jonathan Bromley a écrit:
>

[concerning multiple sources on a signal)
>
>ModelSim won't give any warning or error at compile time (I've already
>posted about this a few weeks ago)


Sorry Nicolas, I missed your post on that issue.

Hmmm... A few days ago I was doing some complicated and messy
stuff with "generate", and the compiler warned me that there
MIGHT be multiple sources... it was right, until I fixed the
code but even when my "generate" code was correct, I still
got the warning. In this case, of course, there was no error
at elaboration.

>I didn't know at the time that the error detection was due at
>elaboration time.


There are many possible errors that cannot be detected until
elaboration. On the other hand, some simple cases could
in principle be detected earlier. I guess it's just a question
of how hard the compiler is prepared to work, to detect some
of these cases.
--
Jonathan Bromley, Consultant

DOULOS - Developing Design Know-how
VHDL, Verilog, SystemC, Perl, Tcl/Tk, Verification, Project Services

Doulos Ltd. Church Hatch, 22 Market Place, Ringwood, BH24 1AW, UK
Tel: +44 (0)1425 471223 mail:
Fax: +44 (0)1425 471573 Web: http://www.doulos.com

The contents of this message may contain personal views which
are not the views of Doulos Ltd., unless specifically stated.
 
Reply With Quote
 
Nicolas Matringe
Guest
Posts: n/a
 
      07-12-2004
Jonathan Bromley a écrit:
> On Fri, 09 Jul 2004 16:57:55 +0200, Nicolas Matringe
> <> wrote:
> [concerning multiple sources on a signal)
>>ModelSim won't give any warning or error at compile time (I've already
>>posted about this a few weeks ago)

> Sorry Nicolas, I missed your post on that issue.


The whole thread is here (but I'm sure you already know how to find it ;o)
http://tinylink.com/?KWoPIItiUt


> There are many possible errors that cannot be detected until
> elaboration. On the other hand, some simple cases could
> in principle be detected earlier. I guess it's just a question
> of how hard the compiler is prepared to work, to detect some
> of these cases.


Michael Riepe pointed that some cases couldn't be detected until
elaboration, for example when using generic parameters:

>>> Quoted text:

If the signals assigned to don't have locally static names, it
will be impossible to detect multiple sources before elaboration:

generic (index : integer := 1);
-- ...
signal sig : std_ulogic_vector(...);
-- ...
sig(0) <= '1'; -- locally static
sig(index) <= '0'; -- not locally static

During elaboration, `index' may or may not become 0.
<<< end of quoted text.


--
____ _ __ ___
| _ \_)/ _|/ _ \ Adresse de retour invalide: retirez le -
| | | | | (_| |_| | Invalid return address: remove the -
|_| |_|_|\__|\___/

 
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
Modelsim AE / multiple waveform windows OL VHDL 3 12-10-2006 11:27 AM
Simulation in modelsim.... Multiple Drivers....... CODE_IS_BAD VHDL 0 04-21-2005 10:56 AM
Adding a web application project to source control (Visual Source Safe) ~~~ .NET Ed ~~~ ASP .Net 1 02-26-2005 02:20 PM
Source control and versions of third party source Marcus Leon Java 5 02-03-2005 03:37 PM
Data Recovery SOURCE CODE ( SOURCE CODES of Professional Data Recovery Software ) Author Tarun Tyagi Cisco 0 12-29-2004 05:03 PM



Advertisments
 



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 47 48 49 50 51 52 53 54 55 56 57