Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > Proper organization of function/procedures requiring global signals

Reply
Thread Tools

Proper organization of function/procedures requiring global signals

 
 
Garrick
Guest
Posts: n/a
 
      09-27-2005
I already have a system in place in Verilog, and now I'm trying to get
everything ported smoothly to VHDL and am having some difficulty. Of
course, perhaps my Verilog setup isn't smooth either.

I have a test bench that I want to simulate higher level function calls
down to my design. For instance, within my test bench, I have a DUT
connected, clocks generate, resets, etc, but I also have a process that
makes calls like:

process
begin
-- SendValue(address, value)
SendValue(x"00", x"1234");

-- UpdateValue;
UpdateValue;

....

wait;
end process;

SendValue(...) and UpdateValue are procedure calls, but they are also
designed to look and function similar to function calls one of our
customers would make on a PC in C++, Python, Java, etc. On the PC, our
API's and hardware/firmware make the connection to the FPGA world. In
the simulation world, I need some behavioral procedures and functions to
make the connection.

Anyway, in Verilog, I was able to seperate a large list of functions and
tasks into a Call.v file, that is then included at the bottom of the
test bench with an `include "Call.v" directive. The functions and tasks
in Call.v are included at compile time at this point. Not perfect, but
it works. The functions and tasks in Call.v are able to utilize global
signals like the clocks, resets, data busses, etc. in the test bench
that aren't explicitly passed.

However, in VHDL, it would be nice to put all my functions and
procedures into a package. Unfortunatly, I can't get global access back
and forth between this package and my other signals. I also don't want
to spam the test bench, which is otherwise quite clean with hundreds of
lines of procedures and functions.

Any suggestions on how to organize this?

Thanks,
Garrick
 
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
Code organization / initialize global array André Hänsel C Programming 15 07-26-2010 04:40 PM
Requiring Lexical $_ / Obliterating Global $_? Tim McDaniel Perl Misc 22 09-17-2008 03:49 PM
FWSM/PIX and Dynamic PAT using global IP range vs. global interface vs. global IP Hoffa Cisco 1 10-25-2006 06:50 PM
FWSM/PIX and Dynamic PAT using global IP range vs. global interface vs. global IP Hoffa Cisco 0 10-25-2006 01:04 PM
Is mymodule.myvariable a 'global'? (What is proper definition of 'global variable'?) seberino@spawar.navy.mil Python 1 08-21-2005 09:21 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