andrescv / jupiter
Goto Github
PK
View Code? Open in Web Editor
NEW
11.0
34.0
50.93 MB
RISC-V Assembler and Runtime Simulator
Home Page: https://jupitersim.gitbook.io/
License: GNU General Public License v3.0
JavaScript 83.69%
ANTLR 3.88%
TypeScript 12.42%
riscv
risc-v
rv32
simulator
riscv-simulator
risc
assembler
runtime-simulator
education
asm
jupiter’s Introduction
Note: Currently we are working on a new version of Jupiter, to see the previous codebase and releases visit the java branch of this repository.
Jupiter is an open source and education-oriented RISC-V assembler and runtime simulator. It is capable of simulate all the instructions of the base integer ISA (I
extension) plus all the other standard extensions (M
, A
, F
, D
, Zicsr
, Zifencei
), RV32G. It was developed taking into account that it could be used in different courses such as: Computer Architecture, Compilers and Assembly Programming.
Features
-
User Friendly: Jupiter was designed focused on education and for all the people that are getting to know the RISC-V architecture. It places for priority the user experience. Jupiter has two modes of operation (Command Line Interface and Graphical User Interface) and both of these were developed to be intuitive to use.
-
Modularity: Jupiter can assemble and simulate several files at once, not everything has to be one file of 1,000 lines of code. Simply indicate by a global label the main starting point of the program. It seeks to have an easy way to create a good structure of projects and laboratories.
-
Feedback: Jupiter indicates different types of errors to easily debug what went wrong.
-
Cross-platform: Jupiter is available for Linux, macOS and Windows.
Other great simulators
-
Venus: Berkeley’s web-based simulator originally developed by @kvakil and then updated and improved by @ThaumicMekanism.
-
RARS: RISC-V Assembler and Runtime Simulator (RARS), based on the originally MARS simulator, but refactored for the RISC-V architecture by @TheThirdOne.
-
Ripes: A graphical 5-stage RISC-V pipeline simulator & assembly editor developed by @mortbopet.
-
Spike: The original RISC-V ISA simulator that implements a functional model of one or more RISC-V harts.
Acknowledgments
A big thank you to all the people working on the RISC-V project.
Resources
- Unprivileged RISC-V Spec
- Privileged RISC-V Spec
- RISC-V Green Card UC Berkeley
- RISC-V Green Card Cambridge
- RISC-V Reader
Contributors
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Made with contrib.rocks.
jupiter’s People
Contributors
jupiter’s Issues
Unexpected Exception in vsim.gui.controllers.SimulatorController/lambda$null$25
Stacktrace:
java.lang.NullPointerException at vsim.gui.controllers.SimulatorController.lambda$null$25(SimulatorController.java:579) at com.sun.javafx.application.PlatformImpl.lambda$null$397(PlatformImpl.java:295) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.application.PlatformImpl.lambda$runLater$398(PlatformImpl.java:294) at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95) at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method) at com.sun.glass.ui.gtk.GtkApplication.lambda$null$203(GtkApplication.java:139) at java.lang.Thread.run(Thread.java:748)
Exception when try to close tab with an unsaved file
An Exception is throwed when you try to close a tab that have an edited file but is not saved
Exception in thread "JavaFX Application Thread" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at javafx.fxml/javafx.fxml.FXMLLoader$MethodHandler.invoke(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader$ControllerMethodEventHandler.handle(Unknown Source)
at javafx.base/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source)
at javafx.base/com.sun.javafx.event.EventUtil.fireEvent(Unknown Source)
at javafx.base/javafx.event.Event.fireEvent(Unknown Source)
at javafx.controls/javafx.scene.control.MenuItem.fire(Unknown Source)
at javafx.controls/com.sun.javafx.scene.control.ControlAcceleratorSupport.lambda$doAcceleratorInstall$1(Unknown Source)
at javafx.graphics/com.sun.javafx.scene.KeyboardShortcutsHandler.processAccelerators(Unknown Source)
at javafx.graphics/com.sun.javafx.scene.KeyboardShortcutsHandler.dispatchBubblingEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source)
at javafx.base/com.sun.javafx.event.EventUtil.fireEvent(Unknown Source)
at javafx.base/javafx.event.Event.fireEvent(Unknown Source)
at javafx.graphics/javafx.scene.Scene$KeyHandler.process(Unknown Source)
at javafx.graphics/javafx.scene.Scene.processKeyEvent(Unknown Source)
at javafx.graphics/javafx.scene.Scene$ScenePeerListener.keyEvent(Unknown Source)
at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler$KeyEventNotification.run(Unknown Source)
at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler$KeyEventNotification.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleKeyEvent$1(Unknown Source)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(Unknown Source)
at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleKeyEvent(Unknown Source)
at javafx.graphics/com.sun.glass.ui.View.handleKeyEvent(Unknown Source)
at javafx.graphics/com.sun.glass.ui.View.notifyKey(Unknown Source)
Caused by: java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.javafx.reflect.Trampoline.invoke(Unknown Source)
at jdk.internal.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at javafx.base/com.sun.javafx.reflect.MethodUtil.invoke(Unknown Source)
at javafx.fxml/com.sun.javafx.fxml.MethodHelper.invoke(Unknown Source)
... 33 more
Caused by: java.lang.IllegalAccessError: class com.jfoenix.controls.JFXAlert (in module com.jfoenix) cannot access class com.sun.javafx.event.EventHandlerManager (in module javafx.base) because module javafx.base does not export com.sun.javafx.event to module com.jfoenix
at com.jfoenix/com.jfoenix.controls.JFXAlert.<init>(Unknown Source)
at jupiter/jupiter.gui.dialogs.CloseDialog.<init>(Unknown Source)
at jupiter/jupiter.gui.dialogs.SaveDialog.<init>(Unknown Source)
at jupiter/jupiter.gui.controllers.Main.saveDialog(Unknown Source)
at jupiter/jupiter.gui.controllers.Editor.closeTabSafetly(Unknown Source)
at jupiter/jupiter.gui.controllers.Editor.close(Unknown Source)
at jupiter/jupiter.gui.controllers.Main.close(Unknown Source)
... 43 more
Unexpected Exception in sun.nio.fs.UnixException/translateToIOException
Stacktrace:
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException at javafx.fxml.FXMLLoader$MethodHandler.invoke(FXMLLoader.java:1774) at javafx.fxml.FXMLLoader$ControllerMethodEventHandler.handle(FXMLLoader.java:1657) at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86) at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238) at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191) at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58) at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74) at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:49) at javafx.event.Event.fireEvent(Event.java:198) at javafx.scene.control.MenuItem.fire(MenuItem.java:462) at com.sun.javafx.scene.control.skin.ContextMenuContent$MenuItemContainer.doSelect(ContextMenuContent.java:1405) at com.sun.javafx.scene.control.skin.ContextMenuContent$MenuItemContainer.lambda$createChildren$599(ContextMenuContent.java:1358) at com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:218) at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80) at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238) at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191) at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59) at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58) at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56) at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56) at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56) at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74) at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54) at javafx.event.Event.fireEvent(Event.java:198) at javafx.scene.Scene$MouseHandler.process(Scene.java:3757) at javafx.scene.Scene$MouseHandler.access$1500(Scene.java:3485) at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1762) at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2494) at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:394) at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:295) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$345(GlassViewEventHandler.java:432) at com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:389) at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:431) at com.sun.glass.ui.View.handleMouseEvent(View.java:555) at com.sun.glass.ui.View.notifyMouse(View.java:937) at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method) at com.sun.glass.ui.gtk.GtkApplication.lambda$null$203(GtkApplication.java:139) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71) at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:275) at javafx.fxml.FXMLLoader$MethodHandler.invoke(FXMLLoader.java:1769) ... 43 more Caused by: java.io.UncheckedIOException: java.nio.file.AccessDeniedException: /home/seifert/.dbus at java.nio.file.FileTreeIterator.fetchNextIfNeeded(FileTreeIterator.java:88) at java.nio.file.FileTreeIterator.hasNext(FileTreeIterator.java:104) at java.util.Iterator.forEachRemaining(Iterator.java:115) at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801) at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) at vsim.utils.Cmd.getFilesInDir(Cmd.java:214) at vsim.gui.controllers.SimulatorController.assemble(SimulatorController.java:212) at vsim.gui.controllers.MenuBarController.assemble(MenuBarController.java:265) ... 53 more Caused by: java.nio.file.AccessDeniedException: /home/seifert/.dbus at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84) at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) at sun.nio.fs.UnixFileSystemProvider.newDirectoryStream(UnixFileSystemProvider.java:427) at java.nio.file.Files.newDirectoryStream(Files.java:457) at java.nio.file.FileTreeWalker.visit(FileTreeWalker.java:300) at java.nio.file.FileTreeWalker.next(FileTreeWalker.java:372) at java.nio.file.FileTreeIterator.fetchNextIfNeeded(FileTreeIterator.java:95) ... 65 more
[Feature Request]
Is your feature request related to a problem? Please describe.
When you have a breakpoint set in the simulate window, and then switch back to the editor to quickly browse the code, you are unable to return back to simulate
Describe the solution you’d like
Do not exit simulate when switching to editor window. Permit back and forth switching between editor and simulate
Describe alternatives you’ve considered
A clear and concise description of any alternative solutions or features you’ve considered (if apply).
Additional context
Add any other context or screenshots about the feature request here (if apply).
a0 vs a7 for system calls
Jupiter uses a0
for the system call number. Most other simulators/kernels use a7
for the system call number. Notably, spike with pk, rv8, qemu for userspace, RARS, and RIPES all use a7
. Venus would be the notable simulator that uses a0
.
Would you be interested in changing to use a7 instead of a0? I would be willing to make a PR, but wanted to get a «go ahead»
before I start.
[BUG]
Describe the bug
Jupiter does not seem to be able to read binary files
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
- Go to ‘…’
- Click on ‘….’
- Scroll down to ‘….’
- See error
Expected behavior
A clear and concise description of what you expected to happen.
It does not appear like an attach a binary file here.
Screenshots
If applicable, add screenshots to help explain your problem.
Jupiter (please complete the following information):
- OS: [e.g. OS X]
- Version [e.g. v3.1]
- Mode GUI]
Additional context
When you fread from a binary file,
e.g., txt file (convert to binary before trying to fread).
5 3
1 -3 4
46 -2 -5
2 -62 0
1 3 13
26 -7 34
The first fread returns 5, but subsequent fread returns 0.
Questions about how to use Jupiter on windows ?
Hi…
I have recently started working on risc v. I was searching for various kind of simulators and then got to know about the jupiter . I have lots of doubts like how to run the programs and how to use it. Is there any chance that i can get a user manual for the Jupiter Riscv simulator.
.equ directive
Hi, thank you for jupiter! I intend to use it in my computer architecture class. One question: Is it possible to define a constant? The standard .equ does not seem to be implemented. Thanks! Matthias.
system call interfaces ?
What are Jupiter’s calling conventions, supported system calls, and system call interfaces? If there is a specific document introduction, I would appreciate it most.
Questions about building project
Jupiter has been great. It is very intuitive and powerful.
Is there a way you can add build instructions for this project? I am new to using Gradle and I have had issues trying to run the application. I wanted to try experiment making scripts.
Either way, I appreciate the work you put in. I am new to RISC V and this has let me obtain a better understanding.
Questions about the name change
I have been watching this project for a bit and was surprised to see a name change. Is there a specific reason for the change?
Is this project inspired by MARS? You mention SPIM as an inspiration, but with the name change to a planet it seems like MARS may also have been considered.
Also, in case you are not aware there are two other risc-v simulators that were directly inspired from MARS, venus and rars (my project).
Simulator assembly view — option to show Hex values?
Jupiter is great — thanks!
I’m puzzled by the choice to show immediate values in the Asseembly view in the Simulator tab as decimal values.
For example, I’m loading a symbol into A1 in order to call print_string, and see the following:
lui x11, 16
addi x11, x11, 36
When I look at the simulator’s register value for a1/x11, the value I see is 0x00010024, which is the important information I need in order to check the Memory tab. It seems that it would make more sense to at least have the option of seeing the two instructions disassembled like this:
lui x11, 0x10
addi x11, x11, 0x24
If nothing else, so that it makes more sense to students when they’re seeing things going on.
Unexpected Exception in vsim.gui.controllers.SimulatorController/lambda$null$24
Stacktrace:
java.lang.NullPointerException at vsim.gui.controllers.SimulatorController.lambda$null$24(SimulatorController.java:572) at com.sun.javafx.application.PlatformImpl.lambda$null$172(PlatformImpl.java:295) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.application.PlatformImpl.lambda$runLater$173(PlatformImpl.java:294) at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95) at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method) at com.sun.glass.ui.gtk.GtkApplication.lambda$null$48(GtkApplication.java:139) at java.lang.Thread.run(Thread.java:748)
Couldn’t execute «jupiter.bat» on x64 windows10
Exception in thread «WindowsNativeRunloopThread» java.lang.NoSuchMethodError:
at javafx.graphics/com.sun.glass.ui.win.WinApplication.staticScreen_getScreens(Native Method)
at javafx.graphics/com.sun.glass.ui.Screen.initScreens(Unknown Source)
at javafx.graphics/com.sun.glass.ui.Application.lambda$run$1(Unknown Source)
at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Exception in thread «JavaFX Application Thread» java.lang.NullPointerException
at javafx.graphics/com.sun.prism.d3d.D3DPipeline.getAdapterOrdinal(Unknown Source)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.assignScreensAdapters(Unknown Source)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.runToolkit(Unknown Source)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.lambda$startup$10(Unknown Source)
at javafx.graphics/com.sun.glass.ui.Application.lambda$run$1(Unknown Source)
at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Run V-Sim-1.0.3 on Window 10
Hello Andrés!
I’m very happy when you’re developing RISC-V simulation. It’s a good notification for human, who researches RISC-V architecture. I downloaded version V-Sim-1.0.3. I had installed Java Runtime Environment (version Java SE 8u192) on Window 10 64-bit before downloading V-Sim-1.0.3, but I haven’t still executed the V-Sim-1.0.3. I set up «JRE_HOME» or «JAVA_HOME» variable on «Environment Variable», which not to result my problem. When I compile on Command Prompt window by command «java V-Sim-1.0.3.jar «. It appears an error: «Could not find / or load main class V-Sim-1.0.3.jar «. So you can help me to resolve this problem.
Best regards!
Nhan Le
[Question] How can I run Jupiter by $ jupiter file.s
Hi,
I am using Ubuntu.
I know that I can run Jupiter by $ image/bin/jupiter file.s.
However, can I run Jupiter by typing $ jupiter file.s in terminal and how can I do that?
Unexpected Exception in vsim.gui.controllers.SimulatorController/lambda$null$24
Stacktrace:
java.lang.NullPointerException at vsim.gui.controllers.SimulatorController.lambda$null$24(SimulatorController.java:572) at com.sun.javafx.application.PlatformImpl.lambda$null$397(PlatformImpl.java:295) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.application.PlatformImpl.lambda$runLater$398(PlatformImpl.java:294) at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95) at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method) at com.sun.glass.ui.gtk.GtkApplication.lambda$null$203(GtkApplication.java:139) at java.lang.Thread.run(Thread.java:748)
Unexpected Exception in vsim.gui.controllers.SimulatorController/lambda$null$24
Stacktrace:
java.lang.NullPointerException at vsim.gui.controllers.SimulatorController.lambda$null$24(SimulatorController.java:572) at com.sun.javafx.application.PlatformImpl.lambda$null$397(PlatformImpl.java:295) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.application.PlatformImpl.lambda$runLater$398(PlatformImpl.java:294) at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95) at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method) at com.sun.glass.ui.gtk.GtkApplication.lambda$null$203(GtkApplication.java:139) at java.lang.Thread.run(Thread.java:748)
open error (win 7)
C:UsersAdministrator>jupiter
Exception in thread «WindowsNativeRunloopThread» java.lang.NoSuchMethodError:
at javafx.graphics/com.sun.glass.ui.win.WinApplication.staticScreen_getS
creens(Native Method)
at javafx.graphics/com.sun.glass.ui.Screen.initScreens(Unknown Source)
at javafx.graphics/com.sun.glass.ui.Application.lambda$run$1(Unknown Sou
rce)
at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native M
ethod)
at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(
Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Exception in thread «JavaFX Application Thread» java.lang.NullPointerException
at javafx.graphics/com.sun.prism.d3d.D3DPipeline.getAdapterOrdinal(Unkno
wn Source)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.assignScreen
sAdapters(Unknown Source)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.runToolkit(U
nknown Source)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.lambda$start
up$10(Unknown Source)
at javafx.graphics/com.sun.glass.ui.Application.lambda$run$1(Unknown Sou
rce)
at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native M
ethod)
at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(
Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
[Question] how to build from source
how to build it? thx
Assembler directives errors
Hi!
I’m using pure RV32I Toolchain instaleld as described here: link.
I wrote a simple C program:
Using mentioned RV32I Toolchain I generated .s file. I wanted to simulate this assembler code in Jupiter but I have some errors (errors that occured are commented in the line they are related to):
Following the RISC-V Assembly Programmer’s Manual: link
directives that are used in my code should be fine.
Unexpected Exception in vsim.gui.controllers.SimulatorController/lambda$null$24
Stacktrace:
java.lang.NullPointerException at vsim.gui.controllers.SimulatorController.lambda$null$24(SimulatorController.java:572) at com.sun.javafx.application.PlatformImpl.lambda$null$172(PlatformImpl.java:295) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.application.PlatformImpl.lambda$runLater$173(PlatformImpl.java:294) at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95) at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method) at com.sun.glass.ui.gtk.GtkApplication.lambda$null$48(GtkApplication.java:139) at java.lang.Thread.run(Thread.java:748)
Question: How to run Jupiter?
Hello!
I am new in the RISC V community and I want to create some project with the RISC V Core. I was trying to run Jupiter on Ubuntu 18.04.3 LTS but it did not work. I would like to use Jupiter to learn more about RISC V but I do not know how to run it correctly. I was wondering if there is a possibility to create a little guide/tutorial how to run Jupiter correctly? Of course if it wouldn’t be a problem for you.
Unexpected Exception in vsim.gui.controllers.SimulatorController/lambda$null$24
Stacktrace:
java.lang.NullPointerException at vsim.gui.controllers.SimulatorController.lambda$null$24(SimulatorController.java:572) at com.sun.javafx.application.PlatformImpl.lambda$null$397(PlatformImpl.java:295) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.application.PlatformImpl.lambda$runLater$398(PlatformImpl.java:294) at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95) at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method) at com.sun.glass.ui.gtk.GtkApplication.lambda$null$203(GtkApplication.java:139) at java.lang.Thread.run(Thread.java:748)
Unexpected Exception in vsim.gui.controllers.SimulatorController/lambda$null$25
Stacktrace:
java.lang.NullPointerException at vsim.gui.controllers.SimulatorController.lambda$null$25(SimulatorController.java:579) at com.sun.javafx.application.PlatformImpl.lambda$null$397(PlatformImpl.java:295) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.application.PlatformImpl.lambda$runLater$398(PlatformImpl.java:294) at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95) at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method) at com.sun.glass.ui.gtk.GtkApplication.lambda$null$203(GtkApplication.java:139) at java.lang.Thread.run(Thread.java:748)
Unexpected Exception in vsim.gui.controllers.SimulatorController/lambda$null$24
Stacktrace:
java.lang.NullPointerException at vsim.gui.controllers.SimulatorController.lambda$null$24(SimulatorController.java:572) at com.sun.javafx.application.PlatformImpl.lambda$null$397(PlatformImpl.java:295) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.application.PlatformImpl.lambda$runLater$398(PlatformImpl.java:294) at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95) at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method) at com.sun.glass.ui.gtk.GtkApplication.lambda$null$203(GtkApplication.java:139) at java.lang.Thread.run(Thread.java:748)
Unexpected Exception in vsim.gui.controllers.SimulatorController/lambda$null$25
Stacktrace:
java.lang.NullPointerException at vsim.gui.controllers.SimulatorController.lambda$null$25(SimulatorController.java:579) at com.sun.javafx.application.PlatformImpl.lambda$null$397(PlatformImpl.java:295) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.application.PlatformImpl.lambda$runLater$398(PlatformImpl.java:294) at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95) at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method) at com.sun.glass.ui.gtk.GtkApplication.lambda$null$203(GtkApplication.java:139) at java.lang.Thread.run(Thread.java:748)
Unexpected Exception in vsim.gui.controllers.SimulatorController/lambda$null$25
Stacktrace:
java.lang.NullPointerException at vsim.gui.controllers.SimulatorController.lambda$null$25(SimulatorController.java:579) at com.sun.javafx.application.PlatformImpl.lambda$null$397(PlatformImpl.java:295) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.application.PlatformImpl.lambda$runLater$398(PlatformImpl.java:294) at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95) at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method) at com.sun.glass.ui.gtk.GtkApplication.lambda$null$203(GtkApplication.java:139) at java.lang.Thread.run(Thread.java:748)
Unexpected Exception in vsim.gui.controllers.SimulatorController/lambda$null$24
Stacktrace:
java.lang.NullPointerException at vsim.gui.controllers.SimulatorController.lambda$null$24(SimulatorController.java:572) at com.sun.javafx.application.PlatformImpl.lambda$null$172(PlatformImpl.java:295) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.application.PlatformImpl.lambda$runLater$173(PlatformImpl.java:294) at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95) at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method) at com.sun.glass.ui.gtk.GtkApplication.lambda$null$48(GtkApplication.java:139) at java.lang.Thread.run(Thread.java:748)
Broken documentation link?
The link under the documentation section never responds. Tried with Chrome and Edge browsers.
Zicsr extension is left unimplemented
I have been working on making sure the Zicsr extension is fully implemented in RARS and so I tried out Jupiter confirm my expectations from my reading of the specification.
I was very surprised when i tried to use FRCSR x5
, saw that it compiled to csrrs x5, 11, x0
and when executed didn’t change t0. I expected it to use csrrs x5, 3, x0
.
When I looked into the code I found https://github.com/andrescv/Jupiter/blob/00041f32017a010077397640c673dbc541406962/src/main/java/jupiter/riscv/instructions/itype/CSRRC.java#L39-L42
It would be nice if there was some indication that CSR instructions were not expected to work. A warning when assembled or a note in the documentation would be enough (I guess this issue now serves that purpose).
Unexpected Exception in vsim.gui.controllers.SimulatorController/lambda$null$25
Stacktrace:
java.lang.NullPointerException at vsim.gui.controllers.SimulatorController.lambda$null$25(SimulatorController.java:579) at com.sun.javafx.application.PlatformImpl.lambda$null$397(PlatformImpl.java:295) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.application.PlatformImpl.lambda$runLater$398(PlatformImpl.java:294) at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95) at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method) at com.sun.glass.ui.gtk.GtkApplication.lambda$null$203(GtkApplication.java:139) at java.lang.Thread.run(Thread.java:748)
Unexpected Exception in vsim.gui.controllers.SimulatorController/lambda$null$24
Stacktrace:
java.lang.NullPointerException at vsim.gui.controllers.SimulatorController.lambda$null$24(SimulatorController.java:572) at com.sun.javafx.application.PlatformImpl.lambda$null$397(PlatformImpl.java:295) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.application.PlatformImpl.lambda$runLater$398(PlatformImpl.java:294) at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95) at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method) at com.sun.glass.ui.gtk.GtkApplication.lambda$null$203(GtkApplication.java:139) at java.lang.Thread.run(Thread.java:748)
Typo in Linker.java
vsim: (error) linker: global start label ‘ ‘ wast not found in text segment
it should be «was not found in text segment» or «wasn’t found in text segment»
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
Here are the examples of the java api jupiter.Flags.START taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
// Other utilities
/**
* Verifies if the program contains the main entry point (start label).
*
* @return {@code true} if the program contains the main entry point, false if not
*/
protected boolean hasEntryPoint() {
return globals.containsKey(Flags.START);
}
/**
* Links RISC-V replacedembly programs.
*
* @param programs list of unlinked programs
* @return linked program
* @throws LinkerException if a linker error occurs
*/
public static LinkedProgram link(ArrayList<Program> programs) throws LinkerException {
Symbol start = Globals.globl.getSymbol(Flags.START);
if (start != null && start.getSegment() == Segment.TEXT) {
// create a new linked program
LinkedProgram lp = new LinkedProgram();
// link .text
for (Program program : programs) {
for (Statement stmt : program.text()) {
lp.add(stmt);
}
}
// link .rodata
lp.rodataStart();
for (Program program : programs) {
for (Byte b : program.rodata()) {
lp.add(b);
}
lp.align();
}
lp.rodataEnd();
// link .bss
for (Program program : programs) {
for (Byte b : program.bss()) {
lp.add(b);
}
lp.align();
}
// link .data
for (Program program : programs) {
for (Byte b : program.data()) {
lp.add(b);
}
lp.align();
}
// dump
if (Flags.DUMP_CODE != null || Flags.DUMP_DATA != null) {
// machine code
if (Flags.DUMP_CODE != null) {
try {
Dump.dumpCode(Flags.DUMP_CODE, lp);
Logger.info("code dumped to file: " + Flags.DUMP_CODE);
} catch (IOException e) {
Logger.warning("could not dump code to file: " + Flags.DUMP_CODE);
}
}
// static data
if (Flags.DUMP_DATA != null) {
try {
Dump.dumpData(Flags.DUMP_DATA, lp);
Logger.info("static data dumped to file: " + Flags.DUMP_DATA);
} catch (IOException e) {
Logger.warning("could not dump static data to file: " + Flags.DUMP_DATA);
}
}
Jupiter.exit(0);
}
return lp;
} else if (start != null) {
throw new LinkerException("global start label '" + Flags.START + "' not defined in .text segment");
} else {
throw new LinkerException("global start label '" + Flags.START + "' not defined");
}
}
future hacker 0 / 0 / 0 Регистрация: 07.04.2019 Сообщений: 14 |
||||
1 |
||||
01.06.2019, 22:16. Показов 3775. Ответов 9 Метки нет (Все метки)
Можете подсказать как исправить. При компиляции выдает [Error] label ‘xy’ used but not defined
__________________
0 |
Programming Эксперт 94731 / 64177 / 26122 Регистрация: 12.04.2006 Сообщений: 116,782 |
01.06.2019, 22:16 |
9 |
plzvtl 57 / 43 / 12 Регистрация: 27.10.2018 Сообщений: 452 |
||||
01.06.2019, 22:37 |
2 |
|||
Синтакс неправильный в строке 6. Добавлено через 1 минуту Добавлено через 1 минуту
0 |
Диссидент 27209 / 16962 / 3749 Регистрация: 24.12.2010 Сообщений: 38,148 |
|
01.06.2019, 22:43 |
3 |
label ‘xy’ used but not defined Дык, а где ты эту метку определил? Добавлено через 5 минут
goto очень опасен Да пир чем тут goto? Строки 6-7 предполагают, скорее всего
1 |
0 / 0 / 0 Регистрация: 07.04.2019 Сообщений: 14 |
|
01.06.2019, 22:49 [ТС] |
4 |
с лекции по программированию Указатели и константы
0 |
Диссидент 27209 / 16962 / 3749 Регистрация: 24.12.2010 Сообщений: 38,148 |
|
01.06.2019, 22:57 |
5 |
с лекции по программированию Пошли эти лекции куда подальше… Или — разуй глаза…
0 |
0 / 0 / 0 Регистрация: 07.04.2019 Сообщений: 14 |
|
01.06.2019, 22:59 [ТС] |
6 |
эти лекции преподают у нас в универе
0 |
Байт |
01.06.2019, 23:11
|
Не по теме:
эти лекции преподают у нас в универе Сочувствую…
0 |
57 / 43 / 12 Регистрация: 27.10.2018 Сообщений: 452 |
|
02.06.2019, 00:42 |
8 |
Указатели и константы Простите ,а где собственно здесь указатели и константы? Добавлено через 2 минуты
gotoxy(37, 1) А что это должно делать? Добавлено через 4 минуты Добавлено через 21 секунду
0 |
Диссидент 27209 / 16962 / 3749 Регистрация: 24.12.2010 Сообщений: 38,148 |
|
02.06.2019, 10:00 |
9 |
gotoxy(37, 1) В пакете conio.h кажется, была такая функция перемещения курсора в точку экрана. Могу и ошибаться, ибо закончил общение с этим пакетом еще в прошлом тысячелетии.
такая строка приводит к С2094 Без полного кода сказать мало что можно.
0 |
jugu 610 / 415 / 151 Регистрация: 11.01.2019 Сообщений: 1,746 |
||||
02.06.2019, 10:14 |
10 |
|||
future hacker, если в некоторой функции F используется оператор goto xy, то в пределах этой же функции F должен быть оператор, помеченный меткой xy, на который выполняется переход. У тебя помеченного оператора нет, т.е. сама метка не определена. У тебя, судя по коду, должно быть что-то типа этого:
0 |
NameError — одна из самых распространенных ошибок в Python. Начинающих она может пугать, но в ней нет ничего сложного. Это ошибка говорит о том, что вы попробовали использовать переменную, которой не существует.
В этом руководстве поговорим об ошибке «NameError name is not defined». Разберем несколько примеров и разберемся, как эту ошибку решать.
NameError возникает в тех случаях, когда вы пытаетесь использовать несуществующие имя переменной или функции.
В Python код запускается сверху вниз. Это значит, что переменную нельзя объявить уже после того, как она была использована. Python просто не будет знать о ее существовании.
Самая распространенная NameError
выглядит вот так:
NameError: name 'some_name' is not defined
Разберем частые причина возникновения этой ошибки.
Причина №1: ошибка в написании имени переменной или функции
Для человека достаточно просто сделать опечатку. Также просто для него — найти ее. Но это не настолько просто для Python.
Язык способен интерпретировать только те имена, которые были введены корректно. Именно поэтому важно следить за правильностью ввода всех имен в коде.
Если ошибку не исправить, то возникнет исключение. Возьмем в качестве примера следующий код:
books = ["Near Dark", "The Order", "Where the Crawdads Sing"]
print(boooks)
Он вернет:
Traceback (most recent call last):
File "main.py", line 3, in
print(boooks)
NameError: name 'boooks' is not defined
Для решения проблемы опечатку нужно исправить. Если ввести print(books)
, то код вернет список книг.
Таким образом при возникновении ошибки с именем в первую очередь нужно проверить, что все имена переменных и функций введены верно.
Причина №2: вызов функции до объявления
Функции должны использоваться после объявления по аналогии с переменными. Это связано с тем, что Python читает код сверху вниз.
Напишем программу, которая вызывает функцию до объявления:
books = ["Near Dark", "The Order", "Where the Crawdads Sing"]
print_books(books)
def print_books(books):
for b in books:
print(b)
Код вернет:
Traceback (most recent call last):
File "main.py", line 3, in
print_books(books)
NameError: name 'print_books' is not defined
На 3 строке мы пытаемся вызвать print_books()
. Однако эта функция объявляется позже.
Чтобы исправить эту ошибку, нужно перенести функцию выше:
def print_books(books):
for b in books:
print(b)
books = ["Near Dark", "The Order", "Where the Crawdads Sing"]
print_books(books)
Причина №3: переменная не объявлена
Программы становятся больше, и порой легко забыть определить переменную. В таком случае возникнет ошибка. Причина в том, что Python не способен работать с необъявленными переменными.
Посмотрим на программу, которая выводит список книг:
Такой код вернет:
Traceback (most recent call last):
File "main.py", line 1, in
for b in books:
NameError: name 'books' is not defined
Переменная books
объявлена не была.
Для решения проблемы переменную нужно объявить в коде:
books = ["Near Dark", "The Order", "Where the Crawdads Sing"]
for b in books:
print(b)
Причина №4: попытка вывести одно слово
Чтобы вывести одно слово, нужно заключить его в двойные скобки. Таким образом мы сообщаем Python, что это строка. Если этого не сделать, язык будет считать, что это часть программы. Рассмотрим такую инструкцию print()
:
Этот код пытается вывести слово «Books» в консоль. Вместо этого он вернет ошибку:
Traceback (most recent call last):
File "main.py", line 1, in
print(Books)
NameError: name 'Books' is not defined
Python воспринимает «Books» как имя переменной. Для решения проблемы нужно заключить имя в скобки:
Теперь Python знает, что нужно вывести в консоли строку, и код возвращает Books
.
Причина №5: объявление переменной вне области видимости
Есть две области видимости переменных: локальная и глобальная. Локальные переменные доступны внутри функций или классов, где они были объявлены. Глобальные переменные доступны во всей программе.
Если попытаться получить доступ к локальной переменной вне ее области видимости, то возникнет ошибка.
Следующий код пытается вывести список книг вместе с их общим количеством:
def print_books():
books = ["Near Dark", "The Order", "Where the Crawdads Sing"]
for b in books:
print(b)
print(len(books))
Код возвращает:
Traceback (most recent call last):
File "main.py", line 5, in
print(len(books))
NameError: name 'books' is not defined
Переменная books
была объявлена, но она была объявлена внутри функции print_books()
. Это значит, что получить к ней доступ нельзя в остальной части программы.
Для решения этой проблемы нужно объявить переменную в глобальной области видимости:
books = ["Near Dark", "The Order", "Where the Crawdads Sing"]
def print_books():
for b in books:
print(b)
print(len(books))
Код выводит название каждой книги из списка books
. После этого выводится общее количество книг в списке с помощью метода len()
.
I keep getting this msg
VBA
Compile Error:
Label not defined
Yes, Label starts with a letter.
Label Has No spaces
Label Has Nothing but letters.
Label’s First letter is in column 1 ( per the editor in Access VBA code editor )
Label Does end with a “ : “ at end.
Not with the extra spaces or quotes.
i Did comment the line out with the Label, ( only label on the line). On a new line I retyped the same label.
i Did save, do a RefreshAll, did a close of VBA editor, then restarted VBA editor, clicked on reset, then debug got same msg.
i did this between every time i tried a different way.
I used GoTo ErrHandler
then added On Error GoTo ErrHander
I copied the label from the Goto line, then pasted it at spot I want, with first letter in column 1, added “
: “ at the end, so no way I could have misspelled the label.
I also did the same using 57
as the label, I did put label on line 57 just in case. as in goto a line number.
Every time I get the same msg.
Only thing I noticed that was different is in Tools / References I see under Available References the below
EditionUpgradeHelperLib
Location C:WindowsSystems32 EditionUpgradeHelperLib.dll
Language: Standard
That is the only reference I do NOT ever recall seeing before. If definitely was no picked before.
I did search net, only info I got came to this, download third party app(s) that is supposed to check all “dll” files , fix them, and remove them if you want to, but that doc had a LONG list of things to do before run program, and hope fixes, not make worse.
and how to reinstall the dll if it turns out you MUST have it.
Was never able to find out what that file is supposed to do.
Never before had this msg, unless I made a typo.
I do have under Available references checked
Visula Basic For Applications
Microsoft Access 16.0 Object Library
OLE Automation
Microsoft Office 16.0 Access database engine Object Library
Microsoft Office 16.0 Object Library
i thank you for any help you can give.
mark J
Mark J