Advertisement
Guest User

Untitled

a guest
Apr 22nd, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class spi_flash_component extends uvm_driver #(uvm_sequence_item, REQ);
  2.  
  3. //-------------------------------------------------------------------------------
  4. // Interface, port, fields
  5. //-------------------------------------------------------------------------------
  6.  
  7.   /**** Discribe them in this feald ****/
  8.   // virtual xx_if ...
  9.  
  10. //-------------------------------------------------------------------------------
  11. // Factory register
  12. //-------------------------------------------------------------------------------
  13.  
  14.   `uvm_component_utils(spi_flash_component)
  15.   //`uvm_component_utils_begin(spi_flash_component)
  16.     /**** `uvm_field_* macro invocations here ****/
  17.   //`uvm_component_utils_end
  18.  
  19. //-------------------------------------------------------------------------------
  20. // Functions and Tasks
  21. //-------------------------------------------------------------------------------
  22.  
  23.   // Constructor
  24.   function new(string name = "spi_flash_component", uvm_component parent=null);
  25.     super.new(name, parent);
  26.   endfunction
  27.  
  28.   //-----------------------------------------------------------------------------
  29.   // User Methods
  30.   //-----------------------------------------------------------------------------
  31.  
  32.   /**** Discribe them in this feald ****/
  33.  
  34.   //-----------------------------------------------------------------------------
  35.   // Build Phases
  36.   //-----------------------------------------------------------------------------
  37.  
  38.   // build
  39.   virtual function void build_phase(uvm_phase phase);
  40.     // super.build_phase(phase);
  41.     /**** Write body of this function ****/
  42.   endfunction
  43.  
  44.   //-----------------------------------------------------------------------------
  45.   // Run Phases
  46.   //-----------------------------------------------------------------------------
  47.  
  48.   // run
  49.   virtual task run_phase(uvm_phase phase);
  50.     super.run_phase(phase);
  51.     phase.raise_objection(this);
  52.  
  53.     /**** Write body of this task ****/
  54.  
  55.     phase.drop_objection(this);
  56.   endtask
  57.  
  58. endclass
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement