Email: bknpk@hotmail.com Phone: +972-54-7649119


V

 

An I2C verification environment, which uses memories and VPI (c code) to drive and monitor data to/from DUT, will be described in this work.

  1. In this site many verification environments have been presented, using, specman , VHDL etc....
    The main page of this work is accessed with the following link.
    This page describes how APB transaction are done.

  2. The test-bench is build of a few blocks. The verilog test-bench contains a BFM and requests item from a c code generator. The bench also collects data and send them to the c code. The c code passes it on to a scoreboard, which is implemented in c++.

  3. In this page I show my first steps in calling a function from c to c++.
    To check the concept, I created small c++ function, a header file and main in c, which calls the c++ function.

  4. The c++ code is listed below:

    #include
    extern "C" int print(int i, double d)
    {
      std::cout << "i = " << i << ", d = " << d << " \n";
    }


  5. The header is also simple:

    extern "C" int print(int i, double d);

  6. The main is written in c:

    #include "l.h"

    int main() {
      int i;
      double d;

      i=2;
      d=5.0;

      print(i, d);
    }

  7. Use the following commands to compile and run:

    g++ f.cpp m.c
    ./a.out

  8. My next step in this self study project was to implement a simple scoreboard
    in c++.

  ...


Search This Site


Feedback This Site




new pages on this site