#ifndef __ALT_TYPES_H__
#define __ALT_TYPES_H__
/*
* Don't declare these typedefs if this file is included by assembly source.
*/
#ifndef ALT_ASM_SRC
typedef signed char alt_8;
typedef unsigned char alt_u8;
typedef signed short alt_16;
typedef unsigned short alt_u16;
typedef signed long alt_32;
typedef unsigned long alt_u32;
typedef long long alt_64;
typedef unsigned long long alt_u64;
#endif
#define ALT_INLINE __inline__
#define ALT_ALWAYS_INLINE __attribute__ ((always_inline))
#define ALT_WEAK __attribute__((weak))
#endif /* __ALT_TYPES_H__ */
首先,我们要知道#inlcude “alt_types.h”是altera公司提供的库仔细读一下以上程序,其实我们不难看出,alt_types.h文件的定义规则: alt_表示(符号位)(位数) ,其中符号位u表示无符号位,位数为比特位。