All about a Verilog Netlist Database project hosted at SourceForge:

Monday, April 20, 2009

Remove all unreachables

I uploaded to a more comprehensive solution to the unreachable removal issue I detailed in my earlier blog.

The details of the unreachable algorithm are in file ruby/srcs/unreach.rb.

I made the nldb system more irb friendly, which required a little hack so I could pass -Xmx arguments through to the jvm.

So, we can go interactive to remove unreachables:

> java -version
java version "1.6.0_11"
Java(TM) SE Runtime Environment (build 1.6.0_11-b03)
Java HotSpot(TM) 64-Bit Server VM (build 11.0-b16, mixed mode)
> jruby -v
jruby 1.2.0 (ruby 1.8.6 patchlevel 287) (2009-03-16 rev 9419) [amd64-java]
> pwd

## Launch irb after loading nldb
> ../../bin/nldb

## Load xlnx.lib.gv library and unreach.xlnx.gv netlist and link top 'unreach'
irb(main):001:0> top ='unreach', '--lib xlnx.lib.gv unreach.xlnx.gv'.split)
Info: xlnx.lib.gv: processed (as a library) in 0 (secs).
Info: unreach.xlnx.gv: processed in 0 (secs).
Info: linking references ...
Info: link (references) time: 0 (secs).
Info: linking connections ...
Info: link (connections) time: 0 (secs).
Info: 0 (secs): total elapsed.

## Load 'unreach.rb'
irb(main):003:0> require 'unreach'
=> true

## Delete all unreachable cells in design referenced in top (we loaded above).
irb(main):004:0> delete_all_unreachable(top, true, nil) {c true}
Info: Unreachable pass 1 ...
Info: unrch_d1_2_3: unreachable (deleted)
Info: unrch_d1_2_2: unreachable (deleted)
Info: unrch_d1_2_1: unreachable (deleted)
Info: unrch_d1_2_0: unreachable (deleted)
Info: Unreachable pass 2 ...
Info: \Madd_unrch_d1_2_add0000_xor<3>11: unreachable (deleted)
Info: Madd_unrch_d1_2_add00001: unreachable (deleted)
Info: \Madd_unrch_d1_2_add0000_xor<2>11: unreachable (deleted)
Info: \Madd_unrch_d1_2_add0000_xor<1>11: unreachable (deleted)
Info: Unreachable pass 3 ...
Info: Madd_unrch_d1_2_add000071: unreachable (deleted)
Info: \Madd_unrch_d1_2_add0000_cy<1>11: unreachable (deleted)
Info: unrch_d1_1_2: unreachable (deleted)
Info: Unreachable pass 4 ...
Info: unrch_d1_1_0: unreachable (deleted)
Info: unrch_d1_1_1: unreachable (deleted)
Info: unrch_d1_1_3: unreachable (deleted)
Info: Unreachable pass 5 ...
Info: After pass 1: 4 unreachable cell(s) deleted
Info: After pass 2: 4 unreachable cell(s) deleted
Info: After pass 3: 3 unreachable cell(s) deleted
Info: After pass 4: 3 unreachable cell(s) deleted
Info: 14 unreachable cell(s) deleted
=> 14

## Save our updated top design into '' netlist
Info: generating ...

irb(main):006:0> exit

To be continued...

No comments:

Post a Comment