• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Functional Verification
  3. Integrating single vr_ad with multiple instance of AXI ...

Stats

  • Locked Locked
  • Replies 1
  • Subscribers 64
  • Views 12949
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Integrating single vr_ad with multiple instance of AXI eVCs

Kamal
Kamal over 16 years ago
Hi, I am trying to integrate the vr_ad (Cadence utility) into my environment. I have a situation that there are multiple instances of AXI which will try to access a single vr_ad. Please provide me with an example... Thanks, Skamal
  • Cancel
  • Kamal
    Kamal over 16 years ago

    Hi,

    I integrated vr_ad into axi using the code below

    extend sys{
      addr_map : vr_ad_map;
      reg_driver : vr_ad_sequence_ driver is instance;
      keep reg_driver.addr_ map == value(addr_map) ;
      keep soft reg_driver.default_ bfm_sd == axi_evc.active_ masters[0] .driver ;
      
      reg_file : REG1 vr_ad_reg_file;

      post_generate( ) is also {
     addr_map.add_ with_offset( 0x0070000, reg_file) ;
      };
    };

     

    extend vr_axi_master_ driver {
      rdata : list of vr_axi_memory_ entry;
      keep rdata.size() ==0;
      vr_ad_execute_ op(operation : vr_ad_operation) : list of byte @clock is {
      if operation is a REG vr_ad_operation (op) {
      var i : uint;
      var lod : list of vr_axi_data_ t;
      var rsize : vr_axi_transfer_ size_t;
      var bkind : vr_axi_burst_ kind_t;
      var write_response : vr_axi_response_ t;
      var read_data : list of vr_axi_memory_ entry;
      
      rsize = ilog2(op.reg. get_size( )).as_a(vr_ axi_transfer_ size_t);
      bkind = FIXED;
      
      if operation.direction == WRITE {
      // Write a single register
      lod.add(op.reg. read_reg_ val().as_ a(vr_axi_ data_t));
      write_response = sequence.write_ burst(op. address, 1, rsize, bkind, lod);
      } else {
      for {i=0;i<op.reg.get_size( );i+=1} {
      result.add(0x0) ;
      };
      rdata = sequence.read_ burst(op. address, 1, rsize, bkind);
      for each (e) in rdata {
      result.add(e. data);
      };
      }; 
      };
      };
    };

     

    //////////// ///////// ///////// ///////// ///////// ///////// ///////// ////
    // 3. Extending the monitor to update the register model.
    //////////// ///////// ///////// ///////// ///////// ///////// ///////// ////
      

    extend vr_axi_agent_ monitor {
      
      on write_burst_ ended {
      if (cur_write_transfer .p_burst. as_a(WRITE' direction vr_axi_monitor_ burst).resp == OKAY) {
      var current_data : list of byte = get_data_from_ transfer( cur_write_ transfer) ;

      if cur_write_transfer. address in [0x0070000.. 0x7FFFFF] then {
      sys.addr_map. update(cur_ write_transfer. address, current_data, {});
      out("vr_ad current write ADDRESS is ",cur_write_ transfer. address);
      out("vr_ad current write DATA is ",current_data) ;
      };
      };
      };
      
      on read_burst_ended {
      if (cur_read_transfer. resp == OKAY) {
      var current_data : list of byte = get_data_from_ transfer( cur_read_ transfer) ;
      if cur_read_transfer. address in [0x0070000.. 0x7FFFFF] then {
     compute sys.addr_map. compare_and_ update(cur_ read_transfer. address, current_data) ;
      out("vr_ad current read ADDRESS is ",cur_read_transfer .address) ;
      out("vr_ad current read DATA is ",current_data) ;
      };
      };
      };
      
      get_data_from_ transfer( c_trans: vr_axi_monitor_ transfer) : list of byte is {
      var num_of_bytes : uint = (1<<c_trans.p_burst. size.as_a( uint));
      for i from 0 to (num_of_bytes - 1) {
      result.add(c_ trans.data[ ((i+1) * 8) -1:i*8].as_a( byte));
      };
      };
    };

     


    I am trying to write virtual sequence for the vr_ad  like this :


    sequence vr_ad_virtual_ sequence;


    extend vr_ad_virtual_ sequence_ driver {
     seq_drv : vr_ad_sequence_ driver;
      event clock is only @sys.any;
    };

    extend sys {
      edriver1 : vr_ad_sequence_ driver is instance;
      virt_drv : vr_ad_virtual_ sequence_ driver is instance;

     keep virt_drv.seq_ drv == edriver1;

    };

    extend MAIN vr_ad_sequence {
      keep count == 0;
    };


    extend MAIN vr_ad_virtual_ sequence {

      !vr_ad_config : vr_ad_sequence;

      body()@driver. clock is only {

     do vr_ad_config keeping {
      .driver == driver.seq_drv;
     };
      };
    };

     


    But after running the environment I am getting the following error:


    *** Error: Contradiction:
      A contradiction has occurred when generating vr_ad_sequence- @1892.(search_ from.get_ all_regs( ).all(.kind= =reg_kind) ) :
      Previous constraints reduced its range of possible values,
      then the following constraint contradicted these values:
      it is a vr_ad_reg (r) and r in* at line 43 in @vr_ad_predefined_ seq
      Reduced: vr_ad_sequence- @1892.(search_ from.get_ all_regs( ).all(.kind= =reg_kind) ) from [0x1..0xffffffff] items into [ items
      Using: == { vr_ad_map-@1 }
    For more details, open Generation Debugger

      *** Error: Error during tick command


    Can any one please figure out the error I am doing and why this error is occuring.


    Thanks,

    S Kamal.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information