Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »


Here is another example of a GENERIC_CSV_FILE created for an ATMEL which uses the MERGE_PIN_NAME PIF

The GENERIC_CSV_FILE was created by hand after copying and pasting the pin_names from the ATMEL datasheet for the ATmega238p

A typical micro-controller will have a group of GPIO pins with several fixed optional functions that the GPIO pin can perform. The Spreadsheet for the part was built with the optional pin functions in the first column, the basic pin name in the 2nd column and the Pin number in the 3rd column



There is no PIN_TYPE PIF in this spreadsheet,

PIN_TYPES were provided using the PIN_TYPE_OVRD file which contained  the lines shown on the right

The override file tells PartBuilder:

PIN_NAMEs containing PB, PC or PD are INOUT pins,

PIN_NAMEs containing AREF or ADC are INPUT pins,

PIN_NAMEs containing VCC or AVCC are POWER pins

and

PIN_NAMEs containing GND are GROUND pins.

pinOverride.txt File
PB=INOUT
PC=INOUT
PD=INOUT
AVCC=POWER
AREF=INPUT
ADC=INPUT
VCC=POWER
GND=GROUND




GENERIC_CSV_COLUMN_DEF

The GENERIC_CSV_COLUMN_DEF copied from above is MERGE_PIN_NAME:PIN_NAME:PIN_NUM so there is one PIF_GROUP meaning there is one pin on each spreadsheet row

The PIN_NAME in column 2 will be appended with the MERGE_PIN_NAME information in column 1 and the PIN_NUM will be taken from column 3

The default value of GEN_CSV_PN_MERGE_CHAR is '_' so the first PIN_NAME for the pin in row 2 will be PD3 joined together with (PCINT19/OC2B/INT1) using an '_'

which will create PD3_(PCINT19/OC2B/INT1)

When all the pin data has been extracted, PartBuilder will use the highlighted RR_REPLACE_CHAR_LIST and replace the '(', ')' and '/' characters with _ **

The resulting renamed PIN_NAME will be PD3_PCINT19_OC2B_INT1 shown below in the final symbol created.

(**The replace algorithm removes any trailing '_' and replaces consecutive _ _ with 1 underscore (when the rename rule is first applied, it would create PD3_ _PCINT19_OC2B_INT1_ and then the extra underscores are cleaned up to create PD3_PCINT19_OC2B_INT1) 

Spreadsheet for same part with 2 pins per row and PIN_TYPE defined

If the spreadsheet was created as shown below instead, with 2 pins in each row, and a PIN_TYPE field for each pin, The GENERIC_CSV_COL_DEF would need to be changed to:

MERGE_PIN_NAME:PIN_NAME:PIN_NUM:PIN_TYPE,SKIP,MERGE_PIN_NAME:PIN_NAME:PIN_NUM:PIN_TYPE

And the GENERIC_PIN_TYPE_MAPPING_FIELD would need to be entered as:

I:INPUT,O:Output,IO:INOUT:GND:GROUND,PWR:POWER to translate the PIN_TYPE information to the PIN_TYPES that partBuilder recognizes.

Here is the resulting status window after reading the file... note the warning for row 20 (GND_PAD,33,GND) which only had data for the first PIF_GROUP.

  • No labels