Go to the documentation of this file.
55 CUOpcodeGenerator::CUOpcodeGenerator(
57 : mach_(&mach), entityStr_(entityName) {}
75 MachineInfo::OperationSet::iterator it;
76 for (it = gcuOps.begin(); it != gcuOps.end(); it++) {
86 if (encMap.count(operName)) {
87 return encMap.at(operName);
115 HDL language, std::ofstream& stream)
const {
125 if (language ==
VHDL) {
127 }
else if (language ==
Verilog) {
130 assert(
false &&
"Unsupported HDL.");
156 stream <<
"library IEEE;" << endl
157 <<
"use IEEE.std_logic_1164.all;" << endl
159 <<
"package " +
entityStr_ +
"_gcu_opcodes is" << endl;
160 OperationEncodingMapType::const_iterator it;
166 stream <<
"end " +
entityStr_ +
"_gcu_opcodes;" << endl;
179 OperationEncodingMapType::const_iterator it;
184 stream <<
"," << endl;
std::string OperationType
void WriteVerilogOpcodePackage(const OperationEncodingMapType &encodings, std::ofstream &stream) const
static std::string toString(const T &source)
#define assert(condition)
static size_t gcuOpcodeWidth(const TTAMachine::Machine &mach)
virtual ControlUnit * controlUnit() const
void generateOpcodePackage(HDL language, std::ofstream &stream) const
#define THROW_EXCEPTION(exceptionType, message)
Exception wrapper macro that automatically includes file name, line number and function name where th...
static OperationSet getOpset(const TTAMachine::Machine &mach)
const TTAMachine::Machine * mach_
virtual int operationCount() const
const std::string entityStr_
size_t encoding(const std::string &operName) const
TCETools::CIStringSet OperationSet
virtual ~CUOpcodeGenerator()
void WriteVhdlOpcodePackage(const OperationEncodingMapType &encodings, std::ofstream &stream) const
HDL
HDLs supported by ProGe.
OperationEncodingMapType encodings() const
size_t opcodeWidth() const
std::map< OperationType, EncodingType, TCEString::ICLess > OperationEncodingMapType