<?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 2008 by bluespec.com</copyright>
  <managingEditor>support@bluespec.com</managingEditor>
  <webMaster>support@bluespec.com</webMaster>
  <pubDate>Wed May 14, 2008 5:43 am</pubDate>
  <lastBuildDate>Wed May 14, 2008 5:43 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>typeclass BitExtend usage</title>
                                        <link>http://www.bluespec.com/forum/viewtopic.php?p=257#257</link>
                                        <description>&lt;br /&gt;
                                      &lt;b&gt;Author:&lt;/b&gt; &lt;a href='http://www.bluespec.com/forum/profile.php?mode=viewprofile&amp;u=69'&gt;patil.nikhil&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      &lt;b&gt;Posted:&lt;/b&gt; Sun May 11, 2008 3:41 am&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      I think truncateLSB could only be used on Bit#() since there is no typeclass (like BitExtend) defined to overload it, but then of course, unpack(truncateLSB(pack(x))) will do the job. Despite being told that I'm not supposed to, I still love pack/unpack &lt;img src=&quot;images/smiles/icon_wink.gif&quot; alt=&quot;Wink&quot; border=&quot;0&quot; /&gt;</description>
                                        <comments>http://www.bluespec.com/forum/viewtopic.php?p=257#257</comments>
                                        <author>patil.nikhil</author>
                                        <pubDate>Sun May 11, 2008 3:41 am</pubDate>
                                        <guid isPermaLink="true">http://www.bluespec.com/forum/viewtopic.php?p=257#257</guid>
                                      </item>
                                      <item>
                                        <title>How to use RevertingVirtualReg?</title>
                                        <link>http://www.bluespec.com/forum/viewtopic.php?p=253#253</link>
                                        <description>&lt;br /&gt;
                                      &lt;b&gt;Author:&lt;/b&gt; &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;
                                      &lt;b&gt;Posted:&lt;/b&gt; Tue May 06, 2008 10:34 am&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      RevertingVirtualReg is a very specialized module which is only rarely needed.  It implements a register interface but does not create a flop in the synthesized hardware.  It is used in cases where you want the scheduling constraints of a register (usually to work around the lack of scheduling attributes on methods) but do not want any hardware generated.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;Reverting&amp;quot; part of the name indicates that the value at cycle boundaries is a constant (if there are multiple writes within a cycle, the last one always reverts to the initial value).  The &amp;quot;Virtual&amp;quot; part of the name indicates that there is no underlying hardware (it is synthesized as a constant, not a flop).  The &amp;quot;Reg&amp;quot; part of the name indicates that it provides a Reg interface.</description>
                                        <comments>http://www.bluespec.com/forum/viewtopic.php?p=253#253</comments>
                                        <author>jnewbern</author>
                                        <pubDate>Tue May 06, 2008 10:34 am</pubDate>
                                        <guid isPermaLink="true">http://www.bluespec.com/forum/viewtopic.php?p=253#253</guid>
                                      </item>
                                      <item>
                                        <title>Bit#(0) weirdness</title>
                                        <link>http://www.bluespec.com/forum/viewtopic.php?p=252#252</link>
                                        <description>&lt;br /&gt;
                                      &lt;b&gt;Author:&lt;/b&gt; &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;
                                      &lt;b&gt;Posted:&lt;/b&gt; Tue May 06, 2008 10:26 am&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      This was determined to be a bug in the compiler, where the implicit condition associated with a zero-width value is being lost.&lt;br /&gt;
&lt;br /&gt;
A workaround for now is to explicitly include the condition using the FIFOF interface's notFull and notEmpty methods for zero-width FIFOs.</description>
                                        <comments>http://www.bluespec.com/forum/viewtopic.php?p=252#252</comments>
                                        <author>jnewbern</author>
                                        <pubDate>Tue May 06, 2008 10:26 am</pubDate>
                                        <guid isPermaLink="true">http://www.bluespec.com/forum/viewtopic.php?p=252#252</guid>
                                      </item>
                                      <item>
                                        <title>floating point</title>
                                        <link>http://www.bluespec.com/forum/viewtopic.php?p=250#250</link>
                                        <description>&lt;br /&gt;
                                      &lt;b&gt;Author:&lt;/b&gt; &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;
                                      &lt;b&gt;Posted:&lt;/b&gt; Tue May 06, 2008 9:56 am&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      The next release of the tool will include support for floating-point values (specifically the SystemVerilog &amp;quot;real&amp;quot; type) as compile-time values.  Support for synthesis of floating-point hardware circuits from &amp;quot;real&amp;quot; types is not included.</description>
                                        <comments>http://www.bluespec.com/forum/viewtopic.php?p=250#250</comments>
                                        <author>jnewbern</author>
                                        <pubDate>Tue May 06, 2008 9:56 am</pubDate>
                                        <guid isPermaLink="true">http://www.bluespec.com/forum/viewtopic.php?p=250#250</guid>
                                      </item>
                                      <item>
                                        <title>internal error caused by BVI and Tuple2</title>
                                        <link>http://www.bluespec.com/forum/viewtopic.php?p=249#249</link>
                                        <description>&lt;br /&gt;
                                      &lt;b&gt;Author:&lt;/b&gt; &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;
                                      &lt;b&gt;Posted:&lt;/b&gt; Tue May 06, 2008 9:46 am&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      The problem arises when attempting to return an interface from a method in a BVI import (tuples are treated internally like interfaces).  We plan to fix the issue with tuples in the future, but a work-around for now is to return some other type in the Bits class from the imported method, such as a Bit#(2) or Vector#(2,Bit#(1)) and then make a wrapper module in BSV which unpacks the value into the desired tuple.</description>
                                        <comments>http://www.bluespec.com/forum/viewtopic.php?p=249#249</comments>
                                        <author>jnewbern</author>
                                        <pubDate>Tue May 06, 2008 9:46 am</pubDate>
                                        <guid isPermaLink="true">http://www.bluespec.com/forum/viewtopic.php?p=249#249</guid>
                                      </item>
                                      <item>
                                        <title>What does &amp;quot;restricted&amp;quot; mean?</title>
                                        <link>http://www.bluespec.com/forum/viewtopic.php?p=246#246</link>
                                        <description>&lt;br /&gt;
                                      &lt;b&gt;Author:&lt;/b&gt; &lt;a href='http://www.bluespec.com/forum/profile.php?mode=viewprofile&amp;u=69'&gt;patil.nikhil&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      &lt;b&gt;Posted:&lt;/b&gt; Sun May 04, 2008 4:21 am&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      As I understand it, it means that it is illegal to have these two methods in the same rule, but if they are in different rules, the rules will be allowed to fire in the same cycle, sequenced as specified.&lt;br /&gt;
&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;
interface X; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; method Action one&amp;#40;&amp;#41;; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; method Action two&amp;#40;&amp;#41;; &lt;br /&gt;
endinterface &lt;br /&gt;
&amp;#40;*synthesize*&amp;#41; &lt;br /&gt;
module mkX&amp;#40;X&amp;#41;; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; Reg#&amp;#40;int&amp;#41; a &amp;lt;- mkReg&amp;#40;0&amp;#41;; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; method Action one&amp;#40;&amp;#41;; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; a &amp;lt;= a + 1; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; endmethod &lt;br /&gt;
&amp;nbsp; &amp;nbsp; method Action two&amp;#40;&amp;#41;; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; a &amp;lt;= 2; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; endmethod &lt;br /&gt;
endmodule &lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
&amp;#40;*synthesize*&amp;#41; &lt;br /&gt;
module mkT&amp;#40;&amp;#41;; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; let x &amp;lt;- mkX; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; rule r1; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; x.one&amp;#40;&amp;#41;; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; endrule &lt;br /&gt;
&amp;nbsp; &amp;nbsp; rule r2; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; x.two&amp;#40;&amp;#41;; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; endrule &lt;br /&gt;
&amp;nbsp; &amp;nbsp; //rule r3; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; //&amp;nbsp; &amp;nbsp; x.one&amp;#40;&amp;#41;; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; //&amp;nbsp; &amp;nbsp; x.two&amp;#40;&amp;#41;; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; //endrule &lt;br /&gt;
endmodule&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;
If you look at the schedule generated by this code, method one is sequenced before (restricted) two. This allows rules r1, r2 above to fire every cycle; but rule r3 craps out with: Rule `RL_r3' uses methods that conflict in parallel.</description>
                                        <comments>http://www.bluespec.com/forum/viewtopic.php?p=246#246</comments>
                                        <author>patil.nikhil</author>
                                        <pubDate>Sun May 04, 2008 4:21 am</pubDate>
                                        <guid isPermaLink="true">http://www.bluespec.com/forum/viewtopic.php?p=246#246</guid>
                                      </item>
                                      <item>
                                        <title>type error (T0020)</title>
                                        <link>http://www.bluespec.com/forum/viewtopic.php?p=244#244</link>
                                        <description>&lt;br /&gt;
                                      &lt;b&gt;Author:&lt;/b&gt; &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;
                                      &lt;b&gt;Posted:&lt;/b&gt; Thu May 01, 2008 12:50 pm&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      Have you tried valueof(n)?&lt;br /&gt;
BTW, is Max#(n,0,n) really necessary?&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;adarsh wrote:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;quote&quot;&gt;How can I extract the size 'n'  of  't'  into an integer variable in the following code?&lt;br /&gt;
&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;function Action junk &amp;#40;t x&amp;#41; provisos&amp;#40; Bits#&amp;#40;t,n&amp;#41;, Max#&amp;#40;n,0,n&amp;#41;&amp;#41;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;$display&amp;#40;&amp;quot; n = %d&amp;quot;, n&amp;#41;;&lt;br /&gt;
endfunction&lt;br /&gt;
&lt;br /&gt;
&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;</description>
                                        <comments>http://www.bluespec.com/forum/viewtopic.php?p=244#244</comments>
                                        <author>wychen</author>
                                        <pubDate>Thu May 01, 2008 12:50 pm</pubDate>
                                        <guid isPermaLink="true">http://www.bluespec.com/forum/viewtopic.php?p=244#244</guid>
                                      </item>
                                      <item>
                                        <title>how to use provisos?</title>
                                        <link>http://www.bluespec.com/forum/viewtopic.php?p=240#240</link>
                                        <description>&lt;br /&gt;
                                      &lt;b&gt;Author:&lt;/b&gt; &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;
                                      &lt;b&gt;Posted:&lt;/b&gt; Thu Apr 24, 2008 12:31 pm&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&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;adarsh wrote:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;quote&quot;&gt;&lt;br /&gt;
the will fire condition for this rule will have&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;&amp;nbsp;&lt;br /&gt;
assign WILL_FIRE_RL_enqFIFO =&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;fifoc$FULL_N &amp;amp;&amp;amp; fifoa1$EMPTY_N &amp;amp;&amp;amp; fifoa2$EMPTY_N &amp;amp;&amp;amp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;fifob1$EMPTY_N &amp;amp;&amp;amp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;fifob2$EMPTY_N ;&lt;br /&gt;
&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;
here even though cond1 is false, if fifoa1 is empty the rule won't fire.  What is the best way to handle such situations? is it possible to suppress implicit predicates?&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;&lt;br /&gt;
You can try a command-line parameter of bsc &amp;quot;-aggressive-conditions&amp;quot;. User guide contains more explanations.</description>
                                        <comments>http://www.bluespec.com/forum/viewtopic.php?p=240#240</comments>
                                        <author>wychen</author>
                                        <pubDate>Thu Apr 24, 2008 12:31 pm</pubDate>
                                        <guid isPermaLink="true">http://www.bluespec.com/forum/viewtopic.php?p=240#240</guid>
                                      </item>
                                      <item>
                                        <title>BSV Application Notes</title>
                                        <link>http://www.bluespec.com/forum/viewtopic.php?p=225#225</link>
                                        <description>&lt;br /&gt;
                                      &lt;b&gt;Author:&lt;/b&gt; &lt;a href='http://www.bluespec.com/forum/profile.php?mode=viewprofile&amp;u=5'&gt;kczeck&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      &lt;b&gt;Posted:&lt;/b&gt; Fri Apr 18, 2008 11:47 am&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      The OCP foundation supplies standard libraries for implementing and interacting with OCP interfaces in SystemC models.  This application note describes how to use these libraries with a BSV design which contains OCP interfaces or sub-interfaces, so that they can interact at the TLM-level with the SystemC environment in which they are embedded.&lt;br /&gt;
&lt;br /&gt;
A SystemC model can be generated from a BSV design using the  -systemc flag during the  bsc link stage.  The generated SystemC model has a clocked, signal-level interface which reflects the (flattened) top-level interface of the BSV design.</description>
                                        <comments>http://www.bluespec.com/forum/viewtopic.php?p=225#225</comments>
                                        <author>kczeck</author>
                                        <pubDate>Fri Apr 18, 2008 11:47 am</pubDate>
                                        <guid isPermaLink="true">http://www.bluespec.com/forum/viewtopic.php?p=225#225</guid>
                                      </item>
                                      <item>
                                        <title>Multi-clock domain question</title>
                                        <link>http://www.bluespec.com/forum/viewtopic.php?p=223#223</link>
                                        <description>&lt;br /&gt;
                                      &lt;b&gt;Author:&lt;/b&gt; &lt;a href='http://www.bluespec.com/forum/profile.php?mode=viewprofile&amp;u=224'&gt;kapilvar&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      &lt;b&gt;Posted:&lt;/b&gt; Fri Apr 18, 2008 7:58 am&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      these days i write the code for PS/2 keyboard interface in bluespec .....i m new in bluespec .....i am facing the problem of multiple clock ...any one can help me regarding this.....&lt;br /&gt;
actually i have to transfer the 8 bit of data one clock domain to the differnt clock domain ....</description>
                                        <comments>http://www.bluespec.com/forum/viewtopic.php?p=223#223</comments>
                                        <author>kapilvar</author>
                                        <pubDate>Fri Apr 18, 2008 7:58 am</pubDate>
                                        <guid isPermaLink="true">http://www.bluespec.com/forum/viewtopic.php?p=223#223</guid>
                                      </item>
                                      <item>
                                        <title>reg Verilog simulator</title>
                                        <link>http://www.bluespec.com/forum/viewtopic.php?p=219#219</link>
                                        <description>&lt;br /&gt;
                                      &lt;b&gt;Author:&lt;/b&gt; &lt;a href='http://www.bluespec.com/forum/profile.php?mode=viewprofile&amp;u=206'&gt;praghu_cool&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      &lt;b&gt;Posted:&lt;/b&gt; Thu Mar 27, 2008 2:20 am&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      thank you jhshao</description>
                                        <comments>http://www.bluespec.com/forum/viewtopic.php?p=219#219</comments>
                                        <author>praghu_cool</author>
                                        <pubDate>Thu Mar 27, 2008 2:20 am</pubDate>
                                        <guid isPermaLink="true">http://www.bluespec.com/forum/viewtopic.php?p=219#219</guid>
                                      </item>
                                      <item>
                                        <title>Mac OS X version of BSC?</title>
                                        <link>http://www.bluespec.com/forum/viewtopic.php?p=215#215</link>
                                        <description>&lt;br /&gt;
                                      &lt;b&gt;Author:&lt;/b&gt; &lt;a href='http://www.bluespec.com/forum/profile.php?mode=viewprofile&amp;u=3'&gt;crimsoncardinal&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      &lt;b&gt;Posted:&lt;/b&gt; Sun Mar 16, 2008 9:34 pm&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      We don't currently support a native version for MAC OS X and we don't currently have plans for a native version.  We'll certainly give you a heads up if that should change.&lt;br /&gt;
&lt;br /&gt;
I'll be bringing up BSC on Linux on VMWare Fusion on MAC OS X in the next few weeks, though agree it would be nice to have a native version.&lt;br /&gt;
&lt;br /&gt;
Operating system support is largely a matter of market demand -- so we'll note your request.</description>
                                        <comments>http://www.bluespec.com/forum/viewtopic.php?p=215#215</comments>
                                        <author>crimsoncardinal</author>
                                        <pubDate>Sun Mar 16, 2008 9:34 pm</pubDate>
                                        <guid isPermaLink="true">http://www.bluespec.com/forum/viewtopic.php?p=215#215</guid>
                                      </item>
                                      <item>
                                        <title>Type checking on index of Vector</title>
                                        <link>http://www.bluespec.com/forum/viewtopic.php?p=213#213</link>
                                        <description>&lt;br /&gt;
                                      &lt;b&gt;Author:&lt;/b&gt; &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;
                                      &lt;b&gt;Posted:&lt;/b&gt; Wed Mar 12, 2008 2:11 am&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      Hmm. The example I gave above is not a good one.&lt;br /&gt;
The problem I faced is more like this:&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;
UInt#&amp;#40;3&amp;#41; index = ?;&lt;br /&gt;
//&amp;#40;index is modified dynamically&amp;#41;&lt;br /&gt;
Vector#&amp;#40;4,Bit#&amp;#40;1&amp;#41;&amp;#41; arr;&lt;br /&gt;
let data = arr&amp;#91;index&amp;#93;; &lt;br /&gt;
&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;&lt;br /&gt;
Since the index is modified dynamically, there is no way to check the validity in compile-time. However, in the generated Verilog file, the index is truncated to two bits since there are only 4 entries in arr. As a result, this hidden bit truncation and possible source of bug cannot be discovered by using nLint.&lt;br /&gt;
In my opinion, either bsc issues a warning or error at runtime indicating the bit-width of index is too wide and will be automatically truncated or just doesn't compile, or keep 3-bit index in generated Verilog file so the down-stream tools have the chance to discover this. I guess most Verilog simulators give X as an output then the index is out-of-range.&lt;br /&gt;
The ultimate solution would still be the run-time checking, and I'd like to see it implemented.</description>
                                        <comments>http://www.bluespec.com/forum/viewtopic.php?p=213#213</comments>
                                        <author>wychen</author>
                                        <pubDate>Wed Mar 12, 2008 2:11 am</pubDate>
                                        <guid isPermaLink="true">http://www.bluespec.com/forum/viewtopic.php?p=213#213</guid>
                                      </item>
                                      <item>
                                        <title>allocating more than one resource to a method?</title>
                                        <link>http://www.bluespec.com/forum/viewtopic.php?p=210#210</link>
                                        <description>&lt;br /&gt;
                                      &lt;b&gt;Author:&lt;/b&gt; &lt;a href='http://www.bluespec.com/forum/profile.php?mode=viewprofile&amp;u=69'&gt;patil.nikhil&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      &lt;b&gt;Posted:&lt;/b&gt; Wed Mar 05, 2008 12:27 pm&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&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;wychen wrote:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;quote&quot;&gt;&lt;br /&gt;
This is very similar to the first example. The only difference is that the argument of doit1() can be different, which should be fine. We would expect a 2-to-1 mux be synthesized in front of doit1 port. However, once you put the (* synthesize *) attribute back to mkAdd_2, it won't compile. This behavior is observed from bsc version in early 2007 till now.&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
I just realized that this is documented in the &amp;quot;known problems and solutions&amp;quot; document (doc/BSV/kpns.pdf) as problem#001: Mutually-exclusive uses of port-limited resources may be allocated inefficiently. The KPNS says that the workaround is to replace the if-else by:&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;
x &amp;lt;= &amp;#40;z == 0&amp;#41; ? a.doit1&amp;#40;x,x&amp;#41; &amp;#58; a.doit1&amp;#40;z,z&amp;#41;;&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;
However, this does not work. Maybe the KPNS document is out-of-date.&lt;br /&gt;
&lt;br /&gt;
Of course, just explicitly making sure doit1 is called exactly once does work.</description>
                                        <comments>http://www.bluespec.com/forum/viewtopic.php?p=210#210</comments>
                                        <author>patil.nikhil</author>
                                        <pubDate>Wed Mar 05, 2008 12:27 pm</pubDate>
                                        <guid isPermaLink="true">http://www.bluespec.com/forum/viewtopic.php?p=210#210</guid>
                                      </item>
                                      <item>
                                        <title>Parallel compilation</title>
                                        <link>http://www.bluespec.com/forum/viewtopic.php?p=209#209</link>
                                        <description>&lt;br /&gt;
                                      &lt;b&gt;Author:&lt;/b&gt; &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;
                                      &lt;b&gt;Posted:&lt;/b&gt; Tue Mar 04, 2008 8:13 am&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      It would be cool if multiple cores can be utilized when compiling Bluespec code. This can be manually done by writing a Makefile and automatically generate dependency file like the example below. It would be even better if bsc can natively support this kind of parallelized compilation, so we don't have to write tricky gawk scripts.&lt;br /&gt;
&lt;br /&gt;
Using this technique, the fresh compilation takes around only 40% of original time on a 8 core machine with 5 licenses.&lt;br /&gt;
&lt;br /&gt;
Any comments are welcomed.&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;
-include .depend&lt;br /&gt;
&lt;br /&gt;
DEP = depend&lt;br /&gt;
$&amp;#40;DEP&amp;#41; &amp;#58; .depend&lt;br /&gt;
.depend &amp;#58; $&amp;#40;bsvsrcs&amp;#41; Makefile&lt;br /&gt;
&amp;nbsp; &amp;nbsp;cat $&amp;#40;bsvsrcs&amp;#41; | gawk '/^package/&amp;#123;sub&amp;#40;/;/,&amp;quot;&amp;quot;,$$2&amp;#41;;package=$$2;packages&amp;#91;package&amp;#93;=package&amp;#125;/^import/&amp;#123;sub&amp;#40;/&amp;#58;.*/,&amp;quot;&amp;quot;,$$2&amp;#41;;import&amp;#91;package,++iid&amp;#93;=$$2&amp;#125;END&amp;#123;for&amp;#40;x in import&amp;#41;&amp;#123;split&amp;#40;x,sep,SUBSEP&amp;#41;;if&amp;#40;packages&amp;#91;import&amp;#91;x&amp;#93;&amp;#93;&amp;#41; print sep&amp;#91;1&amp;#93;&amp;quot;.bo &amp;#58; &amp;quot;import&amp;#91;x&amp;#93;&amp;quot;.bo&amp;quot; &amp;#125;&amp;#125;' &amp;gt; .depend&lt;br /&gt;
&lt;br /&gt;
BSC_COMP = bsc&lt;br /&gt;
BSC_OPTS = -u -elab -show-module-use -verilog -keep-fires -aggressive-conditions \&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-relax-method-earliness -cross-info -v -show-schedule -show-range-conflict \&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-opt-undetermined-vals -O -wait-for-license&lt;br /&gt;
BSC_OPTS2 = +RTS -K1024M&lt;br /&gt;
&lt;br /&gt;
# Run the bluespec compiler&lt;br /&gt;
&lt;br /&gt;
%.bo &amp;#58; %.bsv $&amp;#40;DEP&amp;#41; $&amp;#40;bsvsrcs&amp;#41;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;$&amp;#40;BSC_COMP&amp;#41; $&amp;#40;BSC_OPTS&amp;#41; $&amp;lt; $&amp;#40;BSC_OPTS2&amp;#41; 2&amp;gt;&amp;amp;1 | tee $&amp;#40;basename $&amp;lt;&amp;#41;.log&lt;br /&gt;
&amp;nbsp; &amp;nbsp;grep 'All packages are up to date' $&amp;#40;basename $&amp;lt;&amp;#41;.log&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;</description>
                                        <comments>http://www.bluespec.com/forum/viewtopic.php?p=209#209</comments>
                                        <author>wychen</author>
                                        <pubDate>Tue Mar 04, 2008 8:13 am</pubDate>
                                        <guid isPermaLink="true">http://www.bluespec.com/forum/viewtopic.php?p=209#209</guid>
                                      </item></channel></rss>