1 | # Generic script file for creating the next state relation of a system. |
---|
2 | |
---|
3 | # Author: Rajeev K. Ranjan |
---|
4 | |
---|
5 | # Usage: |
---|
6 | # After reading in the design using one of |
---|
7 | # "read_blif, read_blif_mv, or read_verilog" commands, |
---|
8 | # on VIS prompt type: |
---|
9 | # source script_generic.simple |
---|
10 | # |
---|
11 | # Trouble shooting: |
---|
12 | # i) Invoke the script exactly the way prescribed (no option to "source") |
---|
13 | # ii) The script tries to create a file in the current directory. Make sure |
---|
14 | # that the directory is writable by you. |
---|
15 | |
---|
16 | ### Script starts here ################################################# |
---|
17 | |
---|
18 | # Get rid of the aliases for the commands used in this file |
---|
19 | |
---|
20 | unalias flatten_hierarchy |
---|
21 | unalias static_order |
---|
22 | unalias build_partition_mdds |
---|
23 | unalias print_img_info |
---|
24 | unalias compute_reach |
---|
25 | unalias dynamic_var_ordering |
---|
26 | unalias write_order |
---|
27 | |
---|
28 | # flatten the hierarchy |
---|
29 | flatten_hierarchy |
---|
30 | |
---|
31 | # Variable ordering, assuming the default has taken care of the best |
---|
32 | # setting. |
---|
33 | |
---|
34 | static_order |
---|
35 | |
---|
36 | # Build the next state functions. Use the frontier method such that in |
---|
37 | # case of very large examples, we can create intermediate variables |
---|
38 | # and have a handle on the BDD size. |
---|
39 | |
---|
40 | # We do not want next state functions to have more than 5000 nodes. |
---|
41 | |
---|
42 | set partition_threshold 5000 |
---|
43 | build_partition_mdds frontier |
---|
44 | |
---|
45 | # Next create the next state relation, create clusters and |
---|
46 | # order them. |
---|
47 | |
---|
48 | # Use the method published in IWLS 95. |
---|
49 | # And set the appropriate parameters |
---|
50 | |
---|
51 | set image_method iwls95 |
---|
52 | |
---|
53 | # Make clusters of no larger than 5000 |
---|
54 | |
---|
55 | set image_cluster_size 5000 |
---|
56 | |
---|
57 | # This command is a clumsy way to create the next state relations. |
---|
58 | |
---|
59 | print_img_info |
---|
60 | |
---|
61 | # Invoke the sifting operation to reduce the BDD size |
---|
62 | |
---|
63 | dynamic_var_ordering -f sift |
---|
64 | |
---|
65 | # Save the ordering in a file, to be used later (using a unique name). |
---|
66 | |
---|
67 | write_order __vis.order |
---|
68 | |
---|
69 | # Restart the computation |
---|
70 | |
---|
71 | flatten_hierarchy |
---|
72 | |
---|
73 | # Use the variable ordering obtained after reordering. |
---|
74 | |
---|
75 | static_order -s input_and_latch __vis.order |
---|
76 | |
---|
77 | build_partition_mdds frontier |
---|
78 | |
---|
79 | # This command is a clumsy way to create the next state relations. |
---|
80 | |
---|
81 | print_img_info |
---|