OpenASIP
2.0
|
#include <CUOpcodeGenerator.hh>
Public Types | |
typedef std::string | OperationType |
typedef size_t | EncodingType |
typedef std::map< OperationType, EncodingType, TCEString::ICLess > | OperationEncodingMapType |
Public Member Functions | |
CUOpcodeGenerator (const TTAMachine::Machine &mach, const std::string &entityName="tta0") | |
virtual | ~CUOpcodeGenerator () |
OperationEncodingMapType | encodings () const |
size_t | encoding (const std::string &operName) const |
size_t | opcodeWidth () const |
void | generateOpcodePackage (HDL language, std::ofstream &stream) const |
Static Public Member Functions | |
static size_t | gcuOpcodeWidth (const TTAMachine::Machine &mach) |
Private Member Functions | |
CUOpcodeGenerator () | |
void | WriteVhdlOpcodePackage (const OperationEncodingMapType &encodings, std::ofstream &stream) const |
void | WriteVerilogOpcodePackage (const OperationEncodingMapType &encodings, std::ofstream &stream) const |
Private Attributes | |
const TTAMachine::Machine * | mach_ |
const std::string | entityStr_ |
Class that for given ADF generates encodings for Global Control Unit and RTL package that holds encoding information for CU RTL source codes.
Definition at line 57 of file CUOpcodeGenerator.hh.
typedef size_t ProGe::CUOpcodeGenerator::EncodingType |
Definition at line 61 of file CUOpcodeGenerator.hh.
typedef std::map<OperationType, EncodingType, TCEString::ICLess> ProGe::CUOpcodeGenerator::OperationEncodingMapType |
Definition at line 63 of file CUOpcodeGenerator.hh.
typedef std::string ProGe::CUOpcodeGenerator::OperationType |
Definition at line 60 of file CUOpcodeGenerator.hh.
ProGe::CUOpcodeGenerator::CUOpcodeGenerator | ( | const TTAMachine::Machine & | mach, |
const std::string & | entityName = "tta0" |
||
) |
Definition at line 55 of file CUOpcodeGenerator.cc.
|
virtual |
Definition at line 61 of file CUOpcodeGenerator.cc.
|
private |
Definition at line 59 of file CUOpcodeGenerator.cc.
size_t ProGe::CUOpcodeGenerator::encoding | ( | const std::string & | operName | ) | const |
Definition at line 84 of file CUOpcodeGenerator.cc.
References encodings(), and THROW_EXCEPTION.
Referenced by encodings(), and DefaultDecoderGenerator::opcode().
CUOpcodeGenerator::OperationEncodingMapType ProGe::CUOpcodeGenerator::encodings | ( | ) | const |
Definition at line 67 of file CUOpcodeGenerator.cc.
References assert, TTAMachine::Machine::controlUnit(), encoding(), MachineInfo::getOpset(), mach_, and StringTools::stringToLower().
Referenced by encoding(), generateOpcodePackage(), WriteVerilogOpcodePackage(), and WriteVhdlOpcodePackage().
|
static |
Definition at line 140 of file CUOpcodeGenerator.cc.
References TTAMachine::Machine::controlUnit(), TTAMachine::FunctionUnit::operationCount(), and MathTools::requiredBits().
Referenced by opcodeWidth().
void ProGe::CUOpcodeGenerator::generateOpcodePackage | ( | HDL | language, |
std::ofstream & | stream | ||
) | const |
Definition at line 114 of file CUOpcodeGenerator.cc.
References assert, encodings(), ProGe::Verilog, ProGe::VHDL, WriteVerilogOpcodePackage(), and WriteVhdlOpcodePackage().
Referenced by ProGe::ProcessorGenerator::generateGCUOpcodesPackage().
size_t ProGe::CUOpcodeGenerator::opcodeWidth | ( | ) | const |
Definition at line 98 of file CUOpcodeGenerator.cc.
References gcuOpcodeWidth(), and mach_.
|
private |
Definition at line 173 of file CUOpcodeGenerator.cc.
References encodings(), StringTools::stringToUpper(), and Conversion::toString().
Referenced by generateOpcodePackage().
|
private |
Definition at line 154 of file CUOpcodeGenerator.cc.
References encodings(), entityStr_, StringTools::stringToUpper(), and Conversion::toString().
Referenced by generateOpcodePackage().
|
private |
Definition at line 86 of file CUOpcodeGenerator.hh.
Referenced by WriteVhdlOpcodePackage().
|
private |
Definition at line 85 of file CUOpcodeGenerator.hh.
Referenced by encodings(), and opcodeWidth().