SPREADSHEET PIN_REPORT_TYPES

GENERIC_CSV_FILE and SPREADSHEET 

The SPREADSHEET and GENERIC_CSV_FILE allow the user to provide pinData using a very flexible spreadsheet format 

The user must provide PartBuilder with extra configuration details to  detail  the layout of pinData within the spreadsheet.

The PIN_NUM_TYPE_FILE is actually a subset of the GENERIC_CSV_FILE, where the fields are predefined. 

Unlike the PIN_NUM_TYPE_FILE, in the  GENERIC_CSV_FILE, Multiple Pin Names and Pin Numbers can be provided in one cell of the spreadsheet.

The GENERIC_CSV_FILE  the user to create a .csv file from the source excel or openOffice spreadsheet.

In the SPREADSHEET flow (added after v18.11.1) , partBuilder can read the native spreadsheet file without the intermediate save step, and it also allows the user to merge several spreadsheet Tabs without any intervention

Creating a spreadsheet from a PDF File

There are many free web-based utilities to create a spreadsheet from a pdf file. CadEnhance recommends this site in particular:

https://online2pdf.com/pdf2excel because it allows the user to select a pdf file and restrict the extraction to selected page ranges. 

See Creating a SpreadSheet from a PDF File for more information

Configuring PartBuilder to read a SPREADSHEET

PartBuilder must be told how the pin_data is organized in the actual spreadsheet. This is accomplished using the  Extra Config Options GUI which can be accessed by the More Part Config Settings Button on the Main GUI.


SPREADSHEET_TAB_NAMES (for SPREADSHEET only)

When the PIN_REPORT_TYPE is set to SPREADSHEET, the input spreadsheet may  contain several tabs of information.

The user must tell PartBuilder which Tabs to use, and if the user enters Multiple Tab_Names separated by commas, PartBuilder will merge the data on each of the Tabs into one larger report.

If there is only one Tab defined in the spreadsheet, PartBuilder will figure this out on its own.

PIN_INFORMATION_FIELDS (PIF):

PartBuilder expects to find groups of related PIN_INFORMATION_FIELDS from the SPREADSHEET. The PIN_INFO_FIELDS that PartBuilder recognizes are:

PIN_INFORMATION_FIELD (PIF) NameDescriptionNotes
PIN_NUMA single Pin number or a range of pin numbers
PIN_NAME

A single Pin Name,

A Vectored Pin Name eg. DQ[7:0]

or a group of PIN_NAMES eg sigA,SigB,SigC

If a Vectored Pin_Name is detected, PartBuilder expects to find the matching number of PIN_NUMS in the related PIN_NUM Field.

For example if the PIN_NAME is DQ[7:0] PartBuilder will expect to find 8 Pin Numbers in the PIN_NUM field

if the PIN_NAME Field contained sigA,sigB,sigC... PartBuilder will expect to find 3 Pin Numbers in the PIN_NUM Field

MERGE_PIN_NAME

The PIN_NAME can be split across multiple columns

in this case partBuilder will concatenate the PIN_NAMES from multiple columns to build the full PIN_NAME

PartBuilder uses the value of the GEN_CSV_PN_MERGE_CHAR (which defaults to an underscore '_' to join the elements of a PinName together
PIN_TYPEUsually a Single Pin Type like Input, Inout, Output, Power, GroundThe PIN_TYPE field can contain 1 PIN_TYPE for all the PINS in the PIN_NAME field or it can have individual pin types
IO_STDThe IO Standard for a PIN Like LVCMOS_18 or TTL, HSTL
PIN_DELAYthe PIN_DELAY in length or time
DESCRIPTIONPartBuilder will store this field as the pin DescriptionNothing is done with the description right now, but future revisions of PartBuilder may use it.
SKIPPartBuilder will SKIP this column and also make sure it is emptyIf the column is not empty, PartBuilder will report an error.
IGNOREPartBuilder will IGNORE this column and doesn't care if there is any data provided

Note that you can also add a digit after the IGNORE or SKIP (like IGNORE2 or SKIP3) to bypass multiple columns 


*** Note that our Spreadsheet converter strips out any leading empty columns from the spreadsheet
so if your spreadsheet contains one or more EMPTY columns  BEFORE the first columns that contains real information,
you should NOT add a SKIP or IGNORE for them (it will cause an error if you do)
If you are having issues, You can open the converted CSV file to see what partBuilder is looking at

PIN_INFORMATION_FIELD_GROUPS (PIF_GROUP)

PartBuilder expects to find a minimum of  2 PIN_INFORMATION_FIELDS (PIF) for each Pin in a row. A PIN_NUM and PIN_NAME field must be provided for each pin. The related sets of columns for each pin are called PIN_INFORMATION_FIELD_GROUPS (PIF_GROUP) which are entered as colon ':' separated sets of valid individual PIFS.

here are some example PIF_GROUPS

Example PIF_GROUP defintionsnotes
PIN_NAME:PIN_NUM:PIN_TYPEpretty self explanatory... The 1st column contains the PIN_NAME PIF, the next is the PIN_NUM PIF, and the last is the PIN_TYPE PIF.
PIN_NAME:PIN_NUM:MERGE_PIN_NAME:PIN_TYPEThe MERGE_PIN_NAME PIF in the 3rd column will be concatenated to the PIN_NAME PIF from the 1st Column to build the actual PIN_NAME used by PartBuilder.
SKIP:IGNOREThese 2 columns will be skipped, but the SKIP one will be checked to make sure its empty while the IGNORE one can contain any text.

REPEAT_COUNT=> Modifer

To make the entry less cumbersome, PartBuilder also can also accept a REPEAT_COUNT=>PIF_GROUP modifer to describe a repeating set of PIF_GROUPs, which is what is used in the GENERIC_CSV_COLUMN_DEF Entry above.

This looks like:

REPEAT_COUNT=>PIF_GROUP 

example
4=>PIN_NUM:PIN_TYPEExpect data for 4 PIF_GROUPS of pin data, containing the PIN_NUM PIF and the PIN_TYPE PIF

GENERIC_CSV_COLUMN_DEF:

PartBuilder will read one row of the spreadsheet at a time, and looks to extract the PIN_INFORMATION_FIELDS (PIF), arranged in any order in  spreadsheet columns. 

The GENERIC_CSV_COLUMN_DEF Entry, is used to tell PartBuilder which columns contain which PIFS. It is entered as comma separated PIF_GROUPS,  with one PIF_GROUP for each set of pin data present in a row.

PIF_GROUP1,PIF_GROUP2,...PIF_GROUPn

exampleNotes and example data in the spreadSheet

PIN_NUM:PIN_NAME:PIN_TYPE:IO_STD

PartBuilder will look for one pin in each row and extract the PIN_NUM from the first column, PIN_NAME from the 2nd column, PIN_TYPE from the 3rd column and IO_STD for the 4th column.

note on the 2nd row,

Sample Spreadsheet Rows
Notes
pin_numpin_namepin_typeIO_STD

A3dq7inputsstl1

A3,A4,A6a[2:0]inputLVCMOS15

PartBuilder will find multiple pin_numbers in column 1 and multiple pin_names in column 2

A2 will be associated with pin# A3

A1 will be associated with pin# A4

A0 will be associated with pin # A6

They will all be assigned the input PIN_TYPE and LVCMOS15 IO_STD.

A7,B12ras,casinputLVCMOS15

PartBuilder will find 2 pins

ras will be associated with pin# A7

cas will be associated with pin# B12

12,32,36,39VCCPWR

Part Builder will find 4 VCC PIns and name them VCC_1, VCC_2, VCC_3 and VCC_4 to keep the names unique. VCC_1 will be associated with pin #12

VCC_2 will be associated with pin #32

VCC_3 will be associated with pin #36

VCC_4 will be associated with pin #39

VCC_1 will be associated with pin#12



PIN_NUM:PIN_NAME,PIN_NUM:PIN_NAME

Since there is a comma separating 2 PIF_GROUPS, PartBuilder will look for data for 2 pins from each row, and extract the PIN_NUM and PIN_NAME for the first pin from columns 1 and 2 and the PIN_NUM and PIN_NAME for the 2nd Pin from columns 2 and columns 3.

PartBuilder will build up pin_information for each pin in a row, one at a time, and verify that it contains at least a PIN_NAME and PIN_NUM. PartBuilder will accept a row with sparse pin (so if columns 1 and 2 were empty and columns 3 and 4 contained a PIN_NUM and PIN_NAME it would still pull the existing pin from that row.

pin_numpin_namepin_numpin_name
vcca1in3a7


2=>PIN_NUM:PIN_NAME

exactly the same as the example above, just using the REPEAT_COUNT=> modifier

pin_numpin_namepin_numpin_name
vcc1gnd5


4=>PIN_NAME:PIN_NUM:SKIP

Here PartBuilder will look for data for up-to 4 pins per row, it will skip every 3rd column (and also make sure that that column is blank

pin_namepin_num
pin_namepin_num
pin_namepin_num
pin_namepin_num
in17
out211
gnd12
vcc13


GENERIC_CSV_HDR_ID

The GENERIC_CSV_HDR_ID tells partBuilder what row to skip because they contain  Header fields.

PartBuilder expects to find valid pin data on every occupied row following the Header Row. (It will also skip any row that starts with a '#' so the user may easily comment out rows they want partBuilder to ignore)

It is entered as ROW# (example: ROW3)

After v18.11.1, PartBuilder relies less on the GENERIC_CSV_HDR_ID and will skip data in a PIF_GROUP automatically if it determines  a selected column does not contain the proper type of information. (For instance it will make sure  a PIN_NUM column contains a valid list of PinNumbers, and can even check to make sure the PIN_NUMBERS in a column are actually supposed to be in the device (see the PinData Verification Checks page)

GENERIC_PIN_TYPE_MAPPING ENTRY

The GENERIC_PIN_TYPE_MAPPING is provided to translate the PIN_TYPE provided in a datasheet to a PIN_TYPE that PartBuilder recognizes. It is entered as a comma separated group of PIN_TYPE Translations. PartBuilder recognizes the following PIN_TYPES:

PartBuilder Standard Pin Types
INPUT, OUTPUT, INOUT
POWER, GROUND
NO_CONNECT
ANALOG

If the input CSV file uses different names for these PIN_TYPES, the GENERIC_PIN_TYPE_MAPPING entry is used to provide the Translation.

For instance if the input data sheet denotes INPUTS as I, OUTPUTS as O, INOUTS as BI, GROUNDs as GND and POWER PINS as PWR,

The GENERIC_PIN_TYPE_MAPPING would be set to I:INPUT,O:OUTPUT,BI:INOUT,GND:GROUND,PWR:POWER

Until  v18.11.1, The GENERIC_PIN_TYPE_MAPPING  fields only worked as exact matches.

In later versions, more flexibility is added so that each PIN_TYPE Translation can be a regularExpression and will change pinTypes if the input pinType contains  the PinType match (instead of exactly matching)

GENERIC_PIN_TYPE_MAPPINGSplits intoEffective Rulesexample match
^O.*:OUTPUT,^I.*:INPUT,^B.*:INOUT,^reserved:INOUT^O.*:OUTPUT

any PinType that starts with O will be changed to OUTPUT,

O1,O3,OUT

^I.*:INPUTany PinType that starts with I will be changed to INPUTI7,In6,IN,INP
,^B.*:INOUTany PinType that starts with B will be changed to INOUTB6,BI,BIDI
^reserved:INOUTany PinType that starts with reserved will be changed to INOUTreserved1,reservedBI

More Controls to Filter Out PinData

CadEnhance believes that the user should avoid modifying the original PIN_DATA reports obtained from a vendor if at all possible.

The user may have to obtain an updated version of the pinData from the vendor and would be forced to make the same edits each time.

It is better to provide controls to tell PartBuilder to ignore or include certain  rows or individual pins, and be able to store that rule in the partConfig file. 

With that in mind, the folllowing entries allow the user extra control to allow or disallow certain pinData without modifying the spreadsheet.

EXCLUDE_PIN_NUMS_MATCHING:

This Setting can be used to exclude pins from the spreadsheet where the PIN_NUMBER matches any of the specified patterns.
The reason it was created was to handle tables that describe multiple packages for the same device
where the pin might not exist in some of the packages and might be given as '-' or something else.
Multiple patterns separated by commas can be provided.

This can be helpful when PartBuilder detects Duplicate PinNumbers or PinNames
and you don't want to modify the vendor provided pinData

EXCLUDE_PIN_NAMES_MATCHING:

This Setting can be used to exclude pins from any PIN_REPORT_TYPE where the PIN_NAME matches any of the specified patterns.
This is a natural companion to the EXCLUDE_PIN_NUMS_MATCHING config variable...
Multiple patterns separated by commas can be providedThis can be helpful when PartBuilder detects Duplicate PinNumbers or PinNames
and you don't want to modify the vendor provided pinData

NO_POP_PIN_MATCHES:

This Setting is can be used to identify pins by PIN_NAME that shouldn't be added to the pinout... 

The default is: ^-$,!NO_PIN which means any pinName that contains just '-' or contains !NO_PIN (which would typically be added by editing a spreadsheet)

If a PinName in the PIN_NAME column of a spreadsheet matches any of these patterns, They will be treated as empty pin slots, and will not be added as a pin
This allows you to have a spreadsheet with

PinNumPinNamePinNumPinNamePinNumPinName
A1gndB1-C1vcc
A3-B3gndC3!NO_PIN


where Pins B1,A3 and C3 will not be added to the pinout (or PinCount) because the PIN_NAME matches the NO_POP_PIN_MATCHES setting

A3 is higlighted because the user would probably have added the !NO_PIN entry manually

These patterns could be present in the pin spreadsheet OR the user can edit the pinName cells and add this pattern if needed.

This should work for all other types of PIN_REPORTS, the check is done when adding the pin to the pinout list

VALID_PIN_NUM_MATCHES:

When reading a SPREADSHEET, using SPREADSHEET or GENERIC_CSV PIN_REPORT_TYPE,PartBuilder validates the contents of the PIN_NUM column to make sure they contain
normal pinNumbers like 1 to 100 or A5, AA22. This makes it easier to parse the spreadsheets and throw out rows that don't seem to conform.
Some parts may have pin numbers that do not conform to those rules like: GND_TAB if they do and you are missing pins, you will need to add those special pins to this Entry

(separating each match by a ',')
It will be used as a regular expression to match the pin so the part had GND_TAB1...GND_TAB25 pins
GND_TAB would validate all of them.

This Entry is not needed if the user defines the expected PIns using the newer partBuilder capabilites described in the PinData Verification Checks page, since PartBuilder will accept any pins that are entered in the PCHK_DEVICE_PIN_NUMBERS entry