JOPJava Optimized Processor
|
|
Getting StartedThis page (should) contain the information you need to get JOP running in an FPGA. The description assumes you are using an ALTERA FPGA (EP1K50 or bigger). The boot logic is for a board like Jop Core PCB. Tools you need:
BootingIn the final appliction boot works as follows:
There are two ways to configure the FPGA and two ways to load Java programs: Configure FPGAThe FPGA is configured in PPA mode when loaded from FLASH. But the JTAG pins are also connected to the ByteBlaster connector. This means it can also be downloaded from MAX+PLUS II. To switch between these two modes the MAX7032 has to be reprogrammed:
Load Java programThere are two versions of the JVM: One loads the Java program from FLASH, the second from the serial line (115200, 8, n, 1).
Design FlowThis is a short description to build JOP from ground up. But you can use any precompiled files or project files from the ZIP archive for a short cut. The only problem is (as usual) that the project files use absolut path information. To keep it simple you can start with this directory structure:\usr\cpu\jop3 .
MAX7032 PLDThe PLD has to be programmed first:Generate a project in Leonardo with Select device EPM7032AETC44 and check the output file. It should be: Run Flow Generate a project from Check the pinout in the report. To program the PLD you have to setup the JTAG chain: Open the programmer window and enable under menu 'JTAG'
'Multi-Device JTAG Chain'. Set up the Chain: First device: EPM7032AE with pld_init2.edf and second device: EP1K50.
This setup can be saved or restored (e.g.: In the programmer window select 'Program' ('Configure' is used to configure a FPGA). FPGA configurationThe JVM is written in 'JOP Assembler' and generates some vhdl and mif files:In directory ../asm these files have to be built: javac Instruction.java javac Jopa.java java Jopa jvm.asm copy rom.mif .. copy ram.mif .. copy *.vhd ..There is a litte batch file for this: doit.bat
Genereate a project in Leonard and Compile it (like above). As an example see Generate a project in MAX PLUS and define the pins. The simplest way to define the pins is:
Change JTAG chain to include jopcore.sof (not .pof!) for EP1K50 and configure FPGA. JOP is now listening on the serial line to load a Java program. Java programJava programs are compiled as usual (javac) but must be preverifyed and linked. This is done with jcc.jar.In directory ../java use doit.bat: rem javac -classpath .;jcc.jar runtime\*.java del *.class javac %1.java copy Object.zip x.zip start /w \programme\winzip\winzip32 -a x.zip *.class rem jar uv0f x.zip Jop.class JopSys.class java -cp jcc.jar;. JavaCodeCompact -nq -arch JOP -o %1.bin x.zip rem copy %1.bin ..\jopsim rem ..\down %1.binWinZip hase to be used, because jar generates a jar-file that can't be read by JavaCodeCompact. The resulting .bin file can now be downloaded via serial line. A small C program FLASH programmingThere is a short java program for JOP to program the FLASH:Mem.java .
Download the corresponding .bin file. A small C program amd.c can be used to
program FPGA configuration (.ttf) and Java programs (.bin).
To boot from FLASH see under Booting (don't forget to program a .ttf file with jvmflash.asm but use jvm.asm for download!).
|
| |
Copyright © 2000-2002, DI Martin Schoeberl
|