Jump to content

ajeetha

Members
  • Content Count

    3
  • Joined

  • Last visited

  1. Just to add to Dave's great explanation: SV 2009 added "local::" scope resuoltion to refer to calling class scope variable name. Attached below is a screenshot from our UVM training that covers this very topic: HTH Ajeetha, CVC www.cvcblr.com/blog
  2. SVA has $stable() value change system function to do this for you. It returns a boolean indciating its argument was stable across 2 "sampling events". The result can be used as a boolean expression. Now depending on how often data_io changes you may want to fine tune it, but a raw code would be: always @(posedge clk) begin : b1 new_valid_io <= valid_io && !($stable (data_io)); end : b1 HTH Ajeetha, CVC www.cvcblr.com/blog
  3. As per LRM the `__FILE__ expands to the filename as provided to the compiler. So in your compile script if you provide absolute path, you will get /abs/path/to/file, else ../relative_path: For instance try the below code: module m; initial begin $display ("File: %0s Line: %0d", `__FILE__, `__LINE__); end endmodule : m qverilog C:/tools/cygwin/home/Ajeetha/proj/svlog/FILE_macro_rel_path/FILE_macro_rel_path.sv vs. qverilog ../FILE_macro_rel_path.sv See what happens HTH Ajeetha, CVC www.cvcblr.com/blog
×