APB UVM Agent  0.0.1
apb_agent_config.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 * Encapsulates APB agent configuration settings.
22 *
23 * The configuration settings include the usual UVC knobs (active mode, coverage
24 * collection status) and knobs specific to APB arbitration. An important part
25 * of the configuration instance is a refernce to the APB bus interface.
26 *
27 * The configuration instance is to be created during the build phase of
28 * the agent's parent component, which is typically an environment and associated
29 * with an agent instance through a keyword lookup in the UVM Configuration DB.
30 */
31 class apb_agent_config extends uvm_object;
32 
33 // UVM Factory Registration Macro
34 //
35 `uvm_object_utils(apb_agent_config)
36 
37 //! Reference to the physical APB bus interface.
38 virtual apb_if APB;
39 
40 //------------------------------------------
41 // Data Members
42 //------------------------------------------
43 //! Identifies the usage mode of the agent. In the UVM_ACTIVE state, the agent
44 //! provides all the components for full control and monitoring of the APB bus.
45 //! In the UVM_PASSIVE mode, the agent provides only the bus monitoring functions.
46 uvm_active_passive_enum active = UVM_ACTIVE;
47 //! Makes the agent collect the functional coverage.
49 //! Sets the agent to include an APB RAM based scoreboard.
51 
52 //! Identifies the number of select lines used in the APB bus interface.
54 //! Identifies the select line used by an APB slave controlled and/or observed
55 //! by the APB agent.
56 int apb_index = 0;
57 //! Identifies the base address of an APB slave controlled and/or observed by
58 //! the APB agent.
59 logic[31:0] start_address[15:0];
60 //! @todo Missing description.
61 logic[31:0] range[15:0];
62 
63 //------------------------------------------
64 // Methods
65 //------------------------------------------
66 // Standard UVM Methods:
67 
68 /**
69 * Conventional constructor for UVM objects.
70 */
71 extern function new(
72  //! Name to be associated with the configuration instance in the UVM
73  //! Configuration DB.
74  string name = "apb_agent_config"
75 );
76 
77 endclass: apb_agent_config
78 
79 function apb_agent_config::new(string name = "apb_agent_config");
80  super.new(name);
81 endfunction
int no_select_lines
Identifies the number of select lines used in the APB bus interface.
logic< 31:0 > range[15:0]
bit has_functional_coverage
Makes the agent collect the functional coverage.
Encapsulates APB agent configuration settings.
new(string name="apb_agent_config")
Conventional constructor for UVM objects.
uvm_active_passive_enum active
Identifies the usage mode of the agent.
logic< 31:0 > start_address[15:0]
Identifies the base address of an APB slave controlled and/or observed by the APB agent...
interface apb_if(input PCLK, input PRESETn)
APB bus interface with very simple property checking.
Definition: apb_if.sv:4
bit has_scoreboard
Sets the agent to include an APB RAM based scoreboard.
int apb_index
Identifies the select line used by an APB slave controlled and/or observed by the APB agent...
uvm_object_utils(apb_agent_config) virtual apb_if APB
Reference to the physical APB bus interface.