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

Reply

VHDL - global shared resources

 
Thread Tools Search this Thread
Old 01-20-2005, 04:10 AM   #1
Default global shared resources


Is there a way in VHDL for two separate modules to share signals without
having to declare them as input and/or output ports? The only way I know
how to do it is to explicitly declare the ports in both modules, and tie the
signals together through a common ancestor in the VHDL hierarchy. Is there
a way around that? I'm hoping for some kind of support for "global signals"
that infer connectivity by nature of a common name.

Ed




Ed J
  Reply With Quote
Old 01-20-2005, 04:52 AM   #2
Mike Treseler
 
Posts: n/a
Default Re: global shared resources
Ed J wrote:
> Is there a way in VHDL for two separate modules to share signals without
> having to declare them as input and/or output ports?


The vhdl language and simulation
tools allow packaged signals to be
used like that. Most synthesis
tools do not support this usage.

Processes within the same architecture
can access the same signals. All can
read, only one can drive.

Procedures within the same process can share
the same local process variables.

-- Mike Treseler


Mike Treseler
  Reply With Quote
Old 01-20-2005, 06:50 AM   #3
biau@altavista.com
 
Posts: n/a
Default Re: global shared resources
<<The only way I know
how to do it is to explicitly declare the ports in both modules, and
tie the
signals together through a common ancestor in the VHDL hierarchy. >>

That is the normal--and one might say--clean way to do it.

<<Is there
a way around that? I'm hoping for some kind of support for "global
signals"
that infer connectivity by nature of a common name.>>

As Mike Tressler pointed out, you can declare the global signals in a
package, which makes them global to all architectures (modules) that
care to reference them--provided that the architecture takes care to
make the library where the package is declared visible through a
library clause and the package and signals visible through use clauses.

One situation where this might make sense is when "debug" signals are
needed. Putting in temporary port signals to carry debug signals
through the hierarchy is somewhat of a pain in the neck.

Not all tools are compliant with this VHDL usage, however, and, as Mike
pointed out, synthesis tools are frequent offenders. About two years
ago I tried this and found that Synplify Pro did not allow signals in
packages but Xilinx XST did. So, don't try "global" signals without
checking compatibility with the VHDL tools that you are using or likely
to port to.



biau@altavista.com
  Reply With Quote
Old 01-20-2005, 03:19 PM   #4
Ralf Hildebrandt
 
Posts: n/a
Default Re: global shared resources
Ed J wrote:


> Is there a way in VHDL for two separate modules to share signals without
> having to declare them as input and/or output ports?


You may use:
shared variable

Note: As this is a variable, it is updated immediately when a process
executes and modifies it. So don't test for rising_edge / falling_edge
of this shared variable as this may result in a race condition.

(As you name the VHDL components "modules" I guess you are a Verilog
user: shared variable have similar behavior to blocked signal
assignments. (And also blocked signal assignments should not be used
inside sequential statements.))


Remember: For synthesis a normal signal (fed through via input / output)
is the best choice in most cases.

Ralf


Ralf Hildebrandt
  Reply With Quote
Old 01-20-2005, 04:13 PM   #5
Barry Brown
 
Posts: n/a
Default Re: global shared resources

<> wrote in message
news: oups.com...
> Not all tools are compliant with this VHDL usage, however, and, as Mike
> pointed out, synthesis tools are frequent offenders. About two years
> ago I tried this and found that Synplify Pro did not allow signals in
> packages but Xilinx XST did. So, don't try "global" signals without
> checking compatibility with the VHDL tools that you are using or likely
> to port to.
>


I checked the Synplify Pro 7.5 Ref manual, and it says that global signals
in packages are supported (page 10-3).




Barry Brown
  Reply With Quote
Old 01-21-2005, 01:04 PM   #6
biau@altavista.com
 
Posts: n/a
Default Re: global shared resources
That is good news. It was probably Synplify Pro 6 or earlier that I
tried back then.



biau@altavista.com
  Reply With Quote
Old 01-22-2005, 03:35 AM   #7
Charles Bailey
 
Posts: n/a
Default Re: global shared resources
Also, all processes with the same architecture can read or write shared
variables.

Charles Bailey




Charles Bailey
  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
Browsing shared folder via VPN djguruji Hardware 0 03-31-2008 09:59 AM
how to use resources in jar daniele Software 0 10-17-2007 02:46 PM
Unrecognized junction points in shared folders Dave Hardenbrook A+ Certification 0 05-16-2007 11:28 PM
KO mafia CFR ILLUMINATI ! Global Democracy TRIVOLUZIONE ARTSENU COLD FUSION W post OPEC ! molcaleviATyahoogroupsDOTcom DVD Video 0 02-07-2007 06:14 PM
Legacy Devices and Reserving Resources Question Bloke_in_a_box A+ Certification 1 05-04-2004 06:52 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