Skip to content

Commit 6f16446

Browse files
authored
Merge branch 'master' into master
2 parents 65528cd + 2dc5ac4 commit 6f16446

40 files changed

+3765
-530
lines changed

.github/workflows/debug.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ jobs:
123123

124124
- name: Get official RISC-V tests
125125
if: ${{ steps.cache-tests.outputs.cache-hit != 'true' }}
126-
uses: alehechka/download-tartifact@v1
126+
uses: alehechka/download-tartifact@v2
127127
with:
128128
name: riscv-official-tests
129129

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
}
1919

2020
steps:
21-
- uses: actions/checkout@v2
21+
- uses: actions/checkout@v4
2222

2323
# CMake will not configure without Qt installed
2424
- name: Install Qt
@@ -42,7 +42,7 @@ jobs:
4242
run: make open_build_service_bundle
4343

4444
- name: Store OBS bundle
45-
uses: actions/upload-artifact@v2
45+
uses: actions/upload-artifact@v4
4646
with:
4747
name: obs-package-bundle
48-
path: ${{ github.workspace }}/build/target/pkg
48+
path: ${{ github.workspace }}/build/target/pkg

CMakeLists.txt

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ cmake_policy(VERSION 3.10)
33

44
project(QtRVSim
55
LANGUAGES C CXX
6-
VERSION 0.9.7
6+
VERSION 0.9.8
77
DESCRIPTION "RISC-V CPU simulator for education purposes")
88

99
set(KAREL_KOCI "Karel Koci <cynerd@email.cz>")
@@ -47,11 +47,16 @@ set(PACKAGE_OUTPUT_PATH "${EXECUTABLE_OUTPUT_PATH}/pkg"
4747
CACHE STRING "Absolute path to place generated package files.")
4848
set(FORCE_COLORED_OUTPUT false CACHE BOOL "Always produce ANSI-colored output (GNU/Clang only).")
4949
set(USE_ALTERNATE_LINKER "" CACHE STRING "Use alternate linker. Leave empty for system default; alternatives are 'gold', 'lld', 'bfd', 'mold'")
50+
set(QT_VERSION_MAJOR "auto" CACHE STRING "Qt major version to use. 5|6|auto")
5051

5152
# =============================================================================
5253
# Generated variables
5354
# =============================================================================
5455

56+
if (NOT "${QT_VERSION_MAJOR}" MATCHES "5|6|auto")
57+
message(FATAL_ERROR "Invalid value for QT_VERSION_MAJOR: ${QT_VERSION_MAJOR} (expected 5, 6 or auto)")
58+
endif ()
59+
5560
if (${CMAKE_SYSTEM_NAME} MATCHES "Emscripten")
5661
set(WASM true)
5762
else ()
@@ -241,7 +246,10 @@ endif ()
241246
# Based on article https://www.steinzone.de/wordpress/how-to-support-both-qt5-and-qt6-using-cmake/
242247
# Cannot use version-less approach due to Qt 5.9.5 support constraint.
243248

244-
find_package(QT NAMES Qt5 Qt6 COMPONENTS Core REQUIRED)
249+
if ("${QT_VERSION_MAJOR}" STREQUAL "auto")
250+
find_package(QT NAMES Qt5 Qt6 COMPONENTS Core REQUIRED)
251+
endif ()
252+
245253
# Normally, we would use variable Qt5 or Qt6 to reference the Qt library. Here we do that through
246254
# this variable based on detected version major of Qt.
247255
set(QtLib "Qt${QT_VERSION_MAJOR}")

data/cz.cvut.edu.comparch.qtrvsim.metainfo.xml.in

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,16 @@
1717
</description>
1818

1919
<releases>
20-
<release version="@MAIN_PROJECT_VERSION@" date="2024-02-16">
20+
<release version="@MAIN_PROJECT_VERSION@" date="2024-10-01">
2121
<description>
2222
<p>Current project release.</p>
2323
</description>
2424
</release>
25+
<release version="0.9.7" date="2024-02-16">
26+
<description>
27+
<p>GUI fix crash when no tab is selected, use bundled LibElf on macOS as Homebrew misses RISC-V</p>
28+
</description>
29+
</release>
2530
<release version="0.9.6" date="2023-12-11">
2631
<description>
2732
<p>RISC-V A extension, ACLINT MTIMER, IRQ support, L2 cache, GUI editor tabs</p>

data/gui.desktop.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ Type=Application
77
Comment=@GENERIC_NAME@
88
Terminal=false
99
Categories=System;Emulator;
10+
Keywords=emulator;RISC-V;education;

extras/packaging/deb/debian/changelog

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,27 @@
1+
qtrvsim (0.9.8-1) unstable; urgency=medium
2+
3+
* Machine: aclintmtimer fix count type
4+
* GUI: fix a crash on nonexistent include
5+
* Use win32 config of libelf when compiling natively for Windows
6+
* CI: Add Windows Clang debug build and macos ARM
7+
* CLI: reporter dump to json
8+
* Machine: instruction parsing refactor
9+
* GUI: make printer settings persistent and scale to fit PDF page size
10+
* Assembler: fix immediate parsing
11+
* Assembler: implement GAS modifiers - PC rel still basic only
12+
* Machine: fix zext.w/h inst parse and fix tokenized for inst.xxx
13+
* Machine: fix parse_csr_address and CSR::RegisterMapByName key type
14+
* Machine and GUI: Pseudo LRU cache policy
15+
* Add 25x speed for teaching convenience
16+
* Machien and GUI: Include Jiri Stefan's work on branch predictor
17+
* Machien and GUI: BTB, BHT and BHR are implemented
18+
* Project: Explicit cmake qt major version option
19+
* Packaging: add Keywords entry into desktop file
20+
* Machine: add peripherals high/top address aliases for XLEN=64
21+
* GUI: switch "New" dialog page selection to tree widget, polishing required
22+
23+
-- Pavel Pisa <pisa@cmp.felk.cvut.cz> Tue, 01 Oct 2024 20:45:22 +0200
24+
125
qtrvsim (0.9.7-1) unstable; urgency=medium
226

327
* GUI: fix examples button crashes on Windows and sometimes other platforms

src/cli/reporter.cpp

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ void Reporter::machine_exit() {
2424
report();
2525
if (e_fail != 0) {
2626
printf("Machine was expected to fail but it didn't.\n");
27-
QCoreApplication::exit(1);
27+
exit(1);
2828
} else {
29-
QCoreApplication::exit();
29+
exit(0);
3030
}
3131
}
3232

@@ -62,13 +62,13 @@ void Reporter::machine_exception_reached() {
6262
ExceptionCause excause = machine->get_exception_cause();
6363
printf("Machine stopped on %s exception.\n", get_exception_name(excause));
6464
report();
65-
QCoreApplication::exit();
65+
exit(0);
6666
}
6767

6868
void Reporter::cycle_limit_reached() {
6969
printf("Specified cycle limit reached\n");
7070
report();
71-
QCoreApplication::exit();
71+
exit(0);
7272
}
7373

7474
void Reporter::machine_trap(SimulatorException &e) {
@@ -80,7 +80,7 @@ void Reporter::machine_trap(SimulatorException &e) {
8080
}
8181

8282
printf("Machine trapped: %s\n", qPrintable(e.msg(false)));
83-
QCoreApplication::exit(expected ? 0 : 1);
83+
exit(expected ? 0 : 1);
8484
}
8585

8686
void Reporter::report() {
@@ -219,3 +219,9 @@ void Reporter::report_range(const Reporter::DumpRange &range) {
219219
fprintf(stderr, "Failure closing %s\n", range.path_to_write.toLocal8Bit().data());
220220
}
221221
}
222+
223+
void Reporter::exit(int retcode) {
224+
// Exit might not happen immediately, so we need to stop the machine explicitly.
225+
machine->pause();
226+
QCoreApplication::exit(retcode);
227+
}

src/cli/reporter.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ private slots:
7474
void report_gp_reg(unsigned int i, bool last);
7575
void report_cache(const char *cache_name, const machine::Cache &cache);
7676

77+
void exit(int retcode);
78+
7779
public:
7880
DumpFormat dump_format = DumpFormat::CONSOLE;
7981
QString dump_file_json;

src/gui/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ set(gui_SOURCES
4949
windows/coreview/components/value_handlers.cpp
5050
windows/coreview/components/cache.cpp
5151
widgets/hidingtabwidget.cpp
52+
windows/predictor/predictor_btb_dock.cpp
53+
windows/predictor/predictor_bht_dock.cpp
54+
windows/predictor/predictor_info_dock.cpp
5255
)
5356
set(gui_HEADERS
5457
dialogs/about/aboutdialog.h
@@ -92,6 +95,9 @@ set(gui_HEADERS
9295
windows/coreview/components/cache.h
9396
helper/async_modal.h
9497
widgets/hidingtabwidget.h
98+
windows/predictor/predictor_btb_dock.h
99+
windows/predictor/predictor_bht_dock.h
100+
windows/predictor/predictor_info_dock.h
95101
)
96102
set(gui_UI
97103
dialogs/gotosymbol/gotosymboldialog.ui

0 commit comments

Comments
 (0)