EDA Playground lets you type in and run HDL code (using a selection of free and commercial simulators and synthesizers).
It's great for learning HDLs, it's great for testing out unfamiliar things and it's great for sharing code.
You can start typing straight away. But to run your code, you'll need to sign or log in. Logging in with a Google account gives you access to all non-commercial simulators and some commercial simulators:
To run commercial simulators, you need to register and log in with a username and password. Registration is free, and only pre-approved email's will have access to the commercial simulators.
* ModelSim 10.1d not available.
209
import uvm_pkg::*;
// This class contains a property that can be set
// from the command line.
class my_agent extends uvm_agent;
// This property can be set from the command line like:
// +uvm_set_config_int=*,mode,5
int mode;
`uvm_component_utils_begin(my_agent)
`uvm_field_int(mode, UVM_ALL_ON)
`uvm_component_utils_end
function new(string name = "my_agent", uvm_component parent = null);
super.new(name, parent);
endfunction
endclass
// The UVM test
class my_test extends uvm_test;
`uvm_component_utils(my_test)
my_agent agent;
function new(string name = "my_test", uvm_component parent = null);
super.new(name, parent);
uvm_component::print_config_matches = 1;
endfunction
function void build_phase(uvm_phase phase);
agent = my_agent::type_id::create("my_agent", this);
endfunction: build_phase
task run_phase(uvm_phase phase);
`uvm_info("my_test",
$sformatf("Running test with mode %0d", agent.mode),
UVM_LOW)
endtask: run_phase
endclass
module top_tb;
// Start UVM
initial begin
run_test("my_test");
end
endmodule
xxxxxxxxxx
Your account is not validated. If you wish to use commercial simulators, you need a validated account.
If you have already registered (or have recently changed your email address), but have not clicked on the link in the email we sent you, please do so. If you cannot find the email, please check your spam/junk folder. Or click here to resend the email.
If you have not already registered for a full account, you can do so by clicking below. You will then need to provide us with some identification information. You may wish to save your code first.
Creating, deleting, and renaming files is not supported during Collaboration. To encourage development of these features for Collaboration, tweet to @EDAPlayground
This playground may have been modified. Please save or copy before starting collaboration.
Your exercise has been submitted.