Repair a few small layout thingies

git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1554 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Rutger Hofman 16 years ago
parent c1d0800d87
commit 64f039c8d1

@ -33,8 +33,8 @@
extern urj_bus_t *urj_bus;
void urj_bus_readmem (urj_bus_t *bus, FILE * f, uint32_t addr, uint32_t len);
void urj_bus_writemem (urj_bus_t *bus, FILE * f, uint32_t addr, uint32_t len);
void urj_bus_readmem (urj_bus_t *bus, FILE *f, uint32_t addr, uint32_t len);
void urj_bus_writemem (urj_bus_t *bus, FILE *f, uint32_t addr, uint32_t len);
/* @@@@ this had better be in an internal include file RFHH */

@ -81,8 +81,8 @@ extern urj_flash_cfi_array_t *urj_flash_cfi_array;
void urj_flash_detectflash (urj_bus_t *bus, uint32_t adr);
void urj_flashmem (urj_bus_t *bus, FILE * f, uint32_t addr, int);
void urj_flashmsbin (urj_bus_t *bus, FILE * f, int);
void urj_flashmem (urj_bus_t *bus, FILE *f, uint32_t addr, int);
void urj_flashmsbin (urj_bus_t *bus, FILE *f, int);
void urj_flasherase (urj_bus_t *bus, uint32_t addr, int number);

@ -64,24 +64,25 @@ typedef struct
int len;
} urj_jim_shift_reg_t;
typedef struct urj_jim_device
typedef struct urj_jim_device urj_jim_device_t;
struct urj_jim_device
{
struct urj_jim_device *prev;
urj_jim_device_t *prev;
urj_jim_tap_state_t tap_state;
void (*tck_rise) (struct urj_jim_device * dev, int tms, int tdi,
void (*tck_rise) (urj_jim_device_t *dev, int tms, int tdi,
uint8_t *shmem, size_t shmem_size);
void (*tck_fall) (struct urj_jim_device * dev, uint8_t *shmem,
void (*tck_fall) (urj_jim_device_t *dev, uint8_t *shmem,
size_t shmem_size);
void (*dev_free) (struct urj_jim_device * dev);
void (*dev_free) (urj_jim_device_t *dev);
void *state;
int num_sregs;
int current_dr;
urj_jim_shift_reg_t *sreg;
int tdo;
int tdo_buffer;
}
urj_jim_device_t;
};
typedef struct urj_jim_state
{
@ -92,21 +93,22 @@ typedef struct urj_jim_state
}
urj_jim_state_t;
typedef struct urj_jim_bus_device
typedef struct urj_jim_bus_device urj_jim_bus_device_t;
struct urj_jim_bus_device
{
int width; /* bytes */
int size; /* words (each <width> bytes) */
void *state; /* device-dependent */
void (*init) (struct urj_jim_bus_device * x);
uint32_t (*capture) (struct urj_jim_bus_device * x,
void (*init) (urj_jim_bus_device_t *x);
uint32_t (*capture) (urj_jim_bus_device_t *x,
uint32_t address, uint32_t control,
uint8_t *shmem, size_t shmem_size);
void (*update) (struct urj_jim_bus_device * x,
void (*update) (urj_jim_bus_device_t *x,
uint32_t address, uint32_t data, uint32_t control,
uint8_t *shmem, size_t shmem_size);
void (*free) (struct urj_jim_bus_device * x);
}
urj_jim_bus_device_t;
void (*free) (urj_jim_bus_device_t *x);
};
typedef struct
{

@ -31,7 +31,7 @@
int urj_parse_file (urj_chain_t *chain, const char *filename);
int urj_parse_line (urj_chain_t *chain, char *line);
int urj_parse_stream (urj_chain_t *chain, FILE * f);
int urj_parse_stream (urj_chain_t *chain, FILE *f);
#endif /* URJ_PARSE_H */

@ -54,7 +54,7 @@
#include <urjtag/jtag.h>
#ifndef HAVE_GETLINE
ssize_t urj_lib_getline (char **lineptr, size_t *n, FILE * stream);
ssize_t urj_lib_getline (char **lineptr, size_t *n, FILE *stream);
#endif
static int urj_interactive = 0;

@ -123,7 +123,7 @@ urj_bsdl_read_file (urj_chain_t *chain, const char *BSDL_File_Name,
{
urj_bsdl_globs_t *globs = &(chain->bsdl);
FILE *BSDL_File;
urj_bsdl_vhdl_parser_priv_t *vhdl_parser_priv;
urj_vhdl_parser_priv_t *vhdl_parser_priv;
urj_bsdl_jtag_ctrl_t jtag_ctrl;
int Compile_Errors = 1;
int result;
@ -257,6 +257,7 @@ urj_bsdl_set_path (urj_chain_t *chain, const char *pathlist)
{
num++;
/* extend path list array */
/* @@@@ RFHH check realloc result */
globs->path_list = realloc (globs->path_list,
(num + 1) * sizeof (char *));
/* enter path element up to the delimeter */

@ -552,7 +552,7 @@ urj_bsdl_process_register_access (urj_bsdl_jtag_ctrl_t *jc)
/*****************************************************************************
* int parse_vhdl_elem( urj_bsdl_parser_priv_t *priv, urj_bsdl_vhdl_elem_t *elem )
* int parse_vhdl_elem( urj_bsdl_parser_priv_t *priv, urj_vhdl_elem_t *elem )
*
* Runs the specified vhdl element through the BSDl parser.
*
@ -565,7 +565,7 @@ urj_bsdl_process_register_access (urj_bsdl_jtag_ctrl_t *jc)
* 0 -> error occured
****************************************************************************/
static int
parse_vhdl_elem (urj_bsdl_parser_priv_t *priv, urj_bsdl_vhdl_elem_t *elem)
parse_vhdl_elem (urj_bsdl_parser_priv_t *priv, urj_vhdl_elem_t *elem)
{
char *buf;
size_t buf_len;
@ -713,7 +713,7 @@ int
urj_bsdl_process_elements (urj_bsdl_jtag_ctrl_t *jc, const char *idcode)
{
urj_bsdl_parser_priv_t *priv;
urj_bsdl_vhdl_elem_t *el = jc->vhdl_elem_first;
urj_vhdl_elem_t *el = jc->vhdl_elem_first;
int result = URJ_BSDL_MODE_SYN_CHECK;
if ((priv = urj_bsdl_parser_init (jc)) == NULL)

@ -111,17 +111,17 @@ typedef enum
URJ_BSDL_VET_ATTRIBUTE_STRING,
URJ_BSDL_VET_ATTRIBUTE_DECIMAL,
URJ_BSDL_VET_UNKNOWN
} urj_bsdl_vhdl_elem_type_t;
} urj_vhdl_elem_type_t;
struct vhdl_elem
{
struct vhdl_elem *next;
urj_bsdl_vhdl_elem_type_t type;
urj_vhdl_elem_type_t type;
char *name;
char *payload;
int line;
};
typedef struct vhdl_elem urj_bsdl_vhdl_elem_t;
typedef struct vhdl_elem urj_vhdl_elem_t;
typedef enum
{
@ -140,8 +140,8 @@ struct jtag_ctrl
urj_part_t *part;
/* collected by VHDL parser */
urj_bsdl_port_desc_t *port_desc;
urj_bsdl_vhdl_elem_t *vhdl_elem_first;
urj_bsdl_vhdl_elem_t *vhdl_elem_last;
urj_vhdl_elem_t *vhdl_elem_first;
urj_vhdl_elem_t *vhdl_elem_last;
/* collected by BSDL parser */
char *idcode; /* IDCODE string */
char *usercode; /* USERCODE string */
@ -167,7 +167,7 @@ struct vhdl_parser_priv
urj_bsdl_jtag_ctrl_t *jtag_ctrl;
urj_bsdl_port_desc_t tmp_port_desc;
};
typedef struct vhdl_parser_priv urj_bsdl_vhdl_parser_priv_t;
typedef struct vhdl_parser_priv urj_vhdl_parser_priv_t;
/* private data of the BSDL bison parser
used to store variables the would end up as globals otherwise */

@ -118,7 +118,7 @@ LEGAL NOTICES:
%pure-parser
%parse-param {urj_bsdl_vhdl_parser_priv_t *priv_data}
%parse-param {urj_vhdl_parser_priv_t *priv_data}
%defines
%name-prefix="urj_vhdl_"
@ -164,25 +164,25 @@ int yylex (YYSTYPE *, void *);
} while (0)
#endif
static void Init_Text (urj_bsdl_vhdl_parser_priv_t *);
static void Store_Text (urj_bsdl_vhdl_parser_priv_t *, char *);
static void Print_Error (urj_bsdl_vhdl_parser_priv_t *, const char *);
static void Give_Up_And_Quit (urj_bsdl_vhdl_parser_priv_t *);
static void Init_Text (urj_vhdl_parser_priv_t *);
static void Store_Text (urj_vhdl_parser_priv_t *, char *);
static void Print_Error (urj_vhdl_parser_priv_t *, const char *);
static void Give_Up_And_Quit (urj_vhdl_parser_priv_t *);
/* VHDL semantic action interface */
static void urj_vhdl_set_entity (urj_bsdl_vhdl_parser_priv_t *, char *);
static void urj_vhdl_port_add_name (urj_bsdl_vhdl_parser_priv_t *, char *);
static void urj_vhdl_port_add_bit (urj_bsdl_vhdl_parser_priv_t *);
static void urj_vhdl_port_add_range (urj_bsdl_vhdl_parser_priv_t *, int, int);
static void urj_vhdl_port_apply_port (urj_bsdl_vhdl_parser_priv_t *);
//static void set_attr_bool (urj_bsdl_vhdl_parser_priv_t *, char *, int);
static void set_attr_decimal (urj_bsdl_vhdl_parser_priv_t *, char *, int);
static void set_attr_string (urj_bsdl_vhdl_parser_priv_t *, char *, char *);
//static void set_attr_real (urj_bsdl_vhdl_parser_priv_t *, char *, char *);
//static void set_attr_const (urj_bsdl_vhdl_parser_priv_t *, char *, char *);
void yyerror (urj_bsdl_vhdl_parser_priv_t *, const char *);
static void urj_vhdl_set_entity (urj_vhdl_parser_priv_t *, char *);
static void urj_vhdl_port_add_name (urj_vhdl_parser_priv_t *, char *);
static void urj_vhdl_port_add_bit (urj_vhdl_parser_priv_t *);
static void urj_vhdl_port_add_range (urj_vhdl_parser_priv_t *, int, int);
static void urj_vhdl_port_apply_port (urj_vhdl_parser_priv_t *);
//static void set_attr_bool (urj_vhdl_parser_priv_t *, char *, int);
static void set_attr_decimal (urj_vhdl_parser_priv_t *, char *, int);
static void set_attr_string (urj_vhdl_parser_priv_t *, char *, char *);
//static void set_attr_real (urj_vhdl_parser_priv_t *, char *, char *);
//static void set_attr_const (urj_vhdl_parser_priv_t *, char *, char *);
void yyerror (urj_vhdl_parser_priv_t *, const char *);
%}
%union
@ -600,7 +600,7 @@ ISC_Package_Body : PACKAGE BODY ISC_Packages IS
;
%% /* End rules, begin programs */
/*****************************************************************************
* void Init_Text( urj_bsdl_vhdl_parser_priv_t *priv )
* void Init_Text( urj_vhdl_parser_priv_t *priv )
*
* Allocates the internal test buffer if not already existing.
*
@ -611,7 +611,7 @@ ISC_Package_Body : PACKAGE BODY ISC_Packages IS
* void
****************************************************************************/
static void
Init_Text (urj_bsdl_vhdl_parser_priv_t *priv)
Init_Text (urj_vhdl_parser_priv_t *priv)
{
if (priv->len_buffer == 0)
{
@ -624,7 +624,7 @@ Init_Text (urj_bsdl_vhdl_parser_priv_t *priv)
/*****************************************************************************
* void Store_Text( urj_bsdl_vhdl_parser_priv_t *priv, char *Source )
* void Store_Text( urj_vhdl_parser_priv_t *priv, char *Source )
*
* Appends the given String to the internal text buffer. The buffer
* is extended if the string does not fit into the current size.
@ -637,7 +637,7 @@ Init_Text (urj_bsdl_vhdl_parser_priv_t *priv)
* void
****************************************************************************/
static void
Store_Text (urj_bsdl_vhdl_parser_priv_t *priv, char *Source)
Store_Text (urj_vhdl_parser_priv_t *priv, char *Source)
{ /* Save characters from VHDL string in local string buffer. */
size_t req_len;
char *SourceEnd;
@ -660,7 +660,7 @@ Store_Text (urj_bsdl_vhdl_parser_priv_t *priv, char *Source)
/*----------------------------------------------------------------------*/
static void
Print_Error (urj_bsdl_vhdl_parser_priv_t *priv_data, const char *Errmess)
Print_Error (urj_vhdl_parser_priv_t *priv_data, const char *Errmess)
{
urj_bsdl_jtag_ctrl_t *jc = priv_data->jtag_ctrl;
@ -677,20 +677,20 @@ Print_Error (urj_bsdl_vhdl_parser_priv_t *priv_data, const char *Errmess)
/*----------------------------------------------------------------------*/
static void
Give_Up_And_Quit (urj_bsdl_vhdl_parser_priv_t *priv_data)
Give_Up_And_Quit (urj_vhdl_parser_priv_t *priv_data)
{
Print_Error (priv_data, _("Too many errors"));
}
/*----------------------------------------------------------------------*/
void
yyerror (urj_bsdl_vhdl_parser_priv_t *priv_data, const char *error_string)
yyerror (urj_vhdl_parser_priv_t *priv_data, const char *error_string)
{
}
/*****************************************************************************
* void urj_vhdl_sem_init( urj_bsdl_vhdl_parser_priv_t *priv )
* void urj_vhdl_sem_init( urj_vhdl_parser_priv_t *priv )
*
* Initializes storage elements in the private parser and jtag control
* structures that are used for semantic purposes.
@ -702,7 +702,7 @@ yyerror (urj_bsdl_vhdl_parser_priv_t *priv_data, const char *error_string)
* void
****************************************************************************/
static void
urj_vhdl_sem_init (urj_bsdl_vhdl_parser_priv_t *priv)
urj_vhdl_sem_init (urj_vhdl_parser_priv_t *priv)
{
priv->tmp_port_desc.names_list = NULL;
priv->tmp_port_desc.next = NULL;
@ -765,7 +765,7 @@ free_port_list (urj_bsdl_port_desc_t *pl, int free_me)
/*****************************************************************************
* void free_elem_list( urj_bsdl_vhdl_elem_t *el )
* void free_elem_list( urj_vhdl_elem_t *el )
*
* Deallocates the given list of vhdl_elem items.
*
@ -776,7 +776,7 @@ free_port_list (urj_bsdl_port_desc_t *pl, int free_me)
* void
****************************************************************************/
static void
free_elem_list (urj_bsdl_vhdl_elem_t *el)
free_elem_list (urj_vhdl_elem_t *el)
{
if (el)
{
@ -793,7 +793,7 @@ free_elem_list (urj_bsdl_vhdl_elem_t *el)
/*****************************************************************************
* void urj_vhdl_sem_deinit( urj_bsdl_vhdl_parser_priv_t *priv )
* void urj_vhdl_sem_deinit( urj_vhdl_parser_priv_t *priv )
*
* Frees and deinitializes storage elements in the private parser and
* jtag control structures that were filled by semantic rules.
@ -805,10 +805,10 @@ free_elem_list (urj_bsdl_vhdl_elem_t *el)
* void
****************************************************************************/
static void
urj_vhdl_sem_deinit (urj_bsdl_vhdl_parser_priv_t *priv_data)
urj_vhdl_sem_deinit (urj_vhdl_parser_priv_t *priv_data)
{
urj_bsdl_port_desc_t *pd = priv_data->jtag_ctrl->port_desc;
urj_bsdl_vhdl_elem_t *el = priv_data->jtag_ctrl->vhdl_elem_first;
urj_vhdl_elem_t *el = priv_data->jtag_ctrl->vhdl_elem_first;
/* free port_desc list */
free_port_list (pd, 1);
@ -822,7 +822,7 @@ urj_vhdl_sem_deinit (urj_bsdl_vhdl_parser_priv_t *priv_data)
/*****************************************************************************
* urj_bsdl_vhdl_parser_priv_t *urj_vhdl_parser_init( FILE *f, urj_bsdl_jtag_ctrl_t *jtag_ctrl )
* urj_vhdl_parser_priv_t *urj_vhdl_parser_init( FILE *f, urj_bsdl_jtag_ctrl_t *jtag_ctrl )
*
* Initializes storage elements in the private parser structure that are
* used for parser maintenance purposes.
@ -836,12 +836,12 @@ urj_vhdl_sem_deinit (urj_bsdl_vhdl_parser_priv_t *priv_data)
* Returns
* pointer to private parser structure
****************************************************************************/
urj_bsdl_vhdl_parser_priv_t *
urj_vhdl_parser_priv_t *
urj_vhdl_parser_init (FILE *f, urj_bsdl_jtag_ctrl_t *jtag_ctrl)
{
urj_bsdl_vhdl_parser_priv_t *new_priv;
urj_vhdl_parser_priv_t *new_priv;
if (!(new_priv = malloc (sizeof (urj_bsdl_vhdl_parser_priv_t))))
if (!(new_priv = malloc (sizeof (urj_vhdl_parser_priv_t))))
{
urj_bsdl_msg (jtag_ctrl->proc_mode,
BSDL_MSG_ERR, _("Out of memory, %s line %i\n"),
@ -868,7 +868,7 @@ urj_vhdl_parser_init (FILE *f, urj_bsdl_jtag_ctrl_t *jtag_ctrl)
/*****************************************************************************
* void urj_vhdl_parser_deinit( urj_bsdl_vhdl_parser_priv_t *priv )
* void urj_vhdl_parser_deinit( urj_vhdl_parser_priv_t *priv )
*
* Frees storage elements in the private parser structure that are
* used for parser maintenance purposes.
@ -882,7 +882,7 @@ urj_vhdl_parser_init (FILE *f, urj_bsdl_jtag_ctrl_t *jtag_ctrl)
* void
****************************************************************************/
void
urj_vhdl_parser_deinit (urj_bsdl_vhdl_parser_priv_t *priv_data)
urj_vhdl_parser_deinit (urj_vhdl_parser_priv_t *priv_data)
{
if (priv_data->buffer)
{
@ -896,7 +896,7 @@ urj_vhdl_parser_deinit (urj_bsdl_vhdl_parser_priv_t *priv_data)
}
/*****************************************************************************
* void urj_vhdl_set_entity( urj_bsdl_vhdl_parser_priv_t *priv, char *entityname )
* void urj_vhdl_set_entity( urj_vhdl_parser_priv_t *priv, char *entityname )
*
* Applies the entity name from BSDL as the part name.
*
@ -908,7 +908,7 @@ urj_vhdl_parser_deinit (urj_bsdl_vhdl_parser_priv_t *priv_data)
* void
****************************************************************************/
static void
urj_vhdl_set_entity (urj_bsdl_vhdl_parser_priv_t *priv, char *entityname)
urj_vhdl_set_entity (urj_vhdl_parser_priv_t *priv, char *entityname)
{
if (priv->jtag_ctrl->proc_mode & URJ_BSDL_MODE_INSTR_EXEC)
{
@ -921,7 +921,7 @@ urj_vhdl_set_entity (urj_bsdl_vhdl_parser_priv_t *priv, char *entityname)
}
/*****************************************************************************
* void urj_vhdl_port_add_name( urj_bsdl_vhdl_parser_priv_t *priv, char *name )
* void urj_vhdl_port_add_name( urj_vhdl_parser_priv_t *priv, char *name )
* Port name management function
*
* Sets the name field of the temporary storage area for port description
@ -935,7 +935,7 @@ urj_vhdl_set_entity (urj_bsdl_vhdl_parser_priv_t *priv, char *entityname)
* void
****************************************************************************/
static void
urj_vhdl_port_add_name (urj_bsdl_vhdl_parser_priv_t *priv, char *name)
urj_vhdl_port_add_name (urj_vhdl_parser_priv_t *priv, char *name)
{
urj_bsdl_port_desc_t *pd = &(priv->tmp_port_desc);
urj_bsdl_string_elem_t *new_string;
@ -956,7 +956,7 @@ urj_vhdl_port_add_name (urj_bsdl_vhdl_parser_priv_t *priv, char *name)
/*****************************************************************************
* void urj_vhdl_port_add_bit( urj_bsdl_vhdl_parser_priv_t *priv )
* void urj_vhdl_port_add_bit( urj_vhdl_parser_priv_t *priv )
* Port name management function
*
* Sets the vector and index fields of the temporary storage area for port
@ -970,7 +970,7 @@ urj_vhdl_port_add_name (urj_bsdl_vhdl_parser_priv_t *priv, char *name)
* void
****************************************************************************/
static void
urj_vhdl_port_add_bit (urj_bsdl_vhdl_parser_priv_t *priv)
urj_vhdl_port_add_bit (urj_vhdl_parser_priv_t *priv)
{
urj_bsdl_port_desc_t *pd = &(priv->tmp_port_desc);
@ -981,7 +981,7 @@ urj_vhdl_port_add_bit (urj_bsdl_vhdl_parser_priv_t *priv)
/*****************************************************************************
* void urj_vhdl_port_add_range( urj_bsdl_vhdl_parser_priv_t *priv, int low, int high )
* void urj_vhdl_port_add_range( urj_vhdl_parser_priv_t *priv, int low, int high )
* Port name management function
*
* Sets the vector and index fields of the temporary storage area for port
@ -996,7 +996,7 @@ urj_vhdl_port_add_bit (urj_bsdl_vhdl_parser_priv_t *priv)
* void
****************************************************************************/
static void
urj_vhdl_port_add_range (urj_bsdl_vhdl_parser_priv_t *priv, int low,
urj_vhdl_port_add_range (urj_vhdl_parser_priv_t *priv, int low,
int high)
{
urj_bsdl_port_desc_t *pd = &(priv->tmp_port_desc);
@ -1007,7 +1007,7 @@ urj_vhdl_port_add_range (urj_bsdl_vhdl_parser_priv_t *priv, int low,
}
/*****************************************************************************
* void urj_vhdl_port_apply_port( urj_bsdl_vhdl_parser_priv_t *priv )
* void urj_vhdl_port_apply_port( urj_vhdl_parser_priv_t *priv )
* Port name management function
*
* Applies the current temporary port description to the final list
@ -1020,7 +1020,7 @@ urj_vhdl_port_add_range (urj_bsdl_vhdl_parser_priv_t *priv, int low,
* void
****************************************************************************/
static void
urj_vhdl_port_apply_port (urj_bsdl_vhdl_parser_priv_t *priv)
urj_vhdl_port_apply_port (urj_vhdl_parser_priv_t *priv)
{
urj_bsdl_port_desc_t *tmp_pd = &(priv->tmp_port_desc);
urj_bsdl_port_desc_t *pd = malloc (sizeof (urj_bsdl_port_desc_t));
@ -1048,7 +1048,7 @@ urj_vhdl_port_apply_port (urj_bsdl_vhdl_parser_priv_t *priv)
}
static void
add_elem (urj_bsdl_vhdl_parser_priv_t *priv, urj_bsdl_vhdl_elem_t *el)
add_elem (urj_vhdl_parser_priv_t *priv, urj_vhdl_elem_t *el)
{
urj_bsdl_jtag_ctrl_t *jc = priv->jtag_ctrl;
@ -1065,9 +1065,9 @@ add_elem (urj_bsdl_vhdl_parser_priv_t *priv, urj_bsdl_vhdl_elem_t *el)
#if 0
static void
set_attr_bool (urj_bsdl_vhdl_parser_priv_t *priv, char *name, int value)
set_attr_bool (urj_vhdl_parser_priv_t *priv, char *name, int value)
{
urj_bsdl_vhdl_elem_t *el = malloc (sizeof (urj_bsdl_vhdl_elem_t));
urj_vhdl_elem_t *el = malloc (sizeof (urj_vhdl_elem_t));
if (el)
{
@ -1084,9 +1084,9 @@ set_attr_bool (urj_bsdl_vhdl_parser_priv_t *priv, char *name, int value)
#endif
static void
set_attr_decimal (urj_bsdl_vhdl_parser_priv_t *priv, char *name, int value)
set_attr_decimal (urj_vhdl_parser_priv_t *priv, char *name, int value)
{
urj_bsdl_vhdl_elem_t *el = malloc (sizeof (urj_bsdl_vhdl_elem_t));
urj_vhdl_elem_t *el = malloc (sizeof (urj_vhdl_elem_t));
char *string = malloc (10);
if (el && string)
@ -1105,9 +1105,9 @@ set_attr_decimal (urj_bsdl_vhdl_parser_priv_t *priv, char *name, int value)
}
static void
set_attr_string (urj_bsdl_vhdl_parser_priv_t *priv, char *name, char *string)
set_attr_string (urj_vhdl_parser_priv_t *priv, char *name, char *string)
{
urj_bsdl_vhdl_elem_t *el = malloc (sizeof (urj_bsdl_vhdl_elem_t));
urj_vhdl_elem_t *el = malloc (sizeof (urj_vhdl_elem_t));
/* skip certain attributes */
if ((strcasecmp (name, "DESIGN_WARNING") == 0)
@ -1138,9 +1138,9 @@ set_attr_string (urj_bsdl_vhdl_parser_priv_t *priv, char *name, char *string)
#if 0
static void
set_attr_real (urj_bsdl_vhdl_parser_priv_t *priv, char *name, char *string)
set_attr_real (urj_vhdl_parser_priv_t *priv, char *name, char *string)
{
urj_bsdl_vhdl_elem_t *el = malloc (sizeof (urj_bsdl_vhdl_elem_t));
urj_vhdl_elem_t *el = malloc (sizeof (urj_vhdl_elem_t));
if (el)
{
@ -1158,9 +1158,9 @@ set_attr_real (urj_bsdl_vhdl_parser_priv_t *priv, char *name, char *string)
#if 0
static void
set_attr_const (urj_bsdl_vhdl_parser_priv_t *priv, char *name, char *string)
set_attr_const (urj_vhdl_parser_priv_t *priv, char *name, char *string)
{
urj_bsdl_vhdl_elem_t *el = malloc (sizeof (urj_bsdl_vhdl_elem_t));
urj_vhdl_elem_t *el = malloc (sizeof (urj_vhdl_elem_t));
if (el)
{

@ -453,7 +453,7 @@ yywrap (yyscan_t scanner)
* pointer to allocated and initialized string memory
****************************************************************************/
static char *
new_string (urj_bsdl_scan_extra_t * extra, const char *str)
new_string (urj_bsdl_scan_extra_t *extra, const char *str)
{
char *n_str;
size_t n_str_size;

@ -36,9 +36,9 @@ int urj_vhdl_flex_postinc_compile_errors (void *);
int urj_vhdl_flex_get_lineno (void *);
/* VHDL parser declarations */
urj_bsdl_vhdl_parser_priv_t *urj_vhdl_parser_init (FILE *,
urj_bsdl_jtag_ctrl_t *);
void urj_vhdl_parser_deinit (urj_bsdl_vhdl_parser_priv_t *);
int urj_vhdl_parse (urj_bsdl_vhdl_parser_priv_t *);
urj_vhdl_parser_priv_t *urj_vhdl_parser_init (FILE *,
urj_bsdl_jtag_ctrl_t *);
void urj_vhdl_parser_deinit (urj_vhdl_parser_priv_t *);
int urj_vhdl_parse (urj_vhdl_parser_priv_t *);
#endif /* URJ_VHDL_PARSER_H */

@ -38,7 +38,7 @@
#include <urjtag/jtag.h>
void
urj_bus_readmem (urj_bus_t *bus, FILE * f, uint32_t addr, uint32_t len)
urj_bus_readmem (urj_bus_t *bus, FILE *f, uint32_t addr, uint32_t len)
{
uint32_t step;
uint32_t a;

@ -31,7 +31,7 @@
#include <urjtag/jtag.h>
void
urj_bus_writemem (urj_bus_t *bus, FILE * f, uint32_t addr, uint32_t len)
urj_bus_writemem (urj_bus_t *bus, FILE *f, uint32_t addr, uint32_t len)
{
uint32_t step;
uint32_t a;

@ -38,7 +38,7 @@ cmd_peek_run (urj_chain_t *chain, char *params[])
int pars, j = 1;
urj_bus_area_t area;
/* urj_bus_t * bus = part_get_active_bus(chain); */
/* urj_bus_t *bus = part_get_active_bus(chain); */
if ((pars = urj_cmd_params (params)) < 2)
return -1;
@ -100,7 +100,7 @@ cmd_poke_run (urj_chain_t *chain, char *params[])
{
uint32_t adr, val;
urj_bus_area_t area;
/*urj_bus_t * bus = part_get_active_bus(chain); */
/*urj_bus_t *bus = part_get_active_bus(chain); */
int k = 1, pars = urj_cmd_params (params);
if (pars < 3 || !(pars & 1))

@ -103,7 +103,7 @@ urj_flash_cfi_detect (urj_bus_t *bus, uint32_t adr,
#define D(data) ((data) << d)
#define gD(data) (((data) >> d) & 0xFF)
#define read1(off) gD(URJ_BUS_READ( bus, A(off) ))
#define read2(off) (URJ_BUS_READ_START( bus, A(off) ), gD(URJ_BUS_READ_NEXT( bus, A((off) + 1) )) | gD(URJ_BUS_READ_END( bus )) << 8)
#define read2(off) (URJ_BUS_READ_START (bus, A(off)), gD (URJ_BUS_READ_NEXT (bus, A((off) + 1))) | gD (URJ_BUS_READ_END (bus)) << 8)
#define write1(off,data) URJ_BUS_WRITE( bus, A(off), D(data) )
urj_flash_cfi_query_structure_t *cfi;
@ -252,7 +252,7 @@ urj_flash_cfi_detect (urj_bus_t *bus, uint32_t adr,
uint8_t num_of_banks;
int i;
#undef A
#define A(off) (adr + (pri_vendor_tbl_adr + off) * ba * ma)
#define A(off) (adr + (pri_vendor_tbl_adr + (off)) * ba * ma)
if (read1 (0) != 'P' || read1 (1) != 'R' || read1 (2) != 'I')
{

@ -95,7 +95,7 @@ set_flash_driver (void)
}
void
urj_flashmsbin (urj_bus_t *bus, FILE * f, int noverify)
urj_flashmsbin (urj_bus_t *bus, FILE *f, int noverify)
{
uint32_t adr;
urj_flash_cfi_query_structure_t *cfi;

@ -121,7 +121,7 @@ urj_parse_line (urj_chain_t *chain, char *line)
int
urj_parse_stream (urj_chain_t *chain, FILE * f)
urj_parse_stream (urj_chain_t *chain, FILE *f)
{
char inputline[MAXINPUTLINE + 1];
int go = 1, i, c, lnr, clip, found_comment;

@ -138,7 +138,6 @@ urj_jim_tck_rise (urj_jim_state_t *s, int tms, int tdi)
{
urj_jim_device_t *dev;
for (dev = s->last_device_in_chain; dev; dev = dev->prev)
{
int dev_tdi;

@ -33,7 +33,7 @@
#define GETDELIM_BUFFER 128
ssize_t
urj_lib_getdelim (char **lineptr, size_t *n, int delimiter, FILE * stream)
urj_lib_getdelim (char **lineptr, size_t *n, int delimiter, FILE *stream)
{
char *p;
int c;

@ -31,11 +31,11 @@
#ifndef HAVE_GETDELIM
ssize_t urj_lib_getdelim (char **lineptr, size_t *n, int delimiter,
FILE * stream);
FILE *stream);
#endif /* HAVE_GETDELIM */
ssize_t
urj_lib_getline (char **lineptr, size_t *n, FILE * stream)
urj_lib_getline (char **lineptr, size_t *n, FILE *stream)
{
return urj_lib_getdelim (lineptr, n, '\n', stream);
}

Loading…
Cancel
Save