diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2023-04-30 17:47:00 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2023-04-30 17:47:00 +0300 |
| commit | d133cc70b125efc1d6c992cb49ce1bca41cf580e (patch) | |
| tree | 0f7c2352f6a83b6603304a877f9c02de21ba5fab /include | |
| parent | 3e74b081dba17f12a1661e9e4db6b41a02a78861 (diff) | |
| download | gran-d133cc70b125efc1d6c992cb49ce1bca41cf580e.tar.gz gran-d133cc70b125efc1d6c992cb49ce1bca41cf580e.zip | |
refactor component tree
Diffstat (limited to 'include')
| -rw-r--r-- | include/gran/bus/simple_bus.h (renamed from include/gran/components/bus/simple_bus.h) | 6 | ||||
| -rw-r--r-- | include/gran/clock_domain.h | 6 | ||||
| -rw-r--r-- | include/gran/common.h | 6 | ||||
| -rw-r--r-- | include/gran/component.h | 6 | ||||
| -rw-r--r-- | include/gran/components/mem/simple_mem.h | 8 | ||||
| -rw-r--r-- | include/gran/cpu/riscv/simple_riscv32.h | 8 | ||||
| -rw-r--r-- | include/gran/mem/simple_mem.h | 8 | ||||
| -rw-r--r-- | include/gran/root.h | 6 |
8 files changed, 31 insertions, 23 deletions
diff --git a/include/gran/components/bus/simple_bus.h b/include/gran/bus/simple_bus.h index 3a5f814..c569e8a 100644 --- a/include/gran/components/bus/simple_bus.h +++ b/include/gran/bus/simple_bus.h @@ -1,5 +1,5 @@ -#ifndef EXSIM_SIMPLE_BUS_H -#define EXSIM_SIMPLE_BUS_H +#ifndef GRAN_SIMPLE_BUS_H +#define GRAN_SIMPLE_BUS_H #include <stdint.h> @@ -7,4 +7,4 @@ struct component *create_simple_bus(); stat simple_bus_add(struct component *bus, struct component *component, uintptr_t addr, size_t size); -#endif /* EXSIM_SIMPLE_BUS_H */ +#endif /* GRAN_SIMPLE_BUS_H */ diff --git a/include/gran/clock_domain.h b/include/gran/clock_domain.h index 3f960ae..9fb04a4 100644 --- a/include/gran/clock_domain.h +++ b/include/gran/clock_domain.h @@ -1,5 +1,5 @@ -#ifndef EXSIM_CLOCK_DOMAIN_H -#define EXSIM_CLOCK_DOMAIN_H +#ifndef GRAN_CLOCK_DOMAIN_H +#define GRAN_CLOCK_DOMAIN_H #include <stdint.h> #include <stdbool.h> @@ -37,4 +37,4 @@ bool le_time(struct clock_time a, struct clock_time b); struct clock_time max_time(struct clock_time a, struct clock_time b); struct clock_time domain_time(struct clock_domain *); -#endif /* EXSIM_CLOCK_DOMAIN_H */ +#endif /* GRAN_CLOCK_DOMAIN_H */ diff --git a/include/gran/common.h b/include/gran/common.h index c012c49..b4b8978 100644 --- a/include/gran/common.h +++ b/include/gran/common.h @@ -1,5 +1,5 @@ -#ifndef EXSIM_COMMON_H -#define EXSIM_COMMON_H +#ifndef GRAN_COMMON_H +#define GRAN_COMMON_H #include <stdio.h> @@ -31,4 +31,4 @@ typedef enum { #define debug(x, ...) #endif -#endif /* EXSIM_COMMON_H */ +#endif /* GRAN_COMMON_H */ diff --git a/include/gran/component.h b/include/gran/component.h index cd21a6b..498d7c0 100644 --- a/include/gran/component.h +++ b/include/gran/component.h @@ -1,5 +1,5 @@ -#ifndef EXSIM_COMPONENT_H -#define EXSIM_COMPONENT_H +#ifndef GRAN_COMPONENT_H +#define GRAN_COMPONENT_H #include <stdint.h> #include <stdio.h> @@ -104,4 +104,4 @@ static inline stat swap_u8(struct component *component, uintptr_t addr, return swap(component, addr, sizeof(uint8_t), c, sizeof(uint8_t), c); } -#endif /* EXSIM_COMPONENT_H */ +#endif /* GRAN_COMPONENT_H */ diff --git a/include/gran/components/mem/simple_mem.h b/include/gran/components/mem/simple_mem.h deleted file mode 100644 index 8e0845c..0000000 --- a/include/gran/components/mem/simple_mem.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef EXSIM_SIMPLE_MEM_H -#define EXSIM_SIMPLE_MEM_H - -#include <gran/component.h> - -struct component *create_simple_mem(size_t size); - -#endif /* EXSIM_SIMPLE_MEM_H */ diff --git a/include/gran/cpu/riscv/simple_riscv32.h b/include/gran/cpu/riscv/simple_riscv32.h new file mode 100644 index 0000000..054c76d --- /dev/null +++ b/include/gran/cpu/riscv/simple_riscv32.h @@ -0,0 +1,8 @@ +#ifndef GRAN_SIMPLE_RISCV32 +#define GRAN_SIMPLE_RISCV32 + +#include <gran/component.h> + +struct component *create_simple_riscv32(uint32_t start_pc, struct component *imem, struct component *dmem); + +#endif /* GRAN_SIMPLE_RISCV */ diff --git a/include/gran/mem/simple_mem.h b/include/gran/mem/simple_mem.h new file mode 100644 index 0000000..984dbf6 --- /dev/null +++ b/include/gran/mem/simple_mem.h @@ -0,0 +1,8 @@ +#ifndef GRAN_SIMPLE_MEM_H +#define GRAN_SIMPLE_MEM_H + +#include <gran/component.h> + +struct component *create_simple_mem(size_t size); + +#endif /* GRAN_SIMPLE_MEM_H */ diff --git a/include/gran/root.h b/include/gran/root.h index d158b04..32ca1cf 100644 --- a/include/gran/root.h +++ b/include/gran/root.h @@ -1,5 +1,5 @@ -#ifndef EXSIM_ROOT_H -#define EXSIM_ROOT_H +#ifndef GRAN_ROOT_H +#define GRAN_ROOT_H #include <gran/common.h> #include <gran/clock_domain.h> @@ -11,4 +11,4 @@ stat root_add_clock(struct gran_root *, struct clock_domain *); stat root_run(struct gran_root *); void destroy_root(struct gran_root *); -#endif /* EXSIM_ROOT_H */ +#endif /* GRAN_ROOT_H */ |
