<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8088508857572947626</id><updated>2011-04-21T17:14:16.395-07:00</updated><title type='text'>Verilog Netlist Database</title><subtitle type='html'>All about a Verilog Netlist Database project hosted at SourceForge: http://nldb.sourceforge.net</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://nldb.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8088508857572947626/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://nldb.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>kpfalzer</name><uri>http://www.blogger.com/profile/00750994667177946446</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>3</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8088508857572947626.post-4383239883010714884</id><published>2009-05-01T08:49:00.000-07:00</published><updated>2009-05-01T09:01:24.492-07:00</updated><title type='text'>Check for port differences</title><content type='html'>I uploaded to &lt;a href="http://nldb.sourceforge.net/"&gt;http://nldb.sourceforge.net&lt;/a&gt; a script &lt;span style="font-family: courier new;"&gt;bin/portdiff&lt;/span&gt; (see &lt;span style="font-family: courier new;"&gt;ruby/srcs/portdiff.rb&lt;/span&gt; for details):&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;Usage: portdiff topModule gold.v rev.v libs.v ...&lt;br /&gt;&lt;br /&gt;Load gold.v and rev.v and any remaining libraries: libs.v.&lt;br /&gt;Link each (gold and rev) at level topModule.&lt;br /&gt;&lt;br /&gt;Print ports which are not in the intersection set of ports&lt;br /&gt;of gold and rev.&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;This utility is useful for communicating a block's pin changes to a place and route team, for example; since they will always want to know if there are new or removed block pins which could trigger a new floorplan exercise.&lt;br /&gt;&lt;br /&gt;Once you download and install:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;[karl@localhost nldb]$ &lt;span style="font-weight: bold;"&gt;pwd&lt;/span&gt;&lt;br /&gt;/&lt;span style="font-style: italic;"&gt;home/karl/projects/local&lt;/span&gt;/nldb&lt;br /&gt;[karl@localhost nldb]$ &lt;span style="font-weight: bold;"&gt;cd tests/t2&lt;/span&gt;&lt;br /&gt;[karl@localhost t2]$ &lt;span style="font-weight: bold;"&gt;java -version&lt;/span&gt;&lt;br /&gt;java version "1.6.0_11"&lt;br /&gt;Java(TM) SE Runtime Environment (build 1.6.0_11-b03)&lt;br /&gt;Java HotSpot(TM) 64-Bit Server VM (build 11.0-b16, mixed mode)&lt;br /&gt;[karl@localhost t2]$ &lt;span style="font-weight: bold;"&gt;jruby -v&lt;/span&gt;&lt;br /&gt;jruby 1.2.0 (ruby 1.8.6 patchlevel 287) (2009-03-16 rev 9419) [amd64-java]&lt;br /&gt;[karl@localhost t2]$ &lt;span style="font-weight: bold;"&gt;../../bin/portdiff block block.gv block.rev.gv&lt;/span&gt;&lt;br /&gt;Info: block.gv: processed in 0 (secs).&lt;br /&gt;Info: linking references ...&lt;br /&gt;Info: link (references) time: 0 (secs).&lt;br /&gt;Info: linking connections ...&lt;br /&gt;Info: link (connections) time: 0 (secs).&lt;br /&gt;Info: 0 (secs): total elapsed.&lt;br /&gt;Info: block.rev.gv: processed in 0 (secs).&lt;br /&gt;Info: linking references ...&lt;br /&gt;Info: link (references) time: 0 (secs).&lt;br /&gt;Info: linking connections ...&lt;br /&gt;Info: link (connections) time: 0 (secs).&lt;br /&gt;Info: 0 (secs): total elapsed.&lt;br /&gt;&lt;span style="color: rgb(204, 0, 0);"&gt;Info: block: 2 added, 1 removed in revised&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 0, 0);"&gt;Warn: block: port "i4" added in revised&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 0, 0);"&gt;Warn: block: port "i5" added in revised&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 0, 0);"&gt;Warn: block: port "z3" removed in revised&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;That's all for now.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8088508857572947626-4383239883010714884?l=nldb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nldb.blogspot.com/feeds/4383239883010714884/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nldb.blogspot.com/2009/05/check-for-port-differences.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8088508857572947626/posts/default/4383239883010714884'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8088508857572947626/posts/default/4383239883010714884'/><link rel='alternate' type='text/html' href='http://nldb.blogspot.com/2009/05/check-for-port-differences.html' title='Check for port differences'/><author><name>kpfalzer</name><uri>http://www.blogger.com/profile/00750994667177946446</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8088508857572947626.post-5202828894228701688</id><published>2009-04-20T09:11:00.000-07:00</published><updated>2009-05-15T20:30:55.433-07:00</updated><title type='text'>Remove all unreachables</title><content type='html'>I uploaded to &lt;a href="http://nldb.sourceforge.net/"&gt;http://nldb.sourceforge.net/&lt;/a&gt; a more comprehensive solution to the unreachable removal issue I detailed in my &lt;a href="http://nldb.blogspot.com/2009/04/verilog-netlist-manipulations-begin.html"&gt;earlier blog&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The details of the unreachable algorithm are in file &lt;span style="FONT-WEIGHT: bold;font-family:courier new;" &gt;ruby/srcs/unreach.rb&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;I made the nldb system more irb friendly, which required a little hack so I could pass &lt;span style="FONT-WEIGHT: bold;font-family:courier new;" &gt;-Xmx&lt;/span&gt; arguments through to the jvm.&lt;br /&gt;&lt;br /&gt;So, we can go interactive to remove unreachables:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&gt; &lt;span style="FONT-WEIGHT: bold"&gt;java -version&lt;/span&gt;&lt;br /&gt;java version "1.6.0_11"&lt;br /&gt;Java(TM) SE Runtime Environment (build 1.6.0_11-b03)&lt;br /&gt;Java HotSpot(TM) 64-Bit Server VM (build 11.0-b16, mixed mode)&lt;br /&gt;&gt; &lt;span style="FONT-WEIGHT: bold"&gt;jruby -v&lt;/span&gt;&lt;br /&gt;jruby 1.2.0 (ruby 1.8.6 patchlevel 287) (2009-03-16 rev 9419) [amd64-java]&lt;br /&gt;&gt; &lt;span style="FONT-WEIGHT: bold"&gt;pwd&lt;/span&gt;&lt;br /&gt;/.../nldb/tests/t2&lt;br /&gt;&lt;br /&gt;&lt;span style="FONT-WEIGHT: bold; COLOR: rgb(204,51,204); FONT-STYLE: italic"&gt;## Launch irb after loading nldb&lt;/span&gt;&lt;br /&gt;&gt; &lt;span style="FONT-WEIGHT: bold"&gt;../../bin/nldb&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="FONT-WEIGHT: bold; COLOR: rgb(204,51,204); FONT-STYLE: italic"&gt;## Load xlnx.lib.gv library and unreach.xlnx.gv netlist and link top 'unreach'&lt;/span&gt;&lt;br /&gt;irb(main):001:0&gt; &lt;span style="FONT-WEIGHT: bold"&gt;top = Vmodule.new('unreach', '--lib xlnx.lib.gv unreach.xlnx.gv'.split)&lt;/span&gt;&lt;br /&gt;Info: xlnx.lib.gv: processed (as a library) in 0 (secs).&lt;br /&gt;Info: unreach.xlnx.gv: processed in 0 (secs).&lt;br /&gt;Info: linking references ...&lt;br /&gt;Info: link (references) time: 0 (secs).&lt;br /&gt;Info: linking connections ...&lt;br /&gt;Info: link (connections) time: 0 (secs).&lt;br /&gt;Info: 0 (secs): total elapsed.&lt;br /&gt;&lt;br /&gt;&lt;span style="FONT-WEIGHT: bold; COLOR: rgb(204,51,204); FONT-STYLE: italic"&gt;## Load 'unreach.rb'&lt;/span&gt;&lt;br /&gt;irb(main):003:0&gt; &lt;span style="FONT-WEIGHT: bold"&gt;require 'unreach'&lt;/span&gt;&lt;br /&gt;=&gt; true&lt;br /&gt;&lt;br /&gt;&lt;span style="FONT-WEIGHT: bold; COLOR: rgb(204,51,204); FONT-STYLE: italic"&gt;## Delete all unreachable cells in design referenced in top (we loaded above).&lt;/span&gt;&lt;br /&gt;irb(main):004:0&gt; &lt;span style="FONT-WEIGHT: bold"&gt;delete_all_unreachable(top, true, nil) {c true}&lt;/span&gt;&lt;br /&gt;Info: Unreachable pass 1 ...&lt;br /&gt;Info: unrch_d1_2_3: unreachable (deleted)&lt;br /&gt;Info: unrch_d1_2_2: unreachable (deleted)&lt;br /&gt;Info: unrch_d1_2_1: unreachable (deleted)&lt;br /&gt;Info: unrch_d1_2_0: unreachable (deleted)&lt;br /&gt;Info: Unreachable pass 2 ...&lt;br /&gt;Info: \Madd_unrch_d1_2_add0000_xor&lt;3&gt;11: unreachable (deleted)&lt;br /&gt;Info: Madd_unrch_d1_2_add00001: unreachable (deleted)&lt;br /&gt;Info: \Madd_unrch_d1_2_add0000_xor&lt;2&gt;11: unreachable (deleted)&lt;br /&gt;Info: \Madd_unrch_d1_2_add0000_xor&lt;1&gt;11: unreachable (deleted)&lt;br /&gt;Info: Unreachable pass 3 ...&lt;br /&gt;Info: Madd_unrch_d1_2_add000071: unreachable (deleted)&lt;br /&gt;Info: \Madd_unrch_d1_2_add0000_cy&lt;1&gt;11: unreachable (deleted)&lt;br /&gt;Info: unrch_d1_1_2: unreachable (deleted)&lt;br /&gt;Info: Unreachable pass 4 ...&lt;br /&gt;Info: unrch_d1_1_0: unreachable (deleted)&lt;br /&gt;Info: unrch_d1_1_1: unreachable (deleted)&lt;br /&gt;Info: unrch_d1_1_3: unreachable (deleted)&lt;br /&gt;Info: Unreachable pass 5 ...&lt;br /&gt;Info: After pass 1: 4 unreachable cell(s) deleted&lt;br /&gt;Info: After pass 2: 4 unreachable cell(s) deleted&lt;br /&gt;Info: After pass 3: 3 unreachable cell(s) deleted&lt;br /&gt;Info: After pass 4: 3 unreachable cell(s) deleted&lt;br /&gt;Info: 14 unreachable cell(s) deleted&lt;br /&gt;=&gt; 14&lt;br /&gt;&lt;br /&gt;&lt;span style="FONT-WEIGHT: bold; COLOR: rgb(204,51,204)"&gt;## Save our updated top design into 'unreach.save.gv' netlist&lt;/span&gt;&lt;br /&gt;irb(main):005:0&gt; &lt;span style="FONT-WEIGHT: bold"&gt;top.save(top.to_s+'.save.gv')&lt;/span&gt;&lt;br /&gt;Info: unreach.save.gv: generating ...&lt;br /&gt;&lt;br /&gt;irb(main):006:0&gt; &lt;span style="FONT-WEIGHT: bold"&gt;exit&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;To be continued...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8088508857572947626-5202828894228701688?l=nldb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nldb.blogspot.com/feeds/5202828894228701688/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nldb.blogspot.com/2009/04/remove-all-unreachables.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8088508857572947626/posts/default/5202828894228701688'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8088508857572947626/posts/default/5202828894228701688'/><link rel='alternate' type='text/html' href='http://nldb.blogspot.com/2009/04/remove-all-unreachables.html' title='Remove all unreachables'/><author><name>kpfalzer</name><uri>http://www.blogger.com/profile/00750994667177946446</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8088508857572947626.post-5144927590560176588</id><published>2009-04-03T10:02:00.000-07:00</published><updated>2009-04-03T10:31:09.830-07:00</updated><title type='text'>Verilog netlist manipulations begin</title><content type='html'>I posted the 1st (re-written) version of the nldb project to: &lt;a href="http://nldb.sourceforge.net/"&gt;http://nldb.sourceforge.net&lt;/a&gt;.&lt;br /&gt;As I had last mentioned at my other (related) project: &lt;a href="http://v2kparse.blogspot.com/"&gt;http://v2kparse.blogspot.com&lt;/a&gt;, I realized a need (and opportunity) to solve an immediate issue, so re-architected nldb to use Java and Ruby.&lt;br /&gt;&lt;br /&gt;The first use I found was to indentify and remove &lt;span style="font-style: italic;"&gt;unreachable&lt;/span&gt; flip-flops from a netlist.  There is a simple example in the download:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;1) &lt;a href="http://sourceforge.net/project/showfiles.php?group_id=209057"&gt;download release&lt;/a&gt;: nldb-1.0.tar.gz&lt;br /&gt;2) unload and install&lt;br /&gt;  &lt;span style="font-weight: bold;"&gt;mkdir nldb&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;   cd nldb&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;   tar zxvf ../nldb-1.0.tar.gz&lt;/span&gt;&lt;br /&gt;3) make sure you have a &lt;a href="http://java.com/en/"&gt;java JRE&lt;/a&gt; and &lt;a href="http://jruby.codehaus.org/"&gt;jruby&lt;/a&gt; installed:&lt;br /&gt;  &lt;span style="font-weight: bold;"&gt;java -version&lt;/span&gt;&lt;br /&gt;      java version "1.6.0_11"&lt;br /&gt;      Java(TM) SE Runtime Environment (build 1.6.0_11-b03)&lt;br /&gt;      Java HotSpot(TM) 64-Bit Server VM (build 11.0-b16, mixed mode)&lt;br /&gt;  &lt;span style="font-weight: bold;"&gt;jruby -v&lt;/span&gt;&lt;br /&gt;      jruby 1.2.0 (ruby 1.8.6 patchlevel 287) (2009-03-16 rev 9419) [amd64-java]&lt;br /&gt;4) run the testcase (which is based on a Xilinx generated netlist):&lt;br /&gt;  &lt;span style="font-weight: bold;"&gt;cd tests/t2&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;   ../../bin/nldb unreach --lib xlnx.lib.gv unreach.xlnx.gv&lt;/span&gt;&lt;br /&gt;      Info: xlnx.lib.gv: processed (as a library) in 0 (secs).&lt;br /&gt;      Info: unreach.xlnx.gv: processed in 0 (secs).&lt;br /&gt;      Info: linking references ...&lt;br /&gt;      Info: link (references) time: 0 (secs).&lt;br /&gt;      Info: linking connections ...&lt;br /&gt;      Info: link (connections) time: 0 (secs).&lt;br /&gt;      Info: 0 (secs): total elapsed.&lt;br /&gt;      Info: Unreachable pass 1 ...&lt;br /&gt;      Info: unrch_d1_2_3: unreachable (deleted)&lt;br /&gt;      Info: unrch_d1_2_2: unreachable (deleted)&lt;br /&gt;      Info: unrch_d1_2_1: unreachable (deleted)&lt;br /&gt;      Info: unrch_d1_2_0: unreachable (deleted)&lt;br /&gt;      Info: Unreachable pass 2 ...&lt;br /&gt;      Info: unrch_d1_1_0: unreachable (deleted)&lt;br /&gt;      Info: unrch_d1_1_2: unreachable (deleted)&lt;br /&gt;      Info: unrch_d1_1_1: unreachable (deleted)&lt;br /&gt;      Info: unrch_d1_1_3: unreachable (deleted)&lt;br /&gt;      Info: Unreachable pass 3 ...&lt;br /&gt;      Info: After pass 1: 4 unreachable cell(s) deleted&lt;br /&gt;      Info: After pass 2: 4 unreachable cell(s) deleted&lt;br /&gt;      Info: 8 unreachable cell(s) deleted&lt;br /&gt;      Info: unreach.save.gv: generating ...&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;NOTE: While I did use &lt;a href="http://www.xilinx.com/ise/logic_design_prod/webpack.htm"&gt;Xilinx ISE&lt;/a&gt; to generate a netlist from Verilog RTL (see tests/t2/unreach.v), be advised that the Xilinx synthesis tool does normally remove unreachable logic automatically (by default).&lt;br /&gt;&lt;br /&gt;I coerced the tool to retain unreachable flops by embedding KEEP meta-comments in the RTL.&lt;br /&gt;&lt;br /&gt;If I did not add the KEEP, the generated netlist would have removed the unreachables; and, this nldb example would not have been very interesting...&lt;br /&gt;&lt;br /&gt;(Phew, hopefully that disclaimer will keep the Xilinx fans and lawyers from accusing me of spreading FUD!)&lt;br /&gt;&lt;br /&gt;Now, in my normal day job, I synthesize for ASIC implementation (not FPGAs, currently).  The ASIC synthesis tools often generated netlists w/ unreachable logic. Most times, it is a user/flow issue: i.e., there are dont-touches, desire for simpler FEC (formal equivalency checking), constraints, etc.&lt;br /&gt;&lt;br /&gt;For whatever reason, my need was simply to find out any unreachables and then delete them.  As is stated in the usage of my example:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;#from tests/t2 directory&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;../../bin/nldb&lt;/span&gt;&lt;br /&gt;  ...&lt;br /&gt;  The unreachable algorithm repeatedly removes any unreachable flops until there&lt;br /&gt;  are no more unreachable flops remaining.  This *repeat* operation is required,&lt;br /&gt;  since there may be "pipelines" which are ultimately unreachable.&lt;br /&gt;&lt;br /&gt;  A side-effect of removing (only) the unreachable flops could yield orphan&lt;br /&gt;  (combinational) logic (which formerly fed into the now removed unreachable&lt;br /&gt;  flops).  A future enhancement (or your own ruby code!) could add that&lt;br /&gt;  enhancement.&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;So, that's all for now.&lt;br /&gt;Enjoy!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8088508857572947626-5144927590560176588?l=nldb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nldb.blogspot.com/feeds/5144927590560176588/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nldb.blogspot.com/2009/04/verilog-netlist-manipulations-begin.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8088508857572947626/posts/default/5144927590560176588'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8088508857572947626/posts/default/5144927590560176588'/><link rel='alternate' type='text/html' href='http://nldb.blogspot.com/2009/04/verilog-netlist-manipulations-begin.html' title='Verilog netlist manipulations begin'/><author><name>kpfalzer</name><uri>http://www.blogger.com/profile/00750994667177946446</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
