ovm_scenario.svh

Go to the documentation of this file.
00001 //----------------------------------------------------------------------
00002 //   Copyright 2007-2008 Mentor Graphics Corporation
00003 //   Copyright 2007-2008 Cadence Design Systems, Inc.
00004 //   All Rights Reserved Worldwide
00005 //
00006 //   Licensed under the Apache License, Version 2.0 (the
00007 //   "License"); you may not use this file except in
00008 //   compliance with the License.  You may obtain a copy of
00009 //   the License at
00010 //
00011 //       http://www.apache.org/licenses/LICENSE-2.0
00012 //
00013 //   Unless required by applicable law or agreed to in
00014 //   writing, software distributed under the License is
00015 //   distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
00016 //   CONDITIONS OF ANY KIND, either express or implied.  See
00017 //   the License for the specific language governing
00018 //   permissions and limitations under the License.
00019 //----------------------------------------------------------------------
00020 
00021 virtual class ovm_scenario #(type REQ = ovm_transaction,
00022                      type RSP = ovm_transaction) extends ovm_sequence #(REQ, RSP);
00023 
00024   ovm_scenario_controller_base m_scenario_controller;
00025   ovm_scenario_controller #(REQ, RSP) param_scenario_controller;
00026 
00027 
00028 
00029   function new(string name = "scenario");
00030     super.new(name);
00031   endfunction // new
00032 
00033   virtual function integer get_id();
00034     return (get_sequence_id());
00035   endfunction
00036 
00037   virtual task start(ovm_scenario_controller_base sequencer,
00038                      ovm_scenario_base parent_sequence = null,
00039                      integer this_priority = 100,
00040                      bit call_pre_post = 1);
00041     
00042     m_scenario_controller = sequencer;
00043     $cast(param_scenario_controller, m_scenario_controller);
00044     call_pre_post = 1;
00045     super.start(sequencer, parent_sequence, this_priority, call_pre_post);
00046     if (sequencer != null) begin
00047       unlock();
00048     end
00049   endtask // start
00050 
00051 virtual task pre_body();
00052     // Request a valid sequence_id();
00053     unlock();
00054     return;
00055 endtask // pre_body
00056 
00057   virtual task apply_request(input REQ data_req, input bit randomize = 1);
00058 
00059     param_scenario_controller.apply_request(this, data_req, randomize);
00060   endtask
00061   
00062 virtual task apply_send(input REQ data_req, input bit randomize = 1);
00063     param_scenario_controller.apply_send(this, data_req, randomize);
00064 endtask    
00065     
00066 virtual task apply(input REQ data_req, output RSP data_rsp, input bit randomize = 1);
00067   
00068     param_scenario_controller.apply(this, data_req, data_rsp, randomize);
00069 endtask // apply
00070 
00071 virtual task pre_apply();
00072     return;
00073 endtask
00074 
00075 virtual task mid_apply();
00076     return;
00077 endtask
00078 
00079 virtual task post_apply();
00080     return;
00081 endtask // post_apply
00082 
00083   function string get_scenario_path_name();
00084     return (get_full_name());
00085   endfunction // string
00086 
00087 endclass
00088 

Intelligent Design Verification
Intelligent Design Verification
Project: OVM, Revision: 1.1.0
Copyright (c) 2008 Intelligent Design Verification.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
A copy of the license is included here:
http://www.intelligentdv.com/licenses/fdl.txt
doxygen
Doxygen Version: 1.4.6
Mon Sep 29 14:23:30 2008
Find a documentation bug? Report bugs to: bugs.intelligentdv.com Project: DoxygenFilterSV