• 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. I2C BFM

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 65
  • Views 14600
  • 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

I2C BFM

thescreen
thescreen over 15 years ago

hello
i am trying to use a free-of-charge verifcation IP from http://syswip.com cadence IUS08.20.001 and i am facing some issues i already contacted the authors (they support VCS: you may want to get the complete files from the URL above, it is free code, i do not think there are problems with that (registration is required, though)

i2c_vip/verification_ip/master/i2c_m.sv

- i had to comment lines 489, getting

     dataOutBuff = {};
                   |
ncvlog: *E,ILLPRI (.../i2c_vip/verification_ip/master/i2c_m.sv,489|19): illegal expression primary [4.2(IEEE)].

here is the chunk of code involved

  task readData(input int address, output bit8 dataOutBuff[$], input int lenght, genStop = 0);
    this.tr         = new();
    if(this.cfg.addrMode == 1) begin
      // 10 bit address mode
      this.writeData({6'b011110, address[9:8]}, {address[7:0]}, 0);
      this.tr.address = {6'b011110, address[9:8]};
      this.tr.genStop  = 1;
    end else begin
      // 7 bit address mode
      this.tr.genStop  = genStop;
      this.tr.address   = address;
    end
    TrNum++;
    this.tr.TrType  = I2C_m_busTrans::READ;
    this.tr.TrNum   = TrNum;
    this.tr.dataBuff = new[lenght];
    this.tr.dataLength = lenght;
    this.trInBox.put(this.tr);
    this.trOutBox.get(this.tr);
>>>>>>   dataOutBuff = {};
    for (int i = 0; i < lenght; i++) begin
      dataOutBuff[i] = this.tr.dataBuff[i];
    end
    this.tr = null;
  endtask

- as well as lines 128 and 135

    this.rand_mode(1);
                 |
ncvlog: *E,INAPFS (.../i2c_vip/verification_ip/master/i2c_m.sv,128|17): Inappropriate prefix for the specified built-in task/function.
    this.rand_mode(0);
                 |
ncvlog: *E,INAPFS (/i2c_vip/verification_ip/master/i2c_m.sv,135|17): Inappropriate prefix for the specified built-in task/function.

and here is the code

  task setRndDelay(int t_max, rndLevel);
    this.t_max    = t_max;
    this.rndLevel = rndLevel;
    this.c_timing.constraint_mode(1);
>>>>    this.rand_mode(1);
  endtask
  /////////////////////////////////////////////////////////////////////////////
  /*- setTiming(): Set I2C bus custom timing.*/
  /////////////////////////////////////////////////////////////////////////////
  task setTiming(time t_Low, t_High, t_HoldStart, t_SetupStart,
                              t_HoldData, t_SetupData, t_Buff, t_Valid, t_SetupStop);
>>>   this.rand_mode(0);
>>>    this.constraint_mode(0);
    this.t_Low        = t_Low;
    this.t_High       = t_High;
    this.t_HoldStart  = t_HoldStart;
    this.t_SetupStart = t_SetupStart;
    this.t_HoldData   = t_HoldData;
    this.t_SetupData  = t_SetupData;
    this.t_Buff       = t_Buff;
    this.t_Valid      = t_Valid;
    this.t_SetupStop  = t_SetupStop;
  endtask

I cannot understand why it cannot use the 'this'  in that context, since the standard says

"The this keyword is used to unambiguously refer to properties or methods of the current instance. The this eyword denotes a predefined object handle that refers to the object that was used to invoke the subroutine that his is used within. The this keyword shall only be used within non-static class methods, otherwise an error hall be issued. For example, the following declaration is a common way to write an initialization task:"

After i commented them out that, i then got a crash

ncvlog: *F,INTERR: INTERNAL ERROR
-----------------------------------------------------------------
The tool has encountered an unexpected condition and must exit.
Contact Cadence Design Systems customer support about this
problem and provide enough information to help us reproduce it,
including the logfile that contains this error message.
  TOOL: ncvlog  08.20-p001
  HOSTNAME: bigshow
  OPERATING SYSTEM: Linux 2.6.9-55.ELsmp #1 SMP Fri Apr 20 16:36:54 EDT 2007 x86_64
  MESSAGE: vst_identifier () - bad class, class 581

it looks like
   this.constraint_mode(0);

is the cause of the crash!

but according to section 12.2 od SV 31, standard i see it is correct appearently


thanks

  • Cancel
  • StephenH
    StephenH over 15 years ago

    Hi.

    If you haven't already done so, can you try using a more up to date version of IUS? The one you've reported in your message is very old now. If possible, try the latest 9.2 hot-fix version.

    If that still doesn't work, please use http://support.cadence.com to file a service request, and someone from Cadence support will help resolve the issue for you.

    Thanks.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • thescreen
    thescreen over 15 years ago

     thanks: i already opened a case #41881528 with cadence support

    in the meantime i asked my IT to update IUS

    cheers

     

    • 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