edu.byu.ece.edif.tools.sterilize.lutreplace.logicLutRam.Replace
Class replaceLutRam

java.lang.Object
  extended by edu.byu.ece.edif.tools.sterilize.lutreplace.logicLutRam.Replace.replaceLutRam

public class replaceLutRam
extends java.lang.Object

Takes an EDIF design and replaces all LUTRAMs with a logic implementation. Replacing LUTRAMs allows readback to be used on a design. Note that logic implementations of LUTRAMs are much more costly in terms of size.

Version:
$Id:replaceLutRam.java 198 2008-04-16 21:14:21Z jamesfcarroll $
Author:
Nathan Rollins

Field Summary
private static java.lang.String _designname
           
private static EdifEnvironment _eedesign
           
private static EdifEnvironment _eelogiclib
           
private static java.lang.String _ext
           
private static boolean _externalCall
           
private static boolean _justwrapper
           
private static java.lang.String _logiclib
           
private static java.lang.String _newedif
           
private static RLOCRemove _remover
           
private static boolean _replaceRLOCs
           
private static java.lang.String _target
           
private static TargetPart _targetPart
           
private static java.lang.String _wrapper
           
 
Constructor Summary
replaceLutRam(EdifEnvironment eedesign)
           
replaceLutRam(java.lang.String filename)
          Default constructor
 
Method Summary
private  void _createEnvironments()
          This function creates the EdifEnvironments for the library and design files.
private static void _fixFile(java.lang.String filename)
          This function ensures that the file has an EDIF extension
private static int _initString2int(java.lang.String initstring)
          This function returns the integer value of a hexidecimal string
private static long _initString2long(java.lang.String initstring)
          This function returns the integer value of a hexidecimal string
private static void _modifyLutRam(EdifCell oldCell, EdifCell newCell, EdifCellInstance cellInstance)
          Modify LUTRAM instances and uniquify them so that each instance can be initialized according to the Xilinx LUTRAM primitive init string.
private static void _parseArgs(java.lang.String[] args)
          This function parses the arguments passed in from the command-line when executing the main function.
private static void _setJHDLWrapperFile(java.lang.String filename)
          This function sets the name of the JHDL wrapper output file.
private static void _setOutputEDIFFile(java.lang.String filename)
          This function sets the name of the EDIF output file.
private static void _setReplaceLibraryFile(java.lang.String filename)
          This function sets the name of the EDIF LUTRAM replacement library file
private static void _setTarget(java.lang.String target)
          This function sets the FPGA target architecture
private static void _usage()
          This function prints out the command-line options
 void createJHDLWrapper()
          This function creates a JHDL wrapper file based on the _eedesign EdifEnvironment variable
static void main(java.lang.String[] args)
          The main function which can be used to execute the replacement operation from the command-line.
 void replaceLutRams()
          The main replacement function.
 void setJHDLWrapperFile(java.lang.String filename)
          This function sets the name of the JHDL wrapper output file.
 void setOutputEDIFFile(java.lang.String filename)
          This function sets the name of the EDIF output file.
 void setReplaceLibraryFile(java.lang.String filename)
          This function sets the name of the EDIF LUTRAM replacement library file
 void setTarget(java.lang.String target)
          This function sets the FPGA target architecture
 void writeEdif()
          This function writes an EDIF file corresponding to the _eedesign EdifEnvironment variable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_externalCall

private static boolean _externalCall

_justwrapper

private static boolean _justwrapper

_replaceRLOCs

private static boolean _replaceRLOCs

_remover

private static RLOCRemove _remover

_eedesign

private static EdifEnvironment _eedesign

_eelogiclib

private static EdifEnvironment _eelogiclib

_targetPart

private static TargetPart _targetPart

_ext

private static java.lang.String _ext

_designname

private static java.lang.String _designname

_logiclib

private static java.lang.String _logiclib

_newedif

private static java.lang.String _newedif

_target

private static java.lang.String _target

_wrapper

private static java.lang.String _wrapper
Constructor Detail

replaceLutRam

public replaceLutRam(java.lang.String filename)
Default constructor

Parameters:
filename - The name of the EDIF design file to modify

replaceLutRam

public replaceLutRam(EdifEnvironment eedesign)
Method Detail

createJHDLWrapper

public void createJHDLWrapper()
This function creates a JHDL wrapper file based on the _eedesign EdifEnvironment variable


replaceLutRams

public void replaceLutRams()
The main replacement function.


setOutputEDIFFile

public void setOutputEDIFFile(java.lang.String filename)
This function sets the name of the EDIF output file.

Parameters:
filename - the name of the output EDIF file

setJHDLWrapperFile

public void setJHDLWrapperFile(java.lang.String filename)
This function sets the name of the JHDL wrapper output file.

Parameters:
filename - the name of the output wrapper file

setReplaceLibraryFile

public void setReplaceLibraryFile(java.lang.String filename)
This function sets the name of the EDIF LUTRAM replacement library file

Parameters:
filename - the name of the EDIF logic LUTRAM library file

setTarget

public void setTarget(java.lang.String target)
This function sets the FPGA target architecture

Parameters:
filename - the name of the architecture

writeEdif

public void writeEdif()
This function writes an EDIF file corresponding to the _eedesign EdifEnvironment variable


main

public static void main(java.lang.String[] args)
The main function which can be used to execute the replacement operation from the command-line.

Parameters:
args - the command-line arguments

_createEnvironments

private void _createEnvironments()
This function creates the EdifEnvironments for the library and design files.


_fixFile

private static void _fixFile(java.lang.String filename)
This function ensures that the file has an EDIF extension

Parameters:
filename - file to fix

_initString2int

private static int _initString2int(java.lang.String initstring)
This function returns the integer value of a hexidecimal string

Parameters:
initstring - the hexidecimal string

_initString2long

private static long _initString2long(java.lang.String initstring)
This function returns the integer value of a hexidecimal string

Parameters:
initstring - the hexidecimal string

_modifyLutRam

private static void _modifyLutRam(EdifCell oldCell,
                                  EdifCell newCell,
                                  EdifCellInstance cellInstance)
Modify LUTRAM instances and uniquify them so that each instance can be initialized according to the Xilinx LUTRAM primitive init string.

Parameters:
oldCell - the Xilinx primitive
newCell - the logic version of the Xilinx primitive
cellInstance - the instance of the LUTRAM to be replaced and initialized

_parseArgs

private static void _parseArgs(java.lang.String[] args)
This function parses the arguments passed in from the command-line when executing the main function.

Parameters:
args - the command-line arguments

_setOutputEDIFFile

private static void _setOutputEDIFFile(java.lang.String filename)
This function sets the name of the EDIF output file.

Parameters:
filename - the name of the output EDIF file

_setJHDLWrapperFile

private static void _setJHDLWrapperFile(java.lang.String filename)
This function sets the name of the JHDL wrapper output file.

Parameters:
filename - the name of the output wrapper file

_setReplaceLibraryFile

private static void _setReplaceLibraryFile(java.lang.String filename)
This function sets the name of the EDIF LUTRAM replacement library file

Parameters:
filename - the name of the EDIF logic LUTRAM library file

_setTarget

private static void _setTarget(java.lang.String target)
This function sets the FPGA target architecture

Parameters:
filename - the name of the architecture

_usage

private static void _usage()
This function prints out the command-line options