From 29be1e31688039c7a4d66ca2f1565e8427f3fac5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Lanzend=C3=B6rfer?= <leviathan@libresilicon.com> Date: Fri, 28 Jun 2024 14:03:34 +0100 Subject: [PATCH] Moving header into include dir --- firmware/include/ctype.h | 15 ++++++++++++ firmware/include/defines.h | 5 ++++ firmware/{ => include}/io.h | 0 firmware/{ => include}/rnn.h | 0 firmware/include/stdlib.h | 43 +++++++++++++++++++++++++++++++++ firmware/{ => include}/string.h | 0 6 files changed, 63 insertions(+) create mode 100644 firmware/include/ctype.h create mode 100644 firmware/include/defines.h rename firmware/{ => include}/io.h (100%) rename firmware/{ => include}/rnn.h (100%) create mode 100644 firmware/include/stdlib.h rename firmware/{ => include}/string.h (100%) diff --git a/firmware/include/ctype.h b/firmware/include/ctype.h new file mode 100644 index 0000000..b227864 --- /dev/null +++ b/firmware/include/ctype.h @@ -0,0 +1,15 @@ +/* + * Copyright (C) 2014, Galois, Inc. + * This sotware is distributed under a standard, three-clause BSD license. + * Please see the file LICENSE, distributed with this software, for specific + * terms and conditions. + */ +#ifndef MINLIBC_CTYPE_H +#define MINLIBC_CTYPE_H + +int isdigit(int c); +int isspace(int c); +int tolower(int c); +int toupper(int c); + +#endif diff --git a/firmware/include/defines.h b/firmware/include/defines.h new file mode 100644 index 0000000..d6dd6b8 --- /dev/null +++ b/firmware/include/defines.h @@ -0,0 +1,5 @@ +#define NUM_BITS_PER_TOKEN 16 +#define NUM_INPUT_NEURONS 5 +#define NUM_OUTPUT_NEURONS 16 +#define NUM_HIDDEN_NEURONS_W 5 +#define NUM_HIDDEN_NEURONS_H 6 diff --git a/firmware/io.h b/firmware/include/io.h similarity index 100% rename from firmware/io.h rename to firmware/include/io.h diff --git a/firmware/rnn.h b/firmware/include/rnn.h similarity index 100% rename from firmware/rnn.h rename to firmware/include/rnn.h diff --git a/firmware/include/stdlib.h b/firmware/include/stdlib.h new file mode 100644 index 0000000..f116c4c --- /dev/null +++ b/firmware/include/stdlib.h @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2014, Galois, Inc. + * This sotware is distributed under a standard, three-clause BSD license. + * Please see the file LICENSE, distributed with this software, for specific + * terms and conditions. + */ +#ifndef MINLIBC_STDLIB_H +#define MINLIBC_STDLIB_H + +#define NULL 0 +#define EXIT_SUCCESS 0 +#define EXIT_FAILURE 1 + +typedef unsigned long int size_t; + +double atof(const char *nptr); +int atoi(const char *nptr); +long int strtol(const char *nptr, char **endptr, int base); +unsigned long long strtoull (const char *__restrict, char **__restrict, int); + +char *getenv(const char *name); +void abort(void) __attribute__((noreturn)); +void exit(int status) __attribute__((noreturn)); + +void *malloc(size_t size); +void *realloc(void *ptr, size_t size); +void *calloc(size_t nmemb, size_t size); +void free(void *ptr); + +int mkstemp(char *template); + +void *bsearch(const void *, const void *, size_t, size_t, + int (*)(const void *, const void *)); + +int putenv(char *str); +int unsetenv(const char *name); + +int abs(int j); + +int rand (void); +void srand (unsigned); + +#endif diff --git a/firmware/string.h b/firmware/include/string.h similarity index 100% rename from firmware/string.h rename to firmware/include/string.h -- GitLab