JOP

Java Optimized Processor

 


Home
Documentation
Performance
Download
Applications
Board
Getting Started
Links

Contact

Getting Started

This 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:

Booting

In the final appliction boot works as follows:
  • WD generates reset on power up for MAX7032.
  • MAX7032 loads FPGA configuration for ACEX from FLASH.
  • MAX7032 generates reset on FPGA.
  • JVM is started (jvmflash.asm) and loads Java program from FLASH to RAM.
  • Java program is started.
  • Application has to toggle WD input.
But how can the FLASH get programmed and is there a faster way for development?

There are two ways to configure the FPGA and two ways to load Java programs:

Configure FPGA

The 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:
  • confacx.vhd (confacx.pof) for FLASH mode.
  • pld_init2.vhd (pld_init2.pof) for JTAG mode.

Load Java program

There are two versions of the JVM: One loads the Java program from FLASH, the second from the serial line (115200, 8, n, 1).
  • jvmflash.asm for FLASH mode.
  • jvm.asm for serial line mode.

Design Flow

This 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 PLD

The PLD has to be programmed first:

Generate a project in Leonardo with pld_init2.vhd or open pld_init2.lsp in directory wrk. Leonardo project files use absolute path, so you have to edit the file for your directory structure.

Select device EPM7032AETC44 and check the output file. It should be: ../wrk/pld_init2.edf.

Run Flow

Generate a project from pld_init2.edf in MAX PLUS and run the Compiler.

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.: ../wrk/jc_init.jcf).

In the programmer window select 'Program' ('Configure' is used to configure a FPGA).

FPGA configuration

The 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 ../wrk/jopcore.lsp or use it.

Generate a project in MAX PLUS and define the pins. The simplest way to define the pins is:

  • After project definition close MAX PLUS.
  • Open project.acf and copy a definition from pins.txt (see: -- pins for jopcore (2002/05) .
  • Compile the project in MAX PLUS.
  • Check the report for pinout and that VCCIO is configured for 3.3V!.
Importand part of the report: jopcore.rpt

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 program

Java 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.bin
WinZip 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 down.c does just this.

FLASH programming

There 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