OpenCores
URL https://opencores.org/ocsvn/lpffir/lpffir/trunk

Subversion Repositories lpffir

[/] [lpffir/] [trunk/] [uvm/] [tools/] [uvm_syoscb/] [docs/] [html/] [cl__syoscb__cfg_8svh_source.html] - Rev 4

Compare with Previous | Blame | View Log

<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>SyoSil ApS UVM Scoreboard: cl_syoscb_cfg.svh Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javaScript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.6.1 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<script type="text/javascript">
<!--
function changeDisplayState (e){
  var num=this.id.replace(/[^[0-9]/g,'');
  var button=this.firstChild;
  var sectionDiv=document.getElementById('dynsection'+num);
  if (sectionDiv.style.display=='none'||sectionDiv.style.display==''){
    sectionDiv.style.display='block';
    button.src='open.gif';
  }else{
    sectionDiv.style.display='none';
    button.src='closed.gif';
  }
}
function initDynSections(){
  var divs=document.getElementsByTagName('div');
  var sectionCounter=1;
  for(var i=0;i<divs.length-1;i++){
    if(divs[i].className=='dynheader'&&divs[i+1].className=='dynsection'){
      var header=divs[i];
      var section=divs[i+1];
      var button=header.firstChild;
      if (button!='IMG'){
        divs[i].insertBefore(document.createTextNode(' '),divs[i].firstChild);
        button=document.createElement('img');
        divs[i].insertBefore(button,divs[i].firstChild);
      }
      header.style.cursor='pointer';
      header.onclick=changeDisplayState;
      header.id='dynheader'+sectionCounter;
      button.src='closed.gif';
      section.id='dynsection'+sectionCounter;
      section.style.display='none';
      section.style.marginLeft='14px';
      sectionCounter++;
    }
  }
}
window.onload = initDynSections;
-->
</script>
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <img id="MSearchSelect" src="search/search.png"
             onmouseover="return searchBox.OnSearchSelectShow()"
             onmouseout="return searchBox.OnSearchSelectHide()"
             alt=""/>
        <input type="text" id="MSearchField" value="Search" accesskey="S"
             onfocus="searchBox.OnSearchFieldFocus(true)" 
             onblur="searchBox.OnSearchFieldFocus(false)" 
             onkeyup="searchBox.OnSearchFieldChange(event)"/>
        <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
        </div>
      </li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="dir_562324e130495ce1321e3e3f14c8d761.html">src</a>
  </div>
</div>
<div class="contents">
<h1>cl_syoscb_cfg.svh</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/// Configuration class for the SyoSil UVM scoreboard</span>
<a name="l00002"></a><a class="code" href="classcl__syoscb__cfg.html">00002</a> <span class="comment"></span><span class="keyword">class </span><a class="code" href="classcl__syoscb__cfg.html" title="Configuration class for the SyoSil UVM scoreboard.">cl_syoscb_cfg</a> <span class="keyword">extends</span> uvm_object;
<a name="l00003"></a>00003   <span class="comment">//---------------------------------</span>
<a name="l00004"></a>00004   <span class="comment">// Non randomizable member variables</span>
<a name="l00005"></a>00005   <span class="comment">//---------------------------------</span><span class="comment"></span>
<a name="l00006"></a>00006 <span class="comment">  /// Associative array holding handles to each queue. Indexed by queue name</span>
<a name="l00007"></a>00007 <span class="comment"></span>  local <a class="code" href="classcl__syoscb__queue.html" title="Class which base concet of a queue.">cl_syoscb_queue</a>  queues[string];
<a name="l00008"></a>00008 <span class="comment"></span>
<a name="l00009"></a>00009 <span class="comment">  /// Associative array indexed by producer name. Returns the list of queues which</span>
<a name="l00010"></a>00010 <span class="comment">  /// this producer is related to.</span>
<a name="l00011"></a>00011 <span class="comment"></span>  local cl_syoscb_cfg_pl producers[string];
<a name="l00012"></a>00012   local string           primary_queue;
<a name="l00013"></a>00013 <span class="comment"></span>
<a name="l00014"></a>00014 <span class="comment">  /// 1&apos;b0 =&gt; Calls to cl_syoscb::add_item will clone the uvm_sequence_item</span>
<a name="l00015"></a>00015 <span class="comment">  /// 1&apos;b1 =&gt; Calls to cl_syoscb::add_item will not clone the uvm_sequence_item</span>
<a name="l00016"></a>00016 <span class="comment"></span>  local bit disable_clone = 1&apos;b0;
<a name="l00017"></a>00017 <span class="comment"></span>
<a name="l00018"></a>00018 <span class="comment">  /// Maximum number of elements in each queue before an error is signalled. 0 means no limit (default)</span>
<a name="l00019"></a>00019 <span class="comment"></span>  local int unsigned     max_queue_size[string];
<a name="l00020"></a>00020 
<a name="l00021"></a>00021 <span class="comment">// TBD::JSA   local bit              full_scb_dump;</span>
<a name="l00022"></a>00022 <span class="comment">// TBD::JSA   local int unsigned     full_max_queue_size[string];</span>
<a name="l00023"></a>00023 <span class="comment">// TBD::JSA   local string           full_scb_type[];</span>
<a name="l00024"></a>00024 <span class="comment">// TBD::JSA   local int unsigned     item_time_out_queue[string];</span>
<a name="l00025"></a>00025 <span class="comment">// TBD::JSA   local int unsigned     item_time_out_producer[string];</span>
<a name="l00026"></a>00026 
<a name="l00027"></a>00027   <span class="comment">// The name of the SCB. Default will be the instance name of</span>
<a name="l00028"></a>00028   <span class="comment">// the SCB component if the name is not set explicitly</span>
<a name="l00029"></a>00029   local string           scb_name;
<a name="l00030"></a>00030   
<a name="l00031"></a>00031   <span class="comment">//-------------------------------------</span>
<a name="l00032"></a>00032   <span class="comment">// UVM Macros</span>
<a name="l00033"></a>00033   <span class="comment">//-------------------------------------</span>
<a name="l00034"></a>00034   `uvm_object_utils_begin(cl_syoscb_cfg)
<a name="l00035"></a>00035     `uvm_field_aa_object_string(queues,      UVM_DEFAULT)
<a name="l00036"></a>00036     `uvm_field_aa_object_string(producers,   UVM_DEFAULT)
<a name="l00037"></a>00037     `uvm_field_string(primary_queue,         UVM_DEFAULT) 
<a name="l00038"></a>00038     `uvm_field_int(disable_clone,            UVM_DEFAULT)
<a name="l00039"></a>00039     `uvm_field_aa_int_string(max_queue_size, UVM_DEFAULT)
<a name="l00040"></a>00040     `uvm_field_string(scb_name,              UVM_DEFAULT) 
<a name="l00041"></a>00041   `uvm_object_utils_end
<a name="l00042"></a>00042 
<a name="l00043"></a>00043   <span class="comment">//-------------------------------------</span>
<a name="l00044"></a>00044   <span class="comment">// Constructor</span>
<a name="l00045"></a>00045   <span class="comment">//-------------------------------------</span>
<a name="l00046"></a>00046   extern function new(string name = &quot;cl_syoscb_cfg&quot;);
<a name="l00047"></a>00047 
<a name="l00048"></a>00048   <span class="comment">//-------------------------------------</span>
<a name="l00049"></a>00049   <span class="comment">// Configuration API</span>
<a name="l00050"></a>00050   <span class="comment">//-------------------------------------</span>
<a name="l00051"></a>00051   extern function <a class="code" href="classcl__syoscb__queue.html" title="Class which base concet of a queue.">cl_syoscb_queue</a> <a class="code" href="classcl__syoscb__cfg.html#ab0c58393e3df2c575ee49044dd0bb9f7" title="Configuration API: Returns a queue handle for the specificed queue">get_queue</a>(string queue_name);
<a name="l00052"></a>00052   extern function void <a class="code" href="classcl__syoscb__cfg.html#ad30805eb6ea6a074b2673325177ddc4a" title="Configuration API: Sets the queue object for a given queue">set_queue</a>(string queue_name, cl_syoscb_queue queue);
<a name="l00053"></a>00053   extern function void <a class="code" href="classcl__syoscb__cfg.html#a3da7c1920ef35cfe8b2b030ddd80e1ee" title="Configuration API: Returns all queue names a string list">get_queues</a>(output string queue_names[]);
<a name="l00054"></a>00054   extern function void <a class="code" href="classcl__syoscb__cfg.html#a676fd117aa8f2d4d0f1a81da0a0efe63" title="Configuration API: Will set the legal queues when provides with a list of queue names...">set_queues</a>(string queue_names[]);
<a name="l00055"></a>00055   extern function bit <a class="code" href="classcl__syoscb__cfg.html#a32d8529ecaa50ec267d0c348138a2a2f" title="Configuration API: Returns 1&amp;#39;b0 if the queue does not exist and 1&amp;#39;b1 if it...">exist_queue</a>(string queue_name);
<a name="l00056"></a>00056   extern function int unsigned <a class="code" href="classcl__syoscb__cfg.html#ab1d0b6caf28edd029d164cc9d64d0fe6" title="Configuration API: Returns the number of queues">size_queues</a>();
<a name="l00057"></a>00057   extern function cl_syoscb_cfg_pl <a class="code" href="classcl__syoscb__cfg.html#a50b5ce00366256269397f516bf166269" title="Configuration API: Gets the given producer object for a specified producer">get_producer</a>(string producer);
<a name="l00058"></a>00058   extern function bit <a class="code" href="classcl__syoscb__cfg.html#a9386a9f42400830a58a629f22042d9fe" title="Configuration API: Sets the given producer for the listed queues">set_producer</a>(string producer, queue_names[]);
<a name="l00059"></a>00059   extern function bit <a class="code" href="classcl__syoscb__cfg.html#a87bbd8f8fbf1e94ba0f64fa971ae06db" title="Configuration API: Checks if a given producer exists">exist_producer</a>(string producer);
<a name="l00060"></a>00060   extern function void <a class="code" href="classcl__syoscb__cfg.html#a1ba596973a206feb7c4cf617485dca3f" title="Configuration API: Returns all producers as string list">get_producers</a>(output string producers[]);
<a name="l00061"></a>00061   extern function string <a class="code" href="classcl__syoscb__cfg.html#a6a015afd02c4aea850269eb4341517fe" title="Configuration API: Gets the primary queue.">get_primary_queue</a>();
<a name="l00062"></a>00062   extern function bit <a class="code" href="classcl__syoscb__cfg.html#af78cc5be3554089d3726e2f48e06b298" title="Configuration API: Sets the primary queue.">set_primary_queue</a>(string primary_queue_name);
<a name="l00063"></a>00063   extern function void <a class="code" href="classcl__syoscb__cfg.html#a155c593c718b8b762e42f09d0c860dc2" title="Configuration API: Set the value of the disable_clone member variable">set_disable_clone</a>(bit dc);
<a name="l00064"></a>00064   extern function bit <a class="code" href="classcl__syoscb__cfg.html#ab96e7f30252ad10aa193cc34d4de918d" title="Configuration API: Get the value of the disable_clone member variable">get_disable_clone</a>();
<a name="l00065"></a>00065   extern function void <a class="code" href="classcl__syoscb__cfg.html#a96600ba778f0dbc1978e57d8c074daf4" title="Configuration API: Set the maximum number of items allowed for a given queue.">set_max_queue_size</a>(string queue_name, int unsigned mqs);
<a name="l00066"></a>00066   extern function int unsigned <a class="code" href="classcl__syoscb__cfg.html#adf0dbd3835b9434d98481448261bf7c5" title="Configuration API: Returns the maximum number of allowed items for a given queue...">get_max_queue_size</a>(string queue_name);
<a name="l00067"></a>00067   extern function string get_scb_name();
<a name="l00068"></a>00068   extern function void set_scb_name(string scb_name);
<a name="l00069"></a>00069 endclass : <a class="code" href="classcl__syoscb__cfg.html" title="Configuration class for the SyoSil UVM scoreboard.">cl_syoscb_cfg</a>
<a name="l00070"></a>00070 
<a name="l00071"></a>00071 function <a class="code" href="classcl__syoscb__cfg.html" title="Configuration class for the SyoSil UVM scoreboard.">cl_syoscb_cfg</a>::new(string name = &quot;cl_syoscb_cfg&quot;);
<a name="l00072"></a>00072   super.new(name);
<a name="l00073"></a>00073 endfunction: new
<a name="l00074"></a>00074 <span class="comment"></span>
<a name="l00075"></a>00075 <span class="comment">/// &lt;b&gt;Configuration API:&lt;/b&gt; Returns a queue handle for the specificed queue</span>
<a name="l00076"></a><a class="code" href="classcl__syoscb__cfg.html#ab0c58393e3df2c575ee49044dd0bb9f7">00076</a> <span class="comment"></span>function <a class="code" href="classcl__syoscb__queue.html" title="Class which base concet of a queue.">cl_syoscb_queue</a> <a class="code" href="classcl__syoscb__cfg.html" title="Configuration class for the SyoSil UVM scoreboard.">cl_syoscb_cfg</a>::<a class="code" href="classcl__syoscb__cfg.html#ab0c58393e3df2c575ee49044dd0bb9f7" title="Configuration API: Returns a queue handle for the specificed queue">get_queue</a>(string queue_name);
<a name="l00077"></a>00077   <span class="comment">// If queue does not exist then return NULL</span>
<a name="l00078"></a>00078   if(!this.exist_queue(queue_name)) begin
<a name="l00079"></a>00079     `uvm_info(&quot;CFG_ERROR&quot;, $sformatf(&quot;[%s]: Queue: %0s is not found&quot;, this.scb_name, queue_name), UVM_DEBUG);
<a name="l00080"></a>00080     return(null);
<a name="l00081"></a>00081   end
<a name="l00082"></a>00082 
<a name="l00083"></a>00083   return(this.queues[queue_name]);
<a name="l00084"></a>00084 endfunction: <a class="code" href="classcl__syoscb__cfg.html#ab0c58393e3df2c575ee49044dd0bb9f7" title="Configuration API: Returns a queue handle for the specificed queue">get_queue</a>
<a name="l00085"></a>00085 <span class="comment"></span>
<a name="l00086"></a>00086 <span class="comment">/// &lt;b&gt;Configuration API:&lt;/b&gt; Sets the queue object for a given queue</span>
<a name="l00087"></a><a class="code" href="classcl__syoscb__cfg.html#ad30805eb6ea6a074b2673325177ddc4a">00087</a> <span class="comment"></span>function void <a class="code" href="classcl__syoscb__cfg.html" title="Configuration class for the SyoSil UVM scoreboard.">cl_syoscb_cfg</a>::<a class="code" href="classcl__syoscb__cfg.html#ad30805eb6ea6a074b2673325177ddc4a" title="Configuration API: Sets the queue object for a given queue">set_queue</a>(string queue_name, cl_syoscb_queue queue);
<a name="l00088"></a>00088   this.queues[queue_name] = queue;
<a name="l00089"></a>00089 endfunction: <a class="code" href="classcl__syoscb__cfg.html#ad30805eb6ea6a074b2673325177ddc4a" title="Configuration API: Sets the queue object for a given queue">set_queue</a>
<a name="l00090"></a>00090 <span class="comment"></span>
<a name="l00091"></a>00091 <span class="comment">/// &lt;b&gt;Configuration API:&lt;/b&gt; Returns all queue names a string list</span>
<a name="l00092"></a><a class="code" href="classcl__syoscb__cfg.html#a3da7c1920ef35cfe8b2b030ddd80e1ee">00092</a> <span class="comment"></span>function void <a class="code" href="classcl__syoscb__cfg.html" title="Configuration class for the SyoSil UVM scoreboard.">cl_syoscb_cfg</a>::<a class="code" href="classcl__syoscb__cfg.html#a3da7c1920ef35cfe8b2b030ddd80e1ee" title="Configuration API: Returns all queue names a string list">get_queues</a>(output string queue_names[]);
<a name="l00093"></a>00093   string queue_name;
<a name="l00094"></a>00094   int    unsigned idx = 0;
<a name="l00095"></a>00095 
<a name="l00096"></a>00096   queue_names = new[this.queues.size()];
<a name="l00097"></a>00097 
<a name="l00098"></a>00098   while(this.queues.next(queue_name)) begin
<a name="l00099"></a>00099     queue_names[idx++] = queue_name;
<a name="l00100"></a>00100   end
<a name="l00101"></a>00101 endfunction: <a class="code" href="classcl__syoscb__cfg.html#a3da7c1920ef35cfe8b2b030ddd80e1ee" title="Configuration API: Returns all queue names a string list">get_queues</a>
<a name="l00102"></a>00102 <span class="comment"></span>
<a name="l00103"></a>00103 <span class="comment">/// &lt;b&gt;Configuration API:&lt;/b&gt; Will set the legal queues when provides with a list of queue names.</span>
<a name="l00104"></a>00104 <span class="comment">/// An example could be: set_queues({&quot;Q1&quot;, &quot;Q2&quot;})</span>
<a name="l00105"></a>00105 <span class="comment">/// Will set the max_queue_size for each queue to 0 (no limit) as default</span>
<a name="l00106"></a><a class="code" href="classcl__syoscb__cfg.html#a676fd117aa8f2d4d0f1a81da0a0efe63">00106</a> <span class="comment"></span>function void <a class="code" href="classcl__syoscb__cfg.html" title="Configuration class for the SyoSil UVM scoreboard.">cl_syoscb_cfg</a>::<a class="code" href="classcl__syoscb__cfg.html#a676fd117aa8f2d4d0f1a81da0a0efe63" title="Configuration API: Will set the legal queues when provides with a list of queue names...">set_queues</a>(string queue_names[]);
<a name="l00107"></a>00107   foreach(queue_names[i]) begin
<a name="l00108"></a>00108     this.queues[queue_names[i]] = null;
<a name="l00109"></a>00109 
<a name="l00110"></a>00110     <span class="comment">// Set default max queue size to no limit</span>
<a name="l00111"></a>00111     this.max_queue_size[queue_names[i]] = 0;
<a name="l00112"></a>00112   end
<a name="l00113"></a>00113 endfunction: <a class="code" href="classcl__syoscb__cfg.html#a676fd117aa8f2d4d0f1a81da0a0efe63" title="Configuration API: Will set the legal queues when provides with a list of queue names...">set_queues</a>
<a name="l00114"></a>00114 <span class="comment"></span>
<a name="l00115"></a>00115 <span class="comment">/// &lt;b&gt;Configuration API:&lt;/b&gt; Returns 1&apos;b0 if the queue does not exist and 1&apos;b1 if it exists</span>
<a name="l00116"></a><a class="code" href="classcl__syoscb__cfg.html#a32d8529ecaa50ec267d0c348138a2a2f">00116</a> <span class="comment"></span>function bit <a class="code" href="classcl__syoscb__cfg.html" title="Configuration class for the SyoSil UVM scoreboard.">cl_syoscb_cfg</a>::<a class="code" href="classcl__syoscb__cfg.html#a32d8529ecaa50ec267d0c348138a2a2f" title="Configuration API: Returns 1&amp;#39;b0 if the queue does not exist and 1&amp;#39;b1 if it...">exist_queue</a>(string queue_name);
<a name="l00117"></a>00117   return(this.queues.exists(queue_name)==0 ? 1&apos;b0 : 1&apos;b1);
<a name="l00118"></a>00118 endfunction
<a name="l00119"></a>00119 <span class="comment"></span>
<a name="l00120"></a>00120 <span class="comment">/// &lt;b&gt;Configuration API:&lt;/b&gt; Returns the number of queues</span>
<a name="l00121"></a><a class="code" href="classcl__syoscb__cfg.html#ab1d0b6caf28edd029d164cc9d64d0fe6">00121</a> <span class="comment"></span>function int unsigned <a class="code" href="classcl__syoscb__cfg.html" title="Configuration class for the SyoSil UVM scoreboard.">cl_syoscb_cfg</a>::<a class="code" href="classcl__syoscb__cfg.html#ab1d0b6caf28edd029d164cc9d64d0fe6" title="Configuration API: Returns the number of queues">size_queues</a>();
<a name="l00122"></a>00122   return(this.queues.size());
<a name="l00123"></a>00123 endfunction
<a name="l00124"></a>00124 <span class="comment"></span>
<a name="l00125"></a>00125 <span class="comment">/// &lt;b&gt;Configuration API:&lt;/b&gt; Gets the given producer object for a specified producer</span>
<a name="l00126"></a><a class="code" href="classcl__syoscb__cfg.html#a50b5ce00366256269397f516bf166269">00126</a> <span class="comment"></span>function cl_syoscb_cfg_pl <a class="code" href="classcl__syoscb__cfg.html" title="Configuration class for the SyoSil UVM scoreboard.">cl_syoscb_cfg</a>::<a class="code" href="classcl__syoscb__cfg.html#a50b5ce00366256269397f516bf166269" title="Configuration API: Gets the given producer object for a specified producer">get_producer</a>(string producer);
<a name="l00127"></a>00127   if(this.exist_producer(producer)) begin
<a name="l00128"></a>00128     return(this.producers[producer]);
<a name="l00129"></a>00129   end else begin
<a name="l00130"></a>00130     `uvm_info(&quot;CFG_ERROR&quot;, $sformatf(&quot;[%s]: Unable to get producer: %s&quot;, this.scb_name, producer), UVM_DEBUG);
<a name="l00131"></a>00131     return(null);
<a name="l00132"></a>00132   end
<a name="l00133"></a>00133 endfunction: <a class="code" href="classcl__syoscb__cfg.html#a50b5ce00366256269397f516bf166269" title="Configuration API: Gets the given producer object for a specified producer">get_producer</a>
<a name="l00134"></a>00134 <span class="comment"></span>
<a name="l00135"></a>00135 <span class="comment">/// &lt;b&gt;Configuration API:&lt;/b&gt; Sets the given producer for the listed queues</span>
<a name="l00136"></a><a class="code" href="classcl__syoscb__cfg.html#a9386a9f42400830a58a629f22042d9fe">00136</a> <span class="comment"></span>function bit <a class="code" href="classcl__syoscb__cfg.html" title="Configuration class for the SyoSil UVM scoreboard.">cl_syoscb_cfg</a>::<a class="code" href="classcl__syoscb__cfg.html#a9386a9f42400830a58a629f22042d9fe" title="Configuration API: Sets the given producer for the listed queues">set_producer</a>(string producer, queue_names[]);
<a name="l00137"></a>00137   cl_syoscb_cfg_pl prod_list;
<a name="l00138"></a>00138 
<a name="l00139"></a>00139   <span class="comment">// Check that all queues exists</span>
<a name="l00140"></a>00140   begin
<a name="l00141"></a>00141     bit unique_queue_name[string];
<a name="l00142"></a>00142 
<a name="l00143"></a>00143     foreach (queue_names[i]) begin
<a name="l00144"></a>00144       if(!unique_queue_name.exists(queue_names[i])) begin
<a name="l00145"></a>00145         unique_queue_name[queue_names[i]] = 1&apos;b1;
<a name="l00146"></a>00146       end else begin
<a name="l00147"></a>00147         `uvm_info(&quot;CFG_ERROR&quot;, $sformatf(&quot;[%s]: Unable to set producer: %s. List of queue names contains dublicates&quot;, this.scb_name, producer), UVM_DEBUG);
<a name="l00148"></a>00148         return(1&apos;b0);
<a name="l00149"></a>00149       end
<a name="l00150"></a>00150 
<a name="l00151"></a>00151       <span class="comment">// If queue does not exist then return 1&apos;b0</span>
<a name="l00152"></a>00152       if(!this.exist_queue(queue_names[i])) begin
<a name="l00153"></a>00153         `uvm_info(&quot;CFG_ERROR&quot;, $sformatf(&quot;[%s]: Queue: %0s is not found&quot;, this.scb_name, queue_names[i]), UVM_DEBUG);
<a name="l00154"></a>00154         return(1&apos;b0);
<a name="l00155"></a>00155       end
<a name="l00156"></a>00156     end
<a name="l00157"></a>00157   end
<a name="l00158"></a>00158 
<a name="l00159"></a>00159   <span class="comment">// All queues exist -&gt; set the producer</span>
<a name="l00160"></a>00160   prod_list = new();                    <span class="comment">// Create producer list</span>
<a name="l00161"></a>00161   prod_list.set_list(queue_names);      <span class="comment">// Set queue names in producer list</span>
<a name="l00162"></a>00162   this.producers[producer] = prod_list; <span class="comment">// Set producer list for producer</span>
<a name="l00163"></a>00163 
<a name="l00164"></a>00164   <span class="comment">// Return 1&apos;b1 since all is good</span>
<a name="l00165"></a>00165   return(1&apos;b1);
<a name="l00166"></a>00166 endfunction: <a class="code" href="classcl__syoscb__cfg.html#a9386a9f42400830a58a629f22042d9fe" title="Configuration API: Sets the given producer for the listed queues">set_producer</a>
<a name="l00167"></a>00167 <span class="comment"></span>
<a name="l00168"></a>00168 <span class="comment">/// &lt;b&gt;Configuration API:&lt;/b&gt; Checks if a given producer exists</span>
<a name="l00169"></a><a class="code" href="classcl__syoscb__cfg.html#a87bbd8f8fbf1e94ba0f64fa971ae06db">00169</a> <span class="comment"></span>function bit <a class="code" href="classcl__syoscb__cfg.html" title="Configuration class for the SyoSil UVM scoreboard.">cl_syoscb_cfg</a>::<a class="code" href="classcl__syoscb__cfg.html#a87bbd8f8fbf1e94ba0f64fa971ae06db" title="Configuration API: Checks if a given producer exists">exist_producer</a>(string producer);
<a name="l00170"></a>00170   return(this.producers.exists(producer)==0 ? 1&apos;b0 : 1&apos;b1);
<a name="l00171"></a>00171 endfunction
<a name="l00172"></a>00172 <span class="comment"></span>
<a name="l00173"></a>00173 <span class="comment">/// &lt;b&gt;Configuration API:&lt;/b&gt; Returns all producers as string list</span>
<a name="l00174"></a><a class="code" href="classcl__syoscb__cfg.html#a1ba596973a206feb7c4cf617485dca3f">00174</a> <span class="comment"></span>function void <a class="code" href="classcl__syoscb__cfg.html" title="Configuration class for the SyoSil UVM scoreboard.">cl_syoscb_cfg</a>::<a class="code" href="classcl__syoscb__cfg.html#a1ba596973a206feb7c4cf617485dca3f" title="Configuration API: Returns all producers as string list">get_producers</a>(output string producers[]);
<a name="l00175"></a>00175   string producer;
<a name="l00176"></a>00176   int    unsigned idx = 0;
<a name="l00177"></a>00177 
<a name="l00178"></a>00178   producers = new[this.producers.size()];
<a name="l00179"></a>00179 
<a name="l00180"></a>00180   while(this.producers.next(producer)) begin
<a name="l00181"></a>00181     producers[idx++] = producer;
<a name="l00182"></a>00182   end
<a name="l00183"></a>00183 endfunction: <a class="code" href="classcl__syoscb__cfg.html#a1ba596973a206feb7c4cf617485dca3f" title="Configuration API: Returns all producers as string list">get_producers</a>
<a name="l00184"></a>00184 <span class="comment"></span>
<a name="l00185"></a>00185 <span class="comment">/// &lt;b&gt;Configuration API:&lt;/b&gt; Gets the primary queue.</span>
<a name="l00186"></a>00186 <span class="comment">/// The primary queue is used by the compare algorithms to select which queue to use as the primary one.</span>
<a name="l00187"></a><a class="code" href="classcl__syoscb__cfg.html#a6a015afd02c4aea850269eb4341517fe">00187</a> <span class="comment"></span>function string <a class="code" href="classcl__syoscb__cfg.html" title="Configuration class for the SyoSil UVM scoreboard.">cl_syoscb_cfg</a>::<a class="code" href="classcl__syoscb__cfg.html#a6a015afd02c4aea850269eb4341517fe" title="Configuration API: Gets the primary queue.">get_primary_queue</a>();
<a name="l00188"></a>00188   return(this.primary_queue);
<a name="l00189"></a>00189 endfunction: <a class="code" href="classcl__syoscb__cfg.html#a6a015afd02c4aea850269eb4341517fe" title="Configuration API: Gets the primary queue.">get_primary_queue</a>
<a name="l00190"></a>00190 <span class="comment"></span>
<a name="l00191"></a>00191 <span class="comment">/// &lt;b&gt;Configuration API:&lt;/b&gt; Sets the primary queue.</span>
<a name="l00192"></a>00192 <span class="comment">/// The primary queue is used by the compare algorithms to select which queue to use as the primary one.</span>
<a name="l00193"></a><a class="code" href="classcl__syoscb__cfg.html#af78cc5be3554089d3726e2f48e06b298">00193</a> <span class="comment"></span>function bit <a class="code" href="classcl__syoscb__cfg.html" title="Configuration class for the SyoSil UVM scoreboard.">cl_syoscb_cfg</a>::<a class="code" href="classcl__syoscb__cfg.html#af78cc5be3554089d3726e2f48e06b298" title="Configuration API: Sets the primary queue.">set_primary_queue</a>(string primary_queue_name);
<a name="l00194"></a>00194   <span class="comment">// If queue does not exist then return 1&apos;b0</span>
<a name="l00195"></a>00195   if(!this.exist_queue(primary_queue_name)) begin
<a name="l00196"></a>00196     `uvm_info(&quot;CFG_ERROR&quot;, $sformatf(&quot;[%s]: Queue: %0s is not found&quot;, this.scb_name, primary_queue_name), UVM_DEBUG);
<a name="l00197"></a>00197     return(1&apos;b0);
<a name="l00198"></a>00198   end
<a name="l00199"></a>00199 
<a name="l00200"></a>00200   <span class="comment">// Set the primary queue</span>
<a name="l00201"></a>00201   this.primary_queue = primary_queue_name;
<a name="l00202"></a>00202 
<a name="l00203"></a>00203   <span class="comment">// Return 1&apos;b1 since all is good</span>
<a name="l00204"></a>00204   return(1&apos;b1);
<a name="l00205"></a>00205 endfunction: <a class="code" href="classcl__syoscb__cfg.html#af78cc5be3554089d3726e2f48e06b298" title="Configuration API: Sets the primary queue.">set_primary_queue</a>
<a name="l00206"></a>00206 <span class="comment"></span>
<a name="l00207"></a>00207 <span class="comment">/// &lt;b&gt;Configuration API:&lt;/b&gt; Set the value of the disable_clone member variable</span>
<a name="l00208"></a><a class="code" href="classcl__syoscb__cfg.html#a155c593c718b8b762e42f09d0c860dc2">00208</a> <span class="comment"></span>function void <a class="code" href="classcl__syoscb__cfg.html" title="Configuration class for the SyoSil UVM scoreboard.">cl_syoscb_cfg</a>::<a class="code" href="classcl__syoscb__cfg.html#a155c593c718b8b762e42f09d0c860dc2" title="Configuration API: Set the value of the disable_clone member variable">set_disable_clone</a>(bit dc);
<a name="l00209"></a>00209   this.disable_clone = dc;
<a name="l00210"></a>00210 endfunction
<a name="l00211"></a>00211 <span class="comment"></span>
<a name="l00212"></a>00212 <span class="comment">/// &lt;b&gt;Configuration API:&lt;/b&gt; Get the value of the disable_clone member variable</span>
<a name="l00213"></a><a class="code" href="classcl__syoscb__cfg.html#ab96e7f30252ad10aa193cc34d4de918d">00213</a> <span class="comment"></span>function bit <a class="code" href="classcl__syoscb__cfg.html" title="Configuration class for the SyoSil UVM scoreboard.">cl_syoscb_cfg</a>::<a class="code" href="classcl__syoscb__cfg.html#ab96e7f30252ad10aa193cc34d4de918d" title="Configuration API: Get the value of the disable_clone member variable">get_disable_clone</a>();
<a name="l00214"></a>00214   return(this.disable_clone);
<a name="l00215"></a>00215 endfunction
<a name="l00216"></a>00216 <span class="comment"></span>
<a name="l00217"></a>00217 <span class="comment">/// &lt;b&gt;Configuration API:&lt;/b&gt; Set the maximum number of items allowed for a given queue.</span>
<a name="l00218"></a>00218 <span class="comment">/// 0 (no limit) is default</span>
<a name="l00219"></a><a class="code" href="classcl__syoscb__cfg.html#a96600ba778f0dbc1978e57d8c074daf4">00219</a> <span class="comment"></span>function void <a class="code" href="classcl__syoscb__cfg.html" title="Configuration class for the SyoSil UVM scoreboard.">cl_syoscb_cfg</a>::<a class="code" href="classcl__syoscb__cfg.html#a96600ba778f0dbc1978e57d8c074daf4" title="Configuration API: Set the maximum number of items allowed for a given queue.">set_max_queue_size</a>(string queue_name, int unsigned mqs);
<a name="l00220"></a>00220   if(this.exist_queue(queue_name)) begin
<a name="l00221"></a>00221     this.max_queue_size[queue_name] = mqs;
<a name="l00222"></a>00222   end else begin
<a name="l00223"></a>00223     `uvm_fatal(&quot;CFG_ERROR&quot;, $sformatf(&quot;[%s]: Queue: %s not found when trying to set max_queue_size&quot;, this.scb_name, queue_name))  
<a name="l00224"></a>00224   end
<a name="l00225"></a>00225 endfunction
<a name="l00226"></a>00226 <span class="comment"></span>
<a name="l00227"></a>00227 <span class="comment">/// &lt;b&gt;Configuration API:&lt;/b&gt; Returns the maximum number of allowed items for a given queue.</span>
<a name="l00228"></a>00228 <span class="comment">/// 0 (no limit) is default</span>
<a name="l00229"></a><a class="code" href="classcl__syoscb__cfg.html#adf0dbd3835b9434d98481448261bf7c5">00229</a> <span class="comment"></span>function int unsigned <a class="code" href="classcl__syoscb__cfg.html" title="Configuration class for the SyoSil UVM scoreboard.">cl_syoscb_cfg</a>::<a class="code" href="classcl__syoscb__cfg.html#adf0dbd3835b9434d98481448261bf7c5" title="Configuration API: Returns the maximum number of allowed items for a given queue...">get_max_queue_size</a>(string queue_name);
<a name="l00230"></a>00230   if(this.exist_queue(queue_name)) begin
<a name="l00231"></a>00231     return(this.max_queue_size[queue_name]);
<a name="l00232"></a>00232   end else begin
<a name="l00233"></a>00233     `uvm_fatal(&quot;CFG_ERROR&quot;, $sformatf(&quot;[%s]: Queue: %s not found when trying to get max_queue_size&quot;, this.scb_name, queue_name))
<a name="l00234"></a>00234     return(0);
<a name="l00235"></a>00235   end
<a name="l00236"></a>00236 endfunction
<a name="l00237"></a>00237 
<a name="l00238"></a>00238 function string <a class="code" href="classcl__syoscb__cfg.html" title="Configuration class for the SyoSil UVM scoreboard.">cl_syoscb_cfg</a>::get_scb_name();
<a name="l00239"></a>00239   return(this.scb_name);
<a name="l00240"></a>00240 endfunction: get_scb_name
<a name="l00241"></a>00241 
<a name="l00242"></a>00242 function void <a class="code" href="classcl__syoscb__cfg.html" title="Configuration class for the SyoSil UVM scoreboard.">cl_syoscb_cfg</a>::set_scb_name(string scb_name);
<a name="l00243"></a>00243   this.scb_name = scb_name;
<a name="l00244"></a>00244 endfunction: set_scb_name
</pre></div></div>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&nbsp;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&nbsp;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&nbsp;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&nbsp;</span>Variables</a></div>
 
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>
 
<!--*************************************************************************-->
<!-- $Id: idv_dox_footer.html 136 2010-05-31 19:13:27Z seanoboyle $          -->
<!--*************************************************************************-->
<!--   This program is free software: you can redistribute it and/or modify  -->
<!--   it under the terms of the GNU General Public License as published by  -->
<!--   the Free Software Foundation, either version 3 of the License, or     -->
<!--   (at your option) any later version.                                   -->
<!--                                                                         -->
<!--   This program is distributed in the hope that it will be useful,       -->
<!--   but WITHOUT ANY WARRANTY; without even the implied warranty of        -->
<!--   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         -->
<!--   GNU General Public License for more details.                          -->
<!--                                                                         -->
<!--   You should have received a copy of the GNU General Public License     -->
<!--   along with this program.  If not, see http://www.gnu.org/licenses/.   -->
<!--                                                                         -->
<!--*************************************************************************-->
<!-- Title:        IDV Doxygen Footer File                                   -->
<!-- Description:  This file is a doxygen footer with the IDV logo and a     -->
<!--               and a reference to the GNU FDL License.                   -->
<!--                                                                         -->
<!-- Original Author: Sean O'Boyle                                           -->
<!-- Contact:         seanoboyle@intelligentdv.com                           -->
<!-- Company:         Intelligent Design Verification                        -->
<!-- Company URL:     http://intelligentdv.com                               -->
<!--                                                                         -->
<!-- Download the most recent version here:                                  -->
<!--                  http://intelligentdv.com/downloads                     -->
<!--                                                                         -->
<!-- File Bugs Here:  http://bugs.intelligentdv.com                          -->
<!--        Project:  DoxygenFilterSV                                        -->
<!--                                                                         -->
<!-- File: idv_dox_header.xml                                                -->
<!-- $LastChangedBy: seanoboyle $                                            -->
<!-- $LastChangedDate: 2010-05-31 12:13:27 -0700 (Mon, 31 May 2010) $        -->
<!-- $LastChangedRevision: 136 $                                             -->
<!--                                                                         -->
<!--*************************************************************************-->
 
<br>
<table border="1" width = "100%">
  <tr>
    <td width = "20%">
     <img src="syosil.jpg">
    </td>
    <td width = "60%">
       <address style="text-align: center;">
       Project: SyoSil ApS UVM Scoreboard, Revision: 1.0.2.5<br>
       <br>
       Copyright 2014-2015 SyoSil ApS<br>
       All Rights Reserved Worldwide<br>
       <br>
      Licensed under the Apache License, Version 2.0 (the "License"); you may not
      use this file except in compliance with the License.  You may obtain a copy of
      the License at<br>
      <br>
       <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a><br>
      <br>
      Unless required by applicable law or agreed to in writing, software distributed under the License is
      distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
      implied. See the License for the specific language governing permissions and limitations under
      the License.
      </address>
    </td>
    <td width = "20%">
      <address style="text-align: right;"><small>
      <a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a><br>
      <a href="http://www.doxygen.org/index.html">Doxygen</a> Version: 1.6.1<br>
      <a href="http://www.intelligentdv.com/index.html">IDV SV Filter</a> Version: 2.6.2<br>
      Sat Nov 28 05:41:54 2015</small></address>
   </td>
  </tr>
</table>
<address style="text-align: left;"><small>
Find a documentation bug?  Report bugs to: <a href="http://bugs.intelligentdv.com/">bugs.intelligentdv.com</a> Project: DoxygenFilterSV
</small></address>
</body>
</html>
 

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.