From: Chao Wang (Wangc_at_colorado.edu)
Date: Sun Jan 25 2004 - 11:29:40 MST
Cedric:
I believe that the "Final State" is simply the state of the last line --
which means the help information is a bit misleading -- I just checked the
source code implementing the "simulate" command: vis/src/sim/simIo.c::
Sim_SimPrint(), right after fprintf(of, "#Final State").
It is not going to simulate an additional step in order to get the NEXT
state, but simply extract the state of the LAST vector.
Chao
> Hi Chao,
>
> shouldn't the final state be A ?
> In 5 steps, the model does:
> A -> B -> A -> B -> A
> (it is 4 steps, but let's say we count the states),
> so I wait an A at step 5. But vis answers B for final state.
>
> What do I see wrong ?
> Is the final state simply a reproduction of the line just above ?
>
> The documentation says ("help simulate" in vis):
>
> ----------------------------
> [...]
> An example of a simulation vectors file is:
> # ----> Declarations
> .inputs X1 X2
> .latches L1 L2
> .outputs O
> .initial green 0
> .start_vectors
> # ----> Vectors
> 0 1
> 1 0
> 1 1
> [...]
> vectors_file with additional fields for latches and outputs. Here is
> the result of simulation on last vectors_file example:
> .inputs X1 X2
> .latches L1 L2
> .outputs O
> .initial green 0
> .start_vectors
> #input; current_state; output
> 0 1 ; green 0 ; 0
> 1 0 ; blue 0 ; 1
> 1 1 ; red 1 ; 1
> #Final State : green 1
> [...]
> --------------------------------
>
> where the final state (green) is not the reproduction of the line just
> above (red).
>
> How should I understand it ?
>
> Best regards,
> Cedric.
>
--
This archive was generated by hypermail 2.1.7 : Sun Jan 25 2004 - 11:31:08 MST