ovm_layered_stimulus_defines.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 //------------------------------------------------------------------------------
00022 //
00023 // MACRO: apply_request_with
00024 //
00025 //------------------------------------------------------------------------------
00026 
00027 `define apply_request_with(OVM_DATA_REQ, CONSTRAINTS) \
00028   grant_flag = 0; \
00029   if (m_scenario_controller == null) ovm_report_fatal("seqA", "null m_scenario_controller"); \
00030   m_scenario_controller.request(this); \
00031   wait(grant_flag == 1); \
00032   pre_apply(); \
00033   if (m_driver_ptr == null) ovm_report_fatal(get_full_name(), "null m_driver_ptr"); \
00034   grant_flag = 0; \
00035   assert(OVM_DATA_REQ.randomize() with CONSTRAINTS ) else begin \
00036     ovm_report_warning("ovm_scenario", "Randomization failed in apply_request_with"); \
00037   end \
00038   mid_apply();
00039 
00040 //------------------------------------------------------------------------------
00041 //
00042 // MACRO: apply_with
00043 //
00044 //------------------------------------------------------------------------------
00045 
00046 `define apply_with(OVM_DATA_REQ, OVM_DATA_RSP, CONSTRAINTS) \
00047   `apply_request_with(OVM_DATA_REQ, CONSTRAINTS) \
00048   if ($cast(p_drv, m_driver_ptr) == 0) begin \
00049     ovm_report_fatal("ovm_scenario", "Error casting pdrv from driver_ptr"); \
00050   end \
00051   p_drv.put_req.put(OVM_DATA_REQ); \
00052   p_drv.get_rsp.get(OVM_DATA_RSP); \
00053   post_apply();
00054 
00055 //------------------------------------------------------------------------------
00056 //
00057 // MACRO: apply_send_with
00058 //
00059 //------------------------------------------------------------------------------
00060 
00061 `define apply_send_with(OVM_DATA_REQ, CONSTRAINTS) \
00062   `apply_request_with(OVM_DATA_REQ, CONSTRAINTS); \
00063   if ($cast(p_drv, m_driver_ptr) == 0) begin \
00064     ovm_report_fatal("ovm_scenario", "Error casting pdrv from driver_ptr"); \
00065   end \
00066   p_drv.put_req.put(OVM_DATA_REQ); \
00067   post_apply();
00068 
00069   

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:20:12 2008
Find a documentation bug? Report bugs to: bugs.intelligentdv.com Project: DoxygenFilterSV