Archive for October, 2006

Environment variables:

AMSPath=__install_dir__/IBM_PDK
setenv SPECTRE_DEFAULTS -E
setenv CDS_Netlisting_Mode Analog

Must put a copy of display.drf in the run directory or all layers will appear yellow. Use $AMSPath/bicmos8hp/V1.0.3.3HP/cdslib/bicmos8hp/display.drf

Sample .cdsenv file is found in $AMSPath/bicmos8hp/V1.0.3.3HP/cdslib/examples/.cdsenv Cadence always reads the .cdsenv file from the current working directory. If want to set things up somewhere else, use CDS_LOAD_ENV=CSF and put locations in setup.loc in __toolname__/.cdsenv

Copy the $AMSPath/bicmos8hp/V1.0.3.3HP/cdslib/examples/.cdsinit to the user’s home directory. This will put the IBM_PDK menu choice on the icms window and will setup keybindings.

Backups to DVDS

1. mkisofs -r -v volume name -o iso to write location datafiles

2. growisofs -Z /dev/dvd=iso location -speed=2

If the backspace key does not work, but instead puts ^? or ^H on the screen, fix it with:

stty erase ^backspace

^backspace means to hold down the control key and press backspace at the same time.


IHP had provided us with an entire setup for using the Cadence tools. Now that we’re switching to the IBM process, we have lost the setup. So, in order to make the IHP setup available to everyone, I have copied the files provided by IHP to /net/sw/cad_env.

setenv EDG_CDS_ENV /net/sw/cad_env

Then, in each user’s .cdsinit file, put:

EDG_CDS_ENV =getShellEnvVar( "EDG_CDS_ENV" )
loadi(strcat(EDG_CDS_ENV "/env/cdsinit"));
DENSITY_PERCENT=t

This will load the cdsinit file in /net/sw/cad_env/env/cdsinit. In this env directory are a bunch of .il files that setup the keybindings that we want to use. IHP provided a lot of other stuff as well, but I deleted everything but the keybindings because it appeared that most of the other stuff was more geared to the IHP libraries.

Now that I’ve actually read the Cadence instructions, the site initialization file in _cds_install_dir_/local/.cdsinit should set all the defaults for the site. For us, this would be /net/sw/cad.rh/ic/ic5141/tools/dfII/local/.cdsinit. To set this up, simply copy the _cds_install_dir_/samples/local to _cds_install_dir_/local and rename cdsinit to .cdsinit. That’s it.

I got a call from Network Security saying that our mail server was reporting to an ehlo command that its name was localhost.localdomain. This isn’t really a problem, except that some spam-reporting companies have a bug where this would be enough to automatically blacklist our machine. I edited /etc/hosts and added our machine there, restarted sendmail and everything looks ok.

Also, you have to go to the spamhaus website and request that the address be removed from their system. What a pain!

Our server has a 3Ware 9550SX SATA-RAID card in it that controlls our raid system. The command-line interface to this card is the tw_cli program, provided by 3ware. I wrote a script that runs every hour that checks the status of the raid and sends mail to be if a disk comes up as not optimal or if any new alarm messages appear.

#!/usr/bin/perl

#
# check_raid – Check for any alarms from the raid card, using tw_cli
#
# Syntax: check_raid
#
# If any errors are listed, email them to the sysadmin
#
# 13 October 2006

$day=`date +%a`;
$month=`date +%b`;
$date=`date +%d`;
$hostname=`hostname`;

chop($day);
chop($month);
chop($date);
chop($hostname);

# Location of tw_cli program
$TW_HOME=”/net/sw/edg/bin”;

# Person to receive email
$TO=”admin\@uchicago.edu”;
$FROM=”root”;
$SUBJECT=”RAID DISK PROBLEM ON $hostname”;

# Determine how many raid controllers are in the machine
@raids = `$TW_HOME/tw_cli show| grep ^c`;

# Output of above command will look something like this:
# c0 9550SX-8LP 8 8 1 0 4 4 –
# c1 9550SX-8LP 8 8 1 0 4 4 –

# Run the tw_cli program, looking for errors in each raid
foreach $raid(@raids)
{
# Split the line to get the controller
($controller, $model, $ports, $drives, $units, $notopt, $rrate, $vrate, $bbu)=split(‘ ‘,$raid, 9);

# If any are in the Not Optimal state, email the admin
if ( $notopt != 0 )
{
$notopt_message = “$notopt disk(s) on controller $controller are not in optimal state.\n\n”;
}

# Check for any disk alarms
@alarms=`$TW_HOME/tw_cli show alarms| grep $controller`;
foreach $alarm(@alarms)
{

#Check the month and date on the alarm and only send messages from the current day
($acontroller,$aday,$amonth,$adate,$atime,$ayear,$aerror,$anotes,$junk,$amessage)=split(‘ ‘,$alarm, 10);

# Check that the alarm message is from today
if ($date == $adate && $month == $amonth)
{
# Concatenate the messages together and send mail out
$message = $notopt_message . $alarm;
sendEmail(“$TO”,”$FROM”,”$SUBJECT”,”$message”);
}
}

}

sub sendEmail
{
my ($to, $from, $subject, $message) = @_;
my $sendmail = ‘/usr/sbin/sendmail’;
open (MAIL, “|$sendmail -oi -t”);
print MAIL “From: $from\n”;
print MAIL “To: $to\n”;
print MAIL “Subject: $subject\n\n”;
print MAIL “$message\n”;
close (MAIL);
}

Mentor Graphics printers need to be added to each computer in the shop. The command to run is “filter_setup”. It should be on the PATH. Otherwise, it’s located here:

$MGC_HOME/bin/filter_setup

All of the fis and config files have been created and are in /net/sw/mgc/printer/[fis,configs]. So when running filter_setup, choose “Add Printer”. Fill in the fields and press ok. If making changes to a printer already created, be sure to check the replace button. This command then sets the printer up in cups.

Finally, Mentor Graphics has a way to print directly to a pdf file. It’s a bit complicated, but it does work. The details are in TechNote mg52323, but here’s what’s needed.

-Install Ghostscript

-Create a central location for configuration files, here, it’s /net/sw/mgc/printer. So $MGC_PDF_OPTIONS=/net/sw/mgc/printer/export_pdf (create export_pdf in next step)

-Put this directory (export_pdf) in the above location.

-Copy the following files to the above location:
cp $MGC_HOME/shared/pkgs/pdf_export/templates/mgc_pdf_config .
cp $MGC_HOME/shared/pkgs/pdf_export/templates/mgc_pdf_fis .
cp $MGC_HOME/shared/pkgs/pdf_export/templates/pet .

-Make sure mgcgs and mgcgs.ixn have execute permissions

-Edit /usr/share/ghostscript/7.05/lib/Fontmap.GS and add the following to the end of the file:

% Mentor fonts
/stroke-bs (mgc_stroke_bs.afm);
/mgc-v1-stroke (mgc-v1-stroke.afm);
/stroke (mgc_stroke.afm);
/stroke-bs (mgc_stroke_bs.pfa);
/mgc-v1-stroke (mgc-v1-stroke.pfa);
/stroke (mgc_stroke.pfa);

-Set MGC_GS_PATH=/net/sw/mgc/printer/export_pdf

-Set MGC_PDF_OPTIONS=/net/sw/mgc/printer/export_pdf

-Edit pet file and add this:

extern PDFExportAppTable = [
“export pdf”,
“$MGC_PDF_OPTIONS/mgc_pdf_fis”,
“.pdf”,
“”,
“”
];

In order to set up printers for Mentor Graphics, you have to allow for raw printing. This is done by editing the files /etc/cups/mime.types and /etc/cups/mime.convs. The following lines must NOT be commented out:

mime.convs:
application/octet-stream application/vnd.cups-raw 0

mime.types:
application/octet-stream

That was easy enough. But if you use system-config-printer or redhat-config-printer to set up your printers, these lines automatically get recommented out. So, it’s probably best to NOT use the redhat config programs and stick with using a browser at localhost:631 to configure printers.

We have some very old libraries that need to be added to the Design Architect libraries menu. The ample files were written years ago, around 1992, but they still seem to work. All I have to do is edit the environment variable AMPLE_PATH to source these when Design Architect is started.

Relevant environment variables for adding libraries:

setenv LMC_HOME /net/sw/lmc

setenv AMPLE_PATH
/net/sw/mgc/edg_ample_files:\
/net/sw/libs/edg_lib:\
$LMC_HOME/special/qsim/menus

Here is the old webpage with my notes on what I did with ample files.

http://edg.uchicago.edu/help/eda/ample.html