OpenASIP 2.2
|
Public Member Functions | |
DefaultICDecoderGenerator (const TTAMachine::Machine &machine, const BinaryEncoding &bem) | |
virtual | ~DefaultICDecoderGenerator () |
virtual void | completeNetlist (NetlistBlock &netlistBlock, const NetlistGenerator &generator) |
void | addRV32MicroCode (NetlistBlock &netlistBlock, const NetlistGenerator &generator) |
void | generateDebuggerCode (const NetlistGenerator &generator) |
void | addDummyIfetchDebugPorts (const NetlistGenerator &generator) |
virtual void | generate (HDL language, const std::string &dstDirectory, const NetlistGenerator &generator, const IDF::MachineImplementation &implementation, const std::string &entityString) |
virtual std::set< int > | requiredRFLatencies (const TTAMachine::ImmediateUnit &iu) const |
virtual void | verifyCompatibility () const |
![]() | |
ICDecoderGeneratorPlugin (const TTAMachine::Machine &machine, const BinaryEncoding &bem, const std::string &description) | |
virtual | ~ICDecoderGeneratorPlugin () |
std::string | pluginDescription () const |
int | recognizedParameterCount () const |
std::string | recognizedParameter (int index) const |
std::string | parameterDescription (const std::string ¶mName) const |
void | setParameter (const std::string &name, const std::string &value) |
const TTAMachine::Machine & | machine () const |
const BinaryEncoding & | bem () const |
Private Member Functions | |
virtual void | writeGlobalDefinitions (HDL language, std::ostream &pkgStream) const |
bool | generateDebugger (bool minimal=true) const |
bool | generateBusTrace () const |
bool | hasSynchronousReset () const |
bool | generateLockTrace () const |
bool | bypassInstructionRegister () const |
int | busTraceStartingCycle () const |
int | lockTraceStartingCycle () const |
bool | generateNoSelfLockingFUs () const |
void | addInstructioRegisterBypass (HDL language, const NetlistGenerator &generator) |
int | calculateSupportedDelaySlots () const |
void | readParameters () |
Static Private Member Functions | |
static std::string | vhdlDirection (ProGe::Direction direction) |
static int | dataPortWidth (const TTAMachine::Socket &socket) |
Private Attributes | |
NetlistBlock * | dbsmBlock |
DefaultICGenerator * | icGenerator_ |
DefaultDecoderGenerator * | decoderGenerator_ |
const TTAMachine::Machine & | ttamachine_ |
const BinaryEncoding & | bem_ |
Additional Inherited Members | |
![]() | |
void | addParameter (const std::string &name, const std::string &description) |
bool | hasParameterSet (const std::string &name) const |
std::string | parameterValue (const std::string &name) const |
![]() | |
static TTAMachine::Socket::Direction | convertDirection (HDB::Direction direction) |
Default implementation for IC/decoder generator.
Definition at line 929 of file DefaultICDecoderPlugin.cc.
|
inline |
Definition at line 931 of file DefaultICDecoderPlugin.cc.
References ProGe::ICDecoderGeneratorPlugin::addParameter(), ProGe::ICDecoderGeneratorPlugin::bem(), BUS_TRACE_STARTING_CYCLE, BYPASS_FETCHBLOCK_REG_PARAM, decoderGenerator_, ENABLE_FEATURE, GENERATE_BUS_TRACE_PARAM, GENERATE_DEBUGGER_PARAM, GENERATE_DEBUGGER_PARAM_EXTERNAL, GENERATE_DEBUGGER_PARAM_INTERNAL, GENERATE_DEBUGGER_PARAM_MINIMAL, GENERATE_LOCK_TRACE_PARAM, icGenerator_, LOCK_TRACE_STARTING_CYCLE, and ProGe::ICDecoderGeneratorPlugin::machine().
|
inlinevirtual |
Definition at line 975 of file DefaultICDecoderPlugin.cc.
References decoderGenerator_, and icGenerator_.
|
inline |
Definition at line 1370 of file DefaultICDecoderPlugin.cc.
References ProGe::BIT, ProGe::BIT_VECTOR, ProGe::StaticSignal::GND, ProGe::IN, ProGe::NetlistGenerator::instructionFetch(), ProGe::OUT, ProGe::NetlistPort::setToStatic(), and ProGe::StaticSignal::VCC.
|
inlineprivate |
Enables instruction register bypass feature in the instruction fetch block.
Definition at line 1835 of file DefaultICDecoderPlugin.cc.
References assert, generateDebugger(), ProGe::NetlistGenerator::instructionFetch(), TTAMachine::Machine::isRISCVMachine(), ProGe::NetlistBlock::setParameter(), ttamachine_, ProGe::Verilog, and ProGe::VHDL.
Referenced by generate().
|
inline |
Definition at line 1004 of file DefaultICDecoderPlugin.cc.
References ProGe::NetlistBlock::addSubBlock(), ProGe::BIT, ProGe::BIT_VECTOR, ProGe::NetlistGenerator::clkPort(), ProGe::Netlist::connect(), ProGe::Netlist::disconnectPorts(), ProGe::NetlistGenerator::FETCHBLOCK_PORT_NAME, DefaultDecoderGenerator::GLOCK_PORT_NAME, IFETCH_STALL_PORT_NAME, ProGe::IN, ProGe::NetlistGenerator::instructionDecoder(), ProGe::NetlistGenerator::instructionDecompressor(), ProGe::NetlistGenerator::instructionFetch(), ProGe::NetlistBlock::netlist(), ProGe::OUT, ProGe::NetlistBlock::port(), DefaultDecoderGenerator::RISCV_SIMM_PORT_IN_NAME, RISCV_SIMM_PORT_OUT_NAME, ProGe::NetlistGenerator::rstPort(), and ProGe::NetlistPort::setWidthFormula().
Referenced by completeNetlist().
|
inlineprivate |
Returns the starting cycle to be written to the bus trace given as parameter.
Definition at line 1740 of file DefaultICDecoderPlugin.cc.
References BUS_TRACE_STARTING_CYCLE, ProGe::ICDecoderGeneratorPlugin::hasParameterSet(), ProGe::ICDecoderGeneratorPlugin::parameterValue(), and Conversion::toUnsignedInt().
Referenced by generate(), lockTraceStartingCycle(), and readParameters().
|
inlineprivate |
Tells whether instruction register should be left generated (true).
Definition at line 1721 of file DefaultICDecoderPlugin.cc.
References BYPASS_FETCHBLOCK_REG_PARAM, BYPASS_FETCHBLOCK_REG_PARAM_YES, ProGe::ICDecoderGeneratorPlugin::hasParameterSet(), and ProGe::ICDecoderGeneratorPlugin::parameterValue().
Referenced by calculateSupportedDelaySlots(), and generate().
|
inlineprivate |
Return number of required delay slots. By default the number is three but can be reduced or increased by options.
Definition at line 1869 of file DefaultICDecoderPlugin.cc.
References bypassInstructionRegister().
Referenced by verifyCompatibility().
|
inlinevirtual |
Completes the given netlist by adding IC block and completing the decoder block by adding the ports connected to IC. Connects also IC to all the units in the machine.
The | netlist to complete. |
generator | The netlist generator which generated the netlist. |
Implements ProGe::ICDecoderGeneratorPlugin.
Definition at line 989 of file DefaultICDecoderPlugin.cc.
References DefaultICGenerator::addICToNetlist(), addRV32MicroCode(), DefaultDecoderGenerator::completeDecoderBlock(), decoderGenerator_, icGenerator_, TTAMachine::Machine::isRISCVMachine(), and ttamachine_.
|
inlinestaticprivate |
Calculates the data port width of the given socket.
socket | The socket. |
Definition at line 1818 of file DefaultICDecoderPlugin.cc.
References TTAMachine::Socket::port(), TTAMachine::Socket::portCount(), and TTAMachine::Port::width().
|
inlinevirtual |
Generates the interconnection network and instruction decoder to the given destination directory.
dstDirectory | The destination directory. |
generator | The netlist generator that generated the netlist. |
Implements ProGe::ICDecoderGeneratorPlugin.
Definition at line 1401 of file DefaultICDecoderPlugin.cc.
References __func__, abortWithError, addInstructioRegisterBypass(), ProGe::ProGeContext::adf(), bem_, busTraceStartingCycle(), bypassInstructionRegister(), ProGe::NetlistGenerator::context(), TTAMachine::Machine::controlUnit(), Environment::dataDirPath(), decoderGenerator_, FileSystem::DIRECTORY_SEPARATOR, DS, Exception::errorMessage(), ProGe::CUOpcodeGenerator::gcuOpcodeWidth(), GENERATE_DEBUGGER_PARAM, GENERATE_DEBUGGER_PARAM_MINIMAL, generateBusTrace(), generateDebugger(), generateDebuggerCode(), DefaultDecoderGenerator::generateInstructionDecoder(), DefaultICGenerator::generateInterconnectionNetwork(), generateNoSelfLockingFUs(), ProGe::RV32MicroCodeGenerator::generateRTL(), MachineInfo::getOpset(), ProGe::BlockSourceCopier::getTemplateInstatiator(), hasSynchronousReset(), icGenerator_, IFETCH_STALL_PORT_NAME, implementation, ProGe::BlockSourceCopier::instantiateHDLTemplate(), ProGe::NetlistGenerator::instructionFetch(), TTAMachine::Machine::isRISCVMachine(), ProGe::ICDecoderGeneratorPlugin::parameterValue(), HDLTemplateInstantiator::replacePlaceholder(), HDLTemplateInstantiator::replacePlaceholderFromFile(), DefaultICGenerator::setBusTraceStartingCycle(), ProGe::RV32MicroCodeGenerator::setBypassInstructionRegister(), DefaultICGenerator::setGenerateBusTrace(), DefaultDecoderGenerator::setGenerateNoLoopbackGlock(), DefaultDecoderGenerator::SetHDL(), DefaultICGenerator::SetHDL(), ProGe::NetlistBlock::setParameter(), Conversion::toString(), ttamachine_, and ProGe::VHDL.
|
inlineprivate |
Tells whether IC generator should generate bus tracing code.
Definition at line 1680 of file DefaultICDecoderPlugin.cc.
References GENERATE_BUS_TRACE_PARAM, GENERATE_BUS_TRACE_PARAM_YES, ProGe::ICDecoderGeneratorPlugin::hasParameterSet(), and ProGe::ICDecoderGeneratorPlugin::parameterValue().
Referenced by generate(), and readParameters().
|
inlineprivate |
Tells whether IC generator should generate debug interface code.
Definition at line 1659 of file DefaultICDecoderPlugin.cc.
References GENERATE_DEBUGGER_PARAM, GENERATE_DEBUGGER_PARAM_EXTERNAL, GENERATE_DEBUGGER_PARAM_INTERNAL, GENERATE_DEBUGGER_PARAM_MINIMAL, GENERATE_DEBUGGER_PARAM_YES, ProGe::ICDecoderGeneratorPlugin::hasParameterSet(), and ProGe::ICDecoderGeneratorPlugin::parameterValue().
Referenced by addInstructioRegisterBypass(), generate(), generateDebuggerCode(), and readParameters().
|
inline |
Definition at line 1101 of file DefaultICDecoderPlugin.cc.
References ProGe::NetlistBlock::addPackage(), ProGe::NetlistBlock::addSubBlock(), assert, ProGe::BIT, ProGe::BIT_VECTOR, ProGe::NetlistGenerator::clkPort(), ProGe::Netlist::connect(), dbsmBlock, decoderGenerator_, ProGe::NetlistGenerator::gcuReturnAddressInPort(), GENERATE_DEBUGGER_PARAM, GENERATE_DEBUGGER_PARAM_EXTERNAL, GENERATE_DEBUGGER_PARAM_MINIMAL, generateDebugger(), DefaultDecoderGenerator::glockRequestWidth(), ProGe::IN, ProGe::BaseNetlistBlock::instanceName(), ProGe::NetlistGenerator::instructionDecoder(), ProGe::NetlistGenerator::instructionFetch(), ProGe::BaseNetlistBlock::moduleName(), ProGe::NetlistBlock::netlist(), ProGe::OUT, ProGe::ICDecoderGeneratorPlugin::parameterValue(), ProGe::NetlistBlock::parentBlock(), ProGe::NetlistBlock::port(), ProGe::NetlistGenerator::rstPort(), ProGe::NetlistBlock::setParameter(), ProGe::NetlistBlock::subBlock(), ProGe::NetlistBlock::subBlockCount(), ProGe::NetlistPort::unsetStatic(), and ProGe::NetlistPort::widthFormula().
Referenced by generate().
|
inlineprivate |
Tells whether IC generator should generate global lock tracing code.
Definition at line 1704 of file DefaultICDecoderPlugin.cc.
References GENERATE_LOCK_TRACE_PARAM, GENERATE_LOCK_TRACE_PARAM_YES, ProGe::ICDecoderGeneratorPlugin::hasParameterSet(), and ProGe::ICDecoderGeneratorPlugin::parameterValue().
Referenced by readParameters().
|
inlineprivate |
Definition at line 1783 of file DefaultICDecoderPlugin.cc.
References ProGe::ICDecoderGeneratorPlugin::hasParameterSet(), NO_SELF_LOCKING_PARAM, NO_SELF_LOCKING_PARAM_YES, and ProGe::ICDecoderGeneratorPlugin::parameterValue().
Referenced by generate().
|
inlineprivate |
Definition at line 1694 of file DefaultICDecoderPlugin.cc.
References ENABLE_FEATURE, ProGe::ICDecoderGeneratorPlugin::hasParameterSet(), ProGe::ICDecoderGeneratorPlugin::parameterValue(), and SYNC_RESET.
Referenced by generate(), and readParameters().
|
inlineprivate |
Returns the starting cycle to be written to the global lock trace given as parameter.
If parameter is not defined use value from busTraceStartingCycle() instead.
Definition at line 1763 of file DefaultICDecoderPlugin.cc.
References BUS_TRACE_STARTING_CYCLE, busTraceStartingCycle(), ProGe::ICDecoderGeneratorPlugin::hasParameterSet(), LOCK_TRACE_STARTING_CYCLE, ProGe::ICDecoderGeneratorPlugin::parameterValue(), and Conversion::toUnsignedInt().
Referenced by readParameters().
|
inlineprivatevirtual |
Reads parameters and configures the IC and decoder generators.
Implements ProGe::ICDecoderGeneratorPlugin.
Definition at line 1881 of file DefaultICDecoderPlugin.cc.
References busTraceStartingCycle(), decoderGenerator_, generateBusTrace(), generateDebugger(), generateLockTrace(), hasSynchronousReset(), icGenerator_, lockTraceStartingCycle(), DefaultICGenerator::setBusTraceStartingCycle(), DefaultICGenerator::setExportBustrace(), DefaultDecoderGenerator::setGenerateBusEnable(), DefaultICGenerator::setGenerateBusTrace(), DefaultDecoderGenerator::setGenerateDebugger(), DefaultDecoderGenerator::setGenerateLockTrace(), DefaultDecoderGenerator::setLockTraceStartingCycle(), and DefaultDecoderGenerator::setSyncReset().
|
inlinevirtual |
Returns the required latency of the hardware implementation of the given immediate unit.
iu | The immediate unit. |
Implements ProGe::ICDecoderGeneratorPlugin.
Definition at line 1604 of file DefaultICDecoderPlugin.cc.
References decoderGenerator_, and DefaultDecoderGenerator::requiredRFLatencies().
|
inlinevirtual |
Verifies that the plugin is compatible with the machine.
InvalidData | If the plugin is not compatible with the machine. |
Implements ProGe::ICDecoderGeneratorPlugin.
Definition at line 1615 of file DefaultICDecoderPlugin.cc.
References __func__, calculateSupportedDelaySlots(), TTAMachine::Machine::controlUnit(), decoderGenerator_, TTAMachine::ControlUnit::delaySlots(), icGenerator_, Conversion::toString(), ttamachine_, DefaultDecoderGenerator::verifyCompatibility(), and DefaultICGenerator::verifyCompatibility().
|
inlinestaticprivate |
Converts the given direction to a string.
direction | The direction. |
Definition at line 1799 of file DefaultICDecoderPlugin.cc.
References assert, ProGe::BIDIR, ProGe::IN, and ProGe::OUT.
|
inlineprivatevirtual |
Returns global package definitions in the form of a stream specifically for the variable length instruction architecture.
pkgStream | The destination stream |
Implements ProGe::ICDecoderGeneratorPlugin.
Definition at line 1642 of file DefaultICDecoderPlugin.cc.
References ProGe::ICDecoderGeneratorPlugin::bem(), ProGe::Verilog, ProGe::VHDL, and BinaryEncoding::width().
|
private |
Definition at line 1909 of file DefaultICDecoderPlugin.cc.
Referenced by generate().
|
private |
Definition at line 1904 of file DefaultICDecoderPlugin.cc.
Referenced by generateDebuggerCode().
|
private |
Definition at line 1907 of file DefaultICDecoderPlugin.cc.
Referenced by completeNetlist(), DefaultICDecoderGenerator(), generate(), generateDebuggerCode(), readParameters(), requiredRFLatencies(), verifyCompatibility(), and ~DefaultICDecoderGenerator().
|
private |
Definition at line 1906 of file DefaultICDecoderPlugin.cc.
Referenced by completeNetlist(), DefaultICDecoderGenerator(), generate(), readParameters(), verifyCompatibility(), and ~DefaultICDecoderGenerator().
|
private |
Definition at line 1908 of file DefaultICDecoderPlugin.cc.
Referenced by addInstructioRegisterBypass(), completeNetlist(), generate(), and verifyCompatibility().