|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
这个东西可能对一部分人有用。
Question:How to Integrate Synopsys DesignWare USB 2.0 VIP in the VMM Environment
(VMM 1.2) with implicit phasing?
Answer:The recommended use model is to integrate the DW VIP in the VMM subenv and then
integrate the VMM subenv with VMM 1.2 env. The following procedure highlights
how to integrate the DW VIP in VMM 1.2 env:
USB 2.0 VIP Example Used: tb_usb_vmm_11_advanced_sys
The above example provided with DW installation has been modified to be VMM 1.2
compliant.
Step 1: Create DW USB Host Subenv
===================================
The Host subenv encapsulates the USB Host VIP, USB scenario generator, scoreboard
and Voter.
In addition to just encapsulating components, it preloads the scenario generator
with scenarios that you can control through weights.
The subenv is intended to be reusable at the system level, hence it must be possible
to disable the internal scenario generator and execute transactions that are provided
from an outside source.
There is an input channel argument on the subenv (the default value of the input
channel is null). The output and response channels are connected between the
initiator VIP and host response generator.
In the constructor new(),
Construct the USB Host, input/output channels and Scenario Generator.
The Host transactor callbacks are also initialized here.
In the virtual task start(),
* Start the USB Host(start_xactor called) and scenario generator.
* Register the timeout voter with the consensus class.
* Scenario generator class also linked with consensus class notifier.
In the virtual task stop(),
* Stop the scenario generator, and USB Host by calling their stop_xactor()
method.
As the host subenv is still with legacy model(VMM 1.1) the explicit phasing is
used here for starting/stopping its generators.
Step 2: Create DW USB Device Subenv
===================================
The Device subenv encapsulates the USB Device VIP, USB Device Response generator
and Device Voter.
In the constructor new(),
Construct the USB Device and Device Response Generator.
In the virtual task start(),
* Start the USB Device and Device Response generator.
* Register the timeout voter with the consensus class.
In the virtual task stop(),
* Stop the Response generator and USB Device by calling their stop_xactor()
method.
Step 3: Testbench Environment
===================================
The testbench environment is an extension of vmm_group to implement the basic run flow.
It instantiates the USB Host Subenv and the USB Device Subenv and demonstrates ending
the simulation with VMM consensus.
In the function build_ph(),
* Construct the Host Subenv and set the parent child relationship.
* Construct the Device Subenv and set the parent child relationship.
In the Task reset_dut_ph(),
* Reset the DUT & Testbench components in this task.
In the task run_ph(),
* A custom attach/reset phase for USB done here before starting actual transactions.
* After attach/reset of the VIP/device is finished, actual USB transactions begin.
* Wait for the consensus to finish the simulation.
Step 4: Test Case
===================================
The test case is extended from the vmm_test class. In the test case contruct the
new() function. This is a simple example of how implicit phasing is done for
VMM 1.2 based classes.
Note that run_tests itself will start coordinating the test environment.
In the function configure_test_ph(),
* Set the vmm_opts parametrers, like no of scenarios, timeout etc.
* Replacement provision for environment and factories , if required.
In the program block,
Instantiate the env and call
vmm_simulation::list();
vmm_simulation::run_tests();
The following example demonstrates the DW VIP USB in VMM implicit phasing environment
vmm_usb_12_example.tar.gz
(970.16 KB, 下载次数: 453 )
integration: |
|