APB UVM Agent  0.0.1
apb_seq.svh
Go to the documentation of this file.
1 //------------------------------------------------------------
2 // Copyright 2010 Mentor Graphics Corporation
3 // All Rights Reserved Worldwide
4 //
5 // Licensed under the Apache License, Version 2.0 (the
6 // "License"); you may not use this file except in
7 // compliance with the License. You may obtain a copy of
8 // the License at
9 //
10 // http://www.apache.org/licenses/LICENSE-2.0
11 //
12 // Unless required by applicable law or agreed to in
13 // writing, software distributed under the License is
14 // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
15 // CONDITIONS OF ANY KIND, either express or implied. See
16 // the License for the specific language governing
17 // permissions and limitations under the License.
18 //------------------------------------------------------------
19 
20 /**
21 * Executes a random APB transaction.
22 */
23 class apb_seq extends uvm_sequence #(apb_seq_item);
24 
25 // UVM Factory Registration Macro
26 //
27 `uvm_object_utils(apb_seq)
28 
29 //------------------------------------------
30 // Data Members (Outputs rand, inputs non-rand)
31 //------------------------------------------
32 
33 
34 //------------------------------------------
35 // Constraints
36 //------------------------------------------
37 
38 
39 
40 //------------------------------------------
41 // Methods
42 //------------------------------------------
43 
44 // Standard UVM Methods:
45 
46 /**
47 * Conventional UVM object constructor.
48 */
49 extern function new(string name = "apb_seq");
50 
51 /**
52 * Executes a single random APB transaction. The sequence neither publishes
53 * the details of the transaction, nor its results.
54 */
55 extern task body;
56 
57 endclass:apb_seq
58 
59 function apb_seq::new(string name = "apb_seq");
60  super.new(name);
61 endfunction
62 
64  apb_seq_item req;
65 
66  begin
67  req = apb_seq_item::type_id::create("req");
68  start_item(req);
69  if(!req.randomize()) begin
70  `uvm_error("body", "req randomization failure")
71  end
72  finish_item(req);
73  end
74 
75 endtask:body
Base APB transaction.
Executes a random APB transaction.
Definition: apb_seq.svh:23
task body()
Executes a single random APB transaction.
Definition: apb_seq.svh:63
uvm_object_utils(apb_seq) new(string name
Conventional UVM object constructor.