Archive for the ‘Mentor’ Category

We had the problem where the plot_test for B sized plots was being clipped a little on both sides. I tried every driver and parameter I could find and it didn’t matter. The file that needed to be changed was the configs/colorb file. The offset problem could be solved on one side by using the page_offset_left option. Unfortunately, this basically just moved the entire print area and ended up cutting off more on the right side of the plot. So, I had to add some more parameters, page_length and page_width. Here’s what I ended up using.

colorb config file:
device generic_ps
paper_size 24_INCH_ROLL
page_length 11.0 in
page_width 17.0 in
page_offset_left 0.75 in
page_offset_top 0.25 in
color_plotting enabled
setup_line <</PageSize [1296 1296]>> setpagedevice

I used 1296×1296 as the page size because that’s 18″x18″. The problems I had earlier were due to the fact that the plot area wasn’t fitting inside the 11″x17″ space. By giving it a little more room, the plots work just fine.

colorc config file:
device generic_ps
paper_size 24_INCH_ROLL
page_length 17.0 in
page_width 22.0 in
page_offset_left 0.75 in
page_offset_top 0.25 in
color_plotting enabled
setup_line <</PageSize [1656 1656]>> setpagedevice

colord config file:
device generic_ps
paper_size 24_INCH_ROLL
page_width 22.0 in
page_length 34.0 in
page_offset_left 0.75 in
page_offset_top 0.25 in
color_plotting enabled
setup_line <</PageSize [1728 2520]>> setpagedevice

The config files for C and D are the same as colorc and colord respectively, but have the color_plotting line changed to disabled. The B config file is different because it prints on our edg1 laser printer, which doesn’t need all these parameters set. In the colord file, notice that the setup_line does not have a square page size. This is because the paper (24″) isn’t wide enough for that. So the page size is set as 1728 (=24×72) by 2520 (=35×72). I used 35″ for the length to be sure to have enough room for both the plot and the offset.

Plotting on linux now works fine. Just use the postscript driver for the plotter.
Best C and D-sized plots come from printing to a file and opening and printing the file in Illustrator on a Windows machine–This will be true until a new driver is developed for linux.

Been having problems printing to C and D size paper on the plotter. Our plotter is an HP DesignJet 800PS, with ip address 10.135.152.15. The ppd file that comes from HP or from linux doesn’t work quite correctly with this printer. My solution was to take the ppd file from my Mac, edit it to take out all of the Mac-specific lines and use that.

The file is saved in /net/sw/edg/printerfiles/dj800.ppd. I then added the plotter with:

lpadmin -p plotter -P /net/sw/edg/printerfiles/dj800.ppd -v socket://10.135.152.15:9100
accept plotter
enable plotter

This does NOT work perfectly. It stil seems to cut off the very end of documents. But, that could be acceptable for most things. And that’s probably as good as it’s going to get. If a perfect printout is needed, the solution is to print to file and the plot the file from a Windows machine, where they have drivers that work.

Print command: lpr -Pplotter -oPageSize=AnsiC file_to_print

Files printed to A_file, B_file, etc. were all owned by user lp and had permissions of 600. So the user that created the file wasn’t allowed to read it. This was fixed by editing the fis file and adding the line:

umask 000

Now the files are still owned by lp, but anyone can read/write them.

The location for the printer files is: /net/sw/mgc/printer

Inside this directory are:

configs/ – holding all config files
export_pdf/ – files required to create pdf files
fis/ – holding filter invocation scripts
logs/ – log file locations
model/ – location of model files to use with lpadmin
pet – the printer pet file

All machines use the same files when printing to a printer. But when printing to a file, all the machines use different files. So inside of each directory above, there is another directory with the machine name that holds the files needed for printing to a file.

Other log entries give the details for setting up printing to a printer. To set up printing to a file, it’s done much as it was under HPUX.

The only parameters I’m using are:
paper_sizes are either A, B, C or D
device is generic_ps
color_plotting is either enabled or disabled, depending on what want

Procedure
1. Create config file (template is in $MGC_HOME/shared/pkgs/ps_filter/templates/ps_filter.template)
2. Create a fis file (use filter_setup if need to make a new one)
3. cp $MGC_HOME/pkgs/print_base/examples/mgc_only_model.template /net/sw/mgc/printer/model/hostname/xxx This is only needed for print to file models
4. lpadmin -pxxx -E -i/net/sw/mgc/printer/model/hostname/xxx -v/dev/null Unlike in HPUX, cupsd must be running when issue this command

Try it out with plot_test.

With the installation of the latest version of the Mentor software on the HP machines, the option for printing directly to a pdf is present. This needs to get set up. It is basically the same procedure as on linux, but paths to files have changed.

-Make sure ghostscript is installed

-Location for printer stuff: /net/sw/mgc_hpux/printer/export_pdf

-Copy the export_pdf directory from impulse to any other machine that needs it.

-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 (and yes, can use mgcgs.ixn here because it’s just a script). I could rename it to mgcgs.hpu, but I want to remember that this is the same program that’s running on linux.

Edit /usr/local/share/ghostscript/7.07/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_hpux/printer/export_pdf

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

-Set MGC_PLOT_OPTIONS=/net/sw/mgc_hpux/printer (location of pet file)
-Set AMPLE_PATH=$AMPLE_PATH:$MGC_PDF_OPTIONS

-In linux, the following was added to the pet file. In HPUX, it won’t work if this is added, so leave it out.

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

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”,
“”,
“”
];

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

The BPL are separate from the Board Station package, so I didn’t install them when I installed the BST package. I downloaded the file from the Mentor site. It’s in the same location as the BST package, just further down the page.

After untarring the files, I ran the install program. These files should be installed in the MGC_HOME location. The installation went ok, but I was getting error messages when I tried to place a component from the BPL in Design Architect. Problem was that the post_install_script hadn’t run and I didn’t get any errors about this. The message that I got was that $BPL_LIB/components/… couldn’t be found. And that was true, there was no components directory in the $BPL_LIB location. After looking around the Mentor support site, I found that I needed to run the post_install_script. Here is the syntax:

./post_install_script -target /net/sw/BST2005/2005BST/MGC_HOME.ixl -msicmd /net/sw/BST2005/2005BST/MGC_HOME.ixl/_msidata -mgchome /net/sw/BST2005/2005BST/MGC_HOME.ixl -vco ixl

Had the problem where this wouldn’t run because it said I didn’t have a bplcaddata license. Not true. We did have that license in our file. Turns out that this program doesn’t use the MGLS_LICENSE_FILE variable. It only looks at LM_LICENSE_FILE. So once I set that, the script completed. There is now a components directory in the $BPL_LIB directory. Just make sure that the entry in mgc_location_map is correct.

Eldo is part of the AMS package from Mentor Graphics. Download and untar this package and run instix to start the installation.

Installation Directory: /net/sw/ams_2006.1
Selected all packages

It wants the following environment variables set:

MGC_AMS_HOME /net/sw/ams_2006.1
PATH +$MGC_AMS_HOME/bin: $MGC_AMS_HOME/modeltech/bin

Installation test can then be done with:

systest eldo | adms | adtb | bmc | mach | all
I ran systest all

One complaint was that matlab was missing, so now I can finally order it and install it on the new server.