sunflower-embedded-system-emulator
sunflower-embedded-system-emulator copied to clipboard
Sunflower Full-System Hardware Emulator and Physical System Simulator for Sensor-Driven Systems. Built-in architecture modeling of Hitachi SH (j-core), RISC-V, and more.
`lex-hitachi-sh.c` and `lex-riscv.c` differ only in the tokens for their assembly instructions, so the rest (tokens for Sunflower commands and the lexical analyser function) is all duplicated.
`SF_BITFLIP_ANALYSIS` only supported on SuperH. This issue is related to #176, since the bit flip analysis is currently tied to a number of superH structures, including the `S->N` numa structure.
Disabling `SF_NUMA` causes crash.
Use C99 platform-independent formatting specifiers throughout (e.g., `%zu` for `size_t` and `%"PRIu32"` for `uint32_t`), replacing the current mix of `%d` and `UH8LONGFMT` etc.
Wrong size in `snprintf` in `uncertain_upe.c`: ``` uncertain_upe.c:589:49: warning: ‘%-*d’ directive output truncated writing between 5 and 11 bytes into a region of size 4 [-Wformat-truncation=] result = snprintf(buffer, PRINT_DIGITS...
The constants in the enum should be named based on the coding conventions (e.g., `kSunflowerInstructionLatencyIndexIF`) to make their use left confusing, since the pipeline structure (`P`) also has fields called...
``` sf-hitachi-sh.y:2097:50: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare] if (yyengine->cp->PC - yyengine->cp->MEMBASE < 0 || ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~ sf-hitachi-sh.y:2137:50: warning: comparison of unsigned expression <...
Missing function prototypes and wrong return types in `memory-hierarchy-riscv.c` ``` memory-hierarchy-riscv.c:204:3: warning: implicit declaration of function ‘write_2’; did you mean ‘mwrite’? [-Wimplicit-function-declaration] write_2(S, data, &S->MEM[paddr - S->MEMBASE]); ^~~~~~~ mwrite memory-hierarchy-riscv.c:...
``` main.c:781:34: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘size_t {aka long unsigned int}’ [-Wformat=] printf("Unknown memory length %d in mmap file.\n", strlen(p)); ~^...