Bus Emulation in Testbenches

Discussion in 'VHDL' started by PeterHawk, Aug 27, 2009.

  1. PeterHawk

    PeterHawk

    Joined:
    Aug 27, 2009
    Messages:
    1
    Likes Received:
    0
    Location:
    Aarhus, Denmark
    Hi!

    I'm looking for a nice way to emulate a bus (or another interface) i a VHDL testbench.

    I have a design that interfaces to a bus, and would like to test it functionally from a "relatively" high layer of abstraction.

    In the end I would like the ability to simply write:
    WRITE(<address>, <data>); -- Input a constant and write it to the bus interface according to spec.
    READ(<address>); -- read data from the bus interface according to spec and output result to testbench console/IO

    The bus interface signals is given by the UUT entity.

    I tried placing the READ/WRITE procedures in a separate package, but ended up having to pass all bus- data, address and control signals. i.e:
    WRITE(<wraddress>, <wrdata>, data, address, cs, wr, bs,...);

    Another option is to define the UUT entity signals as global in a separate package, and include this package in the TB and in the bus emulator package. Next problem is how to access the global signals from within the package or rather from within a procedure. Reading global signals from within a procedure is fine, but assigning a value to them does not work.

    I may be on a totally wrong track, but does anyone have a good idea on how to achieve something like this?

    Thanks,

    Peter
     
    PeterHawk, Aug 27, 2009
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Yttrium
    Replies:
    1
    Views:
    864
    Jonathan Bromley
    Oct 31, 2003
  2. AndyAtHome
    Replies:
    0
    Views:
    1,536
    AndyAtHome
    Jun 2, 2004
  3. BLF
    Replies:
    4
    Views:
    1,482
    Mike Treseler
    Aug 7, 2004
  4. Eli Bendersky

    Coding complex VHDL testbenches

    Eli Bendersky, Mar 26, 2007, in forum: VHDL
    Replies:
    21
    Views:
    4,644
    Jonathan Bromley
    Mar 31, 2007
  5. adisomani

    Tutorial for writing testbenches

    adisomani, Jan 24, 2008, in forum: VHDL
    Replies:
    0
    Views:
    658
    adisomani
    Jan 24, 2008
  6. Ashani Patel

    testbenches

    Ashani Patel, Jun 23, 2008, in forum: VHDL
    Replies:
    3
    Views:
    576
    Reuven
    Jun 23, 2008
  7. Marcin Rodzik
    Replies:
    5
    Views:
    1,510
    backhus
    Jul 9, 2010
  8. rpaley000@gmail.com
    Replies:
    0
    Views:
    982
    rpaley000@gmail.com
    Jul 6, 2011
Loading...