1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/src/tools/genmach.h Mon Mar 15 22:10:24 2010 +1000
1.7 + * mmio register code generator
1.9 + * Copyright (c) 2010 Nathan Keynes.
1.11 + * This program is free software; you can redistribute it and/or modify
1.12 + * it under the terms of the GNU General Public License as published by
1.13 + * the Free Software Foundation; either version 2 of the License, or
1.14 + * (at your option) any later version.
1.16 + * This program is distributed in the hope that it will be useful,
1.17 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
1.18 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1.19 + * GNU General Public License for more details.
1.22 +#ifndef lxdream_genmmio_H
1.23 +#define lxdream_genmmio_H 1
1.25 +#include <stdint.h>
1.26 +#include <glib/glist.h>
1.37 + REG_MIRROR, /* Additional address for an existing register - value is the offset of the target reg */
1.54 +} register_endian_t;
1.61 +} register_access_t;
1.67 +} register_trace_t;
1.82 + const char *filename;
1.87 +typedef struct regflags {
1.88 + register_endian_t endian;
1.89 + register_access_t access;
1.90 + register_trace_t traceFlag;
1.91 + register_test_t testFlag;
1.92 + union apval maskValue;
1.93 + unsigned int fillSizeBytes;
1.94 + union apval fillValue;
1.97 +typedef struct regdef {
1.99 + const char *description;
1.101 + unsigned numBytes;
1.102 + unsigned numElements;
1.104 + register_mode_t mode;
1.105 + register_type_t type;
1.106 + gboolean initUndefined;
1.107 + union apval initValue;
1.108 + struct regflags flags;
1.109 + struct action *action;
1.112 +typedef struct regblock {
1.113 + const char *name;
1.114 + const char *description;
1.115 + uint32_t address;
1.116 + struct regflags flags;
1.117 + unsigned numRegs;
1.118 + unsigned blockSize;
1.124 +GList *ioparse( const char *filename, GList *list );
1.126 +#ifdef __cplusplus
1.130 +#endif /* !lxdream_genmmio_H */