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

Reply

VHDL - to access an array defined in some other file ?

 
Thread Tools Search this Thread
Old 07-04-2005, 10:42 PM   #1
Default to access an array defined in some other file ?


hi all
i wrote a code for a RAM, which essentially comprises of an array. Now i
want to read some location in the RAM (array) in some other file..here
lies the problem..

1. simply accessing that array gives me error.
2. i tried writing the array declaration in package, i dont get any syntax
error but then i dont get any data either.
can u help me with a possible solution ?

plz help...thanks



charsi
  Reply With Quote
Old 07-05-2005, 10:03 AM   #2
Jonathan Bromley
 
Posts: n/a
Default Re: to access an array defined in some other file ?
On Mon, 04 Jul 2005 17:42:13 -0400, "charsi"
<> wrote:

>i wrote a code for a RAM, which essentially comprises of an array. Now i
>want to read some location in the RAM (array) in some other file..here
>lies the problem..
>
>1. simply accessing that array gives me error.
>2. i tried writing the array declaration in package, i dont get any syntax
>error but then i dont get any data either.


Oh dear.

Please repeat after me, very slowly and very many times:

VHDL IS NOT C.

If you are writing software in VHDL (for example, if you are
creating a big complicated test bench) then it is sometimes
reasonable to use shared variables declared in packages.
However, the behaviour of shared variables changed
significantly in VHDL-2002 and it's not a good place for
beginners to start their VHDL learning curve.

If you are writing hardware, then you must understand how
VHDL tries to represent hardware. Of course it gives an
error to access the array from somewhere else. I don't know
whether you have ever used a real RAM device, but even if you
haven't I guess you would not expect to read its contents
by removing its package and looking inside. Why, then, do
you expect VHDL to behave like that? To access a RAM you
must manipulate its connections (ports) correctly - supply
an address, wiggle its read strobe and chip select signals,
and pick up the data.

Tell us more and we may be able to guide you better. But
please don't forget to learn the very basic stuff about
entities, ports and signals. The comp.lang.vhdl FAQ will
point you to some excellent textbooks and online advice.
--
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.


Jonathan Bromley
  Reply With Quote
Old 07-05-2005, 06:34 PM   #3
Andy Peters
 
Posts: n/a
Default Re: to access an array defined in some other file ?
charsi wrote:
> hi all
> i wrote a code for a RAM, which essentially comprises of an array. Now i
> want to read some location in the RAM (array) in some other file..here
> lies the problem..
>
> 1. simply accessing that array gives me error.
> 2. i tried writing the array declaration in package, i dont get any syntax
> error but then i dont get any data either.
> can u help me with a possible solution ?


Ummmmmmmmmmmmmmmmmmmmmmmmmmmm, the obvious answer is that you put your
RAM into an entity and then you instantiate the entity into your design
in the usual way.

-a



Andy Peters
  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
open pdf file with Access!! yang General Help Related Topics 0 08-23-2007 08:40 AM
SONY DVD RW DW-G120A SOMETIMES FAILS...... atlantic965 DVD Video 0 06-18-2006 10:36 PM
problems backing up dvds Lawrence Traub DVD Video 11 09-27-2005 07:34 PM
Re: Ripping DVDs. Please answer the attached question. - Question.txt Stan Brown DVD Video 19 02-09-2005 11:19 PM
Burn process failed - help! Log file posted for help troubleshooting Michael Mason DVD Video 1 08-16-2004 09:24 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