Skip to content
This repository has been archived by the owner on Sep 2, 2023. It is now read-only.

Commit

Permalink
sim: Implement SYNC and CCTRL
Browse files Browse the repository at this point in the history
  • Loading branch information
mbitsnbites committed Mar 11, 2023
1 parent e8e24d5 commit 7af9daf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sim/cpu.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@ class cpu_t {
static const uint32_t EX_OP_FUNPH = 0x017du;
static const uint32_t EX_OP_FSQRT = 0x087du;

static const uint32_t EX_OP_SYNC = 0x007eu;
static const uint32_t EX_OP_CCTRL = 0x017eu;

// Memory operations.
static const uint32_t MEM_OP_NONE = 0x0u;
static const uint32_t MEM_OP_LOAD8 = 0x1u;
Expand Down
8 changes: 8 additions & 0 deletions sim/cpu_simple.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2601,6 +2601,14 @@ uint32_t cpu_simple_t::run(const uint32_t start_addr, const int64_t max_cycles)
ex_result = fsqrt32(src_a, src_b);
}
break;
case EX_OP_SYNC:
// Not much to do here.
ex_result = 0U;
break;
case EX_OP_CCTRL:
// Not much to do here.
ex_result = src_c;
break;
}
}

Expand Down

0 comments on commit 7af9daf

Please sign in to comment.