<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="2.0">
<channel>
  <title>bluespec.com</title>
  <link>http://www.bluespec.com/forum/index.php</link>
  <description>Bluespec Forums</description>
  <language>english</language>
  <copyright>(c) Copyright 2010 by bluespec.com</copyright>
  <managingEditor>support@bluespec.com</managingEditor>
  <webMaster>support@bluespec.com</webMaster>
  <pubDate>Wed Sep 08, 2010 6:07 am</pubDate>
  <lastBuildDate>Wed Sep 08, 2010 6:07 am</lastBuildDate>
  <docs>http://backend.userland.com/rss</docs>
  <generator>phpBB2 RSS Syndication Mod by Lucas</generator>
  <ttl>1</ttl>

  <image>
    <title>bluespec.com</title>
    <url></url>
    <link>http://www.bluespec.com/forum/</link>
    <description>Bluespec Forums</description>
  </image>

                                      <item>
                                        <title>Re: About Reg# write/read conflict</title>
                                        <link>http://www.bluespec.com/forum/viewtopic.php?p=458#458</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.bluespec.com/forum/profile.php?mode=viewprofile&amp;u=169'&gt;wychen&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Wed Dec 31, 2008 1:27 am&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      &amp;quot;language that doesn't affect the way you think about programming is not worth knowing&amp;quot; - Alan Perlis&lt;br /&gt;
It would be much more meaningful if you can design your hardware in a bluespec way. If you want to learn from examples, the MIT WiFi/WiMax design is a better starting point than the MIT H.264 design. The H.264 one seems pretty much like RTL and doesn't make full use of these advantages provided by bluespec.</description>
                                        <comments>http://www.bluespec.com/forum/viewtopic.php?p=458#458</comments>
                                        <author>wychen</author>
                                        <pubDate>Wed Dec 31, 2008 1:27 am</pubDate>
                                        <guid isPermaLink="true">http://www.bluespec.com/forum/viewtopic.php?p=458#458</guid>
                                      </item>
                                      <item>
                                        <title>Re: About Reg# write/read conflict</title>
                                        <link>http://www.bluespec.com/forum/viewtopic.php?p=453#453</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.bluespec.com/forum/profile.php?mode=viewprofile&amp;u=237'&gt;test001&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Mon Dec 29, 2008 9:16 pm&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      Thanks your reply!&lt;br /&gt;
    Excuse me, I do not make oneself understood.&lt;br /&gt;
    I want make a FSM by hand(learn from MIT's bsv-h264), so I let step for control. and there have two actions when step is (0-3) or (4-&lt;img src=&quot;images/smiles/icon_cool.gif&quot; alt=&quot;Cool&quot; border=&quot;0&quot; /&gt;. one of set valid in cycles-0, other of read in cycles-4, I think this will work in verilog. I write two rules actions in one rule at the first, it work fine.&lt;br /&gt;
    Next, I want use two rules to process, it has more pellucidly.&lt;br /&gt;
    But when I use Reg#, Bsc can not do two rules fire both(I use -aggressive-conditions in my any demo always). I want get fill_data work in cycles(0-3) and check_data do nothing, cycles(4-&lt;img src=&quot;images/smiles/icon_cool.gif&quot; alt=&quot;Cool&quot; border=&quot;0&quot; /&gt; like, but two rule fire both. this behavior match to verilog's module.&lt;br /&gt;
    I read the document again, I found that ConfigReg like verilog's reg more. I change step to it, Bsc output as I had expected.</description>
                                        <comments>http://www.bluespec.com/forum/viewtopic.php?p=453#453</comments>
                                        <author>test001</author>
                                        <pubDate>Mon Dec 29, 2008 9:16 pm</pubDate>
                                        <guid isPermaLink="true">http://www.bluespec.com/forum/viewtopic.php?p=453#453</guid>
                                      </item>
                                      <item>
                                        <title>Need more information</title>
                                        <link>http://www.bluespec.com/forum/viewtopic.php?p=452#452</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.bluespec.com/forum/profile.php?mode=viewprofile&amp;u=50'&gt;jnewbern&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Mon Dec 29, 2008 11:08 am&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      Test001,&lt;br /&gt;
&lt;br /&gt;
I think you cut out too much from your example.  As you've shown it there is no conflict.  Check_data will be scheduled first and fill_data scheduled second.  Can you give a complete small example so that we can reproduce your issue?&lt;br /&gt;
&lt;br /&gt;
Are you running bsc with the -aggressive-conditions flag?&lt;br /&gt;
&lt;br /&gt;
Your rules look like they're encoding a state machine on the &amp;quot;step&amp;quot; state.  You might prefer to use the StmtFSM facility (documented in the reference manual) instead of writing out the FSM by hand.&lt;br /&gt;
&lt;br /&gt;
Also, a rule that dispatches on a single value of a register like:&lt;br /&gt;
&lt;br /&gt;
rule x;&lt;br /&gt;
   case (val)&lt;br /&gt;
     1: ...&lt;br /&gt;
   endcase&lt;br /&gt;
endrule&lt;br /&gt;
&lt;br /&gt;
can be more cleanly written as:&lt;br /&gt;
&lt;br /&gt;
rule x if (val == 1);&lt;br /&gt;
  ...&lt;br /&gt;
endrule</description>
                                        <comments>http://www.bluespec.com/forum/viewtopic.php?p=452#452</comments>
                                        <author>jnewbern</author>
                                        <pubDate>Mon Dec 29, 2008 11:08 am</pubDate>
                                        <guid isPermaLink="true">http://www.bluespec.com/forum/viewtopic.php?p=452#452</guid>
                                      </item>
                                      <item>
                                        <title>Re: About Reg# write/read conflict</title>
                                        <link>http://www.bluespec.com/forum/viewtopic.php?p=451#451</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.bluespec.com/forum/profile.php?mode=viewprofile&amp;u=237'&gt;test001&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Sat Dec 27, 2008 9:57 pm&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      Excuse me, I forgot that BSV have &amp;quot;conflict_free&amp;quot; &amp;amp; &amp;quot;ConfigReg&amp;quot;, I will try them next week.</description>
                                        <comments>http://www.bluespec.com/forum/viewtopic.php?p=451#451</comments>
                                        <author>test001</author>
                                        <pubDate>Sat Dec 27, 2008 9:57 pm</pubDate>
                                        <guid isPermaLink="true">http://www.bluespec.com/forum/viewtopic.php?p=451#451</guid>
                                      </item>
                                      <item>
                                        <title>About Reg# write/read conflict</title>
                                        <link>http://www.bluespec.com/forum/viewtopic.php?p=450#450</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.bluespec.com/forum/profile.php?mode=viewprofile&amp;u=237'&gt;test001&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Fri Dec 26, 2008 7:14 am&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      In my test today, I found some Reg# read/write conflict.&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;&lt;br /&gt;
rule fill_data;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; case&amp;#40;step&amp;#41;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&amp;#58; begin&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; valid &amp;lt;= ...;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; end&lt;br /&gt;
...&lt;br /&gt;
endrule&lt;br /&gt;
&lt;br /&gt;
rule check_data;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; case&amp;#40;step&amp;#41;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4&amp;#58; begin&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if &amp;#40;valid == 1&amp;#41;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; do_somthing;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; end&lt;br /&gt;
endrule&lt;br /&gt;
&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
but after I check the verilog code, the two rule can not FIRE both, how can I solve this?&lt;br /&gt;
I found one way that read/write in check_data and use RWire# in fill_data. I think this a bad way, but it can be work fine.&lt;br /&gt;
How can I to get better way?</description>
                                        <comments>http://www.bluespec.com/forum/viewtopic.php?p=450#450</comments>
                                        <author>test001</author>
                                        <pubDate>Fri Dec 26, 2008 7:14 am</pubDate>
                                        <guid isPermaLink="true">http://www.bluespec.com/forum/viewtopic.php?p=450#450</guid>
                                      </item></channel></rss>