NAME
ModelSim::List - Facilities to handle the ModelSim list files
SYNOPSIS
use ModelSim::List;
$list = ModelSim::List->new;
# ram.lst is generated by ModelSim
# simulator (via write list command)
$list->parse('ram.lst') or
die $list->error();
# get the value of signal /ram/address at time 100:
$value = $list->strobe('/ram/address', 100);
# get the time when signal /alu/rdy get the value 1:
$time = $list->time_of('/alu/rdy', 1);
# specify regex rather than actual value:
$time = $list->time_of('/processor/bus_data', qr/^z+$/i);
$time = $list->time_of($signal, $value, $start_time);
$time = $list->time_of($signal, $value, $start_time, $end_time);
die $list->error() unless defined $time;
DESCRIPTION
This module provides a class named ModelSim::List with which the EDA tester can easily check in the signals contained in the files generated by ModelSim's "write list" command in a programming manner.
METHODS
- ModelSim::List->new
-
This is the constructor of the ModelSim::List class.
- $list->parse($file_name)
-
This method gets the object parse the list file specified as $file_name. You can invoke the parse method on the same object several times. Once you specify a list file, the new file will override the old one completely. No matter whether you use an -event option in your "write list" command to generate the file or not, the object will recognize the list format automatically.
The method returns 1 to indicate success. When it returns undef, it is recommended to check the error info via the ->error() method.
- $list->strobe($signal, $time)
-
The strobe method are used to get the value of a signal named $signal at any given time instant, $time. The object will preserve the original signal value format used in the list file. No format conversion will happen.
When ->strobe() returns undef, it is recommended to check the detailed info via the ->error() method if you feel surprised.
CAUTION: The delta number will be totally ignored. Therefore, if signal /module/a becomes 0 at "0 ns +0", and changes to 1 at "0 ns +1", thus ->strobe('/module/a', 0) will return 1 rather than 0.
- $list->time_of($signal, $value, ?$start, ?$end)
-
You can utilize the time_of method to get the time instant when $signal first gained the value $value within the time interval specified by $tart and $end. Both the last two arguments are optional. In the case that $start is missing, the initial time 0 will be assumed. If the signal fails to achieve $value, time_of will return undef.
If the $value argument is a regex ref, time_of will perform pattern matching instead of string comparing.
When ->time_of() returns undef, it is recommended to check the detailed info via the ->error() method if you feel surprised.
SEE ALSO
ModelSim Command Reference
AUTHOR
Agent Zhang (ÕÂÒà´º), <agent2002@126.com>
COPYRIGHT
Copyright (C) 2005 by Agent Zhang.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 306:
Non-ASCII character seen before =encoding in '(ÕÂÒà´º),'. Assuming CP1252