#!/usr/local/bin/perl # # synth.pl # Version 0.1 # 9/13/04 Rhett Davis # use lib $ENV{SSHAFT_PERL}; use sshaft; beginstep("synth.pl"); #### Argument Defaults #### $lib="mylib"; while (@ARGV) { $_ = shift; if (/^-mod$/) { $modname = shift; } elsif (/^-file$/) { $file = shift; } elsif (/^-lib$/) { $lib = shift; } elsif (/^-per$/) { $period = shift; } elsif (/^-clk$/) { $clknode = shift; } else { logf(LOG_WARN,"WARNING: Unrecognized argument: $_"); } } dir_init("run/dc",DesignCompiler); ##### Open the destination File and step through the possible modes ##### $script="run/dc/synth.dcsh"; if (!open(SCRIPT,">$script")) { &dief("ERROR: Could not open $script for writing"); } print SCRIPT < area.rpt report_timing > timing.rpt write -output ${modname}_netl.db write -format verilog -output ${modname}_netl.v exit 0 EOM close(SCRIPT); @deps=($file); @targs=("run/dc/${modname}_netl.v"); substep(unix_prog, "dc_shell -f synth.dcsh >& synth.log", "run/dc", "run/dc/synth.log", "/Error:/", "fail", \@deps, \@targs); ##### Create the Cadence Library ##### dir_init("run/cds",CadenceDFII); if (!-e "run/cds/$lib") { substep(skill_step, "wrdCreateLib( ?lib \"$lib\")", "run/cds"); } ##### Create the VerilogIn Parameter file and run ihdl ##### $script="run/cds/verilogIn.param"; if (!open(SCRIPT,">$script")) { &dief("ERROR: Could not open $script for writing"); } $reflibs=gettechvar("CdsVerilogInRefLibs"); print SCRIPT < Verilog In for DFII User Guide -- or ic50/doc/verinuser/verinuser.pdf dest_sch_lib := $lib ref_lib_list := $reflibs structural_views := 1 EOM close(SCRIPT); @deps=("run/dc/${modname}_netl.v"); @targs=("run/cds/$lib/$modname/schematic/sch.cdb"); substep(unix_prog, "ihdl -f -param verilogIn.param ../dc/${modname}_netl.v >& ihdl.log", "run/cds", "run/cds/ihdl.log", "/Creating Schematic/", "pass", \@deps, \@targs); endstep;