<br><br><div class="gmail_quote">2009/9/16 Zoltan Padrah <span dir="ltr"><<a href="mailto:zoltan.padrah@gmail.com">zoltan.padrah@gmail.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>Yes. the logic update is done as you've written.<br></div><div><br></div><div>What do you mean by unstable? Ktechlab crashes or just outputs garbage?</div></blockquote><div><br>Unstable perhaps is not the proper word... i mean irregular periods, i tried with a simple toggle led pic program at 1 Hz.<br>
Logic update at 5e6 is 5 Mhz; <br>Then a pic program at 20 MHz (5MHz instruction cicle) should go real-time.<br>Running simulation i have a 1Hz blinking led in ktl, but sometimes go faster, sometimes slower; anyway is a good aproach, it can run a pic at 20 MHz real-time, not very accurate, but it can.<br>
<br>I added an input clock singal component to the circuit... it goes at 0.25 Hz, even when is configured at 1 Hz, no matter if i use update logic 1e6 or 5e6, it goes at 0.25 Hz.<br><br>But when i run the pic the clock singal go faster...<br>
<br>here you can see a mini-video: <a href="http://arcachofo.users.sourceforge.net/miweb/ktl1">http://arcachofo.users.sourceforge.net/miweb/ktl1</a><br><br>I just try to understand how this work. <br><br>And i'm not sure about why the input signal does not go at 1 Hz, if
it's a problem in the component or a problem in my ktl build.<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><br></div>
<div>Also I don't understand how to reproduce the problem. Set the logic update timer to 5e6 and then?</div></blockquote><div><br>I think you can't reproduce the problem bcos with the actual gpsimprocessor pic simulations goes very slow.<br>
I didn't want to send you a path and send another in some days with some other changes; if you want i send you the actual changes i have made, but i think you should wait a time for some other changes and testing to include it in official release (if accepted).<br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><br></div><div>Maybe Alan knows: how is the time in simulation managed? We should provide the some ways to know what is the current time in the simulation, and how much time has passed since the last step (for reactive elements).</div>

<div><br></div></blockquote><div>I think this could be a good thing.<br><br>I need some time to undertand the gpsim interface (if i finally can..), but i think is possible to do a first aproach to real-time simulating pics in the easy way:<br>
<br>-The gpsimprossesors should be updated at 5e6, may be inside logic update: a 5x loop (to not update all the logic at 5e6) .<br>Every gpsimprocessor should have a counter and update depending on it's clock speed. This way only 4, 8, 12, 16, 20 MHz speeds will be accurate, but this is just a first aproach.<br>
<br>-An editable propertie should be added to the pic component: clock MHz (no idea about how to do this) this integer value is used to set the counter value in simulator.cpp (if someday is possible to use gpsim in real-time mode this value could be used)<br>
<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div></div><div class="gmail_quote">2009/9/16 santiago gonzalez <span dir="ltr"><<a href="mailto:santigoro@gmail.com" target="_blank">santigoro@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5">
I't looks to me that logic update rate (then gpsim processors) is actually 1e6, then 1 MHz.. is this correct?<br><br>What is the actual behaivor of logic update rates?<br>i think the qtimer is at 1KHz, but the loops inside every call aren't sinchonized... i mean: logic updates are done 1e6 times/Sec, but not at 1us steps... isn't it?, not sure about this.<br>


<br>Looks to me that logic updates are done 1000 times/ms, but may be that all 1000 updates could be done in the firsts 100 us, for example. Is this right?<br><br>What is the upper limit to logic updatre rate?, tried with 5e6 with a pic simulation and looks unstable.<br>


<br>I don't know if this is a bug or what:<br>When i add a clock input to the circuit at 1Hz i have a 0.25 Hz signal... is
this a problem of the clock input component, or the timming, or is my PC?<br>
Do you also have 0.25 Hz?<br><br>The extrange thing for me is that at 5e6 i still have a 0.25 Hz signal in the clock input, but if i run the pic then it goes faster but irregular...<br><br><br>
<br></div></div>------------------------------------------------------------------------------<br>
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA<br>
is the only developer event you need to attend this year. Jumpstart your<br>
developing skills, take BlackBerry mobile applications to market and stay<br>
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;<br>
<a href="http://p.sf.net/sfu/devconf" target="_blank">http://p.sf.net/sfu/devconf</a><br>_______________________________________________<br>
Ktechlab-devel mailing list<br>
<a href="mailto:Ktechlab-devel@lists.sourceforge.net" target="_blank">Ktechlab-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/ktechlab-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/ktechlab-devel</a><br>
<br></blockquote></div><br>
<br>------------------------------------------------------------------------------<br>
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA<br>
is the only developer event you need to attend this year. Jumpstart your<br>
developing skills, take BlackBerry mobile applications to market and stay<br>
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;<br>
<a href="http://p.sf.net/sfu/devconf" target="_blank">http://p.sf.net/sfu/devconf</a><br>_______________________________________________<br>
Ktechlab-devel mailing list<br>
<a href="mailto:Ktechlab-devel@lists.sourceforge.net">Ktechlab-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/ktechlab-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/ktechlab-devel</a><br>
<br></blockquote></div><br>