12.07.2015 Views

Simulator Configuration Guide for Synopsys Models

Simulator Configuration Guide for Synopsys Models

Simulator Configuration Guide for Synopsys Models

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Simulator</strong> <strong>Configuration</strong> <strong>Guide</strong>Chapter 9: Using VERA with <strong>Synopsys</strong> <strong>Models</strong>4. Send commands to a DWMM model through the model object’s testbench methods.The VERA testbench methods are similar to the SystemC testbench functions.However, there are some differences in the way they are called. TheVERA/DWMM testbench interface is implemented using the object-orientedfeatures of VERA. The testbench functions are available as methods of theMemPro class.The following example sets the message level to issue all messages.mem1.set_msg_level( SLM_ALL_MSGS, status);Note that the method does not take the model instance ID as an argument. Themem1 object stores its instance ID when it is constructed and there<strong>for</strong>e does notneed the instance ID when any of the testbench methods are called.For details on testbench setup, see the VERA User <strong>Guide</strong>.VERA Testbench ExampleThe following example shows DWMM models controlled from a VERA testbench.#define OUTPUT_EDGE PHOLD#define OUTPUT_SKEW #1#define INPUT_EDGE PSAMPLE#include #include "mempromodel.vrh"program DWMM_test{ // start of top block// global variablesinteger data_width, addr_width, status;string instance_name, class_name;bit[2047:0] tData;integer msgLevel;October 6, 2003 <strong>Synopsys</strong>, Inc. 231

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!