It's not uncommon for testbenches to have the ability to dump information into files that other verification teams can work on. For example, a graphics engine might process data and write into a memory model, which can be captured by the testbench and dumped into a file. Another team that works on the verification of a display controller can use this valid data to functionally verify their block.

Opening and closing files
  fd = $fopen (filename, type)

The function $fopen opens the file specified as the filename argument and returns a 32-bit file descriptor. filename is a string expression that names the file to be opened. type is also a string expression that indicates how the file should be opened. If type is omitted, the file is opened for writing, and a multichannel descriptor is returned. If type is specified, the file is opened in the given mode, and a file descriptor fd is returned.

Login to your free account to read more ...

Was this article helpful ?