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


V

 

This pages describes the UART TX BFM file.

This file explains the assorted parts of the TX BFM.
First some pointers to the sequence driver, eVC name and signal map for I/O access.:
package pk_tx;

unit uart_tx_bfm_u {
  tx_driver : uart_tx_driver_u;
  name : uart_tx_env_name_t;
  sig : sig_map_u;
...

Next clock is applied to the sequence driver:
tx_driver_clk_tcm() @sig.clk_r_ev is {
  while(TRUE) { emit tx_driver.clock; wait cycle; };
};--tx_driver_clk_tcm



At reset the BFM sets the values of the DUT inputs:
bfm_drive_init_tcm() @sig.clk_r_ev is {
  sig.load$=0;
  sig.d_in$=0;
};--bfm_drive_init_tcm

The rest of the BFM code requests an item, from the sequence driver, drives it on the TX input interface and finishes with an item done emission.
  bfm_drive_data_tcm() @sig.clk_r_ev is {
    var tx_data_in : uart_tx_byte_s;
    wait true (sig.rst_p$ == 0);
    message(NONE, "bfm_drive_data_tcm reset wait ended ", name);
    while(TRUE) {
      tx_data_in = tx_driver.get_next_item();
      messagef(HIGH,
        "bfm_drive_data_tcm Requesting new rx byte waits for %d",
        tx_data_in.transmit_delay
      );
      wait [tx_data_in.transmit_delay] * cycle;
      messagef(NONE,
        "bfm_drive_data_tcm drive byte %x",
        tx_data_in.uart_tx_data
      );
      sig.load$=1;
      sig.d_in$=tx_data_in.uart_tx_data;
      wait[1];
      sig.load$=0;
      emit tx_driver.item_done;
    }--while
  };--bfm_drive_data_tcm

  run() is also {
    start bfm_drive_data_tcm();
    start bfm_drive_init_tcm();
    start tx_driver_clk_tcm();
  };
};--unit uart_tx_bfm_u



To go to main project: main project page





  ...


I would be happy to offer my services. Call ASAP !


Home

systemc parameterized CRC module

print from VHDL code







Search This Site


Feedback This Site




new pages on this site