File size: 3,616 Bytes
a69d692 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
<h3>2.2.3 Automatic Functional ECO example script</h3> <p>The ECO script employs the exact syntax of a Perl script. It executes exported APIs that interact with the netlist database, facilitating modifications to the netlist.</p> <p>The following is the example script for automatic functional ECO:</p> <div class='gofscript'><pre><span style='color:#b34c0a'># GOF ECO script, run_example.pl</span> use strict; <a class='n' href='#___setup_eco'>setup_eco</a>(<span style='color:#63ac0a'>"eco_example"</span>);<span style='color:#b34c0a'># Setup ECO name</span> <a class='n' href='#___read_library'>read_library</a>(<span style='color:#63ac0a'>"tsmc.5nm.lib"</span>);<span style='color:#b34c0a'># Read in standard library</span> <span style='color:#b34c0a'># SVF files are optional, best to be used when the design involves multibit flops</span> <span style='color:#b34c0a'>#read_svf("-ref", "reference.svf.txt"); # Optional, must be loaded before read_design, must be in text format</span> <span style='color:#b34c0a'>#read_svf("-imp", "implementation.svf.txt"); # Optional, must be loaded before read_design, must be in text format</span> <a class='n' href='#___read_design'>read_design</a>(<span style='color:#63ac0a'>"-ref"</span>, <span style='color:#63ac0a'>"reference.gv"</span>);<span style='color:#b34c0a'># Read in Reference Netlist</span> <a class='n' href='#___read_design'>read_design</a>(<span style='color:#63ac0a'>"-imp"</span>, <span style='color:#63ac0a'>"implementation.gv"</span>);<span style='color:#b34c0a'># Read in Implementation Netlist Which is under ECO</span> <a class='n' href='#___set_top'>set_top</a>(<span style='color:#63ac0a'>"topmod"</span>);<span style='color:#b34c0a'># Set the top module</span> <span style='color:#b34c0a'># Preserve DFT Test Logic</span> <a class='n' href='#___set_ignore_output'>set_ignore_output</a>(<span style='color:#63ac0a'>"scan_out*"</span>); <a class='n' href='#___set_pin_constant'>set_pin_constant</a>(<span style='color:#63ac0a'>"scan_enable"</span>, 0); <a class='n' href='#___set_pin_constant'>set_pin_constant</a>(<span style='color:#63ac0a'>"scan_mode"</span>, 0); <a class='n' href='#___fix_design'>fix_design</a>(); <a class='n' href='#___save_session'>save_session</a>(<span style='color:#63ac0a'>"current_eco_name"</span>); <span style='color:#b34c0a'># Save a session for future restoration</span> <a class='n' href='#___report_eco'>report_eco</a>(); <span style='color:#b34c0a'># ECO report</span> <a class='n' href='#___check_design'>check_design</a>(<span style='color:#63ac0a'>"-eco"</span>);<span style='color:#b34c0a'># Check if the ECO causes any issue, like floating</span> <a class='n' href='#___write_verilog'>write_verilog</a>(<span style='color:#63ac0a'>"eco_verilog.v"</span>);<span style='color:#b34c0a'># Write out ECO result in Verilog</span> <a class='n' href='#___run_lec'>run_lec</a>(); <span style='color:#b34c0a'># Run GOF LEC to generate Formality help files</span> <a class='n' href='#___write_compare_points'>write_compare_points</a>(<span style='color:#63ac0a'>"compare_points.report"</span>); <a class='n' href='#___write_formality_help_files'>write_formality_help_files</a>(<span style='color:#63ac0a'>"fm_dir/formality_help"</span>); <span style='color:#b34c0a'># formality_help files are generated in fm_dir folder</span> <span style='color:#b34c0a'># fm_dir/formality_help.config.tcl can be used in Formality script to pass logic equivalence checking</span> exit; <span style='color:#b34c0a'># Exit when the ECO is done, comment it out to go to interactive mode when 'GOF >' appears</span> </pre></div> |