Subject: Re: Question on cm_fsm*()
From: Joao.Geada@synopsys.com
Date: Wed Oct 16 2002 - 10:01:56 PDT
Swapnajit,
the cm_fsm_get_statevar() works on a per fsm_id basis.
There may be multiple FSMs per instance and each fsm has a unique fsm_id.
The basic usage is for user to ask how many FSMs there are in a given instance
and then iterate over each asking for the more detailed information, eg:
inst_id = cm_instance_id("full.instance.name"); /* NOTE: full inst name derived by some other means */
nfsms = cm_count_fsms(inst_id); /* -1 if no fsms recognized in this instance */
for (i = 0; i < nfsms; i++) {
fsm_id = cm_fsm_id(inst_id, i); /* -1 if no such fsm in this instance.
Should not occur as i is within the bounds given by cm_count_fsms() */
if (fsm_id != -1) {
state_var_string = cm_fsm_get_state_var(inst_id, fsm_id);
if (state_var_string != NULL) {
/* we now have the state vector for this specific FSM */
}
}
}
Does this answer your questions ?
JOao
==============================================================================
Joao Geada, PhD Principal Engineer Verif Tech Group
Synopsys, Inc TEL: (508) 263-8083
154 Crane Meadow Road, Suite 300, FAX: (508) 263-8069
Marlboro, MA 01752, USA
==============================================================================
This archive was generated by hypermail 2b28 : Wed Oct 16 2002 - 10:06:01 PDT