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


V

 

Simple example for writing BFM and virtual sequences.

  1. In the process of reviewing sequences, I have encountered a simple BFM sequence example. I have slightly modified the example code and also enhanced another version of it to be controlled via a virtual sequence.

  2. The example has a simple library consisting TEST1 and TEST2. The BFM constantly asks for items. After count items, I have constraint it to 10, no more items are given. The test stops, however, when tick MAX is reached. The source code as well as the specman log is given below.

  3. For the virtual sequence, I first closed the BFM main.

    extend MAIN example_sequence
    {
      //demonstrate virtual sequence
      body() @driver.clock is only { };
    };

    The main part of the virtual sequence always does TEST1 followed by TEST2 and any kind selected randomly as in the BFM example.
    Part of the code is listed below:

    ...
    extend MAIN virt_seq {
      !a_seq_1 : TEST1 example_sequence;
      !a_seq_2 : TEST2 example_sequence;
      !a_seq   :       example_sequence;

      body() @driver.clock is only {
        do a_seq_1 keeping {.driver == driver.drv_a};
        do a_seq_2 keeping {.driver == driver.drv_a};
        for i from 0 to 47 {
          do a_seq keeping {.driver == driver.drv_a};
        };
      };
    };
    ...


  4. The code can be downloaded from: code!

Contact me now at:

  ...




Search This Site


Feedback This Site




new pages on this site