Re: problem with "simulate"

From: Cedric Roux (Cedric.Roux_at_lip6.fr)
Date: Wed Jan 21 2004 - 04:35:17 MST


On Tue, 20 Jan 2004, Chao Wang wrote:

> Hi Cedric:
>
> The output of 'simulate' is correct; the problem may be due to the
> interpretation of the output file --- the first line of the output
> vectors represents the initial state ( which is indeed State A for the
> model you provided).
>
> If you could try "simulate -n 5", which is to randomly generate 5
> simulation vectors, you would get
> ---------------------
> # Network: main
> # Simulation vectors have been randomly generated
>
> .inputs i
> .latches s
> .outputs
> .initial A
>
> .start_vectors
>
> # i ; s ;
>
> 0 ; A ;
> 1 ; B ;
> 1 ; A ;
> 1 ; B ;
> # Final State : B
> ------------------------
> It shows that the value of Latch s does change correctly.
>
> 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 : Wed Jan 21 2004 - 04:36:14 MST