JBits resources
This site is still under construction more information are coming soon
JBits is the first tool that enables the designers to handle the FPGA bit streams. This tool is designed by Xilinx, Inc. the world FPGA leader for its own FPGAs "mainly Vertix Family".
This tool is a set of Java APIs and classes which gives it most of the simplicity in coding. It is very useful for designers who want to design run time reconfigurable logic on FPGAs which will help in teh future revolution of the online upgradable hardware.
The tool come with set of tools like logic simulator, power simulator and scripting tools.
The latest release of JBits API is 2.5, it is not yet stable many changes are going to enhance the features and ease of coding.
To summarize:
- JBits handles FPGA bitstreams
- Java based APIs
- Supports partial configuration and modification of the bit stream
- Supports Run time reconfiguration of the internal logic of the FPGA
- It is a low level tool that gives access to the FPGA internal logic and routing resources.
Related links about JBits
How to create an RTPcore using JBits 2.4 classes
- There are two types of cores, the main core and the small cores. The main core is composed of several small cores that are used to build it up.
- This section will describe the small cores. The main core is going to come soon.
- 1. Extend the com.xilinx.JBits.CoreTemplate.RTPCore class "This class is an abstract one which can be used as a template for your core"
- 2. Define core granularity by implementing the abstract methods getHeightGran() and getWidthGran() that should return one of these constants Gran.CLB, Gran.SLICE or Gran.LE
- 3. Set the core height and width in the your core's constructor by calling setHeight() and setWidth()
- 4. Define external ports in the constructor using Net type (that includes clock,inputs and outputs)
- 5. Add ports to the core by using newOutputPort() and newInputPort() also in the constructor
- 6. I suggest to implement the following methods (some of them are taken from the JBits SDK examples) for better coding structure and organization. These methods should be declared private.
- CreatePins: in this method you Create pins, locate them on the resources and connect them to the external ports
- ConfigureCLBs: in this method you do the real configuration for the FPGA logic resources (Flip-flops, LUT, carry logic....). More information about this method will come soon.
- TagCLB: in this method you tag each usable CLB within the core using Bitstream.getVirtex().setTag(row, col, tag) (The tags issue will be described later)
- InternalRoute: in this method you define all internal routings or the core. More information about this method and general routing techniques will come soon.
- 7. Define the implement() method that calls all of the above four methods and places the core on its location (the next 2 points will describe how) so as to do the real implementation of the core on the hardware. This method should be made public so as to be called externally
- 8. Define the core offset using calcAbsoluteOffset() that returns an offset object
- 9. This offset can be used to get the location of the starting point of the core in row, column and slice by using offset.getVerOffset(Gran.CLB) and offset.getHorOffset(Gran.CLB)
- 10. It is recommended to define calcWidth() and calcHeight() as static public methods that returns the height and width of the core (based on some parameters) without instantiating it.
- For examples check My cores section in this page "Shift2D.java and Dalut.java"
How to create a parent RTPcore using JBits 2.4 classes
- 0. Steps 1-5 are the same as the child core
- 6. Define the implement() method that places the core on its location and do the real implementation of the core on the hardware. This method should be made public so as to be called externally
- 7. The followings should be done in the implement method:
- Create the children cores
- Create top level Nets and busses using Net("NetName",this) also the same for buses. Note the use of the keyword this idicates that this core is using the new net.
- Connect top level ports to the top level nets and so the children pins using PortObject.setIntSig(NetObject)
- Call addChild(ChildRTPCore) for all children cores.
- Define the core offset using calcAbsoluteOffset() that returns an offset object.
- Define the relative offsets of the children cores using ChildCore.getRelativeOffset() and set it using ChildOffsetObject.setVerOffset() and ChildOffsetObject.setHorOffset() This offset should be in relative to the position of the Top core.
- Finally Connect the top level nets and buses using Bitstream.connect(NetObject)
- For examples check My cores section in this page "DAfilter.java"
How to do routing using JRoute 2.4 APIs and classes
- Coming soon
-
- For examples check My cores section in this page "Shift2D.java , Dalut.java , DAfilter.java , TestCore.java and SetDAfilter.java"
How to create a Test program and bit stream handler using JBits 2.4 classes
- 1. Create a new class that extends JBitsCommandLineApp class
- 2. In this class you implement the RTCore place and route it, create the bitstream, SYM and/or EDIF file.
- 3. This class needs two methods to be implemented the static main() method and the run method.
- 4. In the main method do the followings
- Instantiate the class itself
- set appName variable
- call the method parseCommandLine(args) which will parse the command line for the device name, the input and output bitstream files' names that are used in the internal logic
- call makeJBits() method that creates the JBits object using the parameters that came in on the command line and defines an internal JBits object jbits to be passed to other methods.
- call the run() method so as to place the core, define its parameters and modify the input Bitstream file.
- call writeBitstream() method to write the bitstream file defined in the output file command line parameter
- 5. In the run() method do the followings
- Define Core global parameters
- Create the JRoute object based on the jbits object (this is created from the class itself check the main method)
- Define the target FPGA architecture (Virtex) using Bitstream.setVirtex(jbits, jroute) method
- Define the core output using the CoreOutput class methods generateBitstream(),generateEDIF() and generateSYM() that takes either true or false as a parameter.
- Create top level Nets and Buses
- Create the system Clock (Will be explained later)
- Instantiate the RTPCores
- set the location of the cores using .getRelativeOffset() method of the core itself, that returns an Offset object which can be used to set the vertical and horizontal locations using the setVerOffset(Gran.CLB,ROW) and setHorOffset(Gran.CLB,COL) methods.
- Once everything is defined call the implement method of each core
- You can run the program as java ProgName -DeviceName InputBitstreamFile.bit OutputStreamFile.bit
- For examples check My cores section in this page "TestCore.java and SetDAfilter.java"
How to create an RTP core using JBits 2.3 classes
- 1. Create new class that extends the com.xilinx.JBits.Virtex.RTPCore.RTPCore class
- 2. You may add it to com.xilinx.JBits.Virtex.RTPCore package
- 3. The constructor should define : the clbWidth, clbHeight, the Core name, the core state symbol, core tag and uniqueTag which reperesents the TagID for each instantace of the core. These variables are protected members of the RTPCore class.
- 4. The core can either overrides the set method "function" That is defined in the Core class as set (JBits _jbits, int _clbRow, int _clbColumn) where JBits is the Jbits class, clbRow and clbColumn are the starting clb of the Core. or implements the set method that is defined as (JBits _jbits).
- 5. When the set(JBits) method is implemented the position of the core is going to be taken from the RTPCore protected members clbColumn & clbRow
- 6. These members will be defined through the use of the place method which sets the relative location of the RTPCore with respect to other core.
- 7. In set function check the written member "variable" that is defined in the RTPCore class to determine the existance of previos setting and set it to true after the core is being set.
- 8. The uniqueTag member must be incremented for each instance of the core and set using the setUniqueTag.
- 9. The functionality is defined using jBits.set(row, col, Resource_Element, Resource_configuration) to define all logic and clocked operations using the CLB resources.
- 10. For each clb the method setTag(JBits jBits, int clbRow, int clbColumn) or setTag(int clbRow, int clbColumn, int tag) to set the CLB tag.
- 11. To remove the core use the method remove(JBits jBits)
- For examples check My cores section in this page
Internal Routing:
- 1. Create end points EndPoint, Pins or Ports objectives for source and distination points in the CLBs
- 2. Create new Router object with the cores JBits
- 3. call the route method defined in the Router Object with the source and destination end points
- 4. Set the configurations using the setJBits(jBits) method
- For examples check My cores section in this page
Notes:
- 1. This information is valid only for release 2.3
- 2. This class will not be the main class in future releases
- 3. There is a problem with multiple instances of the same core and their location information.
Please send your comments to Jamil Khatib
Mini JBits FAQs
- Is it possible that I design a complicated SOC by VHDL, then do the Run-time Reconfiguration to change a part of the peripheral circuits by using JBits.
If you can identify the CLBs you want to modify you can, but the JBits does not provide a simple way to map between the HDL logic and the target CLB or hardware resource so as to modify it.
The only current solution to this problem is to design the entire core with JBits APIs.
- Can Jbits APIs support the complicated system-on-a-chip based FPGA?
In fact JBits is still in its early releases. If you want to build a large SOC, I think the only way is to build it up of small RTPCores and not using direct coding of the large block because you have to code and handle many resources manally.
- Can I create bitstream file using the JBits?
No the JBits APIs just modifies the existing files and can not create them from scrach. Even though, the JBits SDK provides few null bitstream files for XCV300 and XCV1000 devices that can be used to create new bitstream configurations.
- Some JBits programs needs ".bit" file as input, How can I find it?
".bit" file is the bitstreem file for FPGA. As stated in the prevois question JBits can can not create such files, Xilinx created some null bitstream files for some FPGAs (XCV300 for example), these files can be used as input to these programs and to be modified (create new configuration) by the JBits programs.
- Should I know Java language to use the JBits?
Yes. In fact JBits APIs are written in Java and are used as any Java APIs and classes. So in order to write a code using JBits you have to know at least the basics of Java language.
- How can I compile my JBits code?
Use the standard Java technique. You can type following on the command line: javac JbitsCode.java
- What are the supported devices by JBits?
The Vertix family is the only supported devices by JBits.
- What do I need on my system (board) to support JBits APIs?
You need a board that has a processor with an operating system that supports Java or an interface to such system. Your system must also be capable of doing the configuration for the Vertix chip. You can also refer to the JBits documentation and check the features of supported boards. Remore about XVPI in JBits2.5 documentation under JBits2.5/doc/XVPI/XVPI.html
My JBits source codes
Last update: 14 February 2001