summaryrefslogtreecommitdiffstatshomepage
path: root/src/tools/jedutil.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/jedutil.c')
-rw-r--r--src/tools/jedutil.c4080
1 files changed, 2040 insertions, 2040 deletions
diff --git a/src/tools/jedutil.c b/src/tools/jedutil.c
index 5b200b86138..f6b5ba158f1 100644
--- a/src/tools/jedutil.c
+++ b/src/tools/jedutil.c
@@ -165,8 +165,8 @@ typedef int (*command_func_type)(int argc, char *argv[]);
typedef struct _command_entry command_entry;
struct _command_entry
{
- const char *command;
- command_func_type command_func;
+ const char *command;
+ command_func_type command_func;
};
@@ -175,10 +175,10 @@ struct _command_entry
typedef struct _pin_fuse_rows pin_fuse_rows;
struct _pin_fuse_rows
{
- UINT16 pin; /* Pin number */
- UINT16 fuserowoutputenable; /* Fuse row for the output enable */
- UINT16 fuserowtermstart; /* Fuse row for the first term */
- UINT16 fuserowtermend; /* Fuse row for the last term */
+ UINT16 pin; /* Pin number */
+ UINT16 fuserowoutputenable; /* Fuse row for the output enable */
+ UINT16 fuserowtermstart; /* Fuse row for the first term */
+ UINT16 fuserowtermend; /* Fuse row for the last term */
};
@@ -187,9 +187,9 @@ struct _pin_fuse_rows
typedef struct _pin_fuse_columns pin_fuse_columns;
struct _pin_fuse_columns
{
- UINT16 pin; /* Pin number */
- UINT16 lowfusecolumn; /* Column number for low output */
- UINT16 highfusecolumn; /* Column number for high output */
+ UINT16 pin; /* Pin number */
+ UINT16 lowfusecolumn; /* Column number for low output */
+ UINT16 highfusecolumn; /* Column number for high output */
};
@@ -202,15 +202,15 @@ typedef UINT16 (*get_pin_fuse_state_func)(const pal_data* pal, const jed_data* j
struct _pal_data
{
- const char *name;
- const pin_fuse_rows *pinfuserows;
- UINT16 pinfuserowscount;
- const pin_fuse_columns *pinfusecolumns;
- UINT16 pinfusecolumnscount;
- print_product_terms_func print_product_terms;
- config_pins_func config_pins;
- is_product_term_enabled_func is_product_term_enabled;
- get_pin_fuse_state_func get_pin_fuse_state;
+ const char *name;
+ const pin_fuse_rows *pinfuserows;
+ UINT16 pinfuserowscount;
+ const pin_fuse_columns *pinfusecolumns;
+ UINT16 pinfusecolumnscount;
+ print_product_terms_func print_product_terms;
+ config_pins_func config_pins;
+ is_product_term_enabled_func is_product_term_enabled;
+ get_pin_fuse_state_func get_pin_fuse_state;
};
@@ -219,8 +219,8 @@ struct _pal_data
typedef struct _pin_output_config pin_output_config;
struct _pin_output_config
{
- UINT16 pin;
- UINT16 flags;
+ UINT16 pin;
+ UINT16 flags;
};
@@ -305,726 +305,726 @@ static pin_output_config outputpins[26];
static UINT16 outputpinscount;
static pin_fuse_rows pal10l8pinfuserows[] = {
- {12, NO_OUTPUT_ENABLE_FUSE_ROW, 280, 300},
- {13, NO_OUTPUT_ENABLE_FUSE_ROW, 240, 260},
- {14, NO_OUTPUT_ENABLE_FUSE_ROW, 200, 220},
- {15, NO_OUTPUT_ENABLE_FUSE_ROW, 160, 180},
- {16, NO_OUTPUT_ENABLE_FUSE_ROW, 120, 140},
- {17, NO_OUTPUT_ENABLE_FUSE_ROW, 80, 100},
- {18, NO_OUTPUT_ENABLE_FUSE_ROW, 40, 60},
- {19, NO_OUTPUT_ENABLE_FUSE_ROW, 0, 20}};
+ {12, NO_OUTPUT_ENABLE_FUSE_ROW, 280, 300},
+ {13, NO_OUTPUT_ENABLE_FUSE_ROW, 240, 260},
+ {14, NO_OUTPUT_ENABLE_FUSE_ROW, 200, 220},
+ {15, NO_OUTPUT_ENABLE_FUSE_ROW, 160, 180},
+ {16, NO_OUTPUT_ENABLE_FUSE_ROW, 120, 140},
+ {17, NO_OUTPUT_ENABLE_FUSE_ROW, 80, 100},
+ {18, NO_OUTPUT_ENABLE_FUSE_ROW, 40, 60},
+ {19, NO_OUTPUT_ENABLE_FUSE_ROW, 0, 20}};
static pin_fuse_rows pal10h8pinfuserows[] = {
- {12, NO_OUTPUT_ENABLE_FUSE_ROW, 280, 300},
- {13, NO_OUTPUT_ENABLE_FUSE_ROW, 240, 260},
- {14, NO_OUTPUT_ENABLE_FUSE_ROW, 200, 220},
- {15, NO_OUTPUT_ENABLE_FUSE_ROW, 160, 180},
- {16, NO_OUTPUT_ENABLE_FUSE_ROW, 120, 140},
- {17, NO_OUTPUT_ENABLE_FUSE_ROW, 80, 100},
- {18, NO_OUTPUT_ENABLE_FUSE_ROW, 40, 60},
- {19, NO_OUTPUT_ENABLE_FUSE_ROW, 0, 20}};
+ {12, NO_OUTPUT_ENABLE_FUSE_ROW, 280, 300},
+ {13, NO_OUTPUT_ENABLE_FUSE_ROW, 240, 260},
+ {14, NO_OUTPUT_ENABLE_FUSE_ROW, 200, 220},
+ {15, NO_OUTPUT_ENABLE_FUSE_ROW, 160, 180},
+ {16, NO_OUTPUT_ENABLE_FUSE_ROW, 120, 140},
+ {17, NO_OUTPUT_ENABLE_FUSE_ROW, 80, 100},
+ {18, NO_OUTPUT_ENABLE_FUSE_ROW, 40, 60},
+ {19, NO_OUTPUT_ENABLE_FUSE_ROW, 0, 20}};
static pin_fuse_rows pal12l6pinfuserows[] = {
- {13, NO_OUTPUT_ENABLE_FUSE_ROW, 288, 360},
- {14, NO_OUTPUT_ENABLE_FUSE_ROW, 240, 264},
- {15, NO_OUTPUT_ENABLE_FUSE_ROW, 192, 216},
- {16, NO_OUTPUT_ENABLE_FUSE_ROW, 144, 168},
- {17, NO_OUTPUT_ENABLE_FUSE_ROW, 96, 120},
- {18, NO_OUTPUT_ENABLE_FUSE_ROW, 0, 72}};
+ {13, NO_OUTPUT_ENABLE_FUSE_ROW, 288, 360},
+ {14, NO_OUTPUT_ENABLE_FUSE_ROW, 240, 264},
+ {15, NO_OUTPUT_ENABLE_FUSE_ROW, 192, 216},
+ {16, NO_OUTPUT_ENABLE_FUSE_ROW, 144, 168},
+ {17, NO_OUTPUT_ENABLE_FUSE_ROW, 96, 120},
+ {18, NO_OUTPUT_ENABLE_FUSE_ROW, 0, 72}};
static pin_fuse_rows pal12h6pinfuserows[] = {
- {13, NO_OUTPUT_ENABLE_FUSE_ROW, 288, 360},
- {14, NO_OUTPUT_ENABLE_FUSE_ROW, 240, 264},
- {15, NO_OUTPUT_ENABLE_FUSE_ROW, 192, 216},
- {16, NO_OUTPUT_ENABLE_FUSE_ROW, 144, 168},
- {17, NO_OUTPUT_ENABLE_FUSE_ROW, 96, 120},
- {18, NO_OUTPUT_ENABLE_FUSE_ROW, 0, 72}};
+ {13, NO_OUTPUT_ENABLE_FUSE_ROW, 288, 360},
+ {14, NO_OUTPUT_ENABLE_FUSE_ROW, 240, 264},
+ {15, NO_OUTPUT_ENABLE_FUSE_ROW, 192, 216},
+ {16, NO_OUTPUT_ENABLE_FUSE_ROW, 144, 168},
+ {17, NO_OUTPUT_ENABLE_FUSE_ROW, 96, 120},
+ {18, NO_OUTPUT_ENABLE_FUSE_ROW, 0, 72}};
static pin_fuse_rows pal14l4pinfuserows[] = {
- {14, NO_OUTPUT_ENABLE_FUSE_ROW, 336, 420},
- {15, NO_OUTPUT_ENABLE_FUSE_ROW, 224, 308},
- {16, NO_OUTPUT_ENABLE_FUSE_ROW, 112, 196},
- {17, NO_OUTPUT_ENABLE_FUSE_ROW, 0, 84}};
+ {14, NO_OUTPUT_ENABLE_FUSE_ROW, 336, 420},
+ {15, NO_OUTPUT_ENABLE_FUSE_ROW, 224, 308},
+ {16, NO_OUTPUT_ENABLE_FUSE_ROW, 112, 196},
+ {17, NO_OUTPUT_ENABLE_FUSE_ROW, 0, 84}};
static pin_fuse_rows pal14h4pinfuserows[] = {
- {14, NO_OUTPUT_ENABLE_FUSE_ROW, 336, 420},
- {15, NO_OUTPUT_ENABLE_FUSE_ROW, 224, 308},
- {16, NO_OUTPUT_ENABLE_FUSE_ROW, 112, 196},
- {17, NO_OUTPUT_ENABLE_FUSE_ROW, 0, 84}};
+ {14, NO_OUTPUT_ENABLE_FUSE_ROW, 336, 420},
+ {15, NO_OUTPUT_ENABLE_FUSE_ROW, 224, 308},
+ {16, NO_OUTPUT_ENABLE_FUSE_ROW, 112, 196},
+ {17, NO_OUTPUT_ENABLE_FUSE_ROW, 0, 84}};
static pin_fuse_rows pal16l2pinfuserows[] = {
- {15, NO_OUTPUT_ENABLE_FUSE_ROW, 256, 480},
- {16, NO_OUTPUT_ENABLE_FUSE_ROW, 0, 224}};
+ {15, NO_OUTPUT_ENABLE_FUSE_ROW, 256, 480},
+ {16, NO_OUTPUT_ENABLE_FUSE_ROW, 0, 224}};
static pin_fuse_rows pal16h2pinfuserows[] = {
- {15, NO_OUTPUT_ENABLE_FUSE_ROW, 256, 480},
- {16, NO_OUTPUT_ENABLE_FUSE_ROW, 0, 224}};
+ {15, NO_OUTPUT_ENABLE_FUSE_ROW, 256, 480},
+ {16, NO_OUTPUT_ENABLE_FUSE_ROW, 0, 224}};
static pin_fuse_rows pal16c1pinfuserows[] = {
- {15, NO_OUTPUT_ENABLE_FUSE_ROW, 0, 480},
- {16, NO_OUTPUT_ENABLE_FUSE_ROW, 0, 480}};
+ {15, NO_OUTPUT_ENABLE_FUSE_ROW, 0, 480},
+ {16, NO_OUTPUT_ENABLE_FUSE_ROW, 0, 480}};
static pin_fuse_rows pal16l8pinfuserows[] = {
- {12, 1792, 1824, 2016},
- {13, 1536, 1568, 1760},
- {14, 1280, 1312, 1504},
- {15, 1024, 1056, 1248},
- {16, 768, 800, 992},
- {17, 512, 544, 736},
- {18, 256, 288, 480},
- {19, 0, 32, 224}};
+ {12, 1792, 1824, 2016},
+ {13, 1536, 1568, 1760},
+ {14, 1280, 1312, 1504},
+ {15, 1024, 1056, 1248},
+ {16, 768, 800, 992},
+ {17, 512, 544, 736},
+ {18, 256, 288, 480},
+ {19, 0, 32, 224}};
static pin_fuse_rows pal16r4pinfuserows[] = {
- {12, 1792, 1824, 2016},
- {13, 1536, 1568, 1760},
- {14, NO_OUTPUT_ENABLE_FUSE_ROW, 1280, 1504}, /* Registered Output */
- {15, NO_OUTPUT_ENABLE_FUSE_ROW, 1024, 1248}, /* Registered Output */
- {16, NO_OUTPUT_ENABLE_FUSE_ROW, 768, 992}, /* Registered Output */
- {17, NO_OUTPUT_ENABLE_FUSE_ROW, 512, 736}, /* Registered Output */
- {18, 256, 288, 480},
- {19, 0, 32, 224}};
+ {12, 1792, 1824, 2016},
+ {13, 1536, 1568, 1760},
+ {14, NO_OUTPUT_ENABLE_FUSE_ROW, 1280, 1504}, /* Registered Output */
+ {15, NO_OUTPUT_ENABLE_FUSE_ROW, 1024, 1248}, /* Registered Output */
+ {16, NO_OUTPUT_ENABLE_FUSE_ROW, 768, 992}, /* Registered Output */
+ {17, NO_OUTPUT_ENABLE_FUSE_ROW, 512, 736}, /* Registered Output */
+ {18, 256, 288, 480},
+ {19, 0, 32, 224}};
static pin_fuse_rows pal16r6pinfuserows[] = {
- {12, 1792, 1824, 2016},
- {13, NO_OUTPUT_ENABLE_FUSE_ROW, 1536, 1760}, /* Registered Output */
- {14, NO_OUTPUT_ENABLE_FUSE_ROW, 1280, 1504}, /* Registered Output */
- {15, NO_OUTPUT_ENABLE_FUSE_ROW, 1024, 1248}, /* Registered Output */
- {16, NO_OUTPUT_ENABLE_FUSE_ROW, 768, 992}, /* Registered Output */
- {17, NO_OUTPUT_ENABLE_FUSE_ROW, 512, 736}, /* Registered Output */
- {18, NO_OUTPUT_ENABLE_FUSE_ROW, 256, 480}, /* Registered Output */
- {19, 0, 32, 224}};
+ {12, 1792, 1824, 2016},
+ {13, NO_OUTPUT_ENABLE_FUSE_ROW, 1536, 1760}, /* Registered Output */
+ {14, NO_OUTPUT_ENABLE_FUSE_ROW, 1280, 1504}, /* Registered Output */
+ {15, NO_OUTPUT_ENABLE_FUSE_ROW, 1024, 1248}, /* Registered Output */
+ {16, NO_OUTPUT_ENABLE_FUSE_ROW, 768, 992}, /* Registered Output */
+ {17, NO_OUTPUT_ENABLE_FUSE_ROW, 512, 736}, /* Registered Output */
+ {18, NO_OUTPUT_ENABLE_FUSE_ROW, 256, 480}, /* Registered Output */
+ {19, 0, 32, 224}};
static pin_fuse_rows pal16r8pinfuserows[] = {
- {12, NO_OUTPUT_ENABLE_FUSE_ROW, 1792, 2016}, /* Registered Output */
- {13, NO_OUTPUT_ENABLE_FUSE_ROW, 1536, 1760}, /* Registered Output */
- {14, NO_OUTPUT_ENABLE_FUSE_ROW, 1280, 1504}, /* Registered Output */
- {15, NO_OUTPUT_ENABLE_FUSE_ROW, 1024, 1248}, /* Registered Output */
- {16, NO_OUTPUT_ENABLE_FUSE_ROW, 768, 992}, /* Registered Output */
- {17, NO_OUTPUT_ENABLE_FUSE_ROW, 512, 736}, /* Registered Output */
- {18, NO_OUTPUT_ENABLE_FUSE_ROW, 256, 480}, /* Registered Output */
- {19, NO_OUTPUT_ENABLE_FUSE_ROW, 0, 224}}; /* Registered Output */
+ {12, NO_OUTPUT_ENABLE_FUSE_ROW, 1792, 2016}, /* Registered Output */
+ {13, NO_OUTPUT_ENABLE_FUSE_ROW, 1536, 1760}, /* Registered Output */
+ {14, NO_OUTPUT_ENABLE_FUSE_ROW, 1280, 1504}, /* Registered Output */
+ {15, NO_OUTPUT_ENABLE_FUSE_ROW, 1024, 1248}, /* Registered Output */
+ {16, NO_OUTPUT_ENABLE_FUSE_ROW, 768, 992}, /* Registered Output */
+ {17, NO_OUTPUT_ENABLE_FUSE_ROW, 512, 736}, /* Registered Output */
+ {18, NO_OUTPUT_ENABLE_FUSE_ROW, 256, 480}, /* Registered Output */
+ {19, NO_OUTPUT_ENABLE_FUSE_ROW, 0, 224}}; /* Registered Output */
static pin_fuse_rows gal16v8pinfuserows[] = {
- {12, 0, 0, 0},
- {13, 0, 0, 0},
- {14, 0, 0, 0},
- {15, 0, 0, 0},
- {16, 0, 0, 0},
- {17, 0, 0, 0},
- {18, 0, 0, 0},
- {19, 0, 0, 0}};
+ {12, 0, 0, 0},
+ {13, 0, 0, 0},
+ {14, 0, 0, 0},
+ {15, 0, 0, 0},
+ {16, 0, 0, 0},
+ {17, 0, 0, 0},
+ {18, 0, 0, 0},
+ {19, 0, 0, 0}};
static pin_fuse_rows peel18cv8pinfuserows[] = {
- {12, 2556, 2016, 2268},
- {13, 2520, 1728, 1980},
- {14, 2484, 1440, 1692},
- {15, 2448, 1152, 1404},
- {16, 2412, 864, 1116},
- {17, 2376, 576, 828},
- {18, 2340, 288, 540},
- {19, 2304, 0, 252}};
+ {12, 2556, 2016, 2268},
+ {13, 2520, 1728, 1980},
+ {14, 2484, 1440, 1692},
+ {15, 2448, 1152, 1404},
+ {16, 2412, 864, 1116},
+ {17, 2376, 576, 828},
+ {18, 2340, 288, 540},
+ {19, 2304, 0, 252}};
#if defined(include_gal18v10)
static pin_fuse_rows gal18v10pinfuserows[] = {
- {9, 3096, 3132, 3384},
- {11, 2772, 2808, 3060},
- {12, 2448, 2484, 2736},
- {13, 2124, 2160, 2412},
- {14, 1728, 1764, 2088},
- {15, 1332, 1368, 1692},
- {16, 1008, 1044, 1296},
- {17, 684, 720, 972},
- {18, 360, 396, 648},
- {19, 36, 72, 324}};
+ {9, 3096, 3132, 3384},
+ {11, 2772, 2808, 3060},
+ {12, 2448, 2484, 2736},
+ {13, 2124, 2160, 2412},
+ {14, 1728, 1764, 2088},
+ {15, 1332, 1368, 1692},
+ {16, 1008, 1044, 1296},
+ {17, 684, 720, 972},
+ {18, 360, 396, 648},
+ {19, 36, 72, 324}};
#endif
static pin_fuse_rows pal20l8pinfuserows[] = {
- {15, 2240, 2280, 2520},
- {16, 1920, 1960, 2200},
- {17, 1600, 1640, 1880},
- {18, 1280, 1320, 1560},
- {19, 960, 1000, 1240},
- {20, 640, 680, 920},
- {21, 320, 360, 600},
- {22, 0, 40, 280}};
+ {15, 2240, 2280, 2520},
+ {16, 1920, 1960, 2200},
+ {17, 1600, 1640, 1880},
+ {18, 1280, 1320, 1560},
+ {19, 960, 1000, 1240},
+ {20, 640, 680, 920},
+ {21, 320, 360, 600},
+ {22, 0, 40, 280}};
static pin_fuse_rows pal20l10pinfuserows[] = {
- {14, 1440, 1480, 1560},
- {15, 1280, 1320, 1400},
- {16, 1120, 1160, 1240},
- {17, 960, 1000, 1080},
- {18, 800, 840, 920},
- {19, 640, 680, 760},
- {20, 480, 520, 600},
- {21, 320, 360, 440},
- {22, 160, 200, 280},
- {23, 0, 40, 120}};
+ {14, 1440, 1480, 1560},
+ {15, 1280, 1320, 1400},
+ {16, 1120, 1160, 1240},
+ {17, 960, 1000, 1080},
+ {18, 800, 840, 920},
+ {19, 640, 680, 760},
+ {20, 480, 520, 600},
+ {21, 320, 360, 440},
+ {22, 160, 200, 280},
+ {23, 0, 40, 120}};
static pin_fuse_rows pal20r4pinfuserows[] = {
- {15, 2240, 2280, 2520},
- {16, 1920, 1960, 2200},
- {17, NO_OUTPUT_ENABLE_FUSE_ROW, 1600, 1880}, /* Registered Output */
- {18, NO_OUTPUT_ENABLE_FUSE_ROW, 1280, 1560}, /* Registered Output */
- {19, NO_OUTPUT_ENABLE_FUSE_ROW, 960, 1240}, /* Registered Output */
- {20, NO_OUTPUT_ENABLE_FUSE_ROW, 640, 920}, /* Registered Output */
- {21, 320, 360, 600},
- {22, 0, 40, 280}};
+ {15, 2240, 2280, 2520},
+ {16, 1920, 1960, 2200},
+ {17, NO_OUTPUT_ENABLE_FUSE_ROW, 1600, 1880}, /* Registered Output */
+ {18, NO_OUTPUT_ENABLE_FUSE_ROW, 1280, 1560}, /* Registered Output */
+ {19, NO_OUTPUT_ENABLE_FUSE_ROW, 960, 1240}, /* Registered Output */
+ {20, NO_OUTPUT_ENABLE_FUSE_ROW, 640, 920}, /* Registered Output */
+ {21, 320, 360, 600},
+ {22, 0, 40, 280}};
static pin_fuse_rows pal20r6pinfuserows[] = {
- {15, 2240, 2280, 2520},
- {16, NO_OUTPUT_ENABLE_FUSE_ROW, 1920, 2200}, /* Registered Output */
- {17, NO_OUTPUT_ENABLE_FUSE_ROW, 1600, 1880}, /* Registered Output */
- {18, NO_OUTPUT_ENABLE_FUSE_ROW, 1280, 1560}, /* Registered Output */
- {19, NO_OUTPUT_ENABLE_FUSE_ROW, 960, 1240}, /* Registered Output */
- {20, NO_OUTPUT_ENABLE_FUSE_ROW, 640, 920}, /* Registered Output */
- {21, NO_OUTPUT_ENABLE_FUSE_ROW, 320, 600}, /* Registered Output */
- {22, 0, 40, 280}};
+ {15, 2240, 2280, 2520},
+ {16, NO_OUTPUT_ENABLE_FUSE_ROW, 1920, 2200}, /* Registered Output */
+ {17, NO_OUTPUT_ENABLE_FUSE_ROW, 1600, 1880}, /* Registered Output */
+ {18, NO_OUTPUT_ENABLE_FUSE_ROW, 1280, 1560}, /* Registered Output */
+ {19, NO_OUTPUT_ENABLE_FUSE_ROW, 960, 1240}, /* Registered Output */
+ {20, NO_OUTPUT_ENABLE_FUSE_ROW, 640, 920}, /* Registered Output */
+ {21, NO_OUTPUT_ENABLE_FUSE_ROW, 320, 600}, /* Registered Output */
+ {22, 0, 40, 280}};
static pin_fuse_rows pal20r8pinfuserows[] = {
- {15, NO_OUTPUT_ENABLE_FUSE_ROW, 2240, 2520}, /* Registered Output */
- {16, NO_OUTPUT_ENABLE_FUSE_ROW, 1920, 2200}, /* Registered Output */
- {17, NO_OUTPUT_ENABLE_FUSE_ROW, 1600, 1880}, /* Registered Output */
- {18, NO_OUTPUT_ENABLE_FUSE_ROW, 1280, 1560}, /* Registered Output */
- {19, NO_OUTPUT_ENABLE_FUSE_ROW, 960, 1240}, /* Registered Output */
- {20, NO_OUTPUT_ENABLE_FUSE_ROW, 640, 920}, /* Registered Output */
- {21, NO_OUTPUT_ENABLE_FUSE_ROW, 320, 600}, /* Registered Output */
- {22, NO_OUTPUT_ENABLE_FUSE_ROW, 0, 280}}; /* Registered Output */
+ {15, NO_OUTPUT_ENABLE_FUSE_ROW, 2240, 2520}, /* Registered Output */
+ {16, NO_OUTPUT_ENABLE_FUSE_ROW, 1920, 2200}, /* Registered Output */
+ {17, NO_OUTPUT_ENABLE_FUSE_ROW, 1600, 1880}, /* Registered Output */
+ {18, NO_OUTPUT_ENABLE_FUSE_ROW, 1280, 1560}, /* Registered Output */
+ {19, NO_OUTPUT_ENABLE_FUSE_ROW, 960, 1240}, /* Registered Output */
+ {20, NO_OUTPUT_ENABLE_FUSE_ROW, 640, 920}, /* Registered Output */
+ {21, NO_OUTPUT_ENABLE_FUSE_ROW, 320, 600}, /* Registered Output */
+ {22, NO_OUTPUT_ENABLE_FUSE_ROW, 0, 280}}; /* Registered Output */
static pin_fuse_columns pal10l8pinfusecolumns[] = {
- {1, 3, 2},
- {2, 1, 0},
- {3, 5, 4},
- {4, 7, 6},
- {5, 9, 8},
- {6, 11, 10},
- {7, 13, 12},
- {8, 15, 14},
- {9, 17, 16},
- {11, 19, 18}};
+ {1, 3, 2},
+ {2, 1, 0},
+ {3, 5, 4},
+ {4, 7, 6},
+ {5, 9, 8},
+ {6, 11, 10},
+ {7, 13, 12},
+ {8, 15, 14},
+ {9, 17, 16},
+ {11, 19, 18}};
static pin_fuse_columns pal10h8pinfusecolumns[] = {
- {1, 3, 2},
- {2, 1, 0},
- {3, 5, 4},
- {4, 7, 6},
- {5, 9, 8},
- {6, 11, 10},
- {7, 13, 12},
- {8, 15, 14},
- {9, 17, 16},
- {11, 19, 18}};
+ {1, 3, 2},
+ {2, 1, 0},
+ {3, 5, 4},
+ {4, 7, 6},
+ {5, 9, 8},
+ {6, 11, 10},
+ {7, 13, 12},
+ {8, 15, 14},
+ {9, 17, 16},
+ {11, 19, 18}};
static pin_fuse_columns pal12l6pinfusecolumns[] = {
- {1, 3, 2},
- {2, 1, 0},
- {3, 5, 4},
- {4, 9, 8},
- {5, 11, 10},
- {6, 13, 12},
- {7, 15, 14},
- {8, 17, 16},
- {9, 21, 20},
- {11, 23, 22},
- {12, 19, 18},
- {19, 7, 6}};
+ {1, 3, 2},
+ {2, 1, 0},
+ {3, 5, 4},
+ {4, 9, 8},
+ {5, 11, 10},
+ {6, 13, 12},
+ {7, 15, 14},
+ {8, 17, 16},
+ {9, 21, 20},
+ {11, 23, 22},
+ {12, 19, 18},
+ {19, 7, 6}};
static pin_fuse_columns pal12h6pinfusecolumns[] = {
- {1, 3, 2},
- {2, 1, 0},
- {3, 5, 4},
- {4, 9, 8},
- {5, 11, 10},
- {6, 13, 12},
- {7, 15, 14},
- {8, 17, 16},
- {9, 21, 20},
- {11, 23, 22},
- {12, 19, 18},
- {19, 7, 6}};
+ {1, 3, 2},
+ {2, 1, 0},
+ {3, 5, 4},
+ {4, 9, 8},
+ {5, 11, 10},
+ {6, 13, 12},
+ {7, 15, 14},
+ {8, 17, 16},
+ {9, 21, 20},
+ {11, 23, 22},
+ {12, 19, 18},
+ {19, 7, 6}};
static pin_fuse_columns pal14l4pinfusecolumns[] = {
- {1, 3, 2},
- {2, 1, 0},
- {3, 5, 4},
- {4, 9, 8},
- {5, 13, 12},
- {6, 15, 14},
- {7, 17, 16},
- {8, 21, 20},
- {9, 25, 24},
- {11, 27, 26},
- {12, 23, 22},
- {13, 19, 18},
- {18, 11, 10},
- {19, 7, 6}};
+ {1, 3, 2},
+ {2, 1, 0},
+ {3, 5, 4},
+ {4, 9, 8},
+ {5, 13, 12},
+ {6, 15, 14},
+ {7, 17, 16},
+ {8, 21, 20},
+ {9, 25, 24},
+ {11, 27, 26},
+ {12, 23, 22},
+ {13, 19, 18},
+ {18, 11, 10},
+ {19, 7, 6}};
static pin_fuse_columns pal14h4pinfusecolumns[] = {
- {1, 3, 2},
- {2, 1, 0},
- {3, 5, 4},
- {4, 9, 8},
- {5, 13, 12},
- {6, 15, 14},
- {7, 17, 16},
- {8, 21, 20},
- {9, 25, 24},
- {11, 27, 26},
- {12, 23, 22},
- {13, 19, 18},
- {18, 11, 10},
- {19, 7, 6}};
+ {1, 3, 2},
+ {2, 1, 0},
+ {3, 5, 4},
+ {4, 9, 8},
+ {5, 13, 12},
+ {6, 15, 14},
+ {7, 17, 16},
+ {8, 21, 20},
+ {9, 25, 24},
+ {11, 27, 26},
+ {12, 23, 22},
+ {13, 19, 18},
+ {18, 11, 10},
+ {19, 7, 6}};
static pin_fuse_columns pal16l2pinfusecolumns[] = {
- {1, 3, 2},
- {2, 1, 0},
- {3, 5, 4},
- {4, 9, 8},
- {5, 13, 12},
- {6, 17, 16},
- {7, 21, 20},
- {8, 25, 24},
- {9, 29, 28},
- {11, 31, 30},
- {12, 27, 26},
- {13, 23, 22},
- {14, 19, 18},
- {17, 15, 14},
- {18, 11, 10},
- {19, 7, 6}};
+ {1, 3, 2},
+ {2, 1, 0},
+ {3, 5, 4},
+ {4, 9, 8},
+ {5, 13, 12},
+ {6, 17, 16},
+ {7, 21, 20},
+ {8, 25, 24},
+ {9, 29, 28},
+ {11, 31, 30},
+ {12, 27, 26},
+ {13, 23, 22},
+ {14, 19, 18},
+ {17, 15, 14},
+ {18, 11, 10},
+ {19, 7, 6}};
static pin_fuse_columns pal16h2pinfusecolumns[] = {
- {1, 3, 2},
- {2, 1, 0},
- {3, 5, 4},
- {4, 9, 8},
- {5, 13, 12},
- {6, 17, 16},
- {7, 21, 20},
- {8, 25, 24},
- {9, 29, 28},
- {11, 31, 30},
- {12, 27, 26},
- {13, 23, 22},
- {14, 19, 18},
- {17, 15, 14},
- {18, 11, 10},
- {19, 7, 6}};
+ {1, 3, 2},
+ {2, 1, 0},
+ {3, 5, 4},
+ {4, 9, 8},
+ {5, 13, 12},
+ {6, 17, 16},
+ {7, 21, 20},
+ {8, 25, 24},
+ {9, 29, 28},
+ {11, 31, 30},
+ {12, 27, 26},
+ {13, 23, 22},
+ {14, 19, 18},
+ {17, 15, 14},
+ {18, 11, 10},
+ {19, 7, 6}};
static pin_fuse_columns pal16c1pinfusecolumns[] = {
- {1, 3, 2},
- {2, 1, 0},
- {3, 5, 4},
- {4, 9, 8},
- {5, 13, 12},
- {6, 17, 16},
- {7, 21, 20},
- {8, 25, 24},
- {9, 29, 28},
- {11, 31, 30},
- {12, 27, 26},
- {13, 23, 22},
- {14, 19, 18},
- {17, 15, 14},
- {18, 11, 10},
- {19, 7, 6}};
+ {1, 3, 2},
+ {2, 1, 0},
+ {3, 5, 4},
+ {4, 9, 8},
+ {5, 13, 12},
+ {6, 17, 16},
+ {7, 21, 20},
+ {8, 25, 24},
+ {9, 29, 28},
+ {11, 31, 30},
+ {12, 27, 26},
+ {13, 23, 22},
+ {14, 19, 18},
+ {17, 15, 14},
+ {18, 11, 10},
+ {19, 7, 6}};
static pin_fuse_columns pal16l8pinfusecolumns[] = {
- {1, 3, 2},
- {2, 1, 0},
- {3, 5, 4},
- {4, 9, 8},
- {5, 13, 12},
- {6, 17, 16},
- {7, 21, 20},
- {8, 25, 24},
- {9, 29, 28},
- {11, 31, 30},
- {13, 27, 26},
- {14, 23, 22},
- {15, 19, 18},
- {16, 15, 14},
- {17, 11, 10},
- {18, 7, 6}};
+ {1, 3, 2},
+ {2, 1, 0},
+ {3, 5, 4},
+ {4, 9, 8},
+ {5, 13, 12},
+ {6, 17, 16},
+ {7, 21, 20},
+ {8, 25, 24},
+ {9, 29, 28},
+ {11, 31, 30},
+ {13, 27, 26},
+ {14, 23, 22},
+ {15, 19, 18},
+ {16, 15, 14},
+ {17, 11, 10},
+ {18, 7, 6}};
static pin_fuse_columns pal16r4pinfusecolumns[] = {
- {2, 1, 0},
- {3, 5, 4},
- {4, 9, 8},
- {5, 13, 12},
- {6, 17, 16},
- {7, 21, 20},
- {8, 25, 24},
- {9, 29, 28},
- {12, 31, 30},
- {13, 27, 26},
- {14, 23, 22}, /* Registered Output */
- {15, 19, 18}, /* Registered Output */
- {16, 15, 14}, /* Registered Output */
- {17, 11, 10}, /* Registered Output */
- {18, 7, 6},
- {19, 3, 2}};
+ {2, 1, 0},
+ {3, 5, 4},
+ {4, 9, 8},
+ {5, 13, 12},
+ {6, 17, 16},
+ {7, 21, 20},
+ {8, 25, 24},
+ {9, 29, 28},
+ {12, 31, 30},
+ {13, 27, 26},
+ {14, 23, 22}, /* Registered Output */
+ {15, 19, 18}, /* Registered Output */
+ {16, 15, 14}, /* Registered Output */
+ {17, 11, 10}, /* Registered Output */
+ {18, 7, 6},
+ {19, 3, 2}};
static pin_fuse_columns pal16r6pinfusecolumns[] = {
- {2, 1, 0},
- {3, 5, 4},
- {4, 9, 8},
- {5, 13, 12},
- {6, 17, 16},
- {7, 21, 20},
- {8, 25, 24},
- {9, 29, 28},
- {12, 31, 30},
- {13, 27, 26}, /* Registered Output */
- {14, 23, 22}, /* Registered Output */
- {15, 19, 18}, /* Registered Output */
- {16, 15, 14}, /* Registered Output */
- {17, 11, 10}, /* Registered Output */
- {18, 7, 6}, /* Registered Output */
- {19, 3, 2}};
+ {2, 1, 0},
+ {3, 5, 4},
+ {4, 9, 8},
+ {5, 13, 12},
+ {6, 17, 16},
+ {7, 21, 20},
+ {8, 25, 24},
+ {9, 29, 28},
+ {12, 31, 30},
+ {13, 27, 26}, /* Registered Output */
+ {14, 23, 22}, /* Registered Output */
+ {15, 19, 18}, /* Registered Output */
+ {16, 15, 14}, /* Registered Output */
+ {17, 11, 10}, /* Registered Output */
+ {18, 7, 6}, /* Registered Output */
+ {19, 3, 2}};
static pin_fuse_columns pal16r8pinfusecolumns[] = {
- {2, 1, 0},
- {3, 5, 4},
- {4, 9, 8},
- {5, 13, 12},
- {6, 17, 16},
- {7, 21, 20},
- {8, 25, 24},
- {9, 29, 28},
- {12, 31, 30}, /* Registered Output */
- {13, 27, 26}, /* Registered Output */
- {14, 23, 22}, /* Registered Output */
- {15, 19, 18}, /* Registered Output */
- {16, 15, 14}, /* Registered Output */
- {17, 11, 10}, /* Registered Output */
- {18, 7, 6}, /* Registered Output */
- {19, 3, 2}}; /* Registered Output */
+ {2, 1, 0},
+ {3, 5, 4},
+ {4, 9, 8},
+ {5, 13, 12},
+ {6, 17, 16},
+ {7, 21, 20},
+ {8, 25, 24},
+ {9, 29, 28},
+ {12, 31, 30}, /* Registered Output */
+ {13, 27, 26}, /* Registered Output */
+ {14, 23, 22}, /* Registered Output */
+ {15, 19, 18}, /* Registered Output */
+ {16, 15, 14}, /* Registered Output */
+ {17, 11, 10}, /* Registered Output */
+ {18, 7, 6}, /* Registered Output */
+ {19, 3, 2}}; /* Registered Output */
static pin_fuse_columns gal16v8pinfusecolumns[] = {
- {0, 0, 0},
- {0, 0, 0},
- {0, 0, 0},
- {0, 0, 0},
- {0, 0, 0},
- {0, 0, 0},
- {0, 0, 0},
- {0, 0, 0},
- {0, 0, 0},
- {0, 0, 0},
- {0, 0, 0},
- {0, 0, 0},
- {0, 0, 0},
- {0, 0, 0},
- {0, 0, 0},
- {0, 0, 0}};
+ {0, 0, 0},
+ {0, 0, 0},
+ {0, 0, 0},
+ {0, 0, 0},
+ {0, 0, 0},
+ {0, 0, 0},
+ {0, 0, 0},
+ {0, 0, 0},
+ {0, 0, 0},
+ {0, 0, 0},
+ {0, 0, 0},
+ {0, 0, 0},
+ {0, 0, 0},
+ {0, 0, 0},
+ {0, 0, 0},
+ {0, 0, 0}};
static pin_fuse_columns peel18cv8pinfusecolumns[] = {
- {1, 1, 0},
- {2, 5, 4},
- {3, 9, 8},
- {4, 13, 12},
- {5, 17, 16},
- {6, 21, 20},
- {7, 25, 24},
- {8, 29, 28},
- {9, 33, 32},
- {11, 3, 2},
- {12, 35, 34},
- {13, 31, 30},
- {14, 27, 26},
- {15, 23, 22},
- {16, 19, 18},
- {17, 15, 14},
- {18, 11, 10},
- {19, 7, 6}};
+ {1, 1, 0},
+ {2, 5, 4},
+ {3, 9, 8},
+ {4, 13, 12},
+ {5, 17, 16},
+ {6, 21, 20},
+ {7, 25, 24},
+ {8, 29, 28},
+ {9, 33, 32},
+ {11, 3, 2},
+ {12, 35, 34},
+ {13, 31, 30},
+ {14, 27, 26},
+ {15, 23, 22},
+ {16, 19, 18},
+ {17, 15, 14},
+ {18, 11, 10},
+ {19, 7, 6}};
#if defined(include_gal18v10)
static pin_fuse_columns gal18v10pinfusecolumns[] = {
- {1, 1, 0},
- {2, 5, 4},
- {3, 9, 8},
- {4, 13, 12},
- {5, 17, 16},
- {6, 21, 20},
- {7, 25, 24},
- {8, 29, 28},
- {9, 35, 34},
- {11, 33, 32},
- {12, 31, 30},
- {13, 27, 26},
- {14, 23, 22},
- {15, 19, 18},
- {16, 15, 14},
- {17, 11, 10},
- {18, 7, 6},
- {19, 3, 2}};
+ {1, 1, 0},
+ {2, 5, 4},
+ {3, 9, 8},
+ {4, 13, 12},
+ {5, 17, 16},
+ {6, 21, 20},
+ {7, 25, 24},
+ {8, 29, 28},
+ {9, 35, 34},
+ {11, 33, 32},
+ {12, 31, 30},
+ {13, 27, 26},
+ {14, 23, 22},
+ {15, 19, 18},
+ {16, 15, 14},
+ {17, 11, 10},
+ {18, 7, 6},
+ {19, 3, 2}};
#endif
static pin_fuse_columns pal20l8pinfusecolumns[] = {
- {1, 3, 2},
- {2, 1, 0},
- {3, 5, 4},
- {4, 9, 8},
- {5, 13, 12},
- {6, 17, 16},
- {7, 21, 20},
- {8, 25, 24},
- {9, 29, 28},
- {10, 33, 32},
- {11, 37, 36},
- {13, 39, 38},
- {14, 35, 34},
- {16, 31, 30},
- {17, 27, 26},
- {18, 23, 22},
- {19, 19, 18},
- {20, 15, 14},
- {21, 11, 10},
- {23, 7, 6}};
+ {1, 3, 2},
+ {2, 1, 0},
+ {3, 5, 4},
+ {4, 9, 8},
+ {5, 13, 12},
+ {6, 17, 16},
+ {7, 21, 20},
+ {8, 25, 24},
+ {9, 29, 28},
+ {10, 33, 32},
+ {11, 37, 36},
+ {13, 39, 38},
+ {14, 35, 34},
+ {16, 31, 30},
+ {17, 27, 26},
+ {18, 23, 22},
+ {19, 19, 18},
+ {20, 15, 14},
+ {21, 11, 10},
+ {23, 7, 6}};
static pin_fuse_columns pal20l10pinfusecolumns[] = {
- {1, 3, 2},
- {2, 1, 0},
- {3, 5, 4},
- {4, 9, 8},
- {5, 13, 12},
- {6, 17, 16},
- {7, 21, 20},
- {8, 25, 24},
- {9, 29, 28},
- {10, 33, 32},
- {11, 37, 36},
- {13, 39, 38},
- {15, 35, 34},
- {16, 31, 30},
- {17, 27, 26},
- {18, 23, 22},
- {19, 19, 18},
- {20, 15, 14},
- {21, 11, 10},
- {22, 7, 6}};
+ {1, 3, 2},
+ {2, 1, 0},
+ {3, 5, 4},
+ {4, 9, 8},
+ {5, 13, 12},
+ {6, 17, 16},
+ {7, 21, 20},
+ {8, 25, 24},
+ {9, 29, 28},
+ {10, 33, 32},
+ {11, 37, 36},
+ {13, 39, 38},
+ {15, 35, 34},
+ {16, 31, 30},
+ {17, 27, 26},
+ {18, 23, 22},
+ {19, 19, 18},
+ {20, 15, 14},
+ {21, 11, 10},
+ {22, 7, 6}};
static pin_fuse_columns pal20r4pinfusecolumns[] = {
- {2, 1, 0},
- {3, 5, 4},
- {4, 9, 8},
- {5, 13, 12},
- {6, 17, 16},
- {7, 21, 20},
- {8, 25, 24},
- {9, 29, 28},
- {10, 33, 32},
- {11, 37, 36},
- {14, 39, 38},
- {15, 35, 34},
- {16, 31, 30},
- {17, 27, 26},
- {18, 23, 22},
- {19, 19, 18},
- {20, 15, 14},
- {21, 11, 10},
- {22, 7, 6},
- {23, 3, 2}};
+ {2, 1, 0},
+ {3, 5, 4},
+ {4, 9, 8},
+ {5, 13, 12},
+ {6, 17, 16},
+ {7, 21, 20},
+ {8, 25, 24},
+ {9, 29, 28},
+ {10, 33, 32},
+ {11, 37, 36},
+ {14, 39, 38},
+ {15, 35, 34},
+ {16, 31, 30},
+ {17, 27, 26},
+ {18, 23, 22},
+ {19, 19, 18},
+ {20, 15, 14},
+ {21, 11, 10},
+ {22, 7, 6},
+ {23, 3, 2}};
static pin_fuse_columns pal20r6pinfusecolumns[] = {
- {2, 1, 0},
- {3, 5, 4},
- {4, 9, 8},
- {5, 13, 12},
- {6, 17, 16},
- {7, 21, 20},
- {8, 25, 24},
- {9, 29, 28},
- {10, 33, 32},
- {11, 37, 36},
- {14, 39, 38},
- {15, 35, 34},
- {16, 31, 30},
- {17, 27, 26},
- {18, 23, 22},
- {19, 19, 18},
- {20, 15, 14},
- {21, 11, 10},
- {22, 7, 6},
- {23, 3, 2}};
+ {2, 1, 0},
+ {3, 5, 4},
+ {4, 9, 8},
+ {5, 13, 12},
+ {6, 17, 16},
+ {7, 21, 20},
+ {8, 25, 24},
+ {9, 29, 28},
+ {10, 33, 32},
+ {11, 37, 36},
+ {14, 39, 38},
+ {15, 35, 34},
+ {16, 31, 30},
+ {17, 27, 26},
+ {18, 23, 22},
+ {19, 19, 18},
+ {20, 15, 14},
+ {21, 11, 10},
+ {22, 7, 6},
+ {23, 3, 2}};
static pin_fuse_columns pal20r8pinfusecolumns[] = {
- {2, 1, 0},
- {3, 5, 4},
- {4, 9, 8},
- {5, 13, 12},
- {6, 17, 16},
- {7, 21, 20},
- {8, 25, 24},
- {9, 29, 28},
- {10, 33, 32},
- {11, 37, 36},
- {14, 39, 38},
- {15, 35, 34},
- {16, 31, 30},
- {17, 27, 26},
- {18, 23, 22},
- {19, 19, 18},
- {20, 15, 14},
- {21, 11, 10},
- {22, 7, 6},
- {23, 3, 2}};
+ {2, 1, 0},
+ {3, 5, 4},
+ {4, 9, 8},
+ {5, 13, 12},
+ {6, 17, 16},
+ {7, 21, 20},
+ {8, 25, 24},
+ {9, 29, 28},
+ {10, 33, 32},
+ {11, 37, 36},
+ {14, 39, 38},
+ {15, 35, 34},
+ {16, 31, 30},
+ {17, 27, 26},
+ {18, 23, 22},
+ {19, 19, 18},
+ {20, 15, 14},
+ {21, 11, 10},
+ {22, 7, 6},
+ {23, 3, 2}};
static pal_data paldata[] = {
- {"PAL10L8",
- pal10l8pinfuserows, ARRAY_LEN(pal10l8pinfuserows),
- pal10l8pinfusecolumns, ARRAY_LEN(pal10l8pinfusecolumns),
- print_pal10l8_product_terms,
- config_pal10l8_pins,
- NULL,
- NULL},
- {"PAL10H8",
- pal10h8pinfuserows, ARRAY_LEN(pal10h8pinfuserows),
- pal10h8pinfusecolumns, ARRAY_LEN(pal10h8pinfusecolumns),
- print_pal10h8_product_terms,
- config_pal10h8_pins,
- NULL,
- NULL},
- {"PAL12H6",
- pal12h6pinfuserows, ARRAY_LEN(pal12h6pinfuserows),
- pal12h6pinfusecolumns, ARRAY_LEN(pal12h6pinfusecolumns),
- print_pal12h6_product_terms,
- config_pal12h6_pins,
- NULL,
- NULL},
- {"PAL14H4",
- pal14h4pinfuserows, ARRAY_LEN(pal14h4pinfuserows),
- pal14h4pinfusecolumns, ARRAY_LEN(pal14h4pinfusecolumns),
- print_pal14h4_product_terms,
- config_pal14h4_pins,
- NULL,
- NULL},
- {"PAL16H2",
- pal16h2pinfuserows, ARRAY_LEN(pal16h2pinfuserows),
- pal16h2pinfusecolumns, ARRAY_LEN(pal16h2pinfusecolumns),
- print_pal16h2_product_terms,
- config_pal16h2_pins,
- NULL,
- NULL},
- {"PAL16C1",
- pal16c1pinfuserows, ARRAY_LEN(pal16c1pinfuserows),
- pal16c1pinfusecolumns, ARRAY_LEN(pal16c1pinfusecolumns),
- print_pal16c1_product_terms,
- config_pal16c1_pins,
- NULL,
- NULL},
- {"PAL12L6",
- pal12l6pinfuserows, ARRAY_LEN(pal12l6pinfuserows),
- pal12l6pinfusecolumns, ARRAY_LEN(pal12l6pinfusecolumns),
- print_pal12l6_product_terms,
- config_pal12l6_pins,
- NULL,
- NULL},
- {"PAL14L4",
- pal14l4pinfuserows, ARRAY_LEN(pal14l4pinfuserows),
- pal14l4pinfusecolumns, ARRAY_LEN(pal14l4pinfusecolumns),
- print_pal14l4_product_terms,
- config_pal14l4_pins,
- NULL,
- NULL},
- {"PAL16L2",
- pal16l2pinfuserows, ARRAY_LEN(pal16l2pinfuserows),
- pal16l2pinfusecolumns, ARRAY_LEN(pal16l2pinfusecolumns),
- print_pal16l2_product_terms,
- config_pal16l2_pins,
- NULL,
- NULL},
- /*{"15S8", NULL, 0, NULL, 0, NULL, NULL, NULL, NULL},
- {"PLS153", NULL, 0, NULL, 0, NULL, NULL, NULL, NULL},*/
- {"PAL16L8",
- pal16l8pinfuserows, ARRAY_LEN(pal16l8pinfuserows),
- pal16l8pinfusecolumns, ARRAY_LEN(pal16l8pinfusecolumns),
- print_pal16l8_product_terms,
- config_pal16l8_pins,
- NULL,
- NULL},
- {"PAL16R4",
- pal16r4pinfuserows, ARRAY_LEN(pal16r4pinfuserows),
- pal16r4pinfusecolumns, ARRAY_LEN(pal16r4pinfusecolumns),
- print_pal16r4_product_terms,
- config_pal16r4_pins,
- NULL,
- NULL},
- {"PAL16R6",
- pal16r6pinfuserows, ARRAY_LEN(pal16r6pinfuserows),
- pal16r6pinfusecolumns, ARRAY_LEN(pal16r6pinfusecolumns),
- print_pal16r6_product_terms,
- config_pal16r6_pins,
- NULL,
- NULL},
- {"PAL16R8",
- pal16r8pinfuserows, ARRAY_LEN(pal16r8pinfuserows),
- pal16r8pinfusecolumns, ARRAY_LEN(pal16r8pinfusecolumns),
- print_pal16r8_product_terms,
- config_pal16r8_pins,
- NULL,
- NULL},
- /*{"PAL16RA8", NULL, 0, NULL, 0, NULL, NULL, NULL, NULL},
- {"PAL16V8R", NULL, 0, NULL, 0, NULL, NULL, NULL, NULL},
- {"PALCE16V8", NULL, 0, NULL, 0, NULL, NULL, NULL, NULL},*/
- {"GAL16V8",
- gal16v8pinfuserows, ARRAY_LEN(gal16v8pinfuserows),
- gal16v8pinfusecolumns, ARRAY_LEN(gal16v8pinfusecolumns),
- print_gal16v8_product_terms,
- config_gal16v8_pins,
- is_gal16v8_product_term_enabled,
- NULL},
- {"18CV8",
- peel18cv8pinfuserows, ARRAY_LEN(peel18cv8pinfuserows),
- peel18cv8pinfusecolumns, ARRAY_LEN(peel18cv8pinfusecolumns),
- print_peel18cv8_product_terms,
- config_peel18cv8_pins,
- NULL,
- get_peel18cv8_pin_fuse_state},
+ {"PAL10L8",
+ pal10l8pinfuserows, ARRAY_LEN(pal10l8pinfuserows),
+ pal10l8pinfusecolumns, ARRAY_LEN(pal10l8pinfusecolumns),
+ print_pal10l8_product_terms,
+ config_pal10l8_pins,
+ NULL,
+ NULL},
+ {"PAL10H8",
+ pal10h8pinfuserows, ARRAY_LEN(pal10h8pinfuserows),
+ pal10h8pinfusecolumns, ARRAY_LEN(pal10h8pinfusecolumns),
+ print_pal10h8_product_terms,
+ config_pal10h8_pins,
+ NULL,
+ NULL},
+ {"PAL12H6",
+ pal12h6pinfuserows, ARRAY_LEN(pal12h6pinfuserows),
+ pal12h6pinfusecolumns, ARRAY_LEN(pal12h6pinfusecolumns),
+ print_pal12h6_product_terms,
+ config_pal12h6_pins,
+ NULL,
+ NULL},
+ {"PAL14H4",
+ pal14h4pinfuserows, ARRAY_LEN(pal14h4pinfuserows),
+ pal14h4pinfusecolumns, ARRAY_LEN(pal14h4pinfusecolumns),
+ print_pal14h4_product_terms,
+ config_pal14h4_pins,
+ NULL,
+ NULL},
+ {"PAL16H2",
+ pal16h2pinfuserows, ARRAY_LEN(pal16h2pinfuserows),
+ pal16h2pinfusecolumns, ARRAY_LEN(pal16h2pinfusecolumns),
+ print_pal16h2_product_terms,
+ config_pal16h2_pins,
+ NULL,
+ NULL},
+ {"PAL16C1",
+ pal16c1pinfuserows, ARRAY_LEN(pal16c1pinfuserows),
+ pal16c1pinfusecolumns, ARRAY_LEN(pal16c1pinfusecolumns),
+ print_pal16c1_product_terms,
+ config_pal16c1_pins,
+ NULL,
+ NULL},
+ {"PAL12L6",
+ pal12l6pinfuserows, ARRAY_LEN(pal12l6pinfuserows),
+ pal12l6pinfusecolumns, ARRAY_LEN(pal12l6pinfusecolumns),
+ print_pal12l6_product_terms,
+ config_pal12l6_pins,
+ NULL,
+ NULL},
+ {"PAL14L4",
+ pal14l4pinfuserows, ARRAY_LEN(pal14l4pinfuserows),
+ pal14l4pinfusecolumns, ARRAY_LEN(pal14l4pinfusecolumns),
+ print_pal14l4_product_terms,
+ config_pal14l4_pins,
+ NULL,
+ NULL},
+ {"PAL16L2",
+ pal16l2pinfuserows, ARRAY_LEN(pal16l2pinfuserows),
+ pal16l2pinfusecolumns, ARRAY_LEN(pal16l2pinfusecolumns),
+ print_pal16l2_product_terms,
+ config_pal16l2_pins,
+ NULL,
+ NULL},
+ /*{"15S8", NULL, 0, NULL, 0, NULL, NULL, NULL, NULL},
+ {"PLS153", NULL, 0, NULL, 0, NULL, NULL, NULL, NULL},*/
+ {"PAL16L8",
+ pal16l8pinfuserows, ARRAY_LEN(pal16l8pinfuserows),
+ pal16l8pinfusecolumns, ARRAY_LEN(pal16l8pinfusecolumns),
+ print_pal16l8_product_terms,
+ config_pal16l8_pins,
+ NULL,
+ NULL},
+ {"PAL16R4",
+ pal16r4pinfuserows, ARRAY_LEN(pal16r4pinfuserows),
+ pal16r4pinfusecolumns, ARRAY_LEN(pal16r4pinfusecolumns),
+ print_pal16r4_product_terms,
+ config_pal16r4_pins,
+ NULL,
+ NULL},
+ {"PAL16R6",
+ pal16r6pinfuserows, ARRAY_LEN(pal16r6pinfuserows),
+ pal16r6pinfusecolumns, ARRAY_LEN(pal16r6pinfusecolumns),
+ print_pal16r6_product_terms,
+ config_pal16r6_pins,
+ NULL,
+ NULL},
+ {"PAL16R8",
+ pal16r8pinfuserows, ARRAY_LEN(pal16r8pinfuserows),
+ pal16r8pinfusecolumns, ARRAY_LEN(pal16r8pinfusecolumns),
+ print_pal16r8_product_terms,
+ config_pal16r8_pins,
+ NULL,
+ NULL},
+ /*{"PAL16RA8", NULL, 0, NULL, 0, NULL, NULL, NULL, NULL},
+ {"PAL16V8R", NULL, 0, NULL, 0, NULL, NULL, NULL, NULL},
+ {"PALCE16V8", NULL, 0, NULL, 0, NULL, NULL, NULL, NULL},*/
+ {"GAL16V8",
+ gal16v8pinfuserows, ARRAY_LEN(gal16v8pinfuserows),
+ gal16v8pinfusecolumns, ARRAY_LEN(gal16v8pinfusecolumns),
+ print_gal16v8_product_terms,
+ config_gal16v8_pins,
+ is_gal16v8_product_term_enabled,
+ NULL},
+ {"18CV8",
+ peel18cv8pinfuserows, ARRAY_LEN(peel18cv8pinfuserows),
+ peel18cv8pinfusecolumns, ARRAY_LEN(peel18cv8pinfusecolumns),
+ print_peel18cv8_product_terms,
+ config_peel18cv8_pins,
+ NULL,
+ get_peel18cv8_pin_fuse_state},
#if defined(include_gal18v10)
- {"GAL18V10",
- gal18v10pinfuserows, ARRAY_LEN(gal18v10pinfuserows),
- gal18v10pinfusecolumns, ARRAY_LEN(gal18v10pinfusecolumns),
- print_gal18v10_product_terms,
- config_gal18v10_pins,
- NULL,
- NULL},
+ {"GAL18V10",
+ gal18v10pinfuserows, ARRAY_LEN(gal18v10pinfuserows),
+ gal18v10pinfusecolumns, ARRAY_LEN(gal18v10pinfusecolumns),
+ print_gal18v10_product_terms,
+ config_gal18v10_pins,
+ NULL,
+ NULL},
#endif
- {"PAL20L8",
- pal20l8pinfuserows, ARRAY_LEN(pal20l8pinfuserows),
- pal20l8pinfusecolumns, ARRAY_LEN(pal20l8pinfusecolumns),
- print_pal20l8_product_terms,
- config_pal20l8_pins,
- NULL,
- NULL},
- {"PAL20L10",
- pal20l10pinfuserows, ARRAY_LEN(pal20l10pinfuserows),
- pal20l10pinfusecolumns, ARRAY_LEN(pal20l10pinfusecolumns),
- print_pal20l10_product_terms,
- config_pal20l10_pins,
- NULL,
- NULL},
- {"PAL20R4",
- pal20r4pinfuserows, ARRAY_LEN(pal20r4pinfuserows),
- pal20r4pinfusecolumns, ARRAY_LEN(pal20r4pinfusecolumns),
- print_pal20r4_product_terms,
- config_pal20r4_pins,
- NULL,
- NULL},
- {"PAL20R6",
- pal20r6pinfuserows, ARRAY_LEN(pal20r6pinfuserows),
- pal20r6pinfusecolumns, ARRAY_LEN(pal20r6pinfusecolumns),
- print_pal20r6_product_terms,
- config_pal20r6_pins,
- NULL,
- NULL},
- {"PAL20R8",
- pal20r8pinfuserows, ARRAY_LEN(pal20r8pinfuserows),
- pal20r8pinfusecolumns, ARRAY_LEN(pal20r8pinfusecolumns),
- print_pal20r8_product_terms,
- config_pal20r8_pins,
- NULL,
- NULL}/*,
+ {"PAL20L8",
+ pal20l8pinfuserows, ARRAY_LEN(pal20l8pinfuserows),
+ pal20l8pinfusecolumns, ARRAY_LEN(pal20l8pinfusecolumns),
+ print_pal20l8_product_terms,
+ config_pal20l8_pins,
+ NULL,
+ NULL},
+ {"PAL20L10",
+ pal20l10pinfuserows, ARRAY_LEN(pal20l10pinfuserows),
+ pal20l10pinfusecolumns, ARRAY_LEN(pal20l10pinfusecolumns),
+ print_pal20l10_product_terms,
+ config_pal20l10_pins,
+ NULL,
+ NULL},
+ {"PAL20R4",
+ pal20r4pinfuserows, ARRAY_LEN(pal20r4pinfuserows),
+ pal20r4pinfusecolumns, ARRAY_LEN(pal20r4pinfusecolumns),
+ print_pal20r4_product_terms,
+ config_pal20r4_pins,
+ NULL,
+ NULL},
+ {"PAL20R6",
+ pal20r6pinfuserows, ARRAY_LEN(pal20r6pinfuserows),
+ pal20r6pinfusecolumns, ARRAY_LEN(pal20r6pinfusecolumns),
+ print_pal20r6_product_terms,
+ config_pal20r6_pins,
+ NULL,
+ NULL},
+ {"PAL20R8",
+ pal20r8pinfuserows, ARRAY_LEN(pal20r8pinfuserows),
+ pal20r8pinfusecolumns, ARRAY_LEN(pal20r8pinfusecolumns),
+ print_pal20r8_product_terms,
+ config_pal20r8_pins,
+ NULL,
+ NULL}/*,
{"PAL20X4", NULL, 0, NULL, 0, NULL, NULL, NULL, NULL},
{"PAL20X8", NULL, 0, NULL, 0, NULL, NULL, NULL, NULL},
{"PAL20X10", NULL, 0, NULL, 0, NULL, NULL, NULL, NULL},
@@ -1052,9 +1052,9 @@ static int is_jed_file(const char *file)
len = strlen(file);
return (file[len - 4] == '.' &&
- tolower((UINT8)file[len - 3]) == 'j' &&
- tolower((UINT8)file[len - 2]) == 'e' &&
- tolower((UINT8)file[len - 1]) == 'd');
+ tolower((UINT8)file[len - 3]) == 'j' &&
+ tolower((UINT8)file[len - 2]) == 'e' &&
+ tolower((UINT8)file[len - 1]) == 'd');
}
@@ -1066,15 +1066,15 @@ static int is_jed_file(const char *file)
static int is_pla_file(const char *file)
{
- int len;
+ int len;
- /* does the source end in '.pla'? */
- len = strlen(file);
+ /* does the source end in '.pla'? */
+ len = strlen(file);
- return (file[len - 4] == '.' &&
- tolower((UINT8)file[len - 3]) == 'p' &&
- tolower((UINT8)file[len - 2]) == 'l' &&
- tolower((UINT8)file[len - 1]) == 'a');
+ return (file[len - 4] == '.' &&
+ tolower((UINT8)file[len - 3]) == 'p' &&
+ tolower((UINT8)file[len - 2]) == 'l' &&
+ tolower((UINT8)file[len - 1]) == 'a');
}
@@ -1086,17 +1086,17 @@ static int is_pla_file(const char *file)
static const pal_data* find_pal_data(const char *name)
{
- int index;
+ int index;
- for (index = 0; index < ARRAY_LEN(paldata); ++index)
- {
- if (!core_stricmp(name, paldata[index].name))
- {
- return &paldata[index];
- }
- }
+ for (index = 0; index < ARRAY_LEN(paldata); ++index)
+ {
+ if (!core_stricmp(name, paldata[index].name))
+ {
+ return &paldata[index];
+ }
+ }
- return NULL;
+ return NULL;
}
@@ -1108,17 +1108,17 @@ static const pal_data* find_pal_data(const char *name)
static const pin_fuse_rows* find_fuse_rows(const pal_data* pal, UINT16 pin)
{
- UINT16 index;
+ UINT16 index;
- for (index = 0; index < pal->pinfuserowscount; ++index)
- {
- if (pal->pinfuserows[index].pin == pin)
- {
- return &pal->pinfuserows[index];
- }
- }
+ for (index = 0; index < pal->pinfuserowscount; ++index)
+ {
+ if (pal->pinfuserows[index].pin == pin)
+ {
+ return &pal->pinfuserows[index];
+ }
+ }
- return NULL;
+ return NULL;
}
@@ -1130,17 +1130,17 @@ static const pin_fuse_rows* find_fuse_rows(const pal_data* pal, UINT16 pin)
static const pin_fuse_columns* find_fuse_columns(const pal_data* pal, UINT16 pin)
{
- UINT16 index;
+ UINT16 index;
- for (index = 0; index < pal->pinfusecolumnscount; ++index)
- {
- if (pal->pinfusecolumns[index].pin == pin)
- {
- return &pal->pinfusecolumns[index];
- }
- }
+ for (index = 0; index < pal->pinfusecolumnscount; ++index)
+ {
+ if (pal->pinfusecolumns[index].pin == pin)
+ {
+ return &pal->pinfusecolumns[index];
+ }
+ }
- return NULL;
+ return NULL;
}
@@ -1152,26 +1152,26 @@ static const pin_fuse_columns* find_fuse_columns(const pal_data* pal, UINT16 pin
static UINT16 find_pin_from_fuse_row(const pal_data* pal, UINT16 fuserow)
{
- int index;
+ int index;
- for (index = 0; index < pal->pinfuserowscount; ++index)
- {
- if (pal->pinfuserows[index].fuserowoutputenable != NO_OUTPUT_ENABLE_FUSE_ROW)
- {
- if (pal->pinfuserows[index].fuserowoutputenable == fuserow)
- {
- return pal->pinfuserows[index].pin;
- }
- }
+ for (index = 0; index < pal->pinfuserowscount; ++index)
+ {
+ if (pal->pinfuserows[index].fuserowoutputenable != NO_OUTPUT_ENABLE_FUSE_ROW)
+ {
+ if (pal->pinfuserows[index].fuserowoutputenable == fuserow)
+ {
+ return pal->pinfuserows[index].pin;
+ }
+ }
- if (fuserow >= pal->pinfuserows[index].fuserowtermstart &&
- fuserow <= pal->pinfuserows[index].fuserowtermend)
- {
- return pal->pinfuserows[index].pin;
- }
- }
+ if (fuserow >= pal->pinfuserows[index].fuserowtermstart &&
+ fuserow <= pal->pinfuserows[index].fuserowtermend)
+ {
+ return pal->pinfuserows[index].pin;
+ }
+ }
- return 0;
+ return 0;
}
@@ -1183,7 +1183,7 @@ static UINT16 find_pin_from_fuse_row(const pal_data* pal, UINT16 fuserow)
static UINT16 calc_fuse_column_count(const pal_data* pal)
{
- return pal->pinfusecolumnscount * 2;
+ return pal->pinfusecolumnscount * 2;
}
@@ -1195,18 +1195,18 @@ static UINT16 calc_fuse_column_count(const pal_data* pal)
static int all_fuses_in_row_blown(const pal_data* pal, const jed_data* jed, UINT16 fuserow)
{
- UINT16 columncount = calc_fuse_column_count(pal);
- UINT16 column;
+ UINT16 columncount = calc_fuse_column_count(pal);
+ UINT16 column;
- for (column = 0; column < columncount; ++column)
- {
- if (!jed_get_fuse(jed, fuserow + column))
- {
- return 0;
- }
- }
+ for (column = 0; column < columncount; ++column)
+ {
+ if (!jed_get_fuse(jed, fuserow + column))
+ {
+ return 0;
+ }
+ }
- return 1;
+ return 1;
}
@@ -1219,21 +1219,21 @@ static int all_fuses_in_row_blown(const pal_data* pal, const jed_data* jed, UINT
static int does_output_enable_fuse_row_allow_output(const pal_data* pal, const jed_data* jed, UINT16 fuserow)
{
- int lowfusestate, highfusestate;
- UINT16 index;
+ int lowfusestate, highfusestate;
+ UINT16 index;
- for (index = 0; index < pal->pinfusecolumnscount; ++index)
- {
- lowfusestate = jed_get_fuse(jed, fuserow + pal->pinfusecolumns[index].lowfusecolumn);
- highfusestate = jed_get_fuse(jed, fuserow + pal->pinfusecolumns[index].highfusecolumn);
+ for (index = 0; index < pal->pinfusecolumnscount; ++index)
+ {
+ lowfusestate = jed_get_fuse(jed, fuserow + pal->pinfusecolumns[index].lowfusecolumn);
+ highfusestate = jed_get_fuse(jed, fuserow + pal->pinfusecolumns[index].highfusecolumn);
- if (!lowfusestate && !highfusestate)
- {
- return 0;
- }
- }
+ if (!lowfusestate && !highfusestate)
+ {
+ return 0;
+ }
+ }
- return 1;
+ return 1;
}
@@ -1245,14 +1245,14 @@ static int does_output_enable_fuse_row_allow_output(const pal_data* pal, const j
static void set_input_pins(const UINT16* pins, UINT16 pin_count)
{
- UINT16 index;
+ UINT16 index;
- for (index = 0; index < pin_count; ++index)
- {
- inputpins[index] = pins[index];
+ for (index = 0; index < pin_count; ++index)
+ {
+ inputpins[index] = pins[index];
- ++inputpinscount;
- }
+ ++inputpinscount;
+ }
}
@@ -1263,15 +1263,15 @@ static void set_input_pins(const UINT16* pins, UINT16 pin_count)
static void set_output_pins(const pin_output_config* pin_output_configs, UINT16 pin_count)
{
- UINT16 index;
+ UINT16 index;
- for (index = 0; index < pin_count; ++index)
- {
- outputpins[index].pin = pin_output_configs[index].pin;
- outputpins[index].flags = pin_output_configs[index].flags;
+ for (index = 0; index < pin_count; ++index)
+ {
+ outputpins[index].pin = pin_output_configs[index].pin;
+ outputpins[index].flags = pin_output_configs[index].flags;
- ++outputpinscount;
- }
+ ++outputpinscount;
+ }
}
@@ -1283,17 +1283,17 @@ static void set_output_pins(const pin_output_config* pin_output_configs, UINT16
static int is_output_pin(UINT16 pin)
{
- UINT16 index;
+ UINT16 index;
- for (index = 0; index < outputpinscount; ++index)
- {
- if (outputpins[index].pin == pin)
- {
- return 1;
- }
- }
+ for (index = 0; index < outputpinscount; ++index)
+ {
+ if (outputpins[index].pin == pin)
+ {
+ return 1;
+ }
+ }
- return 0;
+ return 0;
}
@@ -1305,17 +1305,17 @@ static int is_output_pin(UINT16 pin)
static UINT16 get_pin_output_flags(UINT16 pin)
{
- UINT16 index;
+ UINT16 index;
- for (index = 0; index < outputpinscount; ++index)
- {
- if (outputpins[index].pin == pin)
- {
- return outputpins[index].flags;
- }
- }
+ for (index = 0; index < outputpinscount; ++index)
+ {
+ if (outputpins[index].pin == pin)
+ {
+ return outputpins[index].flags;
+ }
+ }
- return 0;
+ return 0;
}
@@ -1327,33 +1327,33 @@ static UINT16 get_pin_output_flags(UINT16 pin)
static UINT16 get_pin_fuse_state(const pal_data* pal, const jed_data* jed, UINT16 pin, UINT16 fuserow)
{
- const pin_fuse_columns* fuse_columns = find_fuse_columns(pal, pin);
- int lowfusestate, highfusestate;
+ const pin_fuse_columns* fuse_columns = find_fuse_columns(pal, pin);
+ int lowfusestate, highfusestate;
- if (!fuse_columns)
- {
- fprintf(stderr, "Fuse column data missing for pin %d!\n", pin);
+ if (!fuse_columns)
+ {
+ fprintf(stderr, "Fuse column data missing for pin %d!\n", pin);
- return NO_FUSE_BLOWN;
- }
+ return NO_FUSE_BLOWN;
+ }
- lowfusestate = jed_get_fuse(jed, fuserow + fuse_columns->lowfusecolumn);
- highfusestate = jed_get_fuse(jed, fuserow + fuse_columns->highfusecolumn);
+ lowfusestate = jed_get_fuse(jed, fuserow + fuse_columns->lowfusecolumn);
+ highfusestate = jed_get_fuse(jed, fuserow + fuse_columns->highfusecolumn);
- if (!lowfusestate && highfusestate)
- {
- return LOW_FUSE_BLOWN;
- }
- else if (lowfusestate && !highfusestate)
- {
- return HIGH_FUSE_BLOWN;
- }
- else if (!lowfusestate && !highfusestate)
- {
- return NO_FUSE_BLOWN;
- }
+ if (!lowfusestate && highfusestate)
+ {
+ return LOW_FUSE_BLOWN;
+ }
+ else if (lowfusestate && !highfusestate)
+ {
+ return HIGH_FUSE_BLOWN;
+ }
+ else if (!lowfusestate && !highfusestate)
+ {
+ return NO_FUSE_BLOWN;
+ }
- return LOWHIGH_FUSE_BLOWN;
+ return LOWHIGH_FUSE_BLOWN;
}
@@ -1365,138 +1365,138 @@ static UINT16 get_pin_fuse_state(const pal_data* pal, const jed_data* jed, UINT1
static void generate_product_terms(const pal_data* pal, const jed_data* jed, UINT16 fuserow, char* buffer)
{
- UINT16 index, pin, fuse_state, haveterm, flags;
- char tmpbuffer[20];
-
- *buffer = 0;
- haveterm = 0;
-
- if (pal->is_product_term_enabled && !pal->is_product_term_enabled(pal, jed, fuserow))
- {
- return;
- }
-
- for (index = 0; index < inputpinscount; ++index)
- {
- pin = inputpins[index];
-
- if (pal->get_pin_fuse_state)
- {
- fuse_state = pal->get_pin_fuse_state(pal, jed, pin, fuserow);
- }
- else
- {
- fuse_state = get_pin_fuse_state(pal, jed, pin, fuserow);
- }
-
- if (fuse_state == LOW_FUSE_BLOWN)
- {
- if (haveterm)
- {
- strcat(buffer, " & ");
- }
-
- if (!is_output_pin(pin))
- {
- sprintf(tmpbuffer, "/i%d", pin);
- strcat(buffer, tmpbuffer);
- }
- else
- {
- flags = get_pin_output_flags(pin);
-
- if (flags & OUTPUT_FEEDBACK_OUTPUT)
- {
- if (flags & OUTPUT_COMBINATORIAL)
- {
- sprintf(tmpbuffer, "/o%d", pin);
- }
- else if (flags & OUTPUT_REGISTERED)
- {
- sprintf(tmpbuffer, "/rfo%d", pin);
- }
- else
- {
- tmpbuffer[0] = 0;
-
- fprintf(stderr, "Unknown output feedback controlled by output enable type for pin %d!\n", pin);
- }
- }
- else if (flags & OUTPUT_FEEDBACK_COMBINATORIAL)
- {
- sprintf(tmpbuffer, "/of%d", pin);
- }
- else if (flags & OUTPUT_FEEDBACK_REGISTERED)
- {
- sprintf(tmpbuffer, "/rf%d", pin);
- }
- else
- {
- tmpbuffer[0] = 0;
-
- fprintf(stderr, "Unknown output feedback type for pin %d!\n", pin);
- }
-
- strcat(buffer, tmpbuffer);
- }
-
- haveterm = 1;
- }
-
- if (fuse_state == HIGH_FUSE_BLOWN)
- {
- if (haveterm)
- {
- strcat(buffer, " & ");
- }
-
- if (!is_output_pin(pin))
- {
- sprintf(tmpbuffer, "i%d", pin);
- strcat(buffer, tmpbuffer);
- }
- else
- {
- flags = get_pin_output_flags(pin);
-
- if (flags & OUTPUT_FEEDBACK_OUTPUT)
- {
- if (flags & OUTPUT_COMBINATORIAL)
- {
- sprintf(tmpbuffer, "o%d", pin);
- }
- else if (flags & OUTPUT_REGISTERED)
- {
- sprintf(tmpbuffer, "rfo%d", pin);
- }
- else
- {
- tmpbuffer[0] = 0;
-
- fprintf(stderr, "Unknown output feedback controlled by output enable type for pin %d!\n", pin);
- }
- }
- else if (flags & OUTPUT_FEEDBACK_COMBINATORIAL)
- {
- sprintf(tmpbuffer, "of%d", pin);
- }
- else if (flags & OUTPUT_FEEDBACK_REGISTERED)
- {
- sprintf(tmpbuffer, "rf%d", pin);
- }
- else
- {
- tmpbuffer[0] = 0;
-
- fprintf(stderr, "Unknown output feedback type for pin %d!\n", pin);
- }
-
- strcat(buffer, tmpbuffer);
- }
-
- haveterm = 1;
- }
- }
+ UINT16 index, pin, fuse_state, haveterm, flags;
+ char tmpbuffer[20];
+
+ *buffer = 0;
+ haveterm = 0;
+
+ if (pal->is_product_term_enabled && !pal->is_product_term_enabled(pal, jed, fuserow))
+ {
+ return;
+ }
+
+ for (index = 0; index < inputpinscount; ++index)
+ {
+ pin = inputpins[index];
+
+ if (pal->get_pin_fuse_state)
+ {
+ fuse_state = pal->get_pin_fuse_state(pal, jed, pin, fuserow);
+ }
+ else
+ {
+ fuse_state = get_pin_fuse_state(pal, jed, pin, fuserow);
+ }
+
+ if (fuse_state == LOW_FUSE_BLOWN)
+ {
+ if (haveterm)
+ {
+ strcat(buffer, " & ");
+ }
+
+ if (!is_output_pin(pin))
+ {
+ sprintf(tmpbuffer, "/i%d", pin);
+ strcat(buffer, tmpbuffer);
+ }
+ else
+ {
+ flags = get_pin_output_flags(pin);
+
+ if (flags & OUTPUT_FEEDBACK_OUTPUT)
+ {
+ if (flags & OUTPUT_COMBINATORIAL)
+ {
+ sprintf(tmpbuffer, "/o%d", pin);
+ }
+ else if (flags & OUTPUT_REGISTERED)
+ {
+ sprintf(tmpbuffer, "/rfo%d", pin);
+ }
+ else
+ {
+ tmpbuffer[0] = 0;
+
+ fprintf(stderr, "Unknown output feedback controlled by output enable type for pin %d!\n", pin);
+ }
+ }
+ else if (flags & OUTPUT_FEEDBACK_COMBINATORIAL)
+ {
+ sprintf(tmpbuffer, "/of%d", pin);
+ }
+ else if (flags & OUTPUT_FEEDBACK_REGISTERED)
+ {
+ sprintf(tmpbuffer, "/rf%d", pin);
+ }
+ else
+ {
+ tmpbuffer[0] = 0;
+
+ fprintf(stderr, "Unknown output feedback type for pin %d!\n", pin);
+ }
+
+ strcat(buffer, tmpbuffer);
+ }
+
+ haveterm = 1;
+ }
+
+ if (fuse_state == HIGH_FUSE_BLOWN)
+ {
+ if (haveterm)
+ {
+ strcat(buffer, " & ");
+ }
+
+ if (!is_output_pin(pin))
+ {
+ sprintf(tmpbuffer, "i%d", pin);
+ strcat(buffer, tmpbuffer);
+ }
+ else
+ {
+ flags = get_pin_output_flags(pin);
+
+ if (flags & OUTPUT_FEEDBACK_OUTPUT)
+ {
+ if (flags & OUTPUT_COMBINATORIAL)
+ {
+ sprintf(tmpbuffer, "o%d", pin);
+ }
+ else if (flags & OUTPUT_REGISTERED)
+ {
+ sprintf(tmpbuffer, "rfo%d", pin);
+ }
+ else
+ {
+ tmpbuffer[0] = 0;
+
+ fprintf(stderr, "Unknown output feedback controlled by output enable type for pin %d!\n", pin);
+ }
+ }
+ else if (flags & OUTPUT_FEEDBACK_COMBINATORIAL)
+ {
+ sprintf(tmpbuffer, "of%d", pin);
+ }
+ else if (flags & OUTPUT_FEEDBACK_REGISTERED)
+ {
+ sprintf(tmpbuffer, "rf%d", pin);
+ }
+ else
+ {
+ tmpbuffer[0] = 0;
+
+ fprintf(stderr, "Unknown output feedback type for pin %d!\n", pin);
+ }
+
+ strcat(buffer, tmpbuffer);
+ }
+
+ haveterm = 1;
+ }
+ }
}
@@ -1507,21 +1507,21 @@ static void generate_product_terms(const pal_data* pal, const jed_data* jed, UIN
static void print_input_pins()
{
- UINT16 index;
+ UINT16 index;
- printf("Inputs:\n\n");
+ printf("Inputs:\n\n");
- for (index = 0; index < inputpinscount; ++index)
- {
- printf("%d", inputpins[index]);
+ for (index = 0; index < inputpinscount; ++index)
+ {
+ printf("%d", inputpins[index]);
- if (index + 1 < inputpinscount)
- {
- printf(", ");
- }
- }
+ if (index + 1 < inputpinscount)
+ {
+ printf(", ");
+ }
+ }
- printf("\n\n");
+ printf("\n\n");
}
@@ -1532,67 +1532,67 @@ static void print_input_pins()
static void print_output_pins()
{
- UINT16 index, flags;
-
- printf("Outputs:\n\n");
-
- for (index = 0; index < outputpinscount; ++index)
- {
- flags = outputpins[index].flags;
-
- printf("%d (", outputpins[index].pin);
-
- if (flags & OUTPUT_COMBINATORIAL)
- {
- printf("Combinatorial, ");
- }
- else if (flags & OUTPUT_REGISTERED)
- {
- printf("Registered, ");
- }
- else
- {
- fprintf(stderr, "Unknown output type for pin %d!\n", outputpins[index].pin);
- }
-
- if (flags & OUTPUT_FEEDBACK_OUTPUT)
- {
- printf("Output feedback output, ");
- }
- else if (flags & OUTPUT_FEEDBACK_COMBINATORIAL)
- {
- printf("Output feedback combinatorial, ");
- }
- else if (flags & OUTPUT_FEEDBACK_REGISTERED)
- {
- printf("Output feedback registered, ");
- }
- else if (flags & OUTPUT_FEEDBACK_NONE)
- {
- printf("No output feedback, ");
- }
- else
- {
- fprintf(stderr, "Unknown output feedback type for pin %d!\n", outputpins[index].pin);
- }
-
- if (flags & OUTPUT_ACTIVELOW)
- {
- printf("Active low");
- }
- else if (flags & OUTPUT_ACTIVEHIGH)
- {
- printf("Active high");
- }
- else
- {
- fprintf(stderr, "Unknown output state type for pin %d!\n", outputpins[index].pin);
- }
-
- printf(")\n");
- }
-
- printf("\n");
+ UINT16 index, flags;
+
+ printf("Outputs:\n\n");
+
+ for (index = 0; index < outputpinscount; ++index)
+ {
+ flags = outputpins[index].flags;
+
+ printf("%d (", outputpins[index].pin);
+
+ if (flags & OUTPUT_COMBINATORIAL)
+ {
+ printf("Combinatorial, ");
+ }
+ else if (flags & OUTPUT_REGISTERED)
+ {
+ printf("Registered, ");
+ }
+ else
+ {
+ fprintf(stderr, "Unknown output type for pin %d!\n", outputpins[index].pin);
+ }
+
+ if (flags & OUTPUT_FEEDBACK_OUTPUT)
+ {
+ printf("Output feedback output, ");
+ }
+ else if (flags & OUTPUT_FEEDBACK_COMBINATORIAL)
+ {
+ printf("Output feedback combinatorial, ");
+ }
+ else if (flags & OUTPUT_FEEDBACK_REGISTERED)
+ {
+ printf("Output feedback registered, ");
+ }
+ else if (flags & OUTPUT_FEEDBACK_NONE)
+ {
+ printf("No output feedback, ");
+ }
+ else
+ {
+ fprintf(stderr, "Unknown output feedback type for pin %d!\n", outputpins[index].pin);
+ }
+
+ if (flags & OUTPUT_ACTIVELOW)
+ {
+ printf("Active low");
+ }
+ else if (flags & OUTPUT_ACTIVEHIGH)
+ {
+ printf("Active high");
+ }
+ else
+ {
+ fprintf(stderr, "Unknown output state type for pin %d!\n", outputpins[index].pin);
+ }
+
+ printf(")\n");
+ }
+
+ printf("\n");
}
@@ -1604,127 +1604,127 @@ static void print_output_pins()
static void print_product_terms(const pal_data* pal, const jed_data* jed)
{
- UINT16 index, columncount, flags, row, haveterms;
- char buffer[200];
- int indent, indentindex;
- const pin_fuse_rows* fuse_rows;
-
- columncount = calc_fuse_column_count(pal);
-
- print_input_pins();
- print_output_pins();
-
- printf("Equations:\n\n");
-
- for (index = 0; index < outputpinscount; ++index)
- {
- flags = outputpins[index].flags;
-
- indent = 0;
-
- if (flags & OUTPUT_ACTIVELOW)
- {
- printf("/");
-
- ++indent;
- }
+ UINT16 index, columncount, flags, row, haveterms;
+ char buffer[200];
+ int indent, indentindex;
+ const pin_fuse_rows* fuse_rows;
- if (flags & OUTPUT_COMBINATORIAL)
- {
- sprintf(buffer, "o%d = ", outputpins[index].pin);
- }
- else if (flags & OUTPUT_REGISTERED)
- {
- sprintf(buffer, "rf%d := ", outputpins[index].pin);
- }
- else
- {
- fprintf(stderr, "Unknown output type for pin %d!\n", outputpins[index].pin);
+ columncount = calc_fuse_column_count(pal);
- continue;
- }
+ print_input_pins();
+ print_output_pins();
- printf("%s", buffer);
+ printf("Equations:\n\n");
- haveterms = 0;
- indent += strlen(buffer);
+ for (index = 0; index < outputpinscount; ++index)
+ {
+ flags = outputpins[index].flags;
- fuse_rows = find_fuse_rows(pal, outputpins[index].pin);
+ indent = 0;
- if (!fuse_rows)
- {
- fprintf(stderr, "Fuse row data missing!\n");
+ if (flags & OUTPUT_ACTIVELOW)
+ {
+ printf("/");
- continue;
- }
+ ++indent;
+ }
+
+ if (flags & OUTPUT_COMBINATORIAL)
+ {
+ sprintf(buffer, "o%d = ", outputpins[index].pin);
+ }
+ else if (flags & OUTPUT_REGISTERED)
+ {
+ sprintf(buffer, "rf%d := ", outputpins[index].pin);
+ }
+ else
+ {
+ fprintf(stderr, "Unknown output type for pin %d!\n", outputpins[index].pin);
- for (row = fuse_rows->fuserowtermstart; row <= fuse_rows->fuserowtermend;
- row += columncount)
- {
- generate_product_terms(pal, jed, row, buffer);
+ continue;
+ }
- if (strlen(buffer) > 0)
- {
- if (haveterms)
- {
- printf(" +\n");
+ printf("%s", buffer);
- for (indentindex = 0; indentindex < indent; ++indentindex)
- {
- printf(" ");
- }
- }
- else
- {
- haveterms = 1;
- }
+ haveterms = 0;
+ indent += strlen(buffer);
- printf("%s", buffer);
- }
- }
+ fuse_rows = find_fuse_rows(pal, outputpins[index].pin);
- printf("\n");
+ if (!fuse_rows)
+ {
+ fprintf(stderr, "Fuse row data missing!\n");
- /* output enable equations */
+ continue;
+ }
- if (flags & OUTPUT_COMBINATORIAL)
- {
- printf("o%d.oe = ", outputpins[index].pin);
+ for (row = fuse_rows->fuserowtermstart; row <= fuse_rows->fuserowtermend;
+ row += columncount)
+ {
+ generate_product_terms(pal, jed, row, buffer);
+
+ if (strlen(buffer) > 0)
+ {
+ if (haveterms)
+ {
+ printf(" +\n");
+
+ for (indentindex = 0; indentindex < indent; ++indentindex)
+ {
+ printf(" ");
+ }
+ }
+ else
+ {
+ haveterms = 1;
+ }
+
+ printf("%s", buffer);
+ }
+ }
- if (fuse_rows->fuserowoutputenable == NO_OUTPUT_ENABLE_FUSE_ROW ||
- all_fuses_in_row_blown(pal, jed, fuse_rows->fuserowoutputenable))
- {
- printf("vcc\n");
- }
- else
- {
- generate_product_terms(pal, jed, fuse_rows->fuserowoutputenable, buffer);
+ printf("\n");
- printf("%s\n", buffer);
- }
- }
- else if (flags & OUTPUT_REGISTERED)
- {
- printf("rf%d.oe = ", outputpins[index].pin);
+ /* output enable equations */
- if (fuse_rows->fuserowoutputenable == NO_OUTPUT_ENABLE_FUSE_ROW)
- {
- printf("OE\n");
- }
- else if (all_fuses_in_row_blown(pal, jed, fuse_rows->fuserowoutputenable))
- {
- printf("vcc\n");
- }
- else
- {
- generate_product_terms(pal, jed, fuse_rows->fuserowoutputenable, buffer);
-
- printf("%s\n", buffer);
- }
- }
-
- printf("\n");
- }
+ if (flags & OUTPUT_COMBINATORIAL)
+ {
+ printf("o%d.oe = ", outputpins[index].pin);
+
+ if (fuse_rows->fuserowoutputenable == NO_OUTPUT_ENABLE_FUSE_ROW ||
+ all_fuses_in_row_blown(pal, jed, fuse_rows->fuserowoutputenable))
+ {
+ printf("vcc\n");
+ }
+ else
+ {
+ generate_product_terms(pal, jed, fuse_rows->fuserowoutputenable, buffer);
+
+ printf("%s\n", buffer);
+ }
+ }
+ else if (flags & OUTPUT_REGISTERED)
+ {
+ printf("rf%d.oe = ", outputpins[index].pin);
+
+ if (fuse_rows->fuserowoutputenable == NO_OUTPUT_ENABLE_FUSE_ROW)
+ {
+ printf("OE\n");
+ }
+ else if (all_fuses_in_row_blown(pal, jed, fuse_rows->fuserowoutputenable))
+ {
+ printf("vcc\n");
+ }
+ else
+ {
+ generate_product_terms(pal, jed, fuse_rows->fuserowoutputenable, buffer);
+
+ printf("%s\n", buffer);
+ }
+ }
+
+ printf("\n");
+ }
}
@@ -1736,7 +1736,7 @@ static void print_product_terms(const pal_data* pal, const jed_data* jed)
static void print_pal10l8_product_terms(const pal_data* pal, const jed_data* jed)
{
- print_product_terms(pal, jed);
+ print_product_terms(pal, jed);
}
@@ -1748,7 +1748,7 @@ static void print_pal10l8_product_terms(const pal_data* pal, const jed_data* jed
static void print_pal10h8_product_terms(const pal_data* pal, const jed_data* jed)
{
- print_product_terms(pal, jed);
+ print_product_terms(pal, jed);
}
@@ -1760,7 +1760,7 @@ static void print_pal10h8_product_terms(const pal_data* pal, const jed_data* jed
static void print_pal12l6_product_terms(const pal_data* pal, const jed_data* jed)
{
- print_product_terms(pal, jed);
+ print_product_terms(pal, jed);
}
@@ -1772,7 +1772,7 @@ static void print_pal12l6_product_terms(const pal_data* pal, const jed_data* jed
static void print_pal12h6_product_terms(const pal_data* pal, const jed_data* jed)
{
- print_product_terms(pal, jed);
+ print_product_terms(pal, jed);
}
@@ -1784,7 +1784,7 @@ static void print_pal12h6_product_terms(const pal_data* pal, const jed_data* jed
static void print_pal14l4_product_terms(const pal_data* pal, const jed_data* jed)
{
- print_product_terms(pal, jed);
+ print_product_terms(pal, jed);
}
@@ -1796,7 +1796,7 @@ static void print_pal14l4_product_terms(const pal_data* pal, const jed_data* jed
static void print_pal14h4_product_terms(const pal_data* pal, const jed_data* jed)
{
- print_product_terms(pal, jed);
+ print_product_terms(pal, jed);
}
@@ -1808,7 +1808,7 @@ static void print_pal14h4_product_terms(const pal_data* pal, const jed_data* jed
static void print_pal16l2_product_terms(const pal_data* pal, const jed_data* jed)
{
- print_product_terms(pal, jed);
+ print_product_terms(pal, jed);
}
@@ -1820,7 +1820,7 @@ static void print_pal16l2_product_terms(const pal_data* pal, const jed_data* jed
static void print_pal16h2_product_terms(const pal_data* pal, const jed_data* jed)
{
- print_product_terms(pal, jed);
+ print_product_terms(pal, jed);
}
@@ -1832,7 +1832,7 @@ static void print_pal16h2_product_terms(const pal_data* pal, const jed_data* jed
static void print_pal16c1_product_terms(const pal_data* pal, const jed_data* jed)
{
- print_product_terms(pal, jed);
+ print_product_terms(pal, jed);
}
@@ -1844,7 +1844,7 @@ static void print_pal16c1_product_terms(const pal_data* pal, const jed_data* jed
static void print_pal16l8_product_terms(const pal_data* pal, const jed_data* jed)
{
- print_product_terms(pal, jed);
+ print_product_terms(pal, jed);
}
@@ -1856,7 +1856,7 @@ static void print_pal16l8_product_terms(const pal_data* pal, const jed_data* jed
static void print_pal16r4_product_terms(const pal_data* pal, const jed_data* jed)
{
- print_product_terms(pal, jed);
+ print_product_terms(pal, jed);
}
@@ -1868,7 +1868,7 @@ static void print_pal16r4_product_terms(const pal_data* pal, const jed_data* jed
static void print_pal16r6_product_terms(const pal_data* pal, const jed_data* jed)
{
- print_product_terms(pal, jed);
+ print_product_terms(pal, jed);
}
@@ -1880,7 +1880,7 @@ static void print_pal16r6_product_terms(const pal_data* pal, const jed_data* jed
static void print_pal16r8_product_terms(const pal_data* pal, const jed_data* jed)
{
- print_product_terms(pal, jed);
+ print_product_terms(pal, jed);
}
@@ -1892,7 +1892,7 @@ static void print_pal16r8_product_terms(const pal_data* pal, const jed_data* jed
static void print_gal16v8_product_terms(const pal_data* pal, const jed_data* jed)
{
- print_product_terms(pal, jed);
+ print_product_terms(pal, jed);
}
@@ -1904,31 +1904,31 @@ static void print_gal16v8_product_terms(const pal_data* pal, const jed_data* jed
static void print_peel18cv8_product_terms(const pal_data* pal, const jed_data* jed)
{
- char buffer[200];
+ char buffer[200];
- print_product_terms(pal, jed);
+ print_product_terms(pal, jed);
- /* Synchronous Preset */
+ /* Synchronous Preset */
- generate_product_terms(pal, jed, 2592, buffer);
+ generate_product_terms(pal, jed, 2592, buffer);
- if (strlen(buffer))
- {
- printf("Synchronous Preset:\n\n");
- printf("%s\n", buffer);
- printf("\n");
- }
+ if (strlen(buffer))
+ {
+ printf("Synchronous Preset:\n\n");
+ printf("%s\n", buffer);
+ printf("\n");
+ }
- /* Asynchronous Clear */
+ /* Asynchronous Clear */
- generate_product_terms(pal, jed, 2628, buffer);
+ generate_product_terms(pal, jed, 2628, buffer);
- if (strlen(buffer))
- {
- printf("Asynchronous Clear:\n\n");
- printf("%s\n", buffer);
- printf("\n");
- }
+ if (strlen(buffer))
+ {
+ printf("Asynchronous Clear:\n\n");
+ printf("%s\n", buffer);
+ printf("\n");
+ }
}
@@ -1941,31 +1941,31 @@ static void print_peel18cv8_product_terms(const pal_data* pal, const jed_data* j
#if defined(include_gal18v10)
static void print_gal18v10_product_terms(const pal_data* pal, const jed_data* jed)
{
- char buffer[200];
+ char buffer[200];
- print_product_terms(pal, jed);
+ print_product_terms(pal, jed);
- /* Synchronous Reset */
+ /* Synchronous Reset */
- generate_product_terms(pal, jed, 3420, buffer);
+ generate_product_terms(pal, jed, 3420, buffer);
- if (strlen(buffer))
- {
- printf("Synchronous Reset:\n\n");
- printf("%s\n", buffer);
- printf("\n");
- }
+ if (strlen(buffer))
+ {
+ printf("Synchronous Reset:\n\n");
+ printf("%s\n", buffer);
+ printf("\n");
+ }
- /* Asynchronous Reset */
+ /* Asynchronous Reset */
- generate_product_terms(pal, jed, 0, buffer);
+ generate_product_terms(pal, jed, 0, buffer);
- if (strlen(buffer))
- {
- printf("Asynchronous Reset:\n\n");
- printf("%s\n", buffer);
- printf("\n");
- }
+ if (strlen(buffer))
+ {
+ printf("Asynchronous Reset:\n\n");
+ printf("%s\n", buffer);
+ printf("\n");
+ }
}
#endif
@@ -1978,7 +1978,7 @@ static void print_gal18v10_product_terms(const pal_data* pal, const jed_data* je
static void print_pal20l8_product_terms(const pal_data* pal, const jed_data* jed)
{
- print_product_terms(pal, jed);
+ print_product_terms(pal, jed);
}
@@ -1990,7 +1990,7 @@ static void print_pal20l8_product_terms(const pal_data* pal, const jed_data* jed
static void print_pal20l10_product_terms(const pal_data* pal, const jed_data* jed)
{
- print_product_terms(pal, jed);
+ print_product_terms(pal, jed);
}
@@ -2002,7 +2002,7 @@ static void print_pal20l10_product_terms(const pal_data* pal, const jed_data* je
static void print_pal20r4_product_terms(const pal_data* pal, const jed_data* jed)
{
- print_product_terms(pal, jed);
+ print_product_terms(pal, jed);
}
@@ -2014,7 +2014,7 @@ static void print_pal20r4_product_terms(const pal_data* pal, const jed_data* jed
static void print_pal20r6_product_terms(const pal_data* pal, const jed_data* jed)
{
- print_product_terms(pal, jed);
+ print_product_terms(pal, jed);
}
@@ -2026,7 +2026,7 @@ static void print_pal20r6_product_terms(const pal_data* pal, const jed_data* jed
static void print_pal20r8_product_terms(const pal_data* pal, const jed_data* jed)
{
- print_product_terms(pal, jed);
+ print_product_terms(pal, jed);
}
@@ -2038,19 +2038,19 @@ static void print_pal20r8_product_terms(const pal_data* pal, const jed_data* jed
static void config_pal10l8_pins(const pal_data* pal, const jed_data* jed)
{
- static UINT16 input_pins[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 11};
- static pin_output_config output_pins[] = {
- {12, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
- {13, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
- {14, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
- {15, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
- {16, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
- {17, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
- {18, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
- {19, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE}};
+ static UINT16 input_pins[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 11};
+ static pin_output_config output_pins[] = {
+ {12, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
+ {13, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
+ {14, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
+ {15, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
+ {16, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
+ {17, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
+ {18, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
+ {19, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE}};
- set_input_pins(input_pins, ARRAY_LEN(input_pins));
- set_output_pins(output_pins, ARRAY_LEN(output_pins));
+ set_input_pins(input_pins, ARRAY_LEN(input_pins));
+ set_output_pins(output_pins, ARRAY_LEN(output_pins));
}
@@ -2062,19 +2062,19 @@ static void config_pal10l8_pins(const pal_data* pal, const jed_data* jed)
static void config_pal10h8_pins(const pal_data* pal, const jed_data* jed)
{
- static UINT16 input_pins[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 11};
- static pin_output_config output_pins[] = {
- {12, OUTPUT_ACTIVEHIGH | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
- {13, OUTPUT_ACTIVEHIGH | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
- {14, OUTPUT_ACTIVEHIGH | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
- {15, OUTPUT_ACTIVEHIGH | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
- {16, OUTPUT_ACTIVEHIGH | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
- {17, OUTPUT_ACTIVEHIGH | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
- {18, OUTPUT_ACTIVEHIGH | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
- {19, OUTPUT_ACTIVEHIGH | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE}};
+ static UINT16 input_pins[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 11};
+ static pin_output_config output_pins[] = {
+ {12, OUTPUT_ACTIVEHIGH | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
+ {13, OUTPUT_ACTIVEHIGH | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
+ {14, OUTPUT_ACTIVEHIGH | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
+ {15, OUTPUT_ACTIVEHIGH | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
+ {16, OUTPUT_ACTIVEHIGH | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
+ {17, OUTPUT_ACTIVEHIGH | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
+ {18, OUTPUT_ACTIVEHIGH | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
+ {19, OUTPUT_ACTIVEHIGH | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE}};
- set_input_pins(input_pins, ARRAY_LEN(input_pins));
- set_output_pins(output_pins, ARRAY_LEN(output_pins));
+ set_input_pins(input_pins, ARRAY_LEN(input_pins));
+ set_output_pins(output_pins, ARRAY_LEN(output_pins));
}
@@ -2086,17 +2086,17 @@ static void config_pal10h8_pins(const pal_data* pal, const jed_data* jed)
static void config_pal12l6_pins(const pal_data* pal, const jed_data* jed)
{
- static UINT16 input_pins[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 19};
- static pin_output_config output_pins[] = {
- {13, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
- {14, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
- {15, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
- {16, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
- {17, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
- {18, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE}};
+ static UINT16 input_pins[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 19};
+ static pin_output_config output_pins[] = {
+ {13, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
+ {14, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
+ {15, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
+ {16, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
+ {17, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
+ {18, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE}};
- set_input_pins(input_pins, ARRAY_LEN(input_pins));
- set_output_pins(output_pins, ARRAY_LEN(output_pins));
+ set_input_pins(input_pins, ARRAY_LEN(input_pins));
+ set_output_pins(output_pins, ARRAY_LEN(output_pins));
}
@@ -2108,17 +2108,17 @@ static void config_pal12l6_pins(const pal_data* pal, const jed_data* jed)
static void config_pal12h6_pins(const pal_data* pal, const jed_data* jed)
{
- static UINT16 input_pins[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 19};
- static pin_output_config output_pins[] = {
- {13, OUTPUT_ACTIVEHIGH | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
- {14, OUTPUT_ACTIVEHIGH | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
- {15, OUTPUT_ACTIVEHIGH | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
- {16, OUTPUT_ACTIVEHIGH | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
- {17, OUTPUT_ACTIVEHIGH | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
- {18, OUTPUT_ACTIVEHIGH | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE}};
+ static UINT16 input_pins[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 19};
+ static pin_output_config output_pins[] = {
+ {13, OUTPUT_ACTIVEHIGH | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
+ {14, OUTPUT_ACTIVEHIGH | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
+ {15, OUTPUT_ACTIVEHIGH | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
+ {16, OUTPUT_ACTIVEHIGH | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
+ {17, OUTPUT_ACTIVEHIGH | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
+ {18, OUTPUT_ACTIVEHIGH | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE}};
- set_input_pins(input_pins, ARRAY_LEN(input_pins));
- set_output_pins(output_pins, ARRAY_LEN(output_pins));
+ set_input_pins(input_pins, ARRAY_LEN(input_pins));
+ set_output_pins(output_pins, ARRAY_LEN(output_pins));
}
@@ -2130,15 +2130,15 @@ static void config_pal12h6_pins(const pal_data* pal, const jed_data* jed)
static void config_pal14l4_pins(const pal_data* pal, const jed_data* jed)
{
- static UINT16 input_pins[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 18, 19};
- static pin_output_config output_pins[] = {
- {14, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
- {15, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
- {16, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
- {17, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE}};
+ static UINT16 input_pins[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 18, 19};
+ static pin_output_config output_pins[] = {
+ {14, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
+ {15, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
+ {16, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
+ {17, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE}};
- set_input_pins(input_pins, ARRAY_LEN(input_pins));
- set_output_pins(output_pins, ARRAY_LEN(output_pins));
+ set_input_pins(input_pins, ARRAY_LEN(input_pins));
+ set_output_pins(output_pins, ARRAY_LEN(output_pins));
}
@@ -2150,15 +2150,15 @@ static void config_pal14l4_pins(const pal_data* pal, const jed_data* jed)
static void config_pal14h4_pins(const pal_data* pal, const jed_data* jed)
{
- static UINT16 input_pins[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 18, 19};
- static pin_output_config output_pins[] = {
- {14, OUTPUT_ACTIVEHIGH | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
- {15, OUTPUT_ACTIVEHIGH | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
- {16, OUTPUT_ACTIVEHIGH | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
- {17, OUTPUT_ACTIVEHIGH | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE}};
+ static UINT16 input_pins[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 18, 19};
+ static pin_output_config output_pins[] = {
+ {14, OUTPUT_ACTIVEHIGH | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
+ {15, OUTPUT_ACTIVEHIGH | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
+ {16, OUTPUT_ACTIVEHIGH | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
+ {17, OUTPUT_ACTIVEHIGH | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE}};
- set_input_pins(input_pins, ARRAY_LEN(input_pins));
- set_output_pins(output_pins, ARRAY_LEN(output_pins));
+ set_input_pins(input_pins, ARRAY_LEN(input_pins));
+ set_output_pins(output_pins, ARRAY_LEN(output_pins));
}
@@ -2170,13 +2170,13 @@ static void config_pal14h4_pins(const pal_data* pal, const jed_data* jed)
static void config_pal16l2_pins(const pal_data* pal, const jed_data* jed)
{
- static UINT16 input_pins[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 17, 18, 19};
- static pin_output_config output_pins[] = {
- {15, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
- {16, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE}};
+ static UINT16 input_pins[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 17, 18, 19};
+ static pin_output_config output_pins[] = {
+ {15, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
+ {16, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE}};
- set_input_pins(input_pins, ARRAY_LEN(input_pins));
- set_output_pins(output_pins, ARRAY_LEN(output_pins));
+ set_input_pins(input_pins, ARRAY_LEN(input_pins));
+ set_output_pins(output_pins, ARRAY_LEN(output_pins));
}
@@ -2188,13 +2188,13 @@ static void config_pal16l2_pins(const pal_data* pal, const jed_data* jed)
static void config_pal16h2_pins(const pal_data* pal, const jed_data* jed)
{
- static UINT16 input_pins[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 17, 18, 19};
- static pin_output_config output_pins[] = {
- {15, OUTPUT_ACTIVEHIGH | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
- {16, OUTPUT_ACTIVEHIGH | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE}};
+ static UINT16 input_pins[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 17, 18, 19};
+ static pin_output_config output_pins[] = {
+ {15, OUTPUT_ACTIVEHIGH | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
+ {16, OUTPUT_ACTIVEHIGH | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE}};
- set_input_pins(input_pins, ARRAY_LEN(input_pins));
- set_output_pins(output_pins, ARRAY_LEN(output_pins));
+ set_input_pins(input_pins, ARRAY_LEN(input_pins));
+ set_output_pins(output_pins, ARRAY_LEN(output_pins));
}
@@ -2206,13 +2206,13 @@ static void config_pal16h2_pins(const pal_data* pal, const jed_data* jed)
static void config_pal16c1_pins(const pal_data* pal, const jed_data* jed)
{
- static UINT16 input_pins[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 17, 18, 19};
- static pin_output_config output_pins[] = {
- {15, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
- {16, OUTPUT_ACTIVEHIGH | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE}};
+ static UINT16 input_pins[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 17, 18, 19};
+ static pin_output_config output_pins[] = {
+ {15, OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE},
+ {16, OUTPUT_ACTIVEHIGH | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE}};
- set_input_pins(input_pins, ARRAY_LEN(input_pins));
- set_output_pins(output_pins, ARRAY_LEN(output_pins));
+ set_input_pins(input_pins, ARRAY_LEN(input_pins));
+ set_output_pins(output_pins, ARRAY_LEN(output_pins));
}
@@ -2224,25 +2224,25 @@ static void config_pal16c1_pins(const pal_data* pal, const jed_data* jed)
static void config_pal16l8_pins(const pal_data* pal, const jed_data* jed)
{
- static UINT16 input_pins[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 13, 14, 15, 16, 17, 18};
- pin_output_config output_pins[8];
- UINT16 output_pin_count, index;
+ static UINT16 input_pins[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 13, 14, 15, 16, 17, 18};
+ pin_output_config output_pins[8];
+ UINT16 output_pin_count, index;
- output_pin_count = 0;
+ output_pin_count = 0;
- for (index = 0; index < pal->pinfuserowscount; ++index)
- {
- if (does_output_enable_fuse_row_allow_output(pal, jed, pal->pinfuserows[index].fuserowoutputenable))
- {
- output_pins[output_pin_count].pin = pal->pinfuserows[index].pin;
- output_pins[output_pin_count].flags = OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_OUTPUT;
+ for (index = 0; index < pal->pinfuserowscount; ++index)
+ {
+ if (does_output_enable_fuse_row_allow_output(pal, jed, pal->pinfuserows[index].fuserowoutputenable))
+ {
+ output_pins[output_pin_count].pin = pal->pinfuserows[index].pin;
+ output_pins[output_pin_count].flags = OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_OUTPUT;
- ++output_pin_count;
- }
- }
+ ++output_pin_count;
+ }
+ }
- set_input_pins(input_pins, ARRAY_LEN(input_pins));
- set_output_pins(output_pins, output_pin_count);
+ set_input_pins(input_pins, ARRAY_LEN(input_pins));
+ set_output_pins(output_pins, output_pin_count);
}
@@ -2254,55 +2254,55 @@ static void config_pal16l8_pins(const pal_data* pal, const jed_data* jed)
static void config_pal16r4_pins(const pal_data* pal, const jed_data* jed)
{
- static UINT16 input_pins[] = {2, 3, 4, 5, 6, 7, 8, 9, 12, 13, 14, 15, 16, 17, 18, 19};
- static UINT16 registered_pins[] = {14, 15, 16, 17};
- pin_output_config output_pins[8];
- UINT16 output_pin_count, index;
+ static UINT16 input_pins[] = {2, 3, 4, 5, 6, 7, 8, 9, 12, 13, 14, 15, 16, 17, 18, 19};
+ static UINT16 registered_pins[] = {14, 15, 16, 17};
+ pin_output_config output_pins[8];
+ UINT16 output_pin_count, index;
- output_pin_count = 0;
+ output_pin_count = 0;
- if (does_output_enable_fuse_row_allow_output(pal, jed, 1792))
- {
- output_pins[output_pin_count].pin = 12;
- output_pins[output_pin_count].flags = OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_OUTPUT;
+ if (does_output_enable_fuse_row_allow_output(pal, jed, 1792))
+ {
+ output_pins[output_pin_count].pin = 12;
+ output_pins[output_pin_count].flags = OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_OUTPUT;
- ++output_pin_count;
- }
+ ++output_pin_count;
+ }
- if (does_output_enable_fuse_row_allow_output(pal, jed, 1536))
- {
- output_pins[output_pin_count].pin = 13;
- output_pins[output_pin_count].flags = OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_OUTPUT;
+ if (does_output_enable_fuse_row_allow_output(pal, jed, 1536))
+ {
+ output_pins[output_pin_count].pin = 13;
+ output_pins[output_pin_count].flags = OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_OUTPUT;
- ++output_pin_count;
- }
+ ++output_pin_count;
+ }
- for (index = 0; index < ARRAY_LEN(registered_pins); ++index)
- {
- output_pins[output_pin_count].pin = registered_pins[index];
- output_pins[output_pin_count].flags = OUTPUT_ACTIVELOW | OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED;
+ for (index = 0; index < ARRAY_LEN(registered_pins); ++index)
+ {
+ output_pins[output_pin_count].pin = registered_pins[index];
+ output_pins[output_pin_count].flags = OUTPUT_ACTIVELOW | OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED;
- ++output_pin_count;
- }
+ ++output_pin_count;
+ }
- if (does_output_enable_fuse_row_allow_output(pal, jed, 256))
- {
- output_pins[output_pin_count].pin = 18;
- output_pins[output_pin_count].flags = OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_OUTPUT;
+ if (does_output_enable_fuse_row_allow_output(pal, jed, 256))
+ {
+ output_pins[output_pin_count].pin = 18;
+ output_pins[output_pin_count].flags = OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_OUTPUT;
- ++output_pin_count;
- }
+ ++output_pin_count;
+ }
- if (does_output_enable_fuse_row_allow_output(pal, jed, 0))
- {
- output_pins[output_pin_count].pin = 19;
- output_pins[output_pin_count].flags = OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_OUTPUT;
+ if (does_output_enable_fuse_row_allow_output(pal, jed, 0))
+ {
+ output_pins[output_pin_count].pin = 19;
+ output_pins[output_pin_count].flags = OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_OUTPUT;
- ++output_pin_count;
- }
+ ++output_pin_count;
+ }
- set_input_pins(input_pins, ARRAY_LEN(input_pins));
- set_output_pins(output_pins, output_pin_count);
+ set_input_pins(input_pins, ARRAY_LEN(input_pins));
+ set_output_pins(output_pins, output_pin_count);
}
@@ -2314,39 +2314,39 @@ static void config_pal16r4_pins(const pal_data* pal, const jed_data* jed)
static void config_pal16r6_pins(const pal_data* pal, const jed_data* jed)
{
- static UINT16 input_pins[] = {2, 3, 4, 5, 6, 7, 8, 9, 12, 13, 14, 15, 16, 17, 18, 19};
- static UINT16 registered_pins[] = {13, 14, 15, 16, 17, 18};
- pin_output_config output_pins[8];
- UINT16 output_pin_count, index;
+ static UINT16 input_pins[] = {2, 3, 4, 5, 6, 7, 8, 9, 12, 13, 14, 15, 16, 17, 18, 19};
+ static UINT16 registered_pins[] = {13, 14, 15, 16, 17, 18};
+ pin_output_config output_pins[8];
+ UINT16 output_pin_count, index;
- output_pin_count = 0;
+ output_pin_count = 0;
- if (does_output_enable_fuse_row_allow_output(pal, jed, 1792))
- {
- output_pins[output_pin_count].pin = 12;
- output_pins[output_pin_count].flags = OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_OUTPUT;
+ if (does_output_enable_fuse_row_allow_output(pal, jed, 1792))
+ {
+ output_pins[output_pin_count].pin = 12;
+ output_pins[output_pin_count].flags = OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_OUTPUT;
- ++output_pin_count;
- }
+ ++output_pin_count;
+ }
- for (index = 0; index < ARRAY_LEN(registered_pins); ++index)
- {
- output_pins[output_pin_count].pin = registered_pins[index];
- output_pins[output_pin_count].flags = OUTPUT_ACTIVELOW | OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED;
+ for (index = 0; index < ARRAY_LEN(registered_pins); ++index)
+ {
+ output_pins[output_pin_count].pin = registered_pins[index];
+ output_pins[output_pin_count].flags = OUTPUT_ACTIVELOW | OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED;
- ++output_pin_count;
- }
+ ++output_pin_count;
+ }
- if (does_output_enable_fuse_row_allow_output(pal, jed, 0))
- {
- output_pins[output_pin_count].pin = 19;
- output_pins[output_pin_count].flags = OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_OUTPUT;
+ if (does_output_enable_fuse_row_allow_output(pal, jed, 0))
+ {
+ output_pins[output_pin_count].pin = 19;
+ output_pins[output_pin_count].flags = OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_OUTPUT;
- ++output_pin_count;
- }
+ ++output_pin_count;
+ }
- set_input_pins(input_pins, ARRAY_LEN(input_pins));
- set_output_pins(output_pins, output_pin_count);
+ set_input_pins(input_pins, ARRAY_LEN(input_pins));
+ set_output_pins(output_pins, output_pin_count);
}
@@ -2358,19 +2358,19 @@ static void config_pal16r6_pins(const pal_data* pal, const jed_data* jed)
static void config_pal16r8_pins(const pal_data* pal, const jed_data* jed)
{
- static UINT16 input_pins[] = {2, 3, 4, 5, 6, 7, 8, 9, 12, 13, 14, 15, 16, 17, 18, 19};
- static pin_output_config output_pins[] = {
- {12, OUTPUT_ACTIVELOW | OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED},
- {13, OUTPUT_ACTIVELOW | OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED},
- {14, OUTPUT_ACTIVELOW | OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED},
- {15, OUTPUT_ACTIVELOW | OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED},
- {16, OUTPUT_ACTIVELOW | OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED},
- {17, OUTPUT_ACTIVELOW | OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED},
- {18, OUTPUT_ACTIVELOW | OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED},
- {19, OUTPUT_ACTIVELOW | OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED}};
+ static UINT16 input_pins[] = {2, 3, 4, 5, 6, 7, 8, 9, 12, 13, 14, 15, 16, 17, 18, 19};
+ static pin_output_config output_pins[] = {
+ {12, OUTPUT_ACTIVELOW | OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED},
+ {13, OUTPUT_ACTIVELOW | OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED},
+ {14, OUTPUT_ACTIVELOW | OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED},
+ {15, OUTPUT_ACTIVELOW | OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED},
+ {16, OUTPUT_ACTIVELOW | OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED},
+ {17, OUTPUT_ACTIVELOW | OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED},
+ {18, OUTPUT_ACTIVELOW | OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED},
+ {19, OUTPUT_ACTIVELOW | OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED}};
- set_input_pins(input_pins, ARRAY_LEN(input_pins));
- set_output_pins(output_pins, ARRAY_LEN(output_pins));
+ set_input_pins(input_pins, ARRAY_LEN(input_pins));
+ set_output_pins(output_pins, ARRAY_LEN(output_pins));
}
@@ -2382,259 +2382,259 @@ static void config_pal16r8_pins(const pal_data* pal, const jed_data* jed)
static void config_gal16v8_pins(const pal_data* pal, const jed_data* jed)
{
- typedef struct _output_logic_macrocell output_logic_macrocell;
- struct _output_logic_macrocell
- {
- UINT16 pin;
- UINT16 xor_fuse;
- UINT16 ac1_fuse;
- };
-
- static output_logic_macrocell macrocells[] = {
- {12, 2055, 2127},
- {13, 2054, 2126},
- {14, 2053, 2125},
- {15, 2052, 2124},
- {16, 2051, 2123},
- {17, 2050, 2122},
- {18, 2049, 2121},
- {19, 2048, 2120}};
- static pin_fuse_rows pinfuserows_registered[] = {
- {12, NO_OUTPUT_ENABLE_FUSE_ROW, 1792, 2016},
- {13, NO_OUTPUT_ENABLE_FUSE_ROW, 1536, 1760},
- {14, NO_OUTPUT_ENABLE_FUSE_ROW, 1280, 1504},
- {15, NO_OUTPUT_ENABLE_FUSE_ROW, 1024, 1248},
- {16, NO_OUTPUT_ENABLE_FUSE_ROW, 768, 992},
- {17, NO_OUTPUT_ENABLE_FUSE_ROW, 512, 736},
- {18, NO_OUTPUT_ENABLE_FUSE_ROW, 256, 480},
- {19, NO_OUTPUT_ENABLE_FUSE_ROW, 0, 224}};
- static pin_fuse_rows pinfuserows_combinatorial[] = {
- {12, 1792, 1824, 2016},
- {13, 1536, 1568, 1760},
- {14, 1280, 1312, 1504},
- {15, 1024, 1056, 1248},
- {16, 768, 800, 992},
- {17, 512, 544, 736},
- {18, 256, 288, 480},
- {19, 0, 32, 224}};
- static pin_fuse_columns pinfusecolumns_registered[] = {
- {2, 1, 0},
- {3, 5, 4},
- {4, 9, 8},
- {5, 13, 12},
- {6, 17, 16},
- {7, 21, 20},
- {8, 25, 24},
- {9, 29, 28},
- {12, 31, 30},
- {13, 27, 26},
- {14, 23, 22},
- {15, 19, 18},
- {16, 15, 14},
- {17, 11, 10},
- {18, 7, 6},
- {19, 3, 2}};
- static pin_fuse_columns pinfusecolumns_combinatorialcomplex[] = {
- {1, 3, 2},
- {2, 1, 0},
- {3, 5, 4},
- {4, 9, 8},
- {5, 13, 12},
- {6, 17, 16},
- {7, 21, 20},
- {8, 25, 24},
- {9, 29, 28},
- {11, 31, 30},
- {13, 27, 26},
- {14, 23, 22},
- {15, 19, 18},
- {16, 15, 14},
- {17, 11, 10},
- {18, 7, 6}};
- static pin_fuse_columns pinfusecolumns_combinatorialsimple[] = {
- {1, 3, 2},
- {2, 1, 0},
- {3, 5, 4},
- {4, 9, 8},
- {5, 13, 12},
- {6, 17, 16},
- {7, 21, 20},
- {8, 25, 24},
- {9, 29, 28},
- {11, 31, 30},
- {12, 27, 26},
- {13, 23, 22},
- {14, 19, 18},
- {17, 15, 14},
- {18, 11, 10},
- {19, 7, 6}};
- static UINT16 input_pins_registered[] = {2, 3, 4, 5, 6, 7, 8, 9, 12, 13, 14, 15, 16, 17, 18, 19};
- static UINT16 input_pins_combinatorialcomplex[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 13, 14, 15, 16, 17, 18};
- static UINT16 input_pins_combinatorialsimple[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 17, 18, 19};
- pin_output_config output_pins[ARRAY_LEN(macrocells)];
- UINT16 index, output_pin_count;
-
- output_pin_count = 0;
-
- /* SYN Fuse: 0 - registered, 1 - combinatorial */
-
- if (jed_get_fuse(jed, 2192))
- {
- /* Combinatorial */
- /* AC0 Fuse: 0 - simple mode, 1 - complex mode */
-
- if (jed_get_fuse(jed, 2193))
- {
- /* Complex Mode */
-
- set_input_pins(input_pins_combinatorialcomplex, ARRAY_LEN(input_pins_combinatorialcomplex));
-
- memcpy(gal16v8pinfuserows, pinfuserows_combinatorial, sizeof(pinfuserows_combinatorial));
- memcpy(gal16v8pinfusecolumns, pinfusecolumns_combinatorialcomplex, sizeof(pinfusecolumns_combinatorialcomplex));
-
- for (index = 0; index < ARRAY_LEN(macrocells); ++index)
- {
- if (is_gal16v8_product_term_enabled(pal, jed, pal->pinfuserows[index].fuserowoutputenable) &&
- does_output_enable_fuse_row_allow_output(pal, jed, pal->pinfuserows[index].fuserowoutputenable))
- {
- output_pins[output_pin_count].pin = macrocells[index].pin;
- output_pins[output_pin_count].flags = OUTPUT_COMBINATORIAL;
-
- if (jed_get_fuse(jed, macrocells[index].xor_fuse))
- {
- output_pins[output_pin_count].flags |= OUTPUT_ACTIVEHIGH;
- }
- else
- {
- output_pins[output_pin_count].flags |= OUTPUT_ACTIVELOW;
- }
-
- if (output_pins[output_pin_count].pin != 12 &&
- output_pins[output_pin_count].pin != 19)
- {
- output_pins[output_pin_count].flags |= OUTPUT_FEEDBACK_OUTPUT;
- }
- else
- {
- output_pins[output_pin_count].flags |= OUTPUT_FEEDBACK_NONE;
- }
-
- ++output_pin_count;
- }
- }
- }
- else
- {
- /* Simple Mode */
-
- set_input_pins(input_pins_combinatorialsimple, ARRAY_LEN(input_pins_combinatorialsimple));
-
- memcpy(gal16v8pinfuserows, pinfuserows_registered, sizeof(pinfuserows_registered));
- memcpy(gal16v8pinfusecolumns, pinfusecolumns_combinatorialsimple, sizeof(pinfusecolumns_combinatorialsimple));
-
- for (index = 0; index < ARRAY_LEN(macrocells); ++index)
- {
- if (jed_get_fuse(jed, macrocells[index].ac1_fuse))
- {
- /* Pin is for input only */
-
- if (macrocells[index].pin == 15 || macrocells[index].pin == 16)
- {
- fprintf(stderr, "Pin %d cannot be configured as an input pin.\n",
- macrocells[index].pin);
- }
- }
- else
- {
- output_pins[output_pin_count].pin = macrocells[index].pin;
- output_pins[output_pin_count].flags = OUTPUT_COMBINATORIAL;
-
- if (jed_get_fuse(jed, macrocells[index].xor_fuse))
- {
- output_pins[output_pin_count].flags |= OUTPUT_ACTIVEHIGH;
- }
- else
- {
- output_pins[output_pin_count].flags |= OUTPUT_ACTIVELOW;
- }
-
- if (output_pins[output_pin_count].pin != 15 &&
- output_pins[output_pin_count].pin != 16)
- {
- output_pins[output_pin_count].flags |= OUTPUT_FEEDBACK_OUTPUT;
- }
- else
- {
- output_pins[output_pin_count].flags |= OUTPUT_FEEDBACK_NONE;
- }
-
- ++output_pin_count;
- }
- }
- }
- }
- else
- {
- /* Registered */
-
- set_input_pins(input_pins_registered, ARRAY_LEN(input_pins_registered));
-
- memcpy(gal16v8pinfusecolumns, pinfusecolumns_registered, sizeof(pinfusecolumns_registered));
-
- for (index = 0; index < ARRAY_LEN(macrocells); ++index)
- {
- if (jed_get_fuse(jed, macrocells[index].ac1_fuse))
- {
- /* combinatorial pin */
-
- gal16v8pinfuserows[index].fuserowoutputenable = pinfuserows_combinatorial[index].fuserowoutputenable;
- gal16v8pinfuserows[index].fuserowtermstart = pinfuserows_combinatorial[index].fuserowtermstart;
- gal16v8pinfuserows[index].fuserowtermend = pinfuserows_combinatorial[index].fuserowtermend;
-
- if (is_gal16v8_product_term_enabled(pal, jed, pal->pinfuserows[index].fuserowoutputenable) &&
- does_output_enable_fuse_row_allow_output(pal, jed, pal->pinfuserows[index].fuserowoutputenable))
- {
- output_pins[output_pin_count].pin = macrocells[index].pin;
- output_pins[output_pin_count].flags = OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_OUTPUT;
-
- if (jed_get_fuse(jed, macrocells[index].xor_fuse))
- {
- output_pins[output_pin_count].flags |= OUTPUT_ACTIVEHIGH;
- }
- else
- {
- output_pins[output_pin_count].flags |= OUTPUT_ACTIVELOW;
- }
-
- ++output_pin_count;
- }
- }
- else
- {
- /* registered pin */
-
- gal16v8pinfuserows[index].fuserowoutputenable = pinfuserows_registered[index].fuserowoutputenable;
- gal16v8pinfuserows[index].fuserowtermstart = pinfuserows_registered[index].fuserowtermstart;
- gal16v8pinfuserows[index].fuserowtermend = pinfuserows_registered[index].fuserowtermend;
-
- output_pins[output_pin_count].pin = macrocells[index].pin;
- output_pins[output_pin_count].flags = OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED;
-
- if (jed_get_fuse(jed, macrocells[index].xor_fuse))
- {
- output_pins[output_pin_count].flags |= OUTPUT_ACTIVEHIGH;
- }
- else
- {
- output_pins[output_pin_count].flags |= OUTPUT_ACTIVELOW;
- }
-
- ++output_pin_count;
- }
- }
- }
-
- set_output_pins(output_pins, output_pin_count);
+ typedef struct _output_logic_macrocell output_logic_macrocell;
+ struct _output_logic_macrocell
+ {
+ UINT16 pin;
+ UINT16 xor_fuse;
+ UINT16 ac1_fuse;
+ };
+
+ static output_logic_macrocell macrocells[] = {
+ {12, 2055, 2127},
+ {13, 2054, 2126},
+ {14, 2053, 2125},
+ {15, 2052, 2124},
+ {16, 2051, 2123},
+ {17, 2050, 2122},
+ {18, 2049, 2121},
+ {19, 2048, 2120}};
+ static pin_fuse_rows pinfuserows_registered[] = {
+ {12, NO_OUTPUT_ENABLE_FUSE_ROW, 1792, 2016},
+ {13, NO_OUTPUT_ENABLE_FUSE_ROW, 1536, 1760},
+ {14, NO_OUTPUT_ENABLE_FUSE_ROW, 1280, 1504},
+ {15, NO_OUTPUT_ENABLE_FUSE_ROW, 1024, 1248},
+ {16, NO_OUTPUT_ENABLE_FUSE_ROW, 768, 992},
+ {17, NO_OUTPUT_ENABLE_FUSE_ROW, 512, 736},
+ {18, NO_OUTPUT_ENABLE_FUSE_ROW, 256, 480},
+ {19, NO_OUTPUT_ENABLE_FUSE_ROW, 0, 224}};
+ static pin_fuse_rows pinfuserows_combinatorial[] = {
+ {12, 1792, 1824, 2016},
+ {13, 1536, 1568, 1760},
+ {14, 1280, 1312, 1504},
+ {15, 1024, 1056, 1248},
+ {16, 768, 800, 992},
+ {17, 512, 544, 736},
+ {18, 256, 288, 480},
+ {19, 0, 32, 224}};
+ static pin_fuse_columns pinfusecolumns_registered[] = {
+ {2, 1, 0},
+ {3, 5, 4},
+ {4, 9, 8},
+ {5, 13, 12},
+ {6, 17, 16},
+ {7, 21, 20},
+ {8, 25, 24},
+ {9, 29, 28},
+ {12, 31, 30},
+ {13, 27, 26},
+ {14, 23, 22},
+ {15, 19, 18},
+ {16, 15, 14},
+ {17, 11, 10},
+ {18, 7, 6},
+ {19, 3, 2}};
+ static pin_fuse_columns pinfusecolumns_combinatorialcomplex[] = {
+ {1, 3, 2},
+ {2, 1, 0},
+ {3, 5, 4},
+ {4, 9, 8},
+ {5, 13, 12},
+ {6, 17, 16},
+ {7, 21, 20},
+ {8, 25, 24},
+ {9, 29, 28},
+ {11, 31, 30},
+ {13, 27, 26},
+ {14, 23, 22},
+ {15, 19, 18},
+ {16, 15, 14},
+ {17, 11, 10},
+ {18, 7, 6}};
+ static pin_fuse_columns pinfusecolumns_combinatorialsimple[] = {
+ {1, 3, 2},
+ {2, 1, 0},
+ {3, 5, 4},
+ {4, 9, 8},
+ {5, 13, 12},
+ {6, 17, 16},
+ {7, 21, 20},
+ {8, 25, 24},
+ {9, 29, 28},
+ {11, 31, 30},
+ {12, 27, 26},
+ {13, 23, 22},
+ {14, 19, 18},
+ {17, 15, 14},
+ {18, 11, 10},
+ {19, 7, 6}};
+ static UINT16 input_pins_registered[] = {2, 3, 4, 5, 6, 7, 8, 9, 12, 13, 14, 15, 16, 17, 18, 19};
+ static UINT16 input_pins_combinatorialcomplex[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 13, 14, 15, 16, 17, 18};
+ static UINT16 input_pins_combinatorialsimple[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 17, 18, 19};
+ pin_output_config output_pins[ARRAY_LEN(macrocells)];
+ UINT16 index, output_pin_count;
+
+ output_pin_count = 0;
+
+ /* SYN Fuse: 0 - registered, 1 - combinatorial */
+
+ if (jed_get_fuse(jed, 2192))
+ {
+ /* Combinatorial */
+ /* AC0 Fuse: 0 - simple mode, 1 - complex mode */
+
+ if (jed_get_fuse(jed, 2193))
+ {
+ /* Complex Mode */
+
+ set_input_pins(input_pins_combinatorialcomplex, ARRAY_LEN(input_pins_combinatorialcomplex));
+
+ memcpy(gal16v8pinfuserows, pinfuserows_combinatorial, sizeof(pinfuserows_combinatorial));
+ memcpy(gal16v8pinfusecolumns, pinfusecolumns_combinatorialcomplex, sizeof(pinfusecolumns_combinatorialcomplex));
+
+ for (index = 0; index < ARRAY_LEN(macrocells); ++index)
+ {
+ if (is_gal16v8_product_term_enabled(pal, jed, pal->pinfuserows[index].fuserowoutputenable) &&
+ does_output_enable_fuse_row_allow_output(pal, jed, pal->pinfuserows[index].fuserowoutputenable))
+ {
+ output_pins[output_pin_count].pin = macrocells[index].pin;
+ output_pins[output_pin_count].flags = OUTPUT_COMBINATORIAL;
+
+ if (jed_get_fuse(jed, macrocells[index].xor_fuse))
+ {
+ output_pins[output_pin_count].flags |= OUTPUT_ACTIVEHIGH;
+ }
+ else
+ {
+ output_pins[output_pin_count].flags |= OUTPUT_ACTIVELOW;
+ }
+
+ if (output_pins[output_pin_count].pin != 12 &&
+ output_pins[output_pin_count].pin != 19)
+ {
+ output_pins[output_pin_count].flags |= OUTPUT_FEEDBACK_OUTPUT;
+ }
+ else
+ {
+ output_pins[output_pin_count].flags |= OUTPUT_FEEDBACK_NONE;
+ }
+
+ ++output_pin_count;
+ }
+ }
+ }
+ else
+ {
+ /* Simple Mode */
+
+ set_input_pins(input_pins_combinatorialsimple, ARRAY_LEN(input_pins_combinatorialsimple));
+
+ memcpy(gal16v8pinfuserows, pinfuserows_registered, sizeof(pinfuserows_registered));
+ memcpy(gal16v8pinfusecolumns, pinfusecolumns_combinatorialsimple, sizeof(pinfusecolumns_combinatorialsimple));
+
+ for (index = 0; index < ARRAY_LEN(macrocells); ++index)
+ {
+ if (jed_get_fuse(jed, macrocells[index].ac1_fuse))
+ {
+ /* Pin is for input only */
+
+ if (macrocells[index].pin == 15 || macrocells[index].pin == 16)
+ {
+ fprintf(stderr, "Pin %d cannot be configured as an input pin.\n",
+ macrocells[index].pin);
+ }
+ }
+ else
+ {
+ output_pins[output_pin_count].pin = macrocells[index].pin;
+ output_pins[output_pin_count].flags = OUTPUT_COMBINATORIAL;
+
+ if (jed_get_fuse(jed, macrocells[index].xor_fuse))
+ {
+ output_pins[output_pin_count].flags |= OUTPUT_ACTIVEHIGH;
+ }
+ else
+ {
+ output_pins[output_pin_count].flags |= OUTPUT_ACTIVELOW;
+ }
+
+ if (output_pins[output_pin_count].pin != 15 &&
+ output_pins[output_pin_count].pin != 16)
+ {
+ output_pins[output_pin_count].flags |= OUTPUT_FEEDBACK_OUTPUT;
+ }
+ else
+ {
+ output_pins[output_pin_count].flags |= OUTPUT_FEEDBACK_NONE;
+ }
+
+ ++output_pin_count;
+ }
+ }
+ }
+ }
+ else
+ {
+ /* Registered */
+
+ set_input_pins(input_pins_registered, ARRAY_LEN(input_pins_registered));
+
+ memcpy(gal16v8pinfusecolumns, pinfusecolumns_registered, sizeof(pinfusecolumns_registered));
+
+ for (index = 0; index < ARRAY_LEN(macrocells); ++index)
+ {
+ if (jed_get_fuse(jed, macrocells[index].ac1_fuse))
+ {
+ /* combinatorial pin */
+
+ gal16v8pinfuserows[index].fuserowoutputenable = pinfuserows_combinatorial[index].fuserowoutputenable;
+ gal16v8pinfuserows[index].fuserowtermstart = pinfuserows_combinatorial[index].fuserowtermstart;
+ gal16v8pinfuserows[index].fuserowtermend = pinfuserows_combinatorial[index].fuserowtermend;
+
+ if (is_gal16v8_product_term_enabled(pal, jed, pal->pinfuserows[index].fuserowoutputenable) &&
+ does_output_enable_fuse_row_allow_output(pal, jed, pal->pinfuserows[index].fuserowoutputenable))
+ {
+ output_pins[output_pin_count].pin = macrocells[index].pin;
+ output_pins[output_pin_count].flags = OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_OUTPUT;
+
+ if (jed_get_fuse(jed, macrocells[index].xor_fuse))
+ {
+ output_pins[output_pin_count].flags |= OUTPUT_ACTIVEHIGH;
+ }
+ else
+ {
+ output_pins[output_pin_count].flags |= OUTPUT_ACTIVELOW;
+ }
+
+ ++output_pin_count;
+ }
+ }
+ else
+ {
+ /* registered pin */
+
+ gal16v8pinfuserows[index].fuserowoutputenable = pinfuserows_registered[index].fuserowoutputenable;
+ gal16v8pinfuserows[index].fuserowtermstart = pinfuserows_registered[index].fuserowtermstart;
+ gal16v8pinfuserows[index].fuserowtermend = pinfuserows_registered[index].fuserowtermend;
+
+ output_pins[output_pin_count].pin = macrocells[index].pin;
+ output_pins[output_pin_count].flags = OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED;
+
+ if (jed_get_fuse(jed, macrocells[index].xor_fuse))
+ {
+ output_pins[output_pin_count].flags |= OUTPUT_ACTIVEHIGH;
+ }
+ else
+ {
+ output_pins[output_pin_count].flags |= OUTPUT_ACTIVELOW;
+ }
+
+ ++output_pin_count;
+ }
+ }
+ }
+
+ set_output_pins(output_pins, output_pin_count);
}
@@ -2646,133 +2646,133 @@ static void config_gal16v8_pins(const pal_data* pal, const jed_data* jed)
static void config_peel18cv8_pins(const pal_data* pal, const jed_data* jed)
{
- typedef struct _output_logic_macrocell output_logic_macrocell;
- struct _output_logic_macrocell
- {
- UINT16 pin;
- UINT16 polarity_fuse; /* 0 = active high or 1 = active low */
- UINT16 type_fuse; /* 1 = registered or 0 = combinatorial */
- UINT16 feedback1_fuse;
- UINT16 feedback2_fuse;
- };
-
- static output_logic_macrocell macrocells[] = {
- {12, 2692, 2693, 2694, 2695},
- {13, 2688, 2689, 2690, 2691},
- {14, 2684, 2685, 2686, 2687},
- {15, 2680, 2681, 2682, 2683},
- {16, 2676, 2677, 2678, 2679},
- {17, 2672, 2673, 2674, 2675},
- {18, 2668, 2669, 2670, 2671},
- {19, 2664, 2665, 2666, 2667}};
- static UINT16 input_pins[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19};
- pin_output_config output_pins[ARRAY_LEN(macrocells)];
- UINT16 index, output_pin_count;
-
- set_input_pins(input_pins, ARRAY_LEN(input_pins));
-
- output_pin_count = 0;
-
- for (index = 0; index < ARRAY_LEN(macrocells); ++index)
- {
- if (jed_get_fuse(jed, macrocells[index].feedback1_fuse) &&
- !jed_get_fuse(jed, macrocells[index].feedback2_fuse))
- {
- /* Combinatorial Feedback (pin is output only) */
-
- output_pins[output_pin_count].pin = macrocells[index].pin;
- output_pins[output_pin_count].flags = OUTPUT_FEEDBACK_COMBINATORIAL;
-
- if (jed_get_fuse(jed, macrocells[index].type_fuse))
- {
- output_pins[output_pin_count].flags |= OUTPUT_REGISTERED;
- }
- else
- {
- output_pins[output_pin_count].flags |= OUTPUT_COMBINATORIAL;
- }
-
- if (jed_get_fuse(jed, macrocells[index].polarity_fuse))
- {
- output_pins[output_pin_count].flags |= OUTPUT_ACTIVELOW;
- }
- else
- {
- output_pins[output_pin_count].flags |= OUTPUT_ACTIVEHIGH;
- }
-
- ++output_pin_count;
- }
- else if (!jed_get_fuse(jed, macrocells[index].feedback1_fuse) &&
- !jed_get_fuse(jed, macrocells[index].feedback2_fuse))
- {
- /* Register Feedback (pin is output only) */
-
- output_pins[output_pin_count].pin = macrocells[index].pin;
- output_pins[output_pin_count].flags = OUTPUT_FEEDBACK_REGISTERED;
-
- if (jed_get_fuse(jed, macrocells[index].type_fuse))
- {
- output_pins[output_pin_count].flags |= OUTPUT_REGISTERED;
- }
- else
- {
- output_pins[output_pin_count].flags |= OUTPUT_COMBINATORIAL;
- }
-
- if (jed_get_fuse(jed, macrocells[index].polarity_fuse))
- {
- output_pins[output_pin_count].flags |= OUTPUT_ACTIVELOW;
- }
- else
- {
- output_pins[output_pin_count].flags |= OUTPUT_ACTIVEHIGH;
- }
-
- ++output_pin_count;
- }
- else if (jed_get_fuse(jed, macrocells[index].feedback1_fuse) &&
- jed_get_fuse(jed, macrocells[index].feedback2_fuse))
- {
- /* Bi-directional I/O (pin can be input or output) */
-
- if (does_output_enable_fuse_row_allow_output(pal, jed, pal->pinfuserows[index].fuserowoutputenable))
- {
- output_pins[output_pin_count].pin = macrocells[index].pin;
- output_pins[output_pin_count].flags = OUTPUT_FEEDBACK_OUTPUT;
-
- if (jed_get_fuse(jed, macrocells[index].type_fuse))
- {
- output_pins[output_pin_count].flags |= OUTPUT_REGISTERED;
- }
- else
- {
- output_pins[output_pin_count].flags |= OUTPUT_COMBINATORIAL;
- }
-
- if (jed_get_fuse(jed, macrocells[index].polarity_fuse))
- {
- output_pins[output_pin_count].flags |= OUTPUT_ACTIVELOW;
- }
- else
- {
- output_pins[output_pin_count].flags |= OUTPUT_ACTIVEHIGH;
- }
-
- ++output_pin_count;
- }
- }
- else if (!jed_get_fuse(jed, macrocells[index].feedback1_fuse) &&
- jed_get_fuse(jed, macrocells[index].feedback2_fuse))
- {
- fprintf(stderr, "Unknown input/feedback select configuration. (Pin %d)\n",
- macrocells[index].pin);
-
- continue;
- }
- }
-
- set_output_pins(output_pins, output_pin_count);
+ typedef struct _output_logic_macrocell output_logic_macrocell;
+ struct _output_logic_macrocell
+ {
+ UINT16 pin;
+ UINT16 polarity_fuse; /* 0 = active high or 1 = active low */
+ UINT16 type_fuse; /* 1 = registered or 0 = combinatorial */
+ UINT16 feedback1_fuse;
+ UINT16 feedback2_fuse;
+ };
+
+ static output_logic_macrocell macrocells[] = {
+ {12, 2692, 2693, 2694, 2695},
+ {13, 2688, 2689, 2690, 2691},
+ {14, 2684, 2685, 2686, 2687},
+ {15, 2680, 2681, 2682, 2683},
+ {16, 2676, 2677, 2678, 2679},
+ {17, 2672, 2673, 2674, 2675},
+ {18, 2668, 2669, 2670, 2671},
+ {19, 2664, 2665, 2666, 2667}};
+ static UINT16 input_pins[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19};
+ pin_output_config output_pins[ARRAY_LEN(macrocells)];
+ UINT16 index, output_pin_count;
+
+ set_input_pins(input_pins, ARRAY_LEN(input_pins));
+
+ output_pin_count = 0;
+
+ for (index = 0; index < ARRAY_LEN(macrocells); ++index)
+ {
+ if (jed_get_fuse(jed, macrocells[index].feedback1_fuse) &&
+ !jed_get_fuse(jed, macrocells[index].feedback2_fuse))
+ {
+ /* Combinatorial Feedback (pin is output only) */
+
+ output_pins[output_pin_count].pin = macrocells[index].pin;
+ output_pins[output_pin_count].flags = OUTPUT_FEEDBACK_COMBINATORIAL;
+
+ if (jed_get_fuse(jed, macrocells[index].type_fuse))
+ {
+ output_pins[output_pin_count].flags |= OUTPUT_REGISTERED;
+ }
+ else
+ {
+ output_pins[output_pin_count].flags |= OUTPUT_COMBINATORIAL;
+ }
+
+ if (jed_get_fuse(jed, macrocells[index].polarity_fuse))
+ {
+ output_pins[output_pin_count].flags |= OUTPUT_ACTIVELOW;
+ }
+ else
+ {
+ output_pins[output_pin_count].flags |= OUTPUT_ACTIVEHIGH;
+ }
+
+ ++output_pin_count;
+ }
+ else if (!jed_get_fuse(jed, macrocells[index].feedback1_fuse) &&
+ !jed_get_fuse(jed, macrocells[index].feedback2_fuse))
+ {
+ /* Register Feedback (pin is output only) */
+
+ output_pins[output_pin_count].pin = macrocells[index].pin;
+ output_pins[output_pin_count].flags = OUTPUT_FEEDBACK_REGISTERED;
+
+ if (jed_get_fuse(jed, macrocells[index].type_fuse))
+ {
+ output_pins[output_pin_count].flags |= OUTPUT_REGISTERED;
+ }
+ else
+ {
+ output_pins[output_pin_count].flags |= OUTPUT_COMBINATORIAL;
+ }
+
+ if (jed_get_fuse(jed, macrocells[index].polarity_fuse))
+ {
+ output_pins[output_pin_count].flags |= OUTPUT_ACTIVELOW;
+ }
+ else
+ {
+ output_pins[output_pin_count].flags |= OUTPUT_ACTIVEHIGH;
+ }
+
+ ++output_pin_count;
+ }
+ else if (jed_get_fuse(jed, macrocells[index].feedback1_fuse) &&
+ jed_get_fuse(jed, macrocells[index].feedback2_fuse))
+ {
+ /* Bi-directional I/O (pin can be input or output) */
+
+ if (does_output_enable_fuse_row_allow_output(pal, jed, pal->pinfuserows[index].fuserowoutputenable))
+ {
+ output_pins[output_pin_count].pin = macrocells[index].pin;
+ output_pins[output_pin_count].flags = OUTPUT_FEEDBACK_OUTPUT;
+
+ if (jed_get_fuse(jed, macrocells[index].type_fuse))
+ {
+ output_pins[output_pin_count].flags |= OUTPUT_REGISTERED;
+ }
+ else
+ {
+ output_pins[output_pin_count].flags |= OUTPUT_COMBINATORIAL;
+ }
+
+ if (jed_get_fuse(jed, macrocells[index].polarity_fuse))
+ {
+ output_pins[output_pin_count].flags |= OUTPUT_ACTIVELOW;
+ }
+ else
+ {
+ output_pins[output_pin_count].flags |= OUTPUT_ACTIVEHIGH;
+ }
+
+ ++output_pin_count;
+ }
+ }
+ else if (!jed_get_fuse(jed, macrocells[index].feedback1_fuse) &&
+ jed_get_fuse(jed, macrocells[index].feedback2_fuse))
+ {
+ fprintf(stderr, "Unknown input/feedback select configuration. (Pin %d)\n",
+ macrocells[index].pin);
+
+ continue;
+ }
+ }
+
+ set_output_pins(output_pins, output_pin_count);
}
@@ -2785,76 +2785,76 @@ static void config_peel18cv8_pins(const pal_data* pal, const jed_data* jed)
#if defined(include_gal18v10)
static void config_gal18v10_pins(const pal_data* pal, const jed_data* jed)
{
- typedef struct _output_logic_macrocell output_logic_macrocell;
- struct _output_logic_macrocell
- {
- UINT16 pin;
- UINT16 s0_fuse; /* 0 - active low, 1 - active high */
- UINT16 s1_fuse; /* 0 - registered, 1 - combinatorial */
- };
-
- static output_logic_macrocell macrocells[] = {
- {9, 3474, 3475},
- {11, 3472, 3473},
- {12, 3470, 3471},
- {13, 3468, 3469},
- {14, 3466, 3467},
- {15, 3464, 3465},
- {16, 3462, 3463},
- {17, 3460, 3461},
- {18, 3458, 3459},
- {19, 3456, 3457}};
- static UINT16 input_pins[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 17, 18, 19};
- pin_output_config output_pins[ARRAY_LEN(macrocells)];
- UINT16 index, output_pin_count;
-
- output_pin_count = 0;
-
- for (index = 0; index < ARRAY_LEN(output_pins); ++index)
- {
- if (jed_get_fuse(jed, macrocells[index].s1_fuse))
- {
- /* Combinatorial output or dedicated input */
-
- if (does_output_enable_fuse_row_allow_output(pal, jed, pal->pinfuserows[index].fuserowoutputenable))
- {
- output_pins[output_pin_count].pin = macrocells[index].pin;
- output_pins[output_pin_count].flags = OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_OUTPUT;
-
- if (!jed_get_fuse(jed, macrocells[index].s0_fuse))
- {
- output_pins[output_pin_count].flags |= OUTPUT_ACTIVELOW;
- }
- else
- {
- output_pins[output_pin_count].flags |= OUTPUT_ACTIVEHIGH;
- }
-
- ++output_pin_count;
- }
- }
- else
- {
- /* Registered output */
-
- output_pins[output_pin_count].pin = macrocells[index].pin;
- output_pins[output_pin_count].flags = OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED;
-
- if (!jed_get_fuse(jed, macrocells[index].s0_fuse))
- {
- output_pins[output_pin_count].flags |= OUTPUT_ACTIVELOW;
- }
- else
- {
- output_pins[output_pin_count].flags |= OUTPUT_ACTIVEHIGH;
- }
-
- ++output_pin_count;
- }
- }
-
- set_input_pins(input_pins, ARRAY_LEN(input_pins));
- set_output_pins(output_pins, output_pin_count);
+ typedef struct _output_logic_macrocell output_logic_macrocell;
+ struct _output_logic_macrocell
+ {
+ UINT16 pin;
+ UINT16 s0_fuse; /* 0 - active low, 1 - active high */
+ UINT16 s1_fuse; /* 0 - registered, 1 - combinatorial */
+ };
+
+ static output_logic_macrocell macrocells[] = {
+ {9, 3474, 3475},
+ {11, 3472, 3473},
+ {12, 3470, 3471},
+ {13, 3468, 3469},
+ {14, 3466, 3467},
+ {15, 3464, 3465},
+ {16, 3462, 3463},
+ {17, 3460, 3461},
+ {18, 3458, 3459},
+ {19, 3456, 3457}};
+ static UINT16 input_pins[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 17, 18, 19};
+ pin_output_config output_pins[ARRAY_LEN(macrocells)];
+ UINT16 index, output_pin_count;
+
+ output_pin_count = 0;
+
+ for (index = 0; index < ARRAY_LEN(output_pins); ++index)
+ {
+ if (jed_get_fuse(jed, macrocells[index].s1_fuse))
+ {
+ /* Combinatorial output or dedicated input */
+
+ if (does_output_enable_fuse_row_allow_output(pal, jed, pal->pinfuserows[index].fuserowoutputenable))
+ {
+ output_pins[output_pin_count].pin = macrocells[index].pin;
+ output_pins[output_pin_count].flags = OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_OUTPUT;
+
+ if (!jed_get_fuse(jed, macrocells[index].s0_fuse))
+ {
+ output_pins[output_pin_count].flags |= OUTPUT_ACTIVELOW;
+ }
+ else
+ {
+ output_pins[output_pin_count].flags |= OUTPUT_ACTIVEHIGH;
+ }
+
+ ++output_pin_count;
+ }
+ }
+ else
+ {
+ /* Registered output */
+
+ output_pins[output_pin_count].pin = macrocells[index].pin;
+ output_pins[output_pin_count].flags = OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED;
+
+ if (!jed_get_fuse(jed, macrocells[index].s0_fuse))
+ {
+ output_pins[output_pin_count].flags |= OUTPUT_ACTIVELOW;
+ }
+ else
+ {
+ output_pins[output_pin_count].flags |= OUTPUT_ACTIVEHIGH;
+ }
+
+ ++output_pin_count;
+ }
+ }
+
+ set_input_pins(input_pins, ARRAY_LEN(input_pins));
+ set_output_pins(output_pins, output_pin_count);
}
#endif
@@ -2867,35 +2867,35 @@ static void config_gal18v10_pins(const pal_data* pal, const jed_data* jed)
static void config_pal20l8_pins(const pal_data* pal, const jed_data* jed)
{
- static UINT16 input_pins[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 16, 17, 18, 19, 20, 21, 23};
- pin_output_config output_pins[8];
- UINT16 output_pin_count, index;
+ static UINT16 input_pins[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 16, 17, 18, 19, 20, 21, 23};
+ pin_output_config output_pins[8];
+ UINT16 output_pin_count, index;
- output_pin_count = 0;
+ output_pin_count = 0;
- for (index = 0; index < pal->pinfuserowscount; ++index)
- {
- if (does_output_enable_fuse_row_allow_output(pal, jed, pal->pinfuserows[index].fuserowoutputenable))
- {
- output_pins[output_pin_count].pin = pal->pinfuserows[index].pin;
- output_pins[output_pin_count].flags = OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL;
-
- if (pal->pinfuserows[index].pin != 15 &&
- pal->pinfuserows[index].pin != 22)
- {
- output_pins[output_pin_count].flags |= OUTPUT_FEEDBACK_OUTPUT;
- }
- else
- {
- output_pins[output_pin_count].flags |= OUTPUT_FEEDBACK_NONE;
- }
-
- ++output_pin_count;
- }
- }
+ for (index = 0; index < pal->pinfuserowscount; ++index)
+ {
+ if (does_output_enable_fuse_row_allow_output(pal, jed, pal->pinfuserows[index].fuserowoutputenable))
+ {
+ output_pins[output_pin_count].pin = pal->pinfuserows[index].pin;
+ output_pins[output_pin_count].flags = OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL;
+
+ if (pal->pinfuserows[index].pin != 15 &&
+ pal->pinfuserows[index].pin != 22)
+ {
+ output_pins[output_pin_count].flags |= OUTPUT_FEEDBACK_OUTPUT;
+ }
+ else
+ {
+ output_pins[output_pin_count].flags |= OUTPUT_FEEDBACK_NONE;
+ }
+
+ ++output_pin_count;
+ }
+ }
- set_input_pins(input_pins, ARRAY_LEN(input_pins));
- set_output_pins(output_pins, output_pin_count);
+ set_input_pins(input_pins, ARRAY_LEN(input_pins));
+ set_output_pins(output_pins, output_pin_count);
}
@@ -2907,35 +2907,35 @@ static void config_pal20l8_pins(const pal_data* pal, const jed_data* jed)
static void config_pal20l10_pins(const pal_data* pal, const jed_data* jed)
{
- static UINT16 input_pins[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 16, 17, 18, 19, 20, 21, 22};
- pin_output_config output_pins[10];
- UINT16 output_pin_count, index;
-
- output_pin_count = 0;
+ static UINT16 input_pins[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 16, 17, 18, 19, 20, 21, 22};
+ pin_output_config output_pins[10];
+ UINT16 output_pin_count, index;
- for (index = 0; index < pal->pinfuserowscount; ++index)
- {
- if (does_output_enable_fuse_row_allow_output(pal, jed, pal->pinfuserows[index].fuserowoutputenable))
- {
- output_pins[output_pin_count].pin = pal->pinfuserows[index].pin;
- output_pins[output_pin_count].flags = OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL;
+ output_pin_count = 0;
- if (pal->pinfuserows[index].pin != 23 &&
- pal->pinfuserows[index].pin != 14)
- {
- output_pins[output_pin_count].flags |= OUTPUT_FEEDBACK_OUTPUT;
- }
- else
- {
- output_pins[output_pin_count].flags |= OUTPUT_FEEDBACK_NONE;
- }
-
- ++output_pin_count;
- }
- }
+ for (index = 0; index < pal->pinfuserowscount; ++index)
+ {
+ if (does_output_enable_fuse_row_allow_output(pal, jed, pal->pinfuserows[index].fuserowoutputenable))
+ {
+ output_pins[output_pin_count].pin = pal->pinfuserows[index].pin;
+ output_pins[output_pin_count].flags = OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL;
+
+ if (pal->pinfuserows[index].pin != 23 &&
+ pal->pinfuserows[index].pin != 14)
+ {
+ output_pins[output_pin_count].flags |= OUTPUT_FEEDBACK_OUTPUT;
+ }
+ else
+ {
+ output_pins[output_pin_count].flags |= OUTPUT_FEEDBACK_NONE;
+ }
+
+ ++output_pin_count;
+ }
+ }
- set_input_pins(input_pins, ARRAY_LEN(input_pins));
- set_output_pins(output_pins, output_pin_count);
+ set_input_pins(input_pins, ARRAY_LEN(input_pins));
+ set_output_pins(output_pins, output_pin_count);
}
@@ -2947,55 +2947,55 @@ static void config_pal20l10_pins(const pal_data* pal, const jed_data* jed)
static void config_pal20r4_pins(const pal_data* pal, const jed_data* jed)
{
- static UINT16 input_pins[] = {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23};
- static UINT16 registered_pins[] = {17, 18, 19, 20};
- pin_output_config output_pins[8];
- UINT16 output_pin_count, index;
+ static UINT16 input_pins[] = {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23};
+ static UINT16 registered_pins[] = {17, 18, 19, 20};
+ pin_output_config output_pins[8];
+ UINT16 output_pin_count, index;
- output_pin_count = 0;
+ output_pin_count = 0;
- if (does_output_enable_fuse_row_allow_output(pal, jed, 2240))
- {
- output_pins[output_pin_count].pin = 15;
- output_pins[output_pin_count].flags = OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_OUTPUT;
+ if (does_output_enable_fuse_row_allow_output(pal, jed, 2240))
+ {
+ output_pins[output_pin_count].pin = 15;
+ output_pins[output_pin_count].flags = OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_OUTPUT;
- ++output_pin_count;
- }
+ ++output_pin_count;
+ }
- if (does_output_enable_fuse_row_allow_output(pal, jed, 1920))
- {
- output_pins[output_pin_count].pin = 16;
- output_pins[output_pin_count].flags = OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_OUTPUT;
+ if (does_output_enable_fuse_row_allow_output(pal, jed, 1920))
+ {
+ output_pins[output_pin_count].pin = 16;
+ output_pins[output_pin_count].flags = OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_OUTPUT;
- ++output_pin_count;
- }
+ ++output_pin_count;
+ }
- for (index = 0; index < ARRAY_LEN(registered_pins); ++index)
- {
- output_pins[output_pin_count].pin = registered_pins[index];
- output_pins[output_pin_count].flags = OUTPUT_ACTIVELOW | OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED;
+ for (index = 0; index < ARRAY_LEN(registered_pins); ++index)
+ {
+ output_pins[output_pin_count].pin = registered_pins[index];
+ output_pins[output_pin_count].flags = OUTPUT_ACTIVELOW | OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED;
- ++output_pin_count;
- }
+ ++output_pin_count;
+ }
- if (does_output_enable_fuse_row_allow_output(pal, jed, 320))
- {
- output_pins[output_pin_count].pin = 21;
- output_pins[output_pin_count].flags = OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_OUTPUT;
+ if (does_output_enable_fuse_row_allow_output(pal, jed, 320))
+ {
+ output_pins[output_pin_count].pin = 21;
+ output_pins[output_pin_count].flags = OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_OUTPUT;
- ++output_pin_count;
- }
+ ++output_pin_count;
+ }
- if (does_output_enable_fuse_row_allow_output(pal, jed, 0))
- {
- output_pins[output_pin_count].pin = 22;
- output_pins[output_pin_count].flags = OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_OUTPUT;
+ if (does_output_enable_fuse_row_allow_output(pal, jed, 0))
+ {
+ output_pins[output_pin_count].pin = 22;
+ output_pins[output_pin_count].flags = OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_OUTPUT;
- ++output_pin_count;
- }
+ ++output_pin_count;
+ }
- set_input_pins(input_pins, ARRAY_LEN(input_pins));
- set_output_pins(output_pins, output_pin_count);
+ set_input_pins(input_pins, ARRAY_LEN(input_pins));
+ set_output_pins(output_pins, output_pin_count);
}
@@ -3007,39 +3007,39 @@ static void config_pal20r4_pins(const pal_data* pal, const jed_data* jed)
static void config_pal20r6_pins(const pal_data* pal, const jed_data* jed)
{
- static UINT16 input_pins[] = {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23};
- static UINT16 registered_pins[] = {16, 17, 18, 19, 20, 21};
- pin_output_config output_pins[8];
- UINT16 output_pin_count, index;
+ static UINT16 input_pins[] = {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23};
+ static UINT16 registered_pins[] = {16, 17, 18, 19, 20, 21};
+ pin_output_config output_pins[8];
+ UINT16 output_pin_count, index;
- output_pin_count = 0;
+ output_pin_count = 0;
- if (does_output_enable_fuse_row_allow_output(pal, jed, 2240))
- {
- output_pins[output_pin_count].pin = 15;
- output_pins[output_pin_count].flags = OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_OUTPUT;
+ if (does_output_enable_fuse_row_allow_output(pal, jed, 2240))
+ {
+ output_pins[output_pin_count].pin = 15;
+ output_pins[output_pin_count].flags = OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_OUTPUT;
- ++output_pin_count;
- }
+ ++output_pin_count;
+ }
- for (index = 0; index < ARRAY_LEN(registered_pins); ++index)
- {
- output_pins[output_pin_count].pin = registered_pins[index];
- output_pins[output_pin_count].flags = OUTPUT_ACTIVELOW | OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED;
+ for (index = 0; index < ARRAY_LEN(registered_pins); ++index)
+ {
+ output_pins[output_pin_count].pin = registered_pins[index];
+ output_pins[output_pin_count].flags = OUTPUT_ACTIVELOW | OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED;
- ++output_pin_count;
- }
+ ++output_pin_count;
+ }
- if (does_output_enable_fuse_row_allow_output(pal, jed, 0))
- {
- output_pins[output_pin_count].pin = 22;
- output_pins[output_pin_count].flags = OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_OUTPUT;
+ if (does_output_enable_fuse_row_allow_output(pal, jed, 0))
+ {
+ output_pins[output_pin_count].pin = 22;
+ output_pins[output_pin_count].flags = OUTPUT_ACTIVELOW | OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_OUTPUT;
- ++output_pin_count;
- }
+ ++output_pin_count;
+ }
- set_input_pins(input_pins, ARRAY_LEN(input_pins));
- set_output_pins(output_pins, output_pin_count);
+ set_input_pins(input_pins, ARRAY_LEN(input_pins));
+ set_output_pins(output_pins, output_pin_count);
}
@@ -3051,19 +3051,19 @@ static void config_pal20r6_pins(const pal_data* pal, const jed_data* jed)
static void config_pal20r8_pins(const pal_data* pal, const jed_data* jed)
{
- static UINT16 input_pins[] = {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23};
- static pin_output_config output_pins[] = {
- {15, OUTPUT_ACTIVELOW | OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED},
- {16, OUTPUT_ACTIVELOW | OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED},
- {17, OUTPUT_ACTIVELOW | OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED},
- {18, OUTPUT_ACTIVELOW | OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED},
- {19, OUTPUT_ACTIVELOW | OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED},
- {20, OUTPUT_ACTIVELOW | OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED},
- {21, OUTPUT_ACTIVELOW | OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED},
- {22, OUTPUT_ACTIVELOW | OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED}};
+ static UINT16 input_pins[] = {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23};
+ static pin_output_config output_pins[] = {
+ {15, OUTPUT_ACTIVELOW | OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED},
+ {16, OUTPUT_ACTIVELOW | OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED},
+ {17, OUTPUT_ACTIVELOW | OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED},
+ {18, OUTPUT_ACTIVELOW | OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED},
+ {19, OUTPUT_ACTIVELOW | OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED},
+ {20, OUTPUT_ACTIVELOW | OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED},
+ {21, OUTPUT_ACTIVELOW | OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED},
+ {22, OUTPUT_ACTIVELOW | OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED}};
- set_input_pins(input_pins, ARRAY_LEN(input_pins));
- set_output_pins(output_pins, ARRAY_LEN(output_pins));
+ set_input_pins(input_pins, ARRAY_LEN(input_pins));
+ set_output_pins(output_pins, ARRAY_LEN(output_pins));
}
@@ -3075,18 +3075,18 @@ static void config_pal20r8_pins(const pal_data* pal, const jed_data* jed)
static int is_gal16v8_product_term_enabled(const pal_data* pal, const jed_data* jed, UINT16 fuserow)
{
- UINT16 fuse_ptd;
+ UINT16 fuse_ptd;
- fuse_ptd = (fuserow / calc_fuse_column_count(pal)) + 2128;
+ fuse_ptd = (fuserow / calc_fuse_column_count(pal)) + 2128;
- if (fuse_ptd > 2191)
- {
- fprintf(stderr, "Fuse row %d is illegal!\n", fuserow);
+ if (fuse_ptd > 2191)
+ {
+ fprintf(stderr, "Fuse row %d is illegal!\n", fuserow);
- return 0;
- }
+ return 0;
+ }
- return jed_get_fuse(jed, fuse_ptd);
+ return jed_get_fuse(jed, fuse_ptd);
}
@@ -3098,92 +3098,92 @@ static int is_gal16v8_product_term_enabled(const pal_data* pal, const jed_data*
static UINT16 get_peel18cv8_pin_fuse_state(const pal_data* pal, const jed_data* jed, UINT16 pin, UINT16 fuserow)
{
- const pin_fuse_columns* fuse_columns;
- int lowfusestate, highfusestate, tmpfusestate, swapfusestates;
- UINT16 cfgpin;
-
- /* Synchronous Preset or Asynchronous Clear fuse row? */
-
- if (fuserow == 2592 || fuserow == 2628)
- {
- return get_pin_fuse_state(pal, jed, pin, fuserow);
- }
-
- fuse_columns = find_fuse_columns(pal, pin);
-
- if (!fuse_columns)
- {
- fprintf(stderr, "Fuse column data missing for pin %d!\n", pin);
-
- return NO_FUSE_BLOWN;
- }
-
- cfgpin = find_pin_from_fuse_row(pal, fuserow);
-
- if (!cfgpin)
- {
- fprintf(stderr, "Pin from fuse row failed! (Fuse row: %d)\n", fuserow);
-
- return get_pin_fuse_state(pal, jed, pin, fuserow);
- }
-
- lowfusestate = jed_get_fuse(jed, fuserow + fuse_columns->lowfusecolumn);
- highfusestate = jed_get_fuse(jed, fuserow + fuse_columns->highfusecolumn);
- swapfusestates = 0;
-
- if (is_output_pin(pin) && is_output_pin(cfgpin))
- {
- if (get_pin_output_flags(cfgpin) & OUTPUT_FEEDBACK_COMBINATORIAL)
- {
- if ((get_pin_output_flags(pin) & OUTPUT_ACTIVELOW) &&
- (get_pin_output_flags(pin) & OUTPUT_FEEDBACK_COMBINATORIAL))
- {
- swapfusestates = 1;
- }
- }
- else if (get_pin_output_flags(cfgpin) & OUTPUT_FEEDBACK_REGISTERED)
- {
- if ((get_pin_output_flags(pin) & OUTPUT_ACTIVELOW) &&
- (get_pin_output_flags(pin) & OUTPUT_FEEDBACK_REGISTERED))
- {
- swapfusestates = 1;
- }
- }
- else if (get_pin_output_flags(cfgpin) & OUTPUT_FEEDBACK_OUTPUT)
- {
- if ((get_pin_output_flags(pin) & OUTPUT_ACTIVELOW) &&
- (get_pin_output_flags(pin) & OUTPUT_FEEDBACK_REGISTERED))
- {
- swapfusestates = 1;
- }
- }
- else
- {
- fprintf(stderr, "Unknown output pin type! (Fuse row: %d)\n", fuserow);
- }
- }
-
- if (swapfusestates)
- {
- tmpfusestate = lowfusestate;
- lowfusestate = highfusestate;
- highfusestate = tmpfusestate;
- }
-
- if (!lowfusestate && highfusestate)
- {
- return LOW_FUSE_BLOWN;
- }
- else if (lowfusestate && !highfusestate)
- {
- return HIGH_FUSE_BLOWN;
- }
- else if (!lowfusestate && !highfusestate)
- {
- return NO_FUSE_BLOWN;
- }
-
- return LOWHIGH_FUSE_BLOWN;
+ const pin_fuse_columns* fuse_columns;
+ int lowfusestate, highfusestate, tmpfusestate, swapfusestates;
+ UINT16 cfgpin;
+
+ /* Synchronous Preset or Asynchronous Clear fuse row? */
+
+ if (fuserow == 2592 || fuserow == 2628)
+ {
+ return get_pin_fuse_state(pal, jed, pin, fuserow);
+ }
+
+ fuse_columns = find_fuse_columns(pal, pin);
+
+ if (!fuse_columns)
+ {
+ fprintf(stderr, "Fuse column data missing for pin %d!\n", pin);
+
+ return NO_FUSE_BLOWN;
+ }
+
+ cfgpin = find_pin_from_fuse_row(pal, fuserow);
+
+ if (!cfgpin)
+ {
+ fprintf(stderr, "Pin from fuse row failed! (Fuse row: %d)\n", fuserow);
+
+ return get_pin_fuse_state(pal, jed, pin, fuserow);
+ }
+
+ lowfusestate = jed_get_fuse(jed, fuserow + fuse_columns->lowfusecolumn);
+ highfusestate = jed_get_fuse(jed, fuserow + fuse_columns->highfusecolumn);
+ swapfusestates = 0;
+
+ if (is_output_pin(pin) && is_output_pin(cfgpin))
+ {
+ if (get_pin_output_flags(cfgpin) & OUTPUT_FEEDBACK_COMBINATORIAL)
+ {
+ if ((get_pin_output_flags(pin) & OUTPUT_ACTIVELOW) &&
+ (get_pin_output_flags(pin) & OUTPUT_FEEDBACK_COMBINATORIAL))
+ {
+ swapfusestates = 1;
+ }
+ }
+ else if (get_pin_output_flags(cfgpin) & OUTPUT_FEEDBACK_REGISTERED)
+ {
+ if ((get_pin_output_flags(pin) & OUTPUT_ACTIVELOW) &&
+ (get_pin_output_flags(pin) & OUTPUT_FEEDBACK_REGISTERED))
+ {
+ swapfusestates = 1;
+ }
+ }
+ else if (get_pin_output_flags(cfgpin) & OUTPUT_FEEDBACK_OUTPUT)
+ {
+ if ((get_pin_output_flags(pin) & OUTPUT_ACTIVELOW) &&
+ (get_pin_output_flags(pin) & OUTPUT_FEEDBACK_REGISTERED))
+ {
+ swapfusestates = 1;
+ }
+ }
+ else
+ {
+ fprintf(stderr, "Unknown output pin type! (Fuse row: %d)\n", fuserow);
+ }
+ }
+
+ if (swapfusestates)
+ {
+ tmpfusestate = lowfusestate;
+ lowfusestate = highfusestate;
+ highfusestate = tmpfusestate;
+ }
+
+ if (!lowfusestate && highfusestate)
+ {
+ return LOW_FUSE_BLOWN;
+ }
+ else if (lowfusestate && !highfusestate)
+ {
+ return HIGH_FUSE_BLOWN;
+ }
+ else if (!lowfusestate && !highfusestate)
+ {
+ return NO_FUSE_BLOWN;
+ }
+
+ return LOWHIGH_FUSE_BLOWN;
}
@@ -3279,11 +3279,11 @@ static int print_usage()
fprintf(stderr,
"Usage:\n"
" jedutil -convert <source.jed> <target.bin> [fuses] -- convert JEDEC to binary form\n"
- " jedutil -convert <source.pla> <target.bin> [fuses] -- convert Berkeley standard PLA to binary form\n"
+ " jedutil -convert <source.pla> <target.bin> [fuses] -- convert Berkeley standard PLA to binary form\n"
" jedutil -convert <source.bin> <target.jed> -- convert binary to JEDEC form\n"
- " jedutil -view <source.jed> <device> -- dump JED logic equations\n"
- " jedutil -view <source.bin> <device> -- dump binary logic equations\n"
- " jedutil -viewlist -- view list of supported devices\n"
+ " jedutil -view <source.jed> <device> -- dump JED logic equations\n"
+ " jedutil -view <source.bin> <device> -- dump binary logic equations\n"
+ " jedutil -viewlist -- view list of supported devices\n"
);
return 0;
@@ -3297,7 +3297,7 @@ static int print_usage()
static int command_convert(int argc, char *argv[])
{
- const char *srcfile, *dstfile;
+ const char *srcfile, *dstfile;
int src_is_jed, src_is_pla, dst_is_jed;
int numfuses = 0;
jed_data jed;
@@ -3317,8 +3317,8 @@ static int command_convert(int argc, char *argv[])
/* does the source end in '.jed'? */
src_is_jed = is_jed_file(srcfile);
- /* does the source end in '.pla'? */
- src_is_pla = is_pla_file(srcfile);
+ /* does the source end in '.pla'? */
+ src_is_pla = is_pla_file(srcfile);
/* does the destination end in '.jed'? */
dst_is_jed = is_jed_file(dstfile);
@@ -3348,16 +3348,16 @@ static int command_convert(int argc, char *argv[])
printf("Converting '%s' to binary form '%s'\n", srcfile, dstfile);
/* read the fuse data */
- if (src_is_jed)
+ if (src_is_jed)
err = jed_parse(srcbuf, srcbuflen, &jed);
- else if (src_is_pla)
- err = pla_parse(srcbuf, srcbuflen, &jed);
+ else if (src_is_pla)
+ err = pla_parse(srcbuf, srcbuflen, &jed);
switch (err)
{
- case JEDERR_INVALID_DATA: fprintf(stderr, "Fatal error: Invalid source file\n"); return 1;
- case JEDERR_BAD_XMIT_SUM: fprintf(stderr, "Fatal error: Bad transmission checksum\n"); return 1;
- case JEDERR_BAD_FUSE_SUM: fprintf(stderr, "Fatal error: Bad fusemap checksum\n"); return 1;
+ case JEDERR_INVALID_DATA: fprintf(stderr, "Fatal error: Invalid source file\n"); return 1;
+ case JEDERR_BAD_XMIT_SUM: fprintf(stderr, "Fatal error: Bad transmission checksum\n"); return 1;
+ case JEDERR_BAD_FUSE_SUM: fprintf(stderr, "Fatal error: Bad fusemap checksum\n"); return 1;
}
/* override the number of fuses */
@@ -3388,7 +3388,7 @@ static int command_convert(int argc, char *argv[])
err = jedbin_parse(srcbuf, srcbuflen, &jed);
switch (err)
{
- case JEDERR_INVALID_DATA: fprintf(stderr, "Fatal error: Invalid binary JEDEC file\n"); return 1;
+ case JEDERR_INVALID_DATA: fprintf(stderr, "Fatal error: Invalid binary JEDEC file\n"); return 1;
}
/* print out data */
@@ -3413,7 +3413,7 @@ static int command_convert(int argc, char *argv[])
printf("Target file written successfully\n");
- return 0;
+ return 0;
}
@@ -3424,9 +3424,9 @@ static int command_convert(int argc, char *argv[])
static int command_view(int argc, char *argv[])
{
- const char *srcfile, *palname;
+ const char *srcfile, *palname;
int is_jed;
- const pal_data* pal;
+ const pal_data* pal;
jed_data jed;
int err;
@@ -3435,20 +3435,20 @@ static int command_view(int argc, char *argv[])
return print_usage();
}
- /* extract arguments */
+ /* extract arguments */
srcfile = argv[0];
palname = argv[1];
/* does the source end in '.jed'? */
is_jed = is_jed_file(srcfile);
- /* find the pal entry */
- pal = find_pal_data(palname);
- if (!pal)
- {
+ /* find the pal entry */
+ pal = find_pal_data(palname);
+ if (!pal)
+ {
fprintf(stderr, "Unknown pal name.\n");
return 1;
- }
+ }
/* read the source file */
err = read_source_file(srcfile);
@@ -3462,37 +3462,37 @@ static int command_view(int argc, char *argv[])
err = jed_parse(srcbuf, srcbuflen, &jed);
switch (err)
{
- case JEDERR_INVALID_DATA: fprintf(stderr, "Fatal error: Invalid .JED file\n"); return 1;
- case JEDERR_BAD_XMIT_SUM: fprintf(stderr, "Fatal error: Bad transmission checksum\n"); return 1;
- case JEDERR_BAD_FUSE_SUM: fprintf(stderr, "Fatal error: Bad fusemap checksum\n"); return 1;
+ case JEDERR_INVALID_DATA: fprintf(stderr, "Fatal error: Invalid .JED file\n"); return 1;
+ case JEDERR_BAD_XMIT_SUM: fprintf(stderr, "Fatal error: Bad transmission checksum\n"); return 1;
+ case JEDERR_BAD_FUSE_SUM: fprintf(stderr, "Fatal error: Bad fusemap checksum\n"); return 1;
}
- }
- else
- {
+ }
+ else
+ {
/* read the binary data */
err = jedbin_parse(srcbuf, srcbuflen, &jed);
switch (err)
{
- case JEDERR_INVALID_DATA: fprintf(stderr, "Fatal error: Invalid binary JEDEC file\n"); return 1;
+ case JEDERR_INVALID_DATA: fprintf(stderr, "Fatal error: Invalid binary JEDEC file\n"); return 1;
}
- }
+ }
- /* generate equations from fuse map */
+ /* generate equations from fuse map */
- pal->config_pins(pal, &jed);
+ pal->config_pins(pal, &jed);
- if (pal->print_product_terms)
- {
- pal->print_product_terms(pal, &jed);
- }
- else
- {
- fprintf(stderr, "Viewing product terms not supported for this pal type.");
+ if (pal->print_product_terms)
+ {
+ pal->print_product_terms(pal, &jed);
+ }
+ else
+ {
+ fprintf(stderr, "Viewing product terms not supported for this pal type.");
- return 1;
- }
+ return 1;
+ }
- return 0;
+ return 0;
}
@@ -3504,19 +3504,19 @@ static int command_view(int argc, char *argv[])
static int command_viewlist(int argc, char *argv[])
{
- int index;
+ int index;
if (argc > 0)
{
return print_usage();
}
- for (index = 0; index < ARRAY_LEN(paldata); ++index)
- {
- printf("%s\n", paldata[index].name);
- }
+ for (index = 0; index < ARRAY_LEN(paldata); ++index)
+ {
+ printf("%s\n", paldata[index].name);
+ }
- return 0;
+ return 0;
}
@@ -3526,22 +3526,22 @@ static int command_viewlist(int argc, char *argv[])
int main(int argc, char *argv[])
{
- command_entry command_entries[] = {
- {"-convert", &command_convert},
- {"-view", &command_view},
- {"-viewlist", &command_viewlist}};
- int index;
+ command_entry command_entries[] = {
+ {"-convert", &command_convert},
+ {"-view", &command_view},
+ {"-viewlist", &command_viewlist}};
+ int index;
if (argc < 2)
{
return print_usage();
}
- for (index = 0; index < ARRAY_LEN(command_entries); ++index)
- {
- if (!strcmp(argv[1], command_entries[index].command))
- return command_entries[index].command_func(argc - 2, &argv[2]);
- }
+ for (index = 0; index < ARRAY_LEN(command_entries); ++index)
+ {
+ if (!strcmp(argv[1], command_entries[index].command))
+ return command_entries[index].command_func(argc - 2, &argv[2]);
+ }
- return print_usage();
+ return print_usage();
}