diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2025-12-15 01:25:53 +0200 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2025-12-15 01:25:53 +0200 |
| commit | 452cab52de2107c1ce8c7eb0883ff80bb80ac76b (patch) | |
| tree | cf36cb3c289dde79525ff3d9e9d109b7677ce6d0 /src/cpu/riscv/simple_riscv64.c | |
| parent | 1955ad196b76e6fa928af38ca7a7c32106ac44da (diff) | |
| download | gran-452cab52de2107c1ce8c7eb0883ff80bb80ac76b.tar.gz gran-452cab52de2107c1ce8c7eb0883ff80bb80ac76b.zip | |
add initial simt rv64 core
Diffstat (limited to 'src/cpu/riscv/simple_riscv64.c')
| -rw-r--r-- | src/cpu/riscv/simple_riscv64.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/cpu/riscv/simple_riscv64.c b/src/cpu/riscv/simple_riscv64.c index b2bdff6..fff9a62 100644 --- a/src/cpu/riscv/simple_riscv64.c +++ b/src/cpu/riscv/simple_riscv64.c @@ -661,6 +661,9 @@ static stat simple_riscv64_clock(struct simple_riscv64 *cpu) return ENOSUCH; } + if (ret != OK) + return ret; + if (cpu->ils.state == LDST_IDLE) { cpu->ils.pkt = create_packet(cpu->rcv + 64, cpu->pc, @@ -675,13 +678,16 @@ send: stat ret = SEND(cpu, cpu->imem, cpu->ils.pkt); if (ret == EBUSY) { cpu->ils.state = LDST_BLOCKED; - return ret; + return OK; } + if (ret != OK) + return ret; + cpu->ils.state = LDST_SENT; } - return ret; + return OK; } struct component *create_simple_riscv64(uint64_t rcv, uint64_t start_pc, |
