gnupic: Re: [gnupic] Remarks to gpsim of 05/12/2006
Subject:
Re: [gnupic] Remarks to gpsim of 05/12/2006
From:
Tobias Schlottke ####@####.####
Date:
19 May 2006 19:23:48 +0100
Message-Id: <Pine.LNX.4.64.0605191628430.29203@ws-toby.Netzwert.AG>
Hi Scott,
thank you for your response.
On Fri, 19 May 2006, Scott Dattalo wrote:
.....
> BTW, gpsim can even model an unknown bit state. However this is not fully
> supported for the PIC processors.
?? I dont understand this. If a bit state is unknown
and the program tests the bit, what should be the
result? Ok, it could break with a warning or with an
error.
I have two further questions:
It still regards to gpsim of 05/12/2006 so I dont open
a new thread.
First:
In file src/stimuli.cc method
ValueStimulus::start() (around line 1650):
current = initial.v;
next_sample = *sample_iterator;
future_cycle = next_sample.time + start_cycle;
get_cycles().set_break(future_cycle, this);
}
I appended (uncommented) the "+ start_cycle" for the
future_cycle computation. IMHO all times are relative
to the start_cycle.
Do you agree?
Second:
In the same file, same method at the beginning of the
method you add an initial data set to the array if the
period != 0. With this special handling I am not able
to create an exact stimulus with an exact repetition. I
get glitches if the period is reached and the stimulus
rolls over. May be because the pointer into the data
set is always moved forward one step. If we have
multiple values (even equal ones) for the same time,
the mechanism gets confused. I dont understand
this extra value. If the last point of the array is
different from the initial state who cares?
Ah!
After thinking again I found the following:
If you specify the stimulus as:
{
10, 0,
10, 1,
10, 0,
10, 1,
10, 0,
10, 1,
10, 0,
20, 1
}
you'll get a 3 time toggling bit. The rollover
mechanism inserts for same time two data points. These
are interpreted sequentially in two different cycles.
So the problem is not the insertion of an additional
data point, instead we should skip all points until we
get a time stamp in the future.
But right now I'm not able to do this.
Best regards
Toby