<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    <title>Lothar Miller - Ringoszillator</title>
    <link>http://www.lothar-miller.de/s9y/</link>
    <description>Elektronik und Musik</description>
    <dc:language>de</dc:language>
    <generator>Serendipity 1.3.1 - http://www.s9y.org/</generator>
    <pubDate>Fri, 13 Aug 2010 12:56:29 GMT</pubDate>

    <image>
        <url>http://www.lothar-miller.de/s9y/templates/bulletproof/img/s9y_banner_small.png</url>
        <title>RSS: Lothar Miller - Ringoszillator - Elektronik und Musik</title>
        <link>http://www.lothar-miller.de/s9y/</link>
        <width>100</width>
        <height>21</height>
    </image>

<item>
    <title>Ringoszillator im S3</title>
    <link>http://www.lothar-miller.de/s9y/archives/35-Ringoszillator-im-S3.html</link>
            <category>Ringoszillator</category>
    
    <comments>http://www.lothar-miller.de/s9y/archives/35-Ringoszillator-im-S3.html#comments</comments>
    <wfw:comment>http://www.lothar-miller.de/s9y/wfwcomment.php?cid=35</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.lothar-miller.de/s9y/rss.php?version=2.0&amp;type=comments&amp;cid=35</wfw:commentRss>
    

    <author>nospam@example.com (Lothar Miller)</author>
    <content:encoded>
    
&lt;p&gt;Wie oft braucht man nur einfach irgend einen Takt? &lt;br /&gt;Der muss nicht genau oder stabil sein, sondern einfach nur vor sich hintakten. &lt;/p&gt;&lt;p&gt;Dann ist die gute alte Methode über &lt;b&gt;Gatterlaufzeiten &lt;/b&gt;und einen Inverter einen Ringoszillator zu bauen eigentlich naheliegend. Allerdings neigen die Tools beim FPGA-Design zur Optimierung. Hintereinandergeschaltete Gatter werden zusammengefasst, vereinfacht und gehen so im Build-Prozess verloren &lt;img src=&quot;http://www.lothar-miller.de/s9y/templates/default/img/emoticons/sad.png&quot; alt=&quot;:-(&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt; &lt;/p&gt;&lt;p&gt;Dagegen hilft bei Xilinx das &lt;b&gt;Attribut &amp;quot;KEEP&amp;quot;&lt;/b&gt;. Auf ein Signal angewandt teilt man der Toolchain mit, dass dieses Signal erhalten bleiben soll. Und das ist der Weg, der für den Ringoszillator beschritten wird.&lt;/p&gt;&lt;hr size=&quot;2&quot; width=&quot;100%&quot; /&gt;&lt;pre&gt;&lt;span style=&quot;color: rgb(0, 136, 0); font-weight: bold;&quot;&gt;library&lt;/span&gt; &lt;span&gt;IEEE&lt;/span&gt;;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 136, 0); font-weight: bold;&quot;&gt;use&lt;/span&gt; &lt;span&gt;IEEE&lt;/span&gt;.&lt;span&gt;STD_LOGIC_1164&lt;/span&gt;.&lt;span style=&quot;color: rgb(0, 136, 0); font-weight: bold;&quot;&gt;ALL&lt;/span&gt;;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 136, 0); font-weight: bold;&quot;&gt;use&lt;/span&gt; &lt;span&gt;IEEE&lt;/span&gt;.&lt;span&gt;NUMERIC_STD&lt;/span&gt;.&lt;span style=&quot;color: rgb(0, 136, 0); font-weight: bold;&quot;&gt;ALL&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 136, 0); font-weight: bold;&quot;&gt;entity&lt;/span&gt; &lt;span&gt;RingOszillator&lt;/span&gt; &lt;span style=&quot;color: rgb(0, 136, 0); font-weight: bold;&quot;&gt;is&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;color: rgb(0, 136, 0); font-weight: bold;&quot;&gt;Port&lt;/span&gt; (&lt;span&gt;reset&lt;/span&gt;  : &lt;span style=&quot;color: rgb(0, 136, 0); font-weight: bold;&quot;&gt;in &lt;/span&gt;&lt;span style=&quot;color: rgb(51, 68, 153); font-weight: bold;&quot;&gt;std_logic&lt;/span&gt;;&lt;br /&gt;          &lt;span&gt;oscout&lt;/span&gt; : &lt;span style=&quot;color: rgb(0, 136, 0); font-weight: bold;&quot;&gt;out &lt;/span&gt;&lt;span style=&quot;color: rgb(51, 68, 153); font-weight: bold;&quot;&gt;std_logic&lt;/span&gt;);&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 136, 0); font-weight: bold;&quot;&gt;end&lt;/span&gt; &lt;span&gt;RingOszillator&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 136, 0); font-weight: bold;&quot;&gt;architecture&lt;/span&gt; &lt;span&gt;Behavioral&lt;/span&gt; &lt;span style=&quot;color: rgb(0, 136, 0); font-weight: bold;&quot;&gt;of&lt;/span&gt; &lt;span&gt;RingOszillator&lt;/span&gt; &lt;span style=&quot;color: rgb(0, 136, 0); font-weight: bold;&quot;&gt;is&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(0, 136, 0); font-weight: bold;&quot;&gt;signal&lt;/span&gt; &lt;span&gt;oscff&lt;/span&gt;   : &lt;span style=&quot;color: rgb(51, 68, 153); font-weight: bold;&quot;&gt;std_logic&lt;/span&gt; := &lt;span style=&quot;color: rgb(0, 68, 221);&quot;&gt;&#039;0&#039;&lt;/span&gt;;&lt;br /&gt;  &lt;span style=&quot;color: rgb(0, 136, 0); font-weight: bold;&quot;&gt;signal&lt;/span&gt; &lt;span&gt;ring&lt;/span&gt;    : &lt;span style=&quot;color: rgb(51, 68, 153); font-weight: bold;&quot;&gt;std_logic_vector&lt;/span&gt;(&lt;span style=&quot;color: rgb(0, 0, 221); font-weight: bold;&quot;&gt;7&lt;/span&gt; &lt;span style=&quot;color: rgb(0, 136, 0); font-weight: bold;&quot;&gt;downto&lt;/span&gt; &lt;span style=&quot;color: rgb(0, 0, 221); font-weight: bold;&quot;&gt;0&lt;/span&gt;);&lt;br /&gt;  &lt;span&gt;attribute&lt;/span&gt; &lt;span&gt;KEEP&lt;/span&gt; : &lt;span style=&quot;color: rgb(51, 68, 153); font-weight: bold;&quot;&gt;string&lt;/span&gt;; &lt;br /&gt;  &lt;span&gt;attribute&lt;/span&gt; &lt;span&gt;KEEP&lt;/span&gt; &lt;span style=&quot;color: rgb(0, 136, 0); font-weight: bold;&quot;&gt;of&lt;/span&gt; &lt;span&gt;ring&lt;/span&gt; : &lt;span style=&quot;color: rgb(0, 136, 0); font-weight: bold;&quot;&gt;signal&lt;/span&gt; &lt;span style=&quot;color: rgb(0, 136, 0); font-weight: bold;&quot;&gt;is&lt;/span&gt; &lt;span style=&quot;background-color: rgb(255, 240, 240); color: rgb(221, 34, 0);&quot;&gt;&lt;span style=&quot;color: rgb(119, 17, 0);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;true&lt;/span&gt;&lt;span style=&quot;color: rgb(119, 17, 0);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;; &lt;br /&gt;&lt;span style=&quot;color: rgb(0, 136, 0); font-weight: bold;&quot;&gt;begin&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(136, 136, 136);&quot;&gt;-- die Gatterkette&lt;/span&gt;&lt;br /&gt;  &lt;span&gt;ring&lt;/span&gt; &amp;lt;= &lt;span&gt;ring&lt;/span&gt;(&lt;span style=&quot;color: rgb(0, 0, 221); font-weight: bold;&quot;&gt;6&lt;/span&gt; &lt;span style=&quot;color: rgb(0, 136, 0); font-weight: bold;&quot;&gt;downto&lt;/span&gt; &lt;span style=&quot;color: rgb(0, 0, 221); font-weight: bold;&quot;&gt;0&lt;/span&gt;) &amp;amp; &lt;span style=&quot;color: rgb(0, 136, 0); font-weight: bold;&quot;&gt;not&lt;/span&gt; &lt;span&gt;ring&lt;/span&gt;(&lt;span style=&quot;color: rgb(0, 0, 221); font-weight: bold;&quot;&gt;7&lt;/span&gt;) &lt;span style=&quot;color: rgb(0, 136, 0); font-weight: bold;&quot;&gt;when&lt;/span&gt; &lt;span&gt;reset&lt;/span&gt;=&lt;span style=&quot;color: rgb(0, 68, 221);&quot;&gt;&#039;0&#039;&lt;/span&gt; &lt;span style=&quot;color: rgb(0, 136, 0); font-weight: bold;&quot;&gt;else&lt;/span&gt; (&lt;span style=&quot;color: rgb(0, 136, 0); font-weight: bold;&quot;&gt;others&lt;/span&gt;=&amp;gt;&lt;span style=&quot;color: rgb(0, 68, 221);&quot;&gt;&#039;0&#039;&lt;/span&gt;);&lt;br /&gt;  &lt;span style=&quot;color: rgb(136, 136, 136);&quot;&gt;-- das Symmetrier-Flipflop&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(0, 136, 0); font-weight: bold;&quot;&gt;process&lt;/span&gt; (&lt;span&gt;ring&lt;/span&gt;) &lt;span style=&quot;color: rgb(0, 136, 0); font-weight: bold;&quot;&gt;begin&lt;/span&gt;&lt;br /&gt;     &lt;span style=&quot;color: rgb(0, 136, 0); font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span&gt;rising_edge&lt;/span&gt;(&lt;span&gt;ring&lt;/span&gt;(&lt;span style=&quot;color: rgb(0, 0, 221); font-weight: bold;&quot;&gt;7&lt;/span&gt;)) &lt;span style=&quot;color: rgb(0, 136, 0); font-weight: bold;&quot;&gt;then&lt;/span&gt;&lt;br /&gt;        &lt;span&gt;oscff&lt;/span&gt; &amp;lt;= &lt;span style=&quot;color: rgb(0, 136, 0); font-weight: bold;&quot;&gt;not&lt;/span&gt; &lt;span&gt;oscff&lt;/span&gt;;&lt;br /&gt;     &lt;span style=&quot;color: rgb(0, 136, 0); font-weight: bold;&quot;&gt;end&lt;/span&gt; &lt;span style=&quot;color: rgb(0, 136, 0); font-weight: bold;&quot;&gt;if&lt;/span&gt;;&lt;br /&gt;  &lt;span style=&quot;color: rgb(0, 136, 0); font-weight: bold;&quot;&gt;end&lt;/span&gt; &lt;span style=&quot;color: rgb(0, 136, 0); font-weight: bold;&quot;&gt;process&lt;/span&gt;;&lt;br /&gt;  &lt;span style=&quot;color: rgb(136, 136, 136);&quot;&gt;-- die Ausgangszuweisung&lt;/span&gt;&lt;br /&gt;  &lt;span&gt;oscout&lt;/span&gt; &amp;lt;= &lt;span&gt;oscff&lt;/span&gt;;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 136, 0); font-weight: bold;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 136, 0); font-weight: bold;&quot;&gt;end&lt;/span&gt; &lt;span&gt;Behavioral&lt;/span&gt;;&lt;/pre&gt;&lt;hr size=&quot;2&quot; width=&quot;100%&quot; /&gt;&lt;p&gt;Der &lt;b&gt;reset &lt;/b&gt;ist wichtig, ohne dieses Signal wird die Gatterkette nicht richtig zurückgesetzt, und der Oszillator beginnt nicht zu schwingen.&lt;/p&gt;&lt;p&gt;Mit einem Spartan3 XC3S400 im FG456 Gehäuse erhält man damit eine ziemlich temperaturstabile Frequenz von 50MHz am &lt;b&gt;oscout&lt;/b&gt;. Damit lässt sich doch schon arbeiten, oder? &lt;img src=&quot;http://www.lothar-miller.de/s9y/templates/default/img/emoticons/wink.png&quot; alt=&quot;;-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;&lt;/p&gt; 
    </content:encoded>

    <pubDate>Fri, 06 Mar 2009 08:50:40 +0100</pubDate>
    <guid isPermaLink="false">http://www.lothar-miller.de/s9y/archives/35-guid.html</guid>
    
</item>

</channel>
</rss>
