#define CPU_UNKNOWN 0
#define CPU_ARMV8 1
#define CPU_CORTEXA57 2
+#define CPU_VULCAN 3
static char *cpuname[] = {
"UNKNOWN",
"ARMV8" ,
"CORTEXA57"
+ "VULCAN"
};
static char *cpuname_lower[] = {
"unknown",
"armv8" ,
"cortexa57"
+ "vulcan"
};
int get_feature(char *search)
#ifdef linux
FILE *infile;
- char buffer[512], *p;
+ char buffer[512], *p, *cpu_part, *cpu_implementer;
p = (char *) NULL ;
infile = fopen("/proc/cpuinfo", "r");
- while (fgets(buffer, sizeof(buffer), infile))
- {
+ while (fgets(buffer, sizeof(buffer), infile)) {
- if (!strncmp("CPU part", buffer, 8))
- {
- p = strchr(buffer, ':') + 2;
+ if (!strncmp("CPU part", buffer, 8)) {
+ cpu_part = strchr(buffer, ':') + 2;
+ break;
+ } else if (!strncmp("CPU implementer", buffer, 15)) {
+ cpu_implementer = strchr(buffer, ':') + 2;
break;
}
}
fclose(infile);
- if(p != NULL) {
- if (strstr(p, "0xd07")) {
- return CPU_CORTEXA57;
- }
+ if(cpu_part != NULL && cpu_implementer != NULL) {
+ if (strstr(cpu_part, "0xd07") && strstr(cpu_implementer, "0x41"))
+ return CPU_CORTEXA57;
+ else if (strstr(cpu_part, "0x516") && strstr(cpu_implementer, "0x42"))
+ return CPU_VULCAN;
}
p = (char *) NULL ;
printf("#define L2_ASSOCIATIVE 4\n");
break;
+ case CPU_VULCAN:
+ printf("#define VULCAN \n");
+ printf("#define HAVE_VFP \n");
+ printf("#define HAVE_VFPV3 \n");
+ printf("#define HAVE_NEON \n");
+ printf("#define HAVE_VFPV4 \n");
+ printf("#define L1_CODE_SIZE 32768 \n");
+ printf("#define L1_CODE_LINESIZE 64 \n");
+ printf("#define L1_CODE_ASSOCIATIVE 8 \n");
+ printf("#define L1_DATA_SIZE 32768 \n");
+ printf("#define L1_DATA_LINESIZE 64 \n");
+ printf("#define L1_DATA_ASSOCIATIVE 8 \n");
+ printf("#define L2_SIZE 262144 \n");
+ printf("#define L2_LINESIZE 64 \n");
+ printf("#define L2_ASSOCIATIVE 8 \n");
+ printf("#define L3_SIZE 33554432 \n");
+ printf("#define L3_LINESIZE 64 \n");
+ printf("#define L3_ASSOCIATIVE 32 \n");
+ printf("#define DTB_DEFAULT_ENTRIES 64 \n");
+ printf("#define DTB_SIZE 4096 \n");
+ break;
+
case CPU_CORTEXA57:
printf("#define CORTEXA57\n");
printf("#define HAVE_VFP\n");
printf("#define L2_SIZE 2097152\n");
printf("#define L2_LINESIZE 64\n");
printf("#define L2_ASSOCIATIVE 16\n");
- printf("#define DTB_DEFAULT_ENTRIES 64\n");
- printf("#define DTB_SIZE 4096\n");
+ printf("#define DTB_DEFAULT_ENTRIES 64\n");
+ printf("#define DTB_SIZE 4096\n");
break;
}
}
#else
#endif
+#ifdef FORCE_VULCAN
+#define FORCE
+#define ARCHITECTURE "ARM64"
+#define SUBARCHITECTURE "ARMV8"
+#define SUBDIRNAME "arm64"
+#define ARCHCONFIG "-DVULCAN " \
+ "-DL1_CODE_SIZE=32768 -DL1_CODE_LINESIZE=64 -DL1_CODE_ASSOCIATIVE=8 " \
+ "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 -DL1_DATA_ASSOCIATIVE=8 " \
+ "-DL2_SIZE=262144 -DL2_LINESIZE=64 -DL2_ASSOCIATIVE=8 " \
+ "-DL3_SIZE=33554432 -DL3_LINESIZE=64 -DL3_ASSOCIATIVE=32 " \
+ "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
+ "-DHAVE_VFPV4 -DHAVE_VFPV3 -DHAVE_VFP -DHAVE_NEON"
+#define LIBNAME "vulcan"
+#define CORENAME "VULCAN"
+#else
+#endif
+
#ifndef FORCE
#if defined(__powerpc__) || defined(__powerpc) || defined(powerpc) || \
#define SYMV_P 16
#endif
+#if defined(VULCAN)
+#define SNUMOPT 2
+#define DNUMOPT 2
+
+#define GEMM_DEFAULT_OFFSET_A 0
+#define GEMM_DEFAULT_OFFSET_B 0
+#define GEMM_DEFAULT_ALIGN 0x03fffUL
+
+#define SGEMM_DEFAULT_UNROLL_M 16
+#define SGEMM_DEFAULT_UNROLL_N 4
+
+#define DGEMM_DEFAULT_UNROLL_M 8
+#define DGEMM_DEFAULT_UNROLL_N 4
+
+#define CGEMM_DEFAULT_UNROLL_M 8
+#define CGEMM_DEFAULT_UNROLL_N 4
+
+#define ZGEMM_DEFAULT_UNROLL_M 4
+#define ZGEMM_DEFAULT_UNROLL_N 4
+
+#define SGEMM_DEFAULT_P 512
+#define DGEMM_DEFAULT_P dgemm_p
+#define CGEMM_DEFAULT_P 256
+#define ZGEMM_DEFAULT_P 128
+
+#define SGEMM_DEFAULT_Q 1024
+#define DGEMM_DEFAULT_Q dgemm_q
+#define CGEMM_DEFAULT_Q 512
+#define ZGEMM_DEFAULT_Q 512
+
+#define SGEMM_DEFAULT_R 4096
+#define DGEMM_DEFAULT_R dgemm_r
+#define CGEMM_DEFAULT_R 4096
+#define ZGEMM_DEFAULT_R 2048
+
+#define SYMV_P 16
+#endif
+
#if defined(CORTEXA57)
#define SNUMOPT 2