Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
9f1e731
Fix typos in comments
lbulej Sep 28, 2024
aa38634
Do not initialize ftl0 explicitly
lbulej Sep 29, 2024
da5ea5a
Add array_len and offset_of to utils.h
lbulej Sep 29, 2024
111c22b
Use array_len() instead of DEVICE_TYPE_COUNT to search device_types
lbulej Sep 29, 2024
3c6e967
SH-2E implementation
lbulej Nov 29, 2023
acbbed8
SH-2E integration with MSIM
lbulej Dec 18, 2023
0a01fb9
SH-2E clang-format configuration
lbulej Jan 9, 2024
a26a96e
SH-2E helper scripts
lbulej Oct 2, 2024
e25a12f
SH-2E sample msim.conf
lbulej Oct 2, 2024
5eff654
SH-2E add few unimplemented instructions + cstyle fix
MatusJurcak Jul 4, 2025
8052b66
SH-2E LDC/LDS instructions implementation
MatusJurcak Jul 7, 2025
9a5cf8c
SH-2E add HALT and CPU_REG_DUMP instructions for MSIM + fix address c…
MatusJurcak Jul 7, 2025
51efa9d
SH-2E FPU registers dump instruction + fix fpscr register for little …
MatusJurcak Jul 7, 2025
17f0e50
SH-2E fix printer to work with big endian order
MatusJurcak Jul 10, 2025
5ea7461
SH-2E interrupt/exception handling + INTC
MatusJurcak Aug 19, 2025
72ad30b
SH-2E fix PC value when pushing to stack on interrupt handling
MatusJurcak Aug 19, 2025
e9949a3
SH-2E add option to confiure INTC registers addresses
MatusJurcak Aug 19, 2025
4e23ae2
SH-2E make INTC dynamic and configurable + rework exception processin…
MatusJurcak Sep 7, 2025
dbdf1a5
SH-2E remove limit on number of interrupt sources
MatusJurcak Sep 7, 2025
37349df
SH-2E make INTC independent device
MatusJurcak Sep 25, 2025
d53f6b1
SH-2E add support for power-on/manual resets
MatusJurcak Sep 25, 2025
dbfeb14
SH-2E add reference between INTC and CPU
MatusJurcak Sep 26, 2025
15a3495
SH-2E Add debug functions for other processing states
MatusJurcak Sep 27, 2025
aa6e7e7
SH-2E Add unit tests and simple test
MatusJurcak Nov 16, 2025
12ae520
SH-2E Add unit tests for exceptions
MatusJurcak Nov 17, 2025
6946b8d
SH-2E Refactor instruction opcodes
MatusJurcak Nov 29, 2025
92ab902
SH-2E Fix nd4 format in utils
MatusJurcak Nov 30, 2025
9491a8d
SH-2E FDIV and FMAC exceptions
MatusJurcak Dec 2, 2025
d96af82
SH-2E Fix the FADD insn
MatusJurcak Dec 4, 2025
4302c15
SH-2E Add test with C file and fix printing
MatusJurcak Dec 6, 2025
9fcf32e
SH-2E Change INTC memory behaviour
MatusJurcak Dec 26, 2025
efcd5ee
SH-2E Fix tests configuration
MatusJurcak Dec 26, 2025
88d518b
SH-2E Small fixes + remove unwanted files
MatusJurcak Dec 26, 2025
cd4580e
SH-2E Fix tests
MatusJurcak Jan 1, 2026
fa3917b
SH-2E Add and change copyright headers
MatusJurcak Feb 16, 2026
cf3f236
SH-2E Fix DAP in tests config
MatusJurcak Feb 22, 2026
e599a4d
SH-2E Add tests for arithmetics
MatusJurcak Feb 22, 2026
df888f6
SH-2E Add tests for logic ops
MatusJurcak Feb 23, 2026
2e887e0
SH-2E Add tests for shift ops
MatusJurcak Feb 23, 2026
ca77932
SH-2E Add tests for data transfer ops
MatusJurcak Feb 28, 2026
2c82abc
SH-2E Add tests for branch instructions
MatusJurcak Feb 28, 2026
1e043fe
SH-2E Add tests for FPU 32-bit data transfer instructions
MatusJurcak Feb 28, 2026
36d2a3e
SH-2E Add tests for FPU 32-bit single-precision instructions
MatusJurcak Feb 28, 2026
8c33c6b
SH-2E Add tests for FPU control instructions
MatusJurcak Feb 28, 2026
7239e21
SH-2E Add tests for control instructions
MatusJurcak Feb 28, 2026
8925003
SH-2E Add tests for exception handling
MatusJurcak Mar 1, 2026
8f56abf
SH-2E Fix the NaN printing
MatusJurcak Mar 20, 2026
e3e5464
SH-2E Remove clang-format for SuperH files + NaN comment fix
MatusJurcak Mar 30, 2026
8f7ee8e
SH-2E Add missing abstracts for some instructions
MatusJurcak Mar 30, 2026
14c6730
SH-2E Add more debug features for cpu, intc and printer
MatusJurcak Apr 2, 2026
3481674
SH-2E Add documentation
MatusJurcak Apr 2, 2026
a237dfb
SH-2E Fix the PC-relative address calculation
MatusJurcak May 24, 2026
2ba693e
SH-2E Add CMT device implementation
MatusJurcak May 17, 2026
8dd5183
SH-2E Add CMT reference to CPU
MatusJurcak May 21, 2026
c636a07
SH-2E Add interrupt tests for CMT
MatusJurcak May 21, 2026
d935ad3
SH-2E Add peripheral structure + code refactor
MatusJurcak May 22, 2026
f557c71
SH-2E Add WDT device and tests
MatusJurcak May 23, 2026
c555e4e
SH-2E Initial implementation of the DMAC device
MatusJurcak May 24, 2026
1a8fcae
SH-2E Add simple test for the DMAC
MatusJurcak May 24, 2026
a56c27a
SH-2E Add allow peripheral requests on DMAC
MatusJurcak May 24, 2026
eac99b4
SH-2E fix the or instruction name
MatusJurcak May 24, 2026
c2fbe75
SH-2E Add docs for the CMT, WDT and DMAC + small fixes
MatusJurcak May 24, 2026
19d1c4c
SH-2E fix docs
MatusJurcak May 24, 2026
e68030b
SH-2E Add INTC configuration command
MatusJurcak May 25, 2026
9165b37
SH-2E Update comment about pending address error
MatusJurcak May 25, 2026
b37749c
SH-2E Fix the MOVA and MOVI instructions, add comments and small fixes
MatusJurcak May 26, 2026
ddb0bf0
SH-2E Fix illegal instruction exception
MatusJurcak May 27, 2026
b4522e0
SH-2E Change pc_next to pc_target and fix illegal slot instruction
MatusJurcak May 28, 2026
38f201c
SH-2E refactor pc relative address calculation
MatusJurcak May 29, 2026
e9016c3
SH-2E fix pc-relative address calculation
MatusJurcak Jun 1, 2026
c26e31c
SH-2E Fix the illegal slot instruction
MatusJurcak Jun 8, 2026
45272c2
SH-2E Fix the writes and reads to peripheral devices
MatusJurcak Jun 11, 2026
f917734
SH-2E Add unit testing flag to correctly simulate writes into memory
MatusJurcak Jun 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@ doxygen/
/.cproject
/.settings
/.pydevproject

# MacOS
.DS_Store
12 changes: 11 additions & 1 deletion Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ bindir = @bindir@

BINARY = msim

.PHONY: all install uninstall clean distclean rvtest cstyle
.PHONY: all install uninstall clean distclean rvtest shtest cstyle

all:
$(MAKE) -C src
Expand All @@ -28,14 +28,17 @@ uninstall:
clean:
$(MAKE) -C src clean
$(MAKE) -C tests/rvtests/unit-tests clean
$(MAKE) -C tests/shtests/unit-tests clean

distclean: clean
$(MAKE) -C src distclean
$(MAKE) -C tests/rvtests/unit-tests distclean
$(MAKE) -C tests/shtests/unit-tests distclean
$(RM) -f Makefile config.log config.status config.h stamp-h

test:
make -C . rvtest
make -C . shtest
bats tests/system/

rvtest:
Expand All @@ -45,5 +48,12 @@ rvtest:
cd tests/rvtests ; python3 run_tests.py
@echo "\n All Tests Passed!"

shtest:
@echo "\nUnit tests:"
$(MAKE) -C src shtest
@echo "\nSystem tests:"
cd tests/shtests ; python3 run_tests.py
@echo "\n All Tests Passed!"

cstyle:
find src/ tests/ -name '*.[ch]' -exec clang-format -style=file -i {} \;
2 changes: 2 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ fi
AC_PROG_INSTALL

AC_CHECK_LIB(readline, readline,, [AC_MSG_FAILURE(Library readline not found.)])
AC_CHECK_LIB(m, fmaf,, [AC_MSG_FAILURE(Math library not found.)])
AC_CHECK_LIB(wsock32, main)

AC_CHECK_INCLUDES_DEFAULT
Expand All @@ -43,6 +44,7 @@ AC_CHECK_HEADERS([ \
fcntl.h \
getopt.h \
inttypes.h \
math.h \
readline/history.h \
readline/readline.h \
signal.h \
Expand Down
4 changes: 3 additions & 1 deletion doc/development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,6 @@ All the devices are specified in the ``device`` directory.
The general CPU interface in located in ``device/cpu/general_cpu.h``.

The CPU architectures are implemented in their own directories: inside
``device/cpu/mips_r4000`` and ``device/cpu/riscv_rv32ima``.
``device/cpu/mips_r4000``, ``device/cpu/riscv_rv32ima``, ``device/cpu/riscv_rv64ima`` and ``device/cpu/superh_sh2e``.

The general INTC interface is located in ``device/intc/intc.h`` and the implementation of the SH-2E INTC is located in ``device/intc/sh2e_intc.c``.
Loading