Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class spi_flash_component extends uvm_driver #(uvm_sequence_item, REQ);
- //-------------------------------------------------------------------------------
- // Interface, port, fields
- //-------------------------------------------------------------------------------
- /**** Discribe them in this feald ****/
- // virtual xx_if ...
- //-------------------------------------------------------------------------------
- // Factory register
- //-------------------------------------------------------------------------------
- `uvm_component_utils(spi_flash_component)
- //`uvm_component_utils_begin(spi_flash_component)
- /**** `uvm_field_* macro invocations here ****/
- //`uvm_component_utils_end
- //-------------------------------------------------------------------------------
- // Functions and Tasks
- //-------------------------------------------------------------------------------
- // Constructor
- function new(string name = "spi_flash_component", uvm_component parent=null);
- super.new(name, parent);
- endfunction
- //-----------------------------------------------------------------------------
- // User Methods
- //-----------------------------------------------------------------------------
- /**** Discribe them in this feald ****/
- //-----------------------------------------------------------------------------
- // Build Phases
- //-----------------------------------------------------------------------------
- // build
- virtual function void build_phase(uvm_phase phase);
- // super.build_phase(phase);
- /**** Write body of this function ****/
- endfunction
- //-----------------------------------------------------------------------------
- // Run Phases
- //-----------------------------------------------------------------------------
- // run
- virtual task run_phase(uvm_phase phase);
- super.run_phase(phase);
- phase.raise_objection(this);
- /**** Write body of this task ****/
- phase.drop_objection(this);
- endtask
- endclass
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement