Skip to content

Commit

Permalink
Testfiles - Add generation of C header files for blkprefix 3
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanlippuner committed Jul 18, 2024
1 parent 3ce5075 commit 448db20
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 1 deletion.
3 changes: 2 additions & 1 deletion proto/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,8 @@ def test_genc_ref():
for f in ['issue103/top',
'bug-gen-c-02/mbox_regs', 'bug-gen-c-02/fip_urv_regs',
'issue67/repeatInRepeat', 'issue67/repeatInRepeatC',
'bug-same-label/same_label']:
'bug-same-label/same_label',
'features/blkprefix3', 'features/blkprefix4']:
h_file = srcdir + f + '.h'
cheby_file = srcdir + f + '.cheby'
t = parse_ok(cheby_file)
Expand Down
51 changes: 51 additions & 0 deletions testfiles/features/blkprefix3.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#ifndef __CHEBY__BLKPREFIX3__H__
#define __CHEBY__BLKPREFIX3__H__

#include <stdint.h>

#define BLKPREFIX3_SIZE 12 /* 0xc */

/* (comment missing) */
#define BLKPREFIX3_B1 0x0UL
#define BLKPREFIX3_B1_SIZE 8 /* 0x8 */

/* (comment missing) */
#define BLKPREFIX3_B1_R2 0x0UL
#define BLKPREFIX3_B1_R2_F1_MASK 0x7UL
#define BLKPREFIX3_B1_R2_F1_SHIFT 0
#define BLKPREFIX3_B1_R2_F2 0x10UL

/* (comment missing) */
#define BLKPREFIX3_B1_R3 0x4UL
#define BLKPREFIX3_B1_R3_F1_MASK 0x7UL
#define BLKPREFIX3_B1_R3_F1_SHIFT 0
#define BLKPREFIX3_B1_R3_F2 0x10UL

/* (comment missing) */
#define BLKPREFIX3_B2 0x8UL
#define BLKPREFIX3_B2_SIZE 4 /* 0x4 */

/* (comment missing) */
#define BLKPREFIX3_B2_R3 0x8UL
#define BLKPREFIX3_B2_R3_F1_MASK 0x7UL
#define BLKPREFIX3_B2_R3_F1_SHIFT 0

#ifndef __ASSEMBLER__
struct blkprefix3 {
/* [0x0]: BLOCK (comment missing) */
/* [0x0]: REG (rw) (comment missing) */
uint32_t r2;

/* [0x4]: BLOCK (comment missing) */
/* [0x0]: REG (rw) (comment missing) */
uint32_t r3;

/* [0x8]: BLOCK (comment missing) */
struct b2 {
/* [0x0]: REG (rw) (comment missing) */
uint32_t r3;
} b2;
};
#endif /* !__ASSEMBLER__*/

#endif /* __CHEBY__BLKPREFIX3__H__ */

0 comments on commit 448db20

Please sign in to comment.