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


V

 

ASIC/FPGA Design and Verification Out Source Services

Using AWK like regular expression within specman

  • Sometimes prints are very useful in debug. In my case four eVC(s), of the same kind, were instantiated in the verification environment. So the debug needed to take into account the e path (separate name, per instance, was not used in this existing verification environment).

  • But once I printed the e_path, the debug message was very long (more than one line of 80 characters), making it difficult to post process with script or vim.

  • All I needed from the print was: is it RX or TX instance and what kind of agent is it.

  • This makes AWK like text manipulation, using regular expression from within specman, ideal for the job.

  • var inst: string = get_unit().e_path();
    var tmp := inst ~ "/.*([tr]xfc\.[tr]x)_agent.NORMAL.mon.*/";
    inst=$1;
    messagef(NONE,
      "uart decoder prev=%s %s",
      uart==NEGATIVE?"N":"P", inst
    );
  • One can also drive some signal if instance path condition is met:.

  • if(inst == "txfc.rx") then {--compare string
      'spc_uart_1'=1;
    else
      ...
      ...


    Also available on this project:


    Home

    Based on a VHDL simple UART, I created a small verification eVC








    Search This Site


    Feedback This Site




    new pages on this site