Skip to content

Commit

Permalink
test header files moved to 'tests' folder
Browse files Browse the repository at this point in the history
  • Loading branch information
moizumi99 committed Jul 18, 2020
1 parent fa8cd6a commit 8021055
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 23 deletions.
30 changes: 13 additions & 17 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,30 @@ set(CMAKE_CXX_STANDARD 14)
include_directories(.)

add_executable(assembler_test
assembler.cc
assembler.h
tests/assembler.cc
tests/assembler.h
bit_tools.cc
bit_tools.h
instruction_encdec.cc
instruction_encdec.h
load_assembler.cc
load_assembler.h
load_assembler_test.cc
load_assembler_test.h
tests/load_assembler.cc
tests/load_assembler.h
tests/load_assembler_test.cc
tests/load_assembler_test.h
memory_wrapper.h
memory_wrapper.cpp
)

add_executable(cpu_test
assembler.cc
assembler.h
tests/assembler.cc
tests/assembler.h
bit_tools.cc
bit_tools.h
instruction_encdec.cc
instruction_encdec.h
load_assembler.cc
load_assembler.h
cpu_test.cc
tests/load_assembler.cc
tests/load_assembler.h
tests/cpu_test.cc
RISCV_cpu.cc
RISCV_cpu.h
memory_wrapper.cpp memory_wrapper.h
Expand All @@ -39,14 +39,10 @@ add_executable(cpu_test
riscv_cpu_common.h Disassembler.cpp Disassembler.h PeripheralEmulator.cpp PeripheralEmulator.h)

add_executable(RISCV_Emulator
assembler.cc
assembler.h
bit_tools.cc
bit_tools.h
instruction_encdec.cc
instruction_encdec.h
load_assembler.cc
load_assembler.h
RISCV_cpu.cc
RISCV_cpu.h
RISCV_Emulator.cc
Expand All @@ -62,13 +58,13 @@ add_executable(RISCV_Emulator
add_executable(memory_wrapper_test
memory_wrapper.cpp
memory_wrapper.h
memory_wrapper_test.cpp
tests/memory_wrapper_test.cpp
)

add_executable(pte_test
pte.cpp
pte.h
pte_test.cpp
tests/pte_test.cpp
bit_tools.h
bit_tools.cc
)
6 changes: 0 additions & 6 deletions PeripheralEmulator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,12 +164,6 @@ void PeripheralEmulator::ClearTimerInterrupt() {
}

void PeripheralEmulator::VirtioInit() {
// if(*R(VIRTIO_MMIO_MAGIC_VALUE) != 0x74726976 ||
// *R(VIRTIO_MMIO_VERSION) != 1 ||
// *R(VIRTIO_MMIO_DEVICE_ID) != 2 ||
// *R(VIRTIO_MMIO_VENDOR_ID) != 0x554d4551){
// panic("could not find virtio disk");
// }
assert(memory_);
memory_->Write32(kVirtioBase + 0x00, 0x74726976);
memory_->Write32(kVirtioBase + 0x4, 1);
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 8021055

Please sign in to comment.