#!/bin/bash
# substitutes all 'xxx_' references in template file with real ones
#
sed "s/xxx_output_threshold_pct_rise/$output_threshold_pct_rise/g" | \
sed "s/xxx_output_threshold_pct_fall/$output_threshold_pct_fall/g" | \
sed "s/xxx_input_threshold_pct_rise/$input_threshold_pct_rise/g" | \
sed "s/xxx_input_threshold_pct_fall/$input_threshold_pct_fall/g" | \
sed "s/xxx_output_threshold_rise/$output_threshold_rise/g" | \
sed "s/xxx_output_threshold_fall/$output_threshold_fall/g" | \
sed "s/xxx_input_threshold_rise/$input_threshold_rise/g" | \
sed "s/xxx_input_threshold_fall/$input_threshold_fall/g" | \
sed "s/xxx_input_net_transition/$input_net_transition/g" | \
sed "s/xxx_param_description/$param_description/g" | \
sed "s/xxx_lower_lh_pct/${threshold_pct[0]}/g" | \
sed "s/xxx_upper_lh_pct/${threshold_pct[1]}/g" | \
sed "s/xxx_lower_hl_pct/${threshold_pct[2]}/g" | \
sed "s/xxx_upper_hl_pct/${threshold_pct[3]}/g" | \
sed "s/xxx_lower_hh_pct/${threshold_pct[4]}/g" | \
sed "s/xxx_upper_hh_pct/${threshold_pct[5]}/g" | \
sed "s/xxx_lower_ll_pct/${threshold_pct[6]}/g" | \
sed "s/xxx_upper_ll_pct/${threshold_pct[7]}/g" | \
sed "s/xxx_one_track_area/$one_track_area/g" | \
sed "s/xxx_min_transition/$min_transition/g" | \
sed "s/xxx_outputpin_list/$outputpin_list/g" | \
sed "s!xxx_htmlsource_dir!$htmlsource_dir!g" | \
sed "s/xxx_cell_footprint/$cell_footprint/g" | \
sed "s/xxx_inputpin_list/$inputpin_list/g" | \
sed "s/xxx_rise_slope_lo/$rise_slope_lo/g" | \
sed "s/xxx_rise_slope_hi/$rise_slope_hi/g" | \
sed "s/xxx_fall_slope_lo/$fall_slope_lo/g" | \
sed "s/xxx_fall_slope_hi/$fall_slope_hi/g" | \
sed "s/xxx_transition_10/$transition_10/g" | \
sed "s/xxx_transition_9/$transition_9/g" | \
sed "s/xxx_unate_values/$unate_values/g" | \
sed "s!xxx_vbesourcedir!$vbesourcedir!g" | \
sed "s/xxx_ref_inverter/$ref_inverter/g" | \
sed "s/xxx_inverter_name/$inverter_name/g" | \
sed "s/xxx_lower_lh/${threshold[0]}/g" | \
sed "s/xxx_upper_lh/${threshold[1]}/g" | \
sed "s/xxx_lower_hl/${threshold[2]}/g" | \
sed "s/xxx_upper_hl/${threshold[3]}/g" | \
sed "s/xxx_lower_hh/${threshold[4]}/g" | \
sed "s/xxx_upper_hh/${threshold[5]}/g" | \
sed "s/xxx_lower_ll/${threshold[6]}/g" | \
sed "s/xxx_upper_ll/${threshold[7]}/g" | \
sed "s/xxx_temperature/$temperature/g" | \
sed "s/xxx_cell_list/$cell_list/g" | \
sed "s!xxx_html_dir!$html_dir!g" | \
sed "s/xxx_function/$function/g" | \
sed "s/xxx_pleakage/$pleakage/g" | \
sed "s/xxx_nleakage/$nleakage/g" | \
sed "s/xxx_loadcap0/$loadcap0/g" | \
sed "s/xxx_loadcap1/$loadcap1/g" | \
sed "s/xxx_loadcap2/$loadcap2/g" | \
sed "s/xxx_loadcap3/$loadcap3/g" | \
sed "s/xxx_loadcap4/$loadcap4/g" | \
sed "s/xxx_loadcap5/$loadcap5/g" | \
sed "s/xxx_inthresh/$inthresh/g" | \
sed "s/xxx_outhresh/$outhresh/g" | \
sed "s/xxx_std_load/$std_load/g" | \
sed "s/xxx_vsupply/$vsupply/g" | \
sed "s/xxx_unitcap/$unitcap/g" | \
sed "s/xxx_library/$library/g" | \
sed "s/xxx_lambda/$lambda/g" | \
sed "s!xxx_pmddir!$pmddir!g" | \
sed "s!xxx_libdir!$libdir!g" | \
sed "s/xxx_techno/$techno/g" | \
sed "s/xxx_drive/$drive/g" | \
sed "s/xxx_cell/$cell/g" | \
sed "s/xxx_vdd/$vdd/g"
