OpenASIP
2.0
|
#include <ICDecoderGeneratorPlugin.hh>
Public Member Functions | |
ICDecoderGeneratorPlugin (const TTAMachine::Machine &machine, const BinaryEncoding &bem, const std::string &description) | |
virtual | ~ICDecoderGeneratorPlugin () |
virtual void | completeNetlist (NetlistBlock &netlistBlock, const NetlistGenerator &generator)=0 |
virtual void | generate (HDL language, const std::string &destinationDirectory, const NetlistGenerator &generator, const IDF::MachineImplementation &implementation, const std::string &entityString)=0 |
virtual std::set< int > | requiredRFLatencies (const TTAMachine::ImmediateUnit &iu) const =0 |
virtual void | verifyCompatibility () const =0 |
virtual void | writeGlobalDefinitions (HDL language, std::ostream &pkgStream) const =0 |
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 |
virtual void | readParameters ()=0 |
Protected Member Functions | |
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 Protected Member Functions | |
static TTAMachine::Socket::Direction | convertDirection (HDB::Direction direction) |
Private Types | |
typedef std::map< std::string, std::string > | StringMap |
Map type for strings. More... | |
Private Attributes | |
const TTAMachine::Machine & | machine_ |
The machine to generate. More... | |
const BinaryEncoding & | bem_ |
The binary encoding map. More... | |
StringMap | parameterValues_ |
Parameters set. More... | |
StringMap | parameterDescriptions_ |
Parameter descriptions. More... | |
std::string | description_ |
Description of the plugin. More... | |
Base class for plugins that are able to generate and IC and decoder.
Definition at line 68 of file ICDecoderGeneratorPlugin.hh.
|
private |
Map type for strings.
Definition at line 151 of file ICDecoderGeneratorPlugin.hh.
ProGe::ICDecoderGeneratorPlugin::ICDecoderGeneratorPlugin | ( | const TTAMachine::Machine & | machine, |
const BinaryEncoding & | bem, | ||
const std::string & | description | ||
) |
Constructor.
machine | The machine to generate the IC&decoder for. |
Definition at line 48 of file ICDecoderGeneratorPlugin.cc.
|
virtual |
|
protected |
Adds the given parameter to the set of recognized parameters.
name | Name of the parameter. |
description | Description of the parameter. |
Definition at line 159 of file ICDecoderGeneratorPlugin.cc.
References parameterDescriptions_.
const BinaryEncoding & ProGe::ICDecoderGeneratorPlugin::bem | ( | ) | const |
Returns the binary encoding map.
Definition at line 214 of file ICDecoderGeneratorPlugin.cc.
References bem_.
|
pure virtual |
Completes the given netlist block 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.
coreBlock | The netlist block to complete. |
generator | The netlist generator which generated the netlist. |
Implemented in DefaultICDecoderGenerator.
Referenced by ProGe::NetlistGenerator::generate().
|
staticprotected |
|
pure virtual |
Generates the interconnection network and instruction decoder to the given destination directory.
destinationDirectory | The destination directory. |
generator | The netlist generator that generated the netlist block. |
Implemented in DefaultICDecoderGenerator.
Referenced by ProGe::ProcessorGenerator::generateProcessor().
|
protected |
Tells whether the plugin has the given parameter set.
name | Name of the parameter. |
Definition at line 176 of file ICDecoderGeneratorPlugin.cc.
References MapTools::containsKey(), and parameterValues_.
Referenced by parameterValue().
const TTAMachine::Machine & ProGe::ICDecoderGeneratorPlugin::machine | ( | ) | const |
Returns the machine.
Definition at line 203 of file ICDecoderGeneratorPlugin.cc.
References machine_.
std::string ProGe::ICDecoderGeneratorPlugin::parameterDescription | ( | const std::string & | paramName | ) | const |
Returns the description of the given parameter.
paramName | Name of the parameter. |
IllegalParameter | If the given parameter is unrecognized. |
Definition at line 121 of file ICDecoderGeneratorPlugin.cc.
References __func__, Exception::errorMessage(), and parameterDescriptions_.
|
protected |
Returns the value of the given parameter.
name | Name of the parameter. |
KeyNotFound | If the given parameter is not set. |
Definition at line 189 of file ICDecoderGeneratorPlugin.cc.
References __func__, hasParameterSet(), and parameterValues_.
std::string ProGe::ICDecoderGeneratorPlugin::pluginDescription | ( | ) | const |
Returns the description of the plugin.
Definition at line 70 of file ICDecoderGeneratorPlugin.cc.
References description_.
|
pure virtual |
Implemented in DefaultICDecoderGenerator.
Referenced by ProGe::ProGeUI::generateProcessor().
std::string ProGe::ICDecoderGeneratorPlugin::recognizedParameter | ( | int | index | ) | const |
Returns the name of a recognized parameter by the given index.
index | The index. |
OutOfRange | If the given index is negative or not smaller than the number of recognized parameters. |
Definition at line 95 of file ICDecoderGeneratorPlugin.cc.
References __func__, assert, parameterDescriptions_, and recognizedParameterCount().
int ProGe::ICDecoderGeneratorPlugin::recognizedParameterCount | ( | ) | const |
Returns the number of recognized parameters.
Definition at line 81 of file ICDecoderGeneratorPlugin.cc.
References parameterDescriptions_.
Referenced by recognizedParameter().
|
pure virtual |
Returns the set of acceptable latencies of the hardware implementation of the given immediate unit.
iu | The immediate unit. |
Implemented in DefaultICDecoderGenerator.
Referenced by ProGe::ProcessorGenerator::checkIULatencies().
void ProGe::ICDecoderGeneratorPlugin::setParameter | ( | const std::string & | name, |
const std::string & | value | ||
) |
Sets the given parameter for the plugin.
name | Name of the parameter. |
value | Value of the parameter. |
IllegalParameter | If the given parameter is unrecognized. |
Definition at line 140 of file ICDecoderGeneratorPlugin.cc.
References __func__, MapTools::containsKey(), parameterDescriptions_, and parameterValues_.
Referenced by ProGe::ProGeUI::generateProcessor().
|
pure virtual |
Verifies that the plugin is compatible with the machine.
InvalidData | If the plugin is not compatible with the machine. |
Implemented in DefaultICDecoderGenerator.
Referenced by ProGe::ProcessorGenerator::generateProcessor().
|
pure virtual |
Returns global package definitions in the form of a stream specifically for the variable length instruction architecture.
language | The HDL to use. |
pkgStream | The destination stream |
Implemented in DefaultICDecoderGenerator.
Referenced by ProGe::ProcessorGenerator::generateGlobalsPackage().
|
private |
The binary encoding map.
Definition at line 156 of file ICDecoderGeneratorPlugin.hh.
Referenced by bem().
|
private |
Description of the plugin.
Definition at line 162 of file ICDecoderGeneratorPlugin.hh.
Referenced by pluginDescription().
|
private |
The machine to generate.
Definition at line 154 of file ICDecoderGeneratorPlugin.hh.
Referenced by machine().
|
private |
Parameter descriptions.
Definition at line 160 of file ICDecoderGeneratorPlugin.hh.
Referenced by addParameter(), parameterDescription(), recognizedParameter(), recognizedParameterCount(), and setParameter().
|
private |
Parameters set.
Definition at line 158 of file ICDecoderGeneratorPlugin.hh.
Referenced by hasParameterSet(), parameterValue(), and setParameter().