gnupic: Re: [gnupic] Problem with stimuli..
Subject:
Re: [gnupic] Problem with stimuli..
From:
"Scott Dattalo" ####@####.####
Date:
28 Mar 2006 14:59:57 +0100
Message-Id: <62872.71.139.23.199.1143552547.squirrel@ruckus.brouhaha.com>
> Hi Scott,
>
> thanks for your answer. But.....
> I'm still locked.
> I dont not see the link of shift_in in your example and
> a real pin of a pic. I checked the regression tests and
> found digital_stim.
>
> I can create the processor, load the code and create a
> stimulus. But if I try to create a node I get:
> **gpsim> node pulse trackinput porta2
> ***ERROR: parse error, unexpected SYMBOL_T, expecting
> EOLN_T while parsing:
> 'trackinput'
> Last command: node pulse trackinput porta2
>
> So I think my problem is more related to create a node
> than a stimulus. And regardless if I first create the
> stimulus or the node, the error is the same.
I see... You're attempting to create a new node with the same name as an
existing symbol (in this case porta2). I think what you want to do is
this.
First the stimulus file:
-----------
node track
stimulus asynchronous_stimulus
initial_state 0
name trackinput
start_cycle 50000
{ 0, 1, #1.1-bit 1-tritt 0. tritt of addr 4
182, 0
}
end
attach track trackinput porta2
---------------
Notice that the 'node' command only defines one node while the 'attach'
command uses that node and connects two stimuli to it. BTW, I/O pins are
considered stimuli. If this configuration script is named 'b.stc', then
load it by:
gpsim> load b.stc
(Notice that you don't have to supply the 'c' option to the load command
any more; gpsim assumes the file is a configuration script if the
extension is .stc. If you place your configuration scripts into files with
different extensions then you'll *need* the 'c' option.)
Now that the stimulus has been loaded, you can inspect with:
gpsim> node
Node List
track voltage = 2.99997e-06V
trackinput
porta2
And,
gpsim> stimulus
<snip>
trackinput attached to track
Vth=0V Zth=1000 ohms Cth=0 F nodeVoltage= 2.99997e-06V
Driving=0 drivingState=0 drivenState=0 bitState=0
states = 2
t=0,v=1
t=182,v=0
initial=0
period=0
start_cycle=50000
Next break cycle=0
(note that the version of gpsim you're using may have a different format).
I hope this answer is better than the last one.
Scott