Wednesday, January 21, 2009

Recovering data from Crashed Allegro PCB database using *.jrl File.

**********************************************************
Requirement :-
I was working on a layout but suddenly allegro crashed & my entire work is gone.Is there any way to retrieve board file.

Solution :-
Use allegro generated journal file *.jrl to replay all the operations that you had done before crashing.

Allegro Journal File :-

*.jrl A journal file contains a record of events—menu picks,keyboard, and so on—which are recorded for each session in Allegro.

Steps to take as soon as the database crashes :-
If you have your last saved database or better yet an even newer autosave database and your journal file then yes you can generate a replay script that will rerun the commands.

Note of caution: Do not try reopening your current database without copying your database or autosave and the journal file to a safe location,or atleast the journal file. If you do reopen the database you chance over-writing the journal data and then you will never be able to recover your lost commands.

Logic on how to hack the journal file.
The journal file (.jrl) will need to be parsed out to include all command after the latest save and only include the command lines as the other lines in the .jrl file are comments only and will cause your replay script to fail. The command lines all begin with \i and the comments all begin with \t. Once you have created the script from the .jrl then you can replay it using File-Script-Replay.Note after parsing the journal [*.jrl] file the extension should be changed to script [*.scr].

Steps to recover Manual method:
1. Open the journal file in any of the advanced text editors i prefer gvim editor on windows platform or in UNIX.
Download latest version from :- http://www.vim.org/download.php
2. Select only the time stamp field and delete.[CNTRL V+PAGE DOWN (with the time stamp in the first field selected)].
3. Use command :1,$ s/\\i//g to delete all \i from all lines .
4. Use :1,$ s/\\/#/g to comment all the lines starting with / i. e /t,/w etc..
5. Save the modified journal file as *.scr.
6. Open the database and run the *.scr file using script runner.
7.All operations done before the crash starts running in a sequential mode and you have successfully recovered lost data...
Note :- Its important that you follow the steps as proposed above to successfully recreate the script file.All fillin commands should be manually commented or deleted.
TIP: Open the journal file and delete all other data other than the required operations since last save or autosave command.

Steps to recover using Skill code or built in feature in Allegro:
Allegro 15.2 and above
If your running Allegro 15.2 and above it will automatically generate the Script from the *.jrl file..
Steps to recover :-
1.Copy the journal file only of the crashed database to some other location.
2.Open the crashed data base.
3.Go to "file" menu and select the "script" option.
4.Click on the "Generate" button an browse to the copied journal file.
5..Click on "Replay" button to automatically create a *.scr file from the browsed journal file and perform a replay.
6.You have successfully recovered lost data..



Allegro 15.1 and below
If you do not have 15.2 then there is a skill routine which will do this for you, so you don't need to hack the *.jrl file yourself.The skill routine "REPLAY.il"The skill file is uploaded in Else you need to hack the skill routine as mentioned above..
The Skill file REPLAY.il is available @ http://www.esnips.com/web/CadenceAllegroFiles
************************Kumargs**************************




Tuesday, January 20, 2009

Cadence Allegro file Extensions and what they contain.

***********************************************
.brd - Board database file–typically the printed circuit board (PCB) design file that you add symbols and a net list to when designing the board.

.dra - Drawing file–graphics that can be graphically edited and used to create the binary symbols that are used in the .brd file.

.mdd - Module definitions–sections of a board design that include package symbols and logical connections.

.psm - Package symbol, footprint.

.bsm - Mechanical symbol (board symbol) that gets added to a board with no logic attached.

.osm - Format symbol, (other symbol)–typically graphics, notes,drawing format, notes, logo’s.

.ssm - Shape symbol–when a pad is an irregular shape (not a circle, square, rectangle, and so on).

.fsm - Flash symbol–used to define a thermal relief pad. There is an editor that helps you automatically create these.

.pad - A padstack.

.scr - Script or macro file–an ASCII text file containing Allegro commands that can be replayed to reproduce the same results as if you were selecting those commands.

.tech - Technology file–ASCII file of constraints and design rules.

.mcm - Multi-chip Module File (APD) A design file similar to an Allegro.brd file, but different technology

.txt - Text file, such as that used for parameters. Device files are .txt that contain the definition of a logical device including device type, package symbol, pincount, functions, and swappability.

.jrl - A journal file contains a record of events—menu picks,keyboard, and so on—which are recorded for each session in Allegro.
.tag - Keeps track of the last board worked on in your current directory.Without it, Allegro will open up a new board file.

.INI - This file keeps track of the path your working file is in. The.INI file also keeps track of the window location, the toolbar,and the status of whether the Control Panel is docked and it's location. DO NOT EDIT THIS FILE, if you are having problems with Allegro. This file can be deleted as a form of troubleshooting. The file will be recreated automatically.

.geo - This file remembers the location of forms the last time they were used and places the same type of form in the same location the next time it is used. DO NOT EDIT THIS FILE!

.color - Color view—defines which subclass graphics will be visible or invisible.This file is automatically created when an artwork film control is defined or can be user defined.
******************* Kumargs *******************

Monday, January 19, 2009

Zoom or pan to a specified XY coordinate in Expedition PCB.

***********************************************
Requirement: - zoom or pan to a particular XY coordinate, zoom to selected or highlighted object or zoom to a particular net.

Solution: - Use keyin command as below to perform various zoom and pan operations.

za - Zoom All (Fit All)
zb - Zoom Board (Fit Board)
zc - Zoom Coordinate (pan)
zc x,y
zc = zoom coordinates.
x,y= x and y coordinates.
Example: zc 243,580
zs - Zoom Selected
zh - Zoom Highlighted
zn - Zoom Netname

Example: zn *CLK
zn *GND

******************* Kumargs *******************

Array copy a draw object in Expedition PCB.

********************************************************
Requirement: - Make multiple copies /Array of a draw object at a specified distance.

Solution: - Use keyin command as dx=x,y c r

Syntax: - as dx=x,y column row

Where,
as = Array Selected.
dx = move delta.
x = Distance/Spacing in x direction.
y = Distance/Spacing in y direction.
c= number of Columns.
r= number of rows.

Usage:-
#.Select draw object which needs to be replicated.
#.Keyin command with appropriate values as per syntax.
#.Hit Enter.

Note: - While entering Keyin command make sure that there are no additional spaces other than those specified in syntax.

Examples:-
Step and repeat
If you need a line in silk layer to be copied 10 times with a spacing of 100 thou in x direction the Keyin command would be.

Array example
If you need an array of circles with 100 mils spacing in both x and y directions and with an array size of 2 rows and 4 columns. The Keyin command would be.


******************* Kumargs *******************

Thursday, January 15, 2009

Move/Place Parts by file in Mentor Graphics Expedition.

***********************************************************
Requirement :-
To Export and import placement file using keyin command in Expedition.
logic:-
Use the part place command [pr] in keyin command window.
NOTE :-
Expedition does not have a menu option to perform this operation and can be achieved only through key in command.


Command Syntax :-
pr -file="path"/"filename"{-x}

Where :-
pr -file= -> Is the command.
"path" -> Is the path where the the Placement file needs to exported to or to be imported. The default directory is the one where the .pcb file is located.
The path specified needs to be full along with the appropriate drive letter " D:\WDIR\ECR_Change_Boards\" etc...

"filename" -> The default filename is xyplace.dat
NOTE :- The File name can be any name and can be a txt file.Eg.Placement_PCI.txt
{-x} -> The '-x' argument (if supplied) exports the current placement information into the named file and the file contents are overwritten.


File Syntax :-
{.units thinmmum}
ref desig{cellname=cellname} xy rot topbottom {fix lock}
!
Where :-
.units = line Specifies the units of the design..
NOTE :- Units line is optional. If omitted, the current units settings are used. The line may be specified more than once to change the units on a part by part basis.
! = Comment lines are prefixed with a '!'.
cellname = The cellname need only be supplied if it is different than the default part entry for that part
fix lock = Use this alternatively to fix or lock the placed parts.
NOTE :-. The alternate cellname and the fix and lock flags are optional for any part.

{xy}= Coordinate specified as 'x,y'. Eg 100,-400.
{rot} = The rotation is in degrees.
NOTE :- Not all the parts need to be in the list, only those which you want to move or place.
topbottom = Specifies the side in which the part needs to be placed.


Example placement file :-
.units th
!
.ref R312 2100,4525 0 bottom
.ref C282 880,2190 0 top
.ref C175 3500,3430 90 bottom
.ref R99 4000,2100 90 bottom
.ref R262 6715,4755 270 top
.ref U77 7560,4045 0 top


Applications :-
1. Reuse of placement from one board to another or within the same Board.
2.Replicate the placement for similar channels.
3.Make standard placement files for parts which carry the same part numbers,refdes and locations.Eg for VME Connectors for a standard VME form factor board either 6U or 3U.
And many more .....


Some more variants of the same command [pr] on parts :-


pr -dist { dx=x,y }{ -cols=n } {-angle=angle} refdes-list
To distribute (autoplace) specified parts outside right edge of board in five (default) columns.
An explanation of the {dx=x,y} option is where x and y are the distance from part to part.
Eg:- pr -dist IC*, U*, RP*


Eg:- pr - dist dx=500,200

pr refdes-list
Place all specified parts one at a time until all placed.
Eg :- pr *

pr {-angle=angle} refdes
Place specified part at given coordinate and optionally at specified angle.
Eg:- pr 200,500 -a=45 IC1
******************* Kumargs *******************

Reduce Expedition PCB database size while uploading/Archiving the database.

**********************************************
Requirement :-
While working on large Boards the size of the design becomes so huge that it takes loner time to open ,upload and archive.

logic:-
Delete the "Work" Folder inside the main design directory.
You may also use the Job management wizard in Expedition and run the Cleanup task to remove non-essential project files.The main disadvantage of this is that it also removes all the LOG files created.

Description :-
Any Expedition design while working creates a folder called "Work" and recreates all the files and folders this acts as a backup if the tool crashes abruptly before a save.
While transferring/Archiving the database this folder can be removed completely by deleting in turn reducing the total size of the database.
The "Work" folder will be created automatically if not present each time the design is opened.
By doing this you can reduce 40-50% of the overall database size.
******************* Kumargs *******************

Move parts while placing or moving using arrow keys in Mentor Graphics Expedition.

**********************************************
Requirement :-
To move parts while placing or moving using arrow keys.

logic:-
Select the part and use arrow keys to move the part in Up,Down,Left or Right directions.

USAGE :-


Only arrow Keys :-

Using the four arrow keys moves the part(s)by one grid or one pixel, if no grid is defined the part is moved in the direction of the selected arrow key.

Arrow Keys with Shift Key :-
Using the arrow key with the Shift key moves the part(s) by 10 grids or 10 pixels; if no grid is defined the part is moved in the direction of the selected arrow key.

Arrow Keys with Control Key :-
The arrow keys, used in conjunction with the Ctrl key moves the selected part(s) as close as possible to existing parts in the direction of the arrow key without violating the Pad to Pad or Part to Part Net Class general clearances, while still maintaining its placement grid.
******************* Kumargs *******************