Quick Reference Specman
Quick Reference Specman
Quick Reference
November 2011
This card contains selected e constructs. For complete e syntax, see
the Specman e Language Reference.
Abbreviations:
arg - argument
bool - boolean
enum - enumerated
exp - expression
inst - instance
num - number
TCM - time-consuming method
TE - temporal expression
Predefined Types
bit
byte
int
bool
uint
string
Predefined Events
Method / TLM Interface Ports Statements, Struct and Unit Members
sys.any
real
Constraints
User-Defined Types
Statements
sys.time
true(bool-exp)
cycle
TE1 or TE2
not TE
fail TE
[ n ] [ * TE ]
delay(exp)
detach(TE)
Time-Consuming Actions
wait [[until] TE];
Preprocessor Directives
sync [TE];
struct-inst.quit
#undef name
Macros
keep list1.all_different(exp)
fields
constraints
when conditions
Syntactic Categories
cover groups
events
preprocessor directives
Fields
Actions
Actions
[const][!][%]field-name : type;
var-name = exp ;
run() extract()
finalize() visualize()
check()
get_enclosing_unit()
connect_pointers()
quit()
Template Types
template (struct | unit) template-name of (param-list) [like basetype] {template members }:
template-name of ( actual-param-list )
Events
[[struct-exp].]method-name([param-list])
emit [struct-inst.]event-name;
Actions
Sequence-Driver API
gen_and_start_main: bool
system(command): int
bfm_interaction_mode: bfm_interaction_mode_t
arbitration_mode: seq_arbitration_mode_t
Conditional Procedures
Actions
event item-done
Loops
Actions
date_time(): string
Stopping a Test
stop_run();
driver.deliver_item(item: any_sequence_item)
List Pseudo-Methods
driver.wait_for_item_done(item: any_sequence_item)@sys.any
for i from exp [ down ] to exp [step exp] [do] { action; ... };
for each [struct-type] (list-item) [ using index (index-name) ]
in [reverse] list [do] { action; ... };
for each [line] [(line-name)] in file file-name [do] {action; ... };
while bool-exp [do] { action; ... };
driver.execute_item(item: any_sequence_item)
add[0](list-item : list-type)
Messages
clear()
delete(index : int)
pop[0]() : list-type
push[0](list-item : list-type)
Message-Logger API
continue;
Checks
Actions
verbosity: message_verbosity
// NONE (default), LO, MEDIUM, HIGH, FULL
size() : int
top[0]() : list-type
reverse() : list
Operators
to_file: string
// target log file for printing (default extension is .elog)
is_empty() : bool
[ ] list indexing
. field selection
in range list
~ bitwise not
!, not
Predefined Routines
+, - plus, minus
==, !=
comparison
boolean not
Actions
all_different(exp : exp)
Sequences
text = string
when = bool-exp
text = string
weight = uint
no_collect
Bitwise Routines
radix = DEC|HEX|BIN
when = bool-exp
at_least = num
per_instance = bool
~, !~ string matching
&&, and
||, or
!, not
boolean and
boolean not
=>
boolean or
boolean implication
radix = DEC|HEX|BIN
per_unit_instance [=unit-type]
Specman
Quick Reference
January 2011
This card contains selected Specman commands and procedures. For
more information, see the Specman Command Reference.
Abbreviations:
dir - directory
inst - instance
exp - expression
num - number
General Help
help [string... | reg-exp] // ASCII help sn_help.sh
Help button in GUI
IES Simulator
%irun file1.v file2.v test.e -snprerun "@batch.ecom"// single call
flow with IES (compiles Verilog files and e file, and executes precommands)
ModelSim
write stubs -ncvlog | -ncvhdl | -ver[ilog] | -ncsc | -ncsv | -esi [filename] // IES only; stub files not required for irun
VCS
Waveform-Related Commands
set wave [ -mode=working-mode] viewer
// not needed for IES
Memory Commands
Compiler Script
Message Command
Log Commands
set log file-name [{command;...}]
Event Commands
Syntax Examples:
Example:
specman -p "config print -radix = HEX" -p "load top" -e // starts
Specman, sets print radix to hex, loads top.e, and enables command
line editing mode.
test | setup | generate | start | run [-option = value, ...] // options are
the related configuration options.
check
finalize
extract
Shell Commands
shell shell-command
cover
gen
memory
*sav[e] options
simulation
ies
*res[t[ore]] options
gui
*rel[o[ad]] options
Coverage Commands
debugger
*conf[ig[ure]] category -option=value...
tcm_return
struct-wild-card.tcm-wild-card
tcm_wait
struct-wild-card.tcm-wild-card
tcm_state
struct-wild-card.tcm-wild-card
call
struct-wild-card.method-wild-card
return
struct-wild-card.method-wild-card
sim_read
signal-name-wild-card
sim_write
signal-name-wild-card
output
text wild-card
Setting Breakpoints
lb[reak] [once] [on] l[ine] [line-number] [@module | @expansionindex] [#[thread-handle] [if cond]
sh[ow] sta[ck]
Managing Breakpoints
show breakpoint
fin[ish]
show watch
abort
In the next few sections, the #thread-handle option can only be used
with the l (local) form of the command (e.g. lbreak, but not break).
The special events and special wild cards used as options for some
of the commands are listed separately at the end.
Setting Traces
NOTE
sh[ow] thr[ead]
tcm_start
struct-wild-card.tcm-wild-card
tcm_end
struct-wild-card.tcm-wild-card
tcm_call
struct-wild-card.tcm-wild-card