FAQ
From JopWiki
Contents |
[edit] VHDL files are missing when synthesizing JOP on Quartus or ISE
Some VHDL files are generated from the microcode that implements the JVM. Therefore you have to perform additional steps in the build process. See Getting started and Xilinx.
[edit] How can System.in be used with an USB connection?
java.lang.System.in and java.lang.System.out use the special streams java.io.JOPInputStream and java.io.JOPOutputStream. System.out is routed to the serial line and to the USB device. However, System.in has to block on a read operation and therefore uses only one device. The default is the serial line and can be changed in java.io.JOPInputStream.
[edit] How to use the Flash on the Cycore board?
A small Java program is available to erase, program, and read the 8-bit Flash: util.Amd.
[edit] I get stack overflows
JOP has a limited on-chip RAM for the stack. Therefore, try to reduce the call depth of your application. If this does not help the size of the on-chip stack cache can be increased. Following constants have to be changed:
- RAM_LEN in com.jopdesign.sys.Jopa
- STACK_SIZE in com.jopdesign.sys.Const
For 'make jsim' to a maximum of 68265, default value is 256.
- ram_width in jop_config_xx.vhd
For 'make sim' using ModelSim, default value is 8. This value must correlate with the correct RAM_LEN and STACK_SIZE java file constants. E.g. 1024 = 2 ^ 10, 2K = 2 ^ 11, etc.
For ModelSim hardware simulation, a full 'make all' is recommended to recompile JOP with the changes. For a soft JOP simulation, only rebuilding the tools using 'make tools' is required.
[edit] Why is the download so slow?
If you are using an USB based serial adapter, you may experience lengthy delays when the down.exe program runs as part of make japp. For example, downloading a simple Hello World program may take 12 minutes instead of 2.
To fix this problem, you can modify the download process so that echoing is disabled. To do so:
1. Disable echoing in asm/src/jvm.asm by commenting out the following lines:
434: // ldi io_uart // write byte to uart 435: // stmwa 436: // dup // echo for down.c, 'handshake' 437: // stmwd 438: // wait 439: // wait
2. Disable echoing in c_src/down.c by commenting out the following lines:
54: // ReadFile(hCom, &c, 1, &cnt, NULL);
55: // printf("%d ", c); fflush(stdout);
56: // if (data != c) {
57: // printf("error during download\n");
58: // exit(-1);
59: // }
You will then need to produce a new down.exe by recompiling it:
gcc c_src/down.c -o down.exe
