#!/usr/bin/perl -w
use strict;
use warnings;
use Tk;
# Main Window
my $mw=new MainWindow;
$mw->title("Analog Test Mux Generator");
# Framed Radio buttons at top to choose output
#============================================
my $output_select="netlist";
#--------------------------------------------
my $frame=$mw->LabFrame(
-label=> "Ouput Select",
-labelside=>'acrosstop',
) ->pack(-expand=> '1', -fill=>'both', -side=>'top');
$frame->Radiobutton(
-variable=>\$output_select,
-value=>'netlist',
-text=>'Generate Netlist',
) ->pack(-side=>'left');
$frame->Radiobutton(
-variable=>\$output_select,
-value=>'template',
-text=>'Generate Template',
) ->pack(-side=>'right');
#============================================
my $input_filename;
my $sheet_number;
my $project_name;
#--------------------------------------------
my $netlist_args_frame=$mw->LabFrame(
-label=> "Netlist Input Options",
-labelside=>'acrosstop',
) ->pack(-expand=> '1', -fill=>'both', -side=>'top');
#--------------------------------------------
my $netlist_input_frame=$netlist_args_frame->Frame(
) ->pack(-expand=> '1', -fill=>'both', -side=>'top');
#--------------------------------------------
$netlist_input_frame->Label(
-text=>'Input Filename:'
)->pack(-side=>'left');
$input_filename=$netlist_input_frame->Entry(
# Width is in characters not in pixels
-width=>35,
)->pack(-side=>'right');
#--------------------------------------------
my $netlist_sheet_frame=$netlist_args_frame->Frame(
) ->pack(-expand=> '1', -fill=>'both', -side=>'top');
#--------------------------------------------
$netlist_sheet_frame->Label(
-text=>'Sheet Name/Number:',
)->pack(-side=>'left');
$sheet_number=$netlist_sheet_frame->Entry(
# Width is in characters not in pixels
-width=>35,
)->pack(-side=>'right');
#--------------------------------------------
my $netlist_proj_frame=$netlist_args_frame->Frame(
) ->pack(-expand=> '1', -fill=>'both', -side=>'top');
#--------------------------------------------
$netlist_proj_frame->Label(
-text=>'Project Name:',
)->pack(-side=>'left');
$project_name=$netlist_proj_frame->Entry(
# Width is in characters not in pixels
-width=>35,
)->pack(-side=>'right');
#--------------------------------------------
#============================================
my $template_output_filename;
my $template_project_name;
my $template_pin_list;
#--------------------------------------------
my $template_args_frame=$mw->LabFrame(
-label=> "Template Input Options",
-labelside=>'acrosstop',
) ->pack(-expand=> '1', -fill=>'both', -side=>'top');
#--------------------------------------------
my $template_output_frame=$template_args_frame->Frame(
) ->pack(-expand=> '1', -fill=>'both', -side=>'top');
#--------------------------------------------
$template_output_frame->Label(
-text=>'Template Filename:',
)->pack(-side=>'left');
$template_output_filename=$template_output_frame->Entry(
# Width is in characters not in pixels
-width=>35,
)->pack(-side=>'right');
#--------------------------------------------
my $template_proj_frame=$template_args_frame->Frame(
) ->pack(-expand=> '1', -fill=>'both', -side=>'top');
#--------------------------------------------
$template_proj_frame->Label(
-text=>'Project Name:',
)->pack(-side=>'left');
$template_project_name=$template_proj_frame->Entry(
# Width is in characters not in pixels
-width=>35,
)->pack(-side=>'right');
#--------------------------------------------
my $template_pins_frame=$template_args_frame->Frame(
) ->pack(-expand=> '1', -fill=>'both', -side=>'top');
#--------------------------------------------
$template_pins_frame->Label(
-text=>'Template Pins:',
)->pack(-side=>'left');
$template_pin_list=$template_pins_frame->Entry(
# Width is in characters not in pixels
-width=>35,
)->pack(-side=>'right');
#--------------------------------------------
#============================================
my $import_working_directory;
my $import_ref_lib;
my $import_dest_lib;
#--------------------------------------------
my $import_args_frame=$mw->LabFrame(
-label=> "Import Input Options",
-labelside=>'acrosstop',
) ->pack(-expand=> '1', -fill=>'both', -side=>'top');
#--------------------------------------------
my $import_dir_frame=$import_args_frame->Frame(
) ->pack(-expand=> '1', -fill=>'both', -side=>'top');
#--------------------------------------------
$import_dir_frame->Label(
-text=>'Working Directory:',
)->pack(-side=>'left');
$import_working_directory=$import_dir_frame->Entry(
# Width is in characters not in pixels
-width=>35,
)->pack(-side=>'right');
#--------------------------------------------
my $import_ref_frame=$import_args_frame->Frame(
) ->pack(-expand=> '1', -fill=>'both', -side=>'top');
#--------------------------------------------
$import_ref_frame->Label(
-text=>'Reference Library:',
)->pack(-side=>'left');
$import_ref_lib=$import_ref_frame->Entry(
# Width is in characters not in pixels
-width=>35,
)->pack(-side=>'right');
#--------------------------------------------
my $import_dest_frame=$import_args_frame->Frame(
) ->pack(-expand=> '1', -fill=>'both', -side=>'top');
#--------------------------------------------
$import_dest_frame->Label(
-text=>'Destination Library:',
)->pack(-side=>'left');
$import_dest_lib=$import_dest_frame->Entry(
# Width is in characters not in pixels
-width=>35,
)->pack(-side=>'right');
#--------------------------------------------
#============================================
#============================================
my $merge_option=0;
my $spares_option=0;
#--------------------------------------------
my $options_frame=$mw->LabFrame(
-label=> "Additional Options",
-labelside=>'acrosstop',
) ->pack(-expand=> '1', -fill=>'both', -side=>'top');
my $merge_check=$options_frame->Checkbutton(
-text=>"Merge Output Controls",
-variable=>\$merge_option
) ->pack(-side=>'left');
$merge_check->deselect();
my $spares_check=$options_frame->Checkbutton(
-text=>"Add Spare Cells",
-variable=>\$spares_option
) ->pack(-side=>'right');
$spares_check->deselect();
#============================================
my $exit = $mw->Button(-text => 'Exit',
-command => sub
{
exit;
});
$exit->pack(-side => 'bottom', -expand => '1', -fill => 'x');
#
my $generate = $mw->Button(-text => 'Generate',
-command => sub
{
generate();
});
$generate->pack(-side => 'bottom', -expand => '1', -fill => 'x');
MainLoop;
#print "Hello World\n";
# subroutines:
sub generate {
my $input_filename=$input_filename->get;
my $project_name=$project_name->get;
my $sheet_number=$sheet_number->get;
my $template_output_filename=$template_output_filename->get;
my $template_project_name=$template_project_name->get;
my $template_pin_list=$template_pin_list->get;
my $import_working_directory=$import_working_directory->get;
my $import_ref_lib=$import_ref_lib->get;
my $import_dest_lib=$import_dest_lib->get;
print "---------------------------------------------\n";
print "Input = $input_filename\n";
print "Sheet = $sheet_number\n";
print "Project = $project_name\n";
print "---------------------------------------------\n";
print "Template File = $template_output_filename\n";
print "Template Project = $template_project_name\n";
print "Template Pins:\n";
print "$_\n" foreach (split ', ', $template_pin_list);
print "---------------------------------------------\n";
print "Working Directory = $import_working_directory\n";
print "Ref Lib = $import_ref_lib\n";
print "Dest Lib = $import_dest_lib\n";
print "---------------------------------------------\n";
}
__END__
####
#!/usr/bin/perl -w
use strict;
use warnings;
use Tk;
# Main Window
my $mw=new MainWindow;
$mw->title("Analog Test Mux Generator");
# Framed Radio buttons at top to choose output
#============================================
my $output_select="netlist";
#--------------------------------------------
my $frame=$mw->LabFrame(
-label=> "Ouput Select",
-labelside=>'acrosstop',
) ->pack(-expand=> '1', -fill=>'both', -side=>'top');
$frame->Radiobutton(
-variable=>\$output_select,
-value=>'netlist',
-text=>'Generate Netlist',
) ->pack(-side=>'left');
$frame->Radiobutton(
-variable=>\$output_select,
-value=>'template',
-text=>'Generate Template',
) ->pack(-side=>'right');
#============================================
my $input_filename;
my $sheet_number;
my $project_name;
#--------------------------------------------
my $netlist_args_frame=$mw->LabFrame(
-label=> "Netlist Input Options",
-labelside=>'acrosstop',
) ->pack(-expand=> '1', -fill=>'both', -side=>'top');
#--------------------------------------------
my $netlist_input_frame=$netlist_args_frame->Frame(
) ->pack(-expand=> '1', -fill=>'both', -side=>'top');
#--------------------------------------------
$netlist_input_frame->Label(
-text=>'Input Filename:'
)->pack(-side=>'left');
$input_filename=$netlist_input_frame->Entry(
# Width is in characters not in pixels
-width=>35,
)->pack(-side=>'right');
#--------------------------------------------
my $netlist_sheet_frame=$netlist_args_frame->Frame(
) ->pack(-expand=> '1', -fill=>'both', -side=>'top');
#--------------------------------------------
$netlist_sheet_frame->Label(
-text=>'Sheet Name/Number:',
)->pack(-side=>'left');
$sheet_number=$netlist_sheet_frame->Entry(
# Width is in characters not in pixels
-width=>35,
)->pack(-side=>'right');
#--------------------------------------------
my $netlist_proj_frame=$netlist_args_frame->Frame(
) ->pack(-expand=> '1', -fill=>'both', -side=>'top');
#--------------------------------------------
$netlist_proj_frame->Label(
-text=>'Project Name:',
)->pack(-side=>'left');
$project_name=$netlist_proj_frame->Entry(
# Width is in characters not in pixels
-width=>35,
)->pack(-side=>'right');
#--------------------------------------------
#============================================
#my $template_output_filename;
#my $template_project_name;
#my $template_pin_list;
##--------------------------------------------
#my $template_args_frame=$mw->LabFrame(
#-label=> "Template Input Options",
#-labelside=>'acrosstop',
#) ->pack(-expand=> '1', -fill=>'both', -side=>'top');
##--------------------------------------------
#my $template_output_frame=$template_args_frame->Frame(
#) ->pack(-expand=> '1', -fill=>'both', -side=>'top');
##--------------------------------------------
#$template_output_frame->Label(
#-text=>'Template Filename:',
#)->pack(-side=>'left');
#$template_output_filename=$template_output_frame->Entry(
## Width is in characters not in pixels
#-width=>35,
#)->pack(-side=>'right');
##--------------------------------------------
#my $template_proj_frame=$template_args_frame->Frame(
#) ->pack(-expand=> '1', -fill=>'both', -side=>'top');
##--------------------------------------------
#$template_proj_frame->Label(
#-text=>'Project Name:',
#)->pack(-side=>'left');
#$template_project_name=$template_proj_frame->Entry(
## Width is in characters not in pixels
#-width=>35,
#)->pack(-side=>'right');
##--------------------------------------------
#my $template_pins_frame=$template_args_frame->Frame(
#) ->pack(-expand=> '1', -fill=>'both', -side=>'top');
##--------------------------------------------
#$template_pins_frame->Label(
#-text=>'Template Pins:',
#)->pack(-side=>'left');
#$template_pin_list=$template_pins_frame->Entry(
## Width is in characters not in pixels
#-width=>35,
#)->pack(-side=>'right');
##--------------------------------------------
#============================================
my $import_working_directory;
my $import_ref_lib;
my $import_dest_lib;
#--------------------------------------------
my $import_args_frame=$mw->LabFrame(
-label=> "Import Input Options",
-labelside=>'acrosstop',
) ->pack(-expand=> '1', -fill=>'both', -side=>'top');
#--------------------------------------------
my $import_dir_frame=$import_args_frame->Frame(
) ->pack(-expand=> '1', -fill=>'both', -side=>'top');
#--------------------------------------------
$import_dir_frame->Label(
-text=>'Working Directory:',
)->pack(-side=>'left');
$import_working_directory=$import_dir_frame->Entry(
# Width is in characters not in pixels
-width=>35,
)->pack(-side=>'right');
#--------------------------------------------
my $import_ref_frame=$import_args_frame->Frame(
) ->pack(-expand=> '1', -fill=>'both', -side=>'top');
#--------------------------------------------
$import_ref_frame->Label(
-text=>'Reference Library:',
)->pack(-side=>'left');
$import_ref_lib=$import_ref_frame->Entry(
# Width is in characters not in pixels
-width=>35,
)->pack(-side=>'right');
#--------------------------------------------
my $import_dest_frame=$import_args_frame->Frame(
) ->pack(-expand=> '1', -fill=>'both', -side=>'top');
#--------------------------------------------
$import_dest_frame->Label(
-text=>'Destination Library:',
)->pack(-side=>'left');
$import_dest_lib=$import_dest_frame->Entry(
# Width is in characters not in pixels
-width=>35,
)->pack(-side=>'right');
#--------------------------------------------
#============================================
#============================================
my $merge_option=0;
my $spares_option=0;
#--------------------------------------------
my $options_frame=$mw->LabFrame(
-label=> "Additional Options",
-labelside=>'acrosstop',
) ->pack(-expand=> '1', -fill=>'both', -side=>'top');
my $merge_check=$options_frame->Checkbutton(
-text=>"Merge Output Controls",
-variable=>\$merge_option
) ->pack(-side=>'left');
$merge_check->deselect();
my $spares_check=$options_frame->Checkbutton(
-text=>"Add Spare Cells",
-variable=>\$spares_option
) ->pack(-side=>'right');
$spares_check->deselect();
#============================================
my $exit = $mw->Button(-text => 'Exit',
-command => sub
{
exit;
});
$exit->pack(-side => 'bottom', -expand => '1', -fill => 'x');
#
my $generate = $mw->Button(-text => 'Generate',
-command => sub
{
generate();
});
$generate->pack(-side => 'bottom', -expand => '1', -fill => 'x');
MainLoop;
#print "Hello World\n";
# subroutines:
sub generate {
my $input_filename=$input_filename->get;
my $project_name=$project_name->get;
my $sheet_number=$sheet_number->get;
#my $template_output_filename=$template_output_filename->get;
#my $template_project_name=$template_project_name->get;
#my $template_pin_list=$template_pin_list->get;
my $import_working_directory=$import_working_directory->get;
my $import_ref_lib=$import_ref_lib->get;
my $import_dest_lib=$import_dest_lib->get;
print "---------------------------------------------\n";
print "Input = $input_filename\n";
print "Sheet = $sheet_number\n";
print "Project = $project_name\n";
#print "---------------------------------------------\n";
#print "Template File = $template_output_filename\n";
#print "Template Project = $template_project_name\n";
#print "Template Pins:\n";
#print "$_\n" foreach (split ', ', $template_pin_list);
print "---------------------------------------------\n";
print "Working Directory = $import_working_directory\n";
print "Ref Lib = $import_ref_lib\n";
print "Dest Lib = $import_dest_lib\n";
print "---------------------------------------------\n";
}
__END__
##
##
#!/usr/bin/perl -w
use strict;
use warnings;
use Tk;
# Main Window
my $mw=new MainWindow;
$mw->title("Analog Test Mux Generator");
# Framed Radio buttons at top to choose output
#============================================
my $output_select="template";
#--------------------------------------------
my $frame=$mw->LabFrame(
-label=> "Ouput Select",
-labelside=>'acrosstop',
) ->pack(-expand=> '1', -fill=>'both', -side=>'top');
$frame->Radiobutton(
-variable=>\$output_select,
-value=>'netlist',
-text=>'Generate Netlist',
) ->pack(-side=>'left');
$frame->Radiobutton(
-variable=>\$output_select,
-value=>'template',
-text=>'Generate Template',
) ->pack(-side=>'right');
#============================================
#my $input_filename;
#my $sheet_number;
#my $project_name;
##--------------------------------------------
#my $netlist_args_frame=$mw->LabFrame(
#-label=> "Netlist Input Options",
#-labelside=>'acrosstop',
#) ->pack(-expand=> '1', -fill=>'both', -side=>'top');
##--------------------------------------------
#my $netlist_input_frame=$netlist_args_frame->Frame(
#) ->pack(-expand=> '1', -fill=>'both', -side=>'top');
##--------------------------------------------
#$netlist_input_frame->Label(
#-text=>'Input Filename:'
#)->pack(-side=>'left');
#$input_filename=$netlist_input_frame->Entry(
## Width is in characters not in pixels
#-width=>35,
#)->pack(-side=>'right');
##--------------------------------------------
#my $netlist_sheet_frame=$netlist_args_frame->Frame(
#) ->pack(-expand=> '1', -fill=>'both', -side=>'top');
##--------------------------------------------
#$netlist_sheet_frame->Label(
#-text=>'Sheet Name/Number:',
#)->pack(-side=>'left');
#$sheet_number=$netlist_sheet_frame->Entry(
## Width is in characters not in pixels
#-width=>35,
#)->pack(-side=>'right');
##--------------------------------------------
#my $netlist_proj_frame=$netlist_args_frame->Frame(
#) ->pack(-expand=> '1', -fill=>'both', -side=>'top');
##--------------------------------------------
#$netlist_proj_frame->Label(
#-text=>'Project Name:',
#)->pack(-side=>'left');
#$project_name=$netlist_proj_frame->Entry(
## Width is in characters not in pixels
#-width=>35,
#)->pack(-side=>'right');
##--------------------------------------------
#============================================
my $template_output_filename;
my $template_project_name;
my $template_pin_list;
#--------------------------------------------
my $template_args_frame=$mw->LabFrame(
-label=> "Template Input Options",
-labelside=>'acrosstop',
) ->pack(-expand=> '1', -fill=>'both', -side=>'top');
#--------------------------------------------
my $template_output_frame=$template_args_frame->Frame(
) ->pack(-expand=> '1', -fill=>'both', -side=>'top');
#--------------------------------------------
$template_output_frame->Label(
-text=>'Template Filename:',
)->pack(-side=>'left');
$template_output_filename=$template_output_frame->Entry(
# Width is in characters not in pixels
-width=>35,
)->pack(-side=>'right');
#--------------------------------------------
my $template_proj_frame=$template_args_frame->Frame(
) ->pack(-expand=> '1', -fill=>'both', -side=>'top');
#--------------------------------------------
$template_proj_frame->Label(
-text=>'Project Name:',
)->pack(-side=>'left');
$template_project_name=$template_proj_frame->Entry(
# Width is in characters not in pixels
-width=>35,
)->pack(-side=>'right');
#--------------------------------------------
my $template_pins_frame=$template_args_frame->Frame(
) ->pack(-expand=> '1', -fill=>'both', -side=>'top');
#--------------------------------------------
$template_pins_frame->Label(
-text=>'Template Pins:',
)->pack(-side=>'left');
$template_pin_list=$template_pins_frame->Entry(
# Width is in characters not in pixels
-width=>35,
)->pack(-side=>'right');
#--------------------------------------------
##============================================
#my $import_working_directory;
#my $import_ref_lib;
#my $import_dest_lib;
##--------------------------------------------
#my $import_args_frame=$mw->LabFrame(
#-label=> "Import Input Options",
#-labelside=>'acrosstop',
#) ->pack(-expand=> '1', -fill=>'both', -side=>'top');
##--------------------------------------------
#my $import_dir_frame=$import_args_frame->Frame(
#) ->pack(-expand=> '1', -fill=>'both', -side=>'top');
##--------------------------------------------
#$import_dir_frame->Label(
#-text=>'Working Directory:',
#)->pack(-side=>'left');
#$import_working_directory=$import_dir_frame->Entry(
## Width is in characters not in pixels
#-width=>35,
#)->pack(-side=>'right');
##--------------------------------------------
#my $import_ref_frame=$import_args_frame->Frame(
#) ->pack(-expand=> '1', -fill=>'both', -side=>'top');
##--------------------------------------------
#$import_ref_frame->Label(
#-text=>'Reference Library:',
#)->pack(-side=>'left');
#$import_ref_lib=$import_ref_frame->Entry(
## Width is in characters not in pixels
#-width=>35,
#)->pack(-side=>'right');
##--------------------------------------------
#my $import_dest_frame=$import_args_frame->Frame(
#) ->pack(-expand=> '1', -fill=>'both', -side=>'top');
##--------------------------------------------
#$import_dest_frame->Label(
#-text=>'Destination Library:',
#)->pack(-side=>'left');
#$import_dest_lib=$import_dest_frame->Entry(
## Width is in characters not in pixels
#-width=>35,
#)->pack(-side=>'right');
##--------------------------------------------
##============================================
##============================================
#my $merge_option=0;
#my $spares_option=0;
##--------------------------------------------
#my $options_frame=$mw->LabFrame(
#-label=> "Additional Options",
#-labelside=>'acrosstop',
#) ->pack(-expand=> '1', -fill=>'both', -side=>'top');
#
#my $merge_check=$options_frame->Checkbutton(
#-text=>"Merge Output Controls",
#-variable=>\$merge_option
#) ->pack(-side=>'left');
#$merge_check->deselect();
#
#my $spares_check=$options_frame->Checkbutton(
#-text=>"Add Spare Cells",
#-variable=>\$spares_option
#) ->pack(-side=>'right');
#$spares_check->deselect();
#
#============================================
my $exit = $mw->Button(-text => 'Exit',
-command => sub
{
exit;
});
$exit->pack(-side => 'bottom', -expand => '1', -fill => 'x');
#
my $generate = $mw->Button(-text => 'Generate',
-command => sub
{
generate();
});
$generate->pack(-side => 'bottom', -expand => '1', -fill => 'x');
MainLoop;
#print "Hello World\n";
# subroutines:
sub generate {
#my $input_filename=$input_filename->get;
#my $project_name=$project_name->get;
#my $sheet_number=$sheet_number->get;
my $template_output_filename=$template_output_filename->get;
my $template_project_name=$template_project_name->get;
my $template_pin_list=$template_pin_list->get;
#my $import_working_directory=$import_working_directory->get;
#my $import_ref_lib=$import_ref_lib->get;
#my $import_dest_lib=$import_dest_lib->get;
#print "---------------------------------------------\n";
#print "Input = $input_filename\n";
#print "Sheet = $sheet_number\n";
#print "Project = $project_name\n";
print "---------------------------------------------\n";
print "Template File = $template_output_filename\n";
print "Template Project = $template_project_name\n";
print "Template Pins:\n";
print "$_\n" foreach (split ', ', $template_pin_list);
print "---------------------------------------------\n";
#print "Working Directory = $import_working_directory\n";
#print "Ref Lib = $import_ref_lib\n";
#print "Dest Lib = $import_dest_lib\n";
#print "---------------------------------------------\n";
}
__END__