Go to the documentation of this file.
34 #include <boost/format.hpp>
135 const std::string NetlistGenerator::DECODER_INSTR_WORD_PORT =
137 const std::string NetlistGenerator::DECODER_RESET_PORT =
RESET_PORT_NAME;
138 const std::string NetlistGenerator::DECODER_CLOCK_PORT =
CLOCK_PORT_NAME;
139 const std::string NetlistGenerator::DECODER_RA_LOAD_PORT =
141 const std::string NetlistGenerator::DECODER_PC_LOAD_PORT =
143 const std::string NetlistGenerator::DECODER_PC_OPCODE_PORT =
145 const std::string NetlistGenerator::DECODER_LOCK_REQ_OUT_PORT =
147 const std::string NetlistGenerator::DECODER_LOCK_REQ_IN_PORT =
149 const std::string NetlistGenerator::DECODER_LOCK_STATUS_PORT =
151 const std::string NetlistGenerator::DECOMP_LOCK_REQ_IN_PORT =
153 const std::string NetlistGenerator::DECOMP_GLOCK_PORT =
155 const std::string NetlistGenerator::DECOMP_INSTR_WORD_PORT =
159 NetlistGenerator::NetlistGenerator(
161 : context_(context), plugin_(plugin), coreBlock_(NULL),
162 instructionDecoder_(NULL), instructionDecompressor_(NULL),
163 instructionFetch_(NULL), raInPort_(NULL), raOutPort_(NULL) {}
191 std::ostream& warningStream = std::cerr) {
192 if (imemWidthInMAUs < 1) {
194 "Instruction memory width in MAUs must be positive.";
212 for (
int i = 0; i <
context_.
idf().fuImplementationCount(); i++) {
219 for (
int i = 0; i <
context_.
idf().rfImplementationCount(); i++) {
226 for (
int i = 0; i <
context_.
idf().iuImplementationCount(); i++) {
257 for (
auto i = range.first; i != range.second; ++i) {
258 if(i->second->direction() == dir)
261 return *MapTools::valueForKey<NetlistPort*>(
267 "Cannot find netlist port '%s' in parent unit: '%s'") %
285 return *MapTools::valueForKey<NetlistBlock*>(
290 "Cannot find corresponding netlist block for '%s'") %
306 return *MapTools::valueForKey<NetlistPort*>(
loadPortMap_, &port);
310 "Cannot find load port '%s' in instance name: '%s', "
311 "module name: '%s'") %
336 return *MapTools::valueForKey<NetlistPort*>(
340 (boost::format(
"Cannot find rf opcode port '%s' in "
341 "instance name: '%s', "
342 "module name: '%s'") %
359 return *MapTools::valueForKey<NetlistPort*>(
363 (boost::format(
"Cannot find guard port in register file "
364 "instance name: '%s',"
365 "module name: '%s'") %
382 return *MapTools::valueForKey<NetlistPort*>(
386 (boost::format(
"Cannot find opcode port in function unit "
387 "instance name: '%s',"
388 "module name: '%s'") %
404 return *MapTools::valueForKey<NetlistPort*>(
409 "Cannot find guard port '%s' in instance name: '%s', "
410 "module name: '%s'") %
427 return *MapTools::valueForKey<NetlistPort*>(
clkPorts_, &block);
430 (boost::format(
"Cannot find clock port in netlist block "
432 "'%s', module name: '%s'") %
448 return *MapTools::valueForKey<NetlistPort*>(
rstPorts_, &block);
451 (boost::format(
"Cannot find reset port in netlist block "
453 "'%s', module name: '%s'") %
479 return *MapTools::valueForKey<NetlistPort*>(
glockPorts_, &block);
482 (boost::format(
"Cannot find global lock port in netlist block "
484 " '%s', module name: '%s'") %
512 return *MapTools::valueForKey<NetlistPort*>(
glockReqPorts_, &block);
515 (boost::format(
"Cannot find global lock request port in "
517 "instance name: '%s', module name: '%s'") %
535 return *MapTools::valueForKey<NetlistPort*>(
iuPortMap_, &iu);
538 (boost::format(
"Cannot find immediate unit '%s' write port.") %
556 "Cannot find return address of in port of GCU");
572 "Cannot find return address of out port of GCU");
587 "Cannot find TTA core block from the netlist.");
603 "Cannot find instruction decoder block from the netlist.");
620 "Cannot find instruction fetch block from the netlist.");
639 "Cannot find instruction decompressor block from the "
659 return *MapTools::valueForKey<FUEntry*>(
fuEntryMap_, fuName);
662 "Cannot find function unit entry from the netlist.");
678 return *MapTools::valueForKey<RFEntry*>(
rfEntryMap_, rfName);
681 "Cannot find register file entry from the netlist.");
696 "Imem width fixed to 4 MAUs for RISC-V machines");
699 "Imem width is currently fixed to 1 MAU");
703 Parameter coreIdParam(
"core_id",
"integer",
"0",
"0");
722 tlReadEnablePort, tlAddressPort, tlDataPort);
758 ifetchReadEnablePort, ifetchAddressPort, ifetchDataPort);
779 netlist.
connect(*tlClkPort, *ifetchClkPort);
780 netlist.
connect(*tlRstPort, *ifetchRstPort);
782 netlist.
connect(*toplevelInstructionLine, *ifetchInstructionLine);
789 for (
int i = 0; i < gcu->
portCount(); i++) {
801 assert(
false &&
"Unconneced ADF port.");
843 netlist.
connect(*ifetchFetchPort, *decFetchPort);
844 netlist.
connect(*ifetchGlockPort, *decLockPort);
845 netlist.
connect(*ifetchFetchBlockPort, *decFetchBlockPort);
848 netlist.
connect(*tlClkPort, *decClkPort);
849 netlist.
connect(*tlRstPort, *decRstPort);
878 netlist.
connect(*decIWordPort, *decodIWordPort);
879 netlist.
connect(*decGlockPort, *decodLockPort);
880 netlist.
connect(*decLockReqPort, *decodLockReqPort);
883 netlist.
connect(*decodClkPort, *tlClkPort);
884 netlist.
connect(*decodRstPort, *tlRstPort);
887 netlist.
connect(*decodPCLoadPort, *ifetchPCLoadPort);
888 netlist.
connect(*decodRALoadPort, *ifetchRALoadPort);
889 netlist.
connect(*decodPCOpcodePort, *ifetchPCOpcodePort);
892 netlist.
connect(*tlLockStatusPort, *decodLockedPort);
901 std::string fuName =
"fu_" + fug.
name();
902 std::transform(fuName.begin(), fuName.end(), fuName.begin(), ::tolower);
905 fuName, fuName +
"_generated", *
this);
933 int opcodeWidth =
static_cast<int>(std::ceil(
943 "glockreq_out",
"1", 1,
BIT,
OUT, *block);
947 for (
int i = 0; i < fu->
portCount(); ++i) {
976 std::ostream& warningStream) {
977 string hdbFile = location.
hdbFile();
978 int id = location.
id();
982 HDBManager& manager = HDBRegistry::instance().hdb(hdbFile);
993 "have an implementation in HDB " +
998 "have architecture definition in HDB " +
1006 string errorMsg =
"ADF does not have FU '" + location.
unitName() +
1007 "' which is referred to in the IDF.";
1023 format architecturesDontMatch(
"Architectures of FU entry %1% in "
1024 "%2% and FU '%3%' don't match.");
1030 string paramName = parameter.
name;
1031 string paramType = parameter.
type;
1032 string paramValue = parameter.
value;
1034 bool parameterResolved =
false;
1058 parameterResolved =
true;
1069 parameterResolved =
true;
1072 architecturesDontMatch %
id % hdbFile %
1075 architecturesDontMatch.str());
1080 if (!parameterResolved) {
1081 format errorMsg(
"Unable to resolve the value of "
1082 "parameter %1% of FU "
1084 errorMsg % paramName % id;
1086 __FILE__, __LINE__,
__func__, errorMsg.str());
1105 *adfFU, architecture.
architecture(), architecturePort);
1107 architecturesDontMatch %
id % hdbFile % adfFU->
name();
1109 __FILE__, __LINE__,
__func__, architecturesDontMatch.str());
1144 fuImplementation, coreBlock, *block, *adfFU);
1147 if (fuImplementation.
clkPort() !=
"") {
1157 if (fuImplementation.
rstPort() !=
"") {
1167 if (fuImplementation.
glockPort() !=
"") {
1194 set<std::pair<NetlistPort*, NetlistPort*>> lsuPorts;
1196 set<std::pair<NetlistPort*, NetlistPort*>> otherPorts;
1210 string nlParamName = fuBlock.
instanceName() +
"_" + paramName;
1213 nlParamName, param.
type(), param.
value());
1216 size_t replaceStart = tlPortWidth.find(param.
name(), 0);
1217 if (replaceStart == std::string::npos) {
1219 (boost::format(
"FU external port parameter "
1220 "dependencies do not "
1222 "to be right: Tried to find "
1223 "parameter named '%s'"
1224 " from external port width formula "
1227 param.
name() % tlPortWidth % nlParamName)
1230 size_t replaceLength = param.
name().length();
1231 tlPortWidth = tlPortWidth.
replace(
1232 replaceStart, replaceLength, nlParamName);
1244 lsuPorts.insert(std::make_pair(extPort, tlPort));
1260 for (
auto portPair : lsuPorts) {
1266 dmemPortGroup->
addPort(*portPair.second);
1269 if (dmemPortGroup !=
nullptr) {
1271 dmemPortGroup =
nullptr;
1294 string errorMsg =
"ADF does not contain register file '" +
1295 location.
unitName() +
"' referred to in IDF.";
1323 string errorMsg =
"ADF does not contain immediate unit '" +
1324 location.
unitName() +
"' referred to in IDF.";
1355 const std::string& blockNamePrefix) {
1359 HDBRegistry::instance().hdb(location.
hdbFile());
1366 format text(
"RF entry %1% does not have an implementation or "
1368 "defined in HDB %2%.");
1369 text % location.
id() % location.
hdbFile();
1396 }
else if (param.
value ==
"") {
1398 "Unable to resolve the value of parameter %1% of RF "
1400 errorMsg % param.
name % location.
id();
1456 assert(newInputPort || newOutputPort);
1464 bool mapped =
false;
1465 for (
int i = 0; i < regFile.
portCount(); i++) {
1466 rfPort = regFile.
port(i);
1484 format text(
"Unable to map port '%1%' of RF entry '%2%' in "
1486 "to any port in %4% '%5%'.");
1489 text %
"immediate unit";
1491 text %
"register file";
1493 text % regFile.
name();
1503 if (iu != NULL && newInputPort) {
1513 if (rfPort != NULL) {
1543 format text(
"RF entry '%1%' in HDB '%2%' does not have "
1544 "opcode port required for RFs of size > 1.");
1545 text % location.
id() % location.
hdbFile();
1565 string component_type(
"");
1582 string nlParamName =
1583 component_type + location.
unitName() +
"_" + hdbParamName;
1586 nlParamName, param.
type(), param.
value());
1589 size_t replaceStart = tlPortWidth.find(param.
name(), 0);
1590 if (replaceStart == std::string::npos) {
1592 (boost::format(
"RF external port parameter "
1593 "dependencies do not "
1595 "to be right: Tried to find "
1596 "parameter named '%s'"
1597 " from external port width formula "
1600 param.
name() % tlPortWidth % nlParamName)
1603 size_t replaceLength = param.
name().length();
1604 tlPortWidth = tlPortWidth.
replace(
1605 replaceStart, replaceLength, nlParamName);
1612 string tlPortName = component_type + location.
unitName() +
"_" +
1613 externalPort.
name();
1655 for (
auto i = range.first; i != range.second; ++i) {
1672 std::pair<const Unit*, NetlistBlock*>(&unit, &
netlistBlock));
1696 std::pair<const NetlistPort*, NetlistPort*>(&port, &
loadPort));
1710 std::pair<const NetlistPort*, NetlistPort*>(&port, &opcodePort));
1724 std::pair<const NetlistBlock*, NetlistPort*>(&block, &port));
1738 std::pair<const NetlistBlock*, NetlistPort*>(&block, &
clkPort));
1752 std::pair<const NetlistBlock*, NetlistPort*>(&block, &resetPort));
1766 std::pair<const NetlistBlock*, NetlistPort*>(&block, &
glockPort));
1779 glockReqPorts_.insert(std::pair<const NetlistBlock*, NetlistPort*>(
1794 std::pair<const NetlistBlock*, NetlistPort*>(&block, &guardPort));
1808 std::pair<const NetlistPort*, NetlistPort*>(&dataPort, &guardPort));
1822 std::pair<const ImmediateUnit*, NetlistPort*>(&iu, &port));
1833 const string& paramName,
const FUEntry* fuEntry)
const {
1840 if (widthFormula == paramName) {
1860 unsigned int highestAddr = AS->
end();
1861 unsigned int lowestAddr = AS->
start();
1862 if (highestAddr == 0 || lowestAddr >= highestAddr) {
1863 string errorMessage =
"Invalid address space";
1865 __FILE__, __LINE__,
__func__, errorMessage.c_str());
1867 return static_cast<unsigned int>(ceil(log(highestAddr) / log(2)));
1869 string errorMessage =
"Tried to resolve address space width "
1872 "' that doesn't have address space";
1874 __FILE__, __LINE__,
__func__, errorMessage.c_str());
1890 const FUEntry& fu, std::ostream& warningStream) {
1899 set<string> opcodeSet;
1902 opcodeSet.insert(operation->
name());
1906 for (set<string>::iterator iter = opcodeSet.begin();
1907 iter != opcodeSet.end(); iter++) {
1912 warningStream <<
"Warning: Opcode defined in HDB for "
1913 <<
"operation " << *iter
1914 <<
" does not comply with the requirement "
1915 <<
"for numbering the operation codes "
1916 <<
"according to alphabetical order of "
1917 <<
"operations. Please fix the vhdl and "
1918 <<
"hdb entry." << std::endl;
1922 if (requiredBits > portWidth) {
1923 portWidth = requiredBits;
1938 set<string> opcodeSet;
1941 opcodeSet.insert(operation->
name());
1946 if (opcodeSet.size() < 2) {
1966 FUPort* correspondingPort = NULL;
1971 string opName = origOperation->
name();
1974 if (!origOperation->
isBound(*origPort)) {
1977 int origIO = origOperation->
io(*origPort);
1982 if (correspondingPort == NULL) {
1983 correspondingPort = port;
1984 }
else if (correspondingPort != port) {
1990 if (correspondingPort == NULL) {
1992 std::string(
"Corresponding port for [") + portName +
1993 "] defined in HDB was not found in FU of ADF: [" +
1994 fuToSearch.
name() +
"].");
1997 return *correspondingPort;
2026 return iMem.
width();
2044 string errorMsg =
"The machine does not have a control unit.";
2051 "The control unit does not have an address space.";
2060 switch (direction) {
2068 assert(
false &&
"Unknown HDB::direction.");
2084 if (baseInstanceName.
lower() == moduleName.
lower()) {
2087 newInstanceName = baseInstanceName;
2089 return newInstanceName;
2108 const int opCount = 18;
2110 "ldw",
"ldh",
"ldq",
"ldw2",
"ldw4",
2111 "stw",
"sth",
"stq",
"stw2",
"stw4",
2112 "ld8",
"ldu8",
"ld16",
"ldu16",
"ld32",
2113 "st8",
"st16",
"st32"
2116 for (
auto& op : ops) {
2139 static const std::set<std::string> magicWords{
2140 "addr",
"data",
"mem_en",
"wr_en",
"wr_mask"};
2142 for (
auto magicWord : magicWords) {
2143 if (portName.find(magicWord) != std::string::npos) {
2153 if (((pos = portName.find(
"addr")) != std::string::npos)) {
2155 }
else if (((pos = portName.find(
"data")) != std::string::npos)) {
2156 if ((portName.find(
"_in", pos + 4)) != std::string::npos) {
2158 }
else if ((portName.find(
"_out", pos + 4)) != std::string::npos) {
2161 }
else if (((pos = portName.find(
"mem_en")) != std::string::npos)) {
2162 if ((portName.find(
"_x", pos + 6)) != std::string::npos) {
2167 }
else if (((pos = portName.find(
"wr_mask")) != std::string::npos)) {
2168 if ((portName.find(
"_x", pos + 7)) != std::string::npos) {
2173 }
else if (((pos = portName.find(
"wr_en")) != std::string::npos)) {
2174 if ((portName.find(
"_x", pos + 5)) != std::string::npos) {
NetlistBlock & instructionFetch() const
const string LOCK_PORT_NAME
bool isParameterizable(const std::string ¶mName, const HDB::FUEntry *fuEntry) const
void addInOperand(TTAMachine::FUPort *port, int id)
NetlistBlock & instructionDecompressor() const
NetlistBlock * instructionDecompressor_
The instruction decompressor block.
virtual const Netlist & netlist() const
std::string clkPort() const
bool hasGlockReqPort(const NetlistBlock &block) const
const string FETCHBLOCK_PORT_NAME
static const std::string DECODER_LOCK_STATUS_PORT
std::string opcodePortWidthFormula() const
void addFUToNetlist(const IDF::FUImplementationLocation &location, NetlistBlock &netlistBlock, std::ostream &warningStream)
virtual Socket * inputSocket() const
@ FETCHBLOCK
Signal is TTA instruction block block containing (compressed) instruction.
void mapFUOpcodePort(const NetlistBlock &block, NetlistPort &opcodePort)
void mapLoadPort(const NetlistPort &port, NetlistPort &loadPort)
PortRelationMap loadPortMap_
Maps loads ports.
const BaseNetlistBlock & parentBlock() const
virtual bool hasImplementation() const
bool hasParameterizedWidth(const std::string &port) const
virtual TCEString name() const
bool isRISCVMachine() const
PortRelationMap rfOpcodePortMap_
Maps opcode ports.
virtual bool hasAddressSpace() const
TTAMachine::Machine * machine
the architecture definition of the estimated processor
PortPurposeMap clkPorts_
Maps clock ports.
IDF::MachineImplementation * implementation
the implementation definition of the estimated processor
@ BIT_VECTOR
Several bits.
const TTAMachine::Machine & adf() const
@ CORE_HALT_STATUS
Signal that tell if core is halted.
const string LOCK_STATUS_PORT_NAME
const string RF_NAME_PREFIX
void addGCUToNetlist(NetlistBlock &toplevelBlock, int imemWidthInMAUs)
const TCEString & type() const
NetlistBlock * coreBlock_
The TTA core block.
static const std::string DECODER_PC_LOAD_PORT
PC load port name in instruction decoder.
HDB::RFEntry & rfEntry(const std::string &rfName) const
virtual BaseFUPort * triggerPort() const
void mapGlobalLockRequestPort(const NetlistBlock &block, NetlistPort &glockReqPort)
PortPurposeMap rfGuardPorts_
Maps RF guard ports.
NetlistBlock * generate(const ProGeOptions &options, int imemWidthInMAUs, TCEString entityNameStr, std::ostream &warningStream)
const string LOCK_REQUEST_PORT_NAME
RFImplementationLocation & iuImplementation(const std::string &iu) const
virtual int width() const =0
Convenience class for output bit ports.
const string RA_LOAD_PORT_NAME
Direction direction() const
static unsigned replace(std::string &str, const std::string &oldPattern, const std::string &newPattern)
void addBaseRFToNetlist(const ProGeOptions &options, const TTAMachine::BaseRegisterFile ®File, const IDF::RFImplementationLocation &location, NetlistBlock &netlistBlock, const std::string &blockNamePrefix)
TTAMachine::FunctionUnit & architecture() const
Direction direction() const
const std::string & instanceName() const
void mapResetPort(const NetlistBlock &block, NetlistPort &resetPort)
void addIUToNetlist(const ProGeOptions &options, const IDF::RFImplementationLocation &location, NetlistBlock &netlistBlock)
void setParameter(const std::string &name, const std::string &type, const std::string &value)
const string INSTRUCTIONWIDTH
NetlistPort & fuGuardPort(const NetlistPort &fuPort) const
FUExternalPort & externalPort(int index) const
const string READ_ENABLE_PORT_NAME
@ UNDEFINED
Signal does not have specified usage.
const string DECOMPRESSOR_BLOCK_NAME
@ BIDIR
Bidirectional port.
const string DECODER_BLOCK_NAME
static const std::string DECODER_PC_OPCODE_PORT
PC opcode port name in instruction decoder.
const string PC_IN_PORT_NAME
virtual BaseFUPort * port(const std::string &name) const
virtual AddressSpace * addressSpace() const
const string FETCH_PORT_NAME
static const std::string DECODER_RA_LOAD_PORT
RA load port name in instruction decoder.
static TTAMachine::FUPort & findCorrespondingPort(const TTAMachine::FunctionUnit &fuToSearch, const TTAMachine::FunctionUnit &origFU, const std::string &portName)
NetlistPort & glockReqPort(const NetlistBlock &block) const
NetlistPort & glockPort(const NetlistBlock &block) const
bool isLSU(const TTAMachine::FunctionUnit &fu) const
std::string opcodePort() const
const string RA_IN_PORT_NAME
virtual bool isTriggering() const
NetlistPort & loadPort(const NetlistPort &port) const
void addOutOperand(TTAMachine::FUPort *port)
const string PC_READ_PORT_NAME
void addParameter(const Parameter ¶m)
PortPurposeMap glockReqPorts_
Maps global lock request ports.
NetlistBlock & netlistBlock(const TTAMachine::Unit &unit) const
const string TOPLEVEL_BLOCK_DEFAULT_NAME
static std::string toString(const T &source)
const string PC_OPCODE_PORT_NAME
static const std::string FETCHBLOCK_PORT_NAME
void addPackage(const std::string &packageName)
static bool isLSUDataPort(const TTAMachine::FunctionUnit &adfFU, const std::string &portName)
bool connect(const NetlistPort &port1, const NetlistPort &port2, int port1FirstBit, int port2FirstBit, int width=1)
virtual int numberOfRegisters() const
RFArchitecture & architecture() const
@ INSTRUCTION_LINE
Signal group type for serial TTA instruction bus.
static int opcodePortWidth(const HDB::FUEntry &fu, std::ostream &warningStream)
@ WRITEMODE
Signal to choose mode for READ_WRITE_REQUEST or similar.
std::string rstPort() const
static const std::string DECODER_LOCK_REQ_IN_PORT
Lock request in port name in instruction decoder.
std::string glockReqPort() const
RFImplementationLocation & rfImplementation(const std::string &rf) const
#define assert(condition)
void addRFToNetlist(const ProGeOptions &options, const IDF::RFImplementationLocation &location, NetlistBlock &netlistBlock)
int parameterCount() const
GeneratableFUNetlistBlock * addGeneratableFUsToNetlist(const IDF::FUGenerated &fug, NetlistBlock &netlistBlock)
virtual FUPort * port(int operand) const
const ProGeContext & context_
NetlistPort & gcuReturnAddressOutPort() const
const string IMEMWIDTHFORMULA
NetlistPort & clkPort(const NetlistBlock &block) const
static const std::string DECODER_CLOCK_PORT
Clock port name in instruction decoder.
bool hasParameter(const std::string &name) const
virtual ControlUnit * controlUnit() const
int io(const FUPort &port) const
const string BUSY_PORT_NAME
void mapRFGuardPort(const NetlistBlock &block, NetlistPort &guardPort)
virtual bool hasArchitecture() const
virtual ~NetlistGenerator()
const std::string & name() const
Convenience class for input ports.
PortPurposeMap fuOpcodePorts_
Maps FU opcode ports.
void mapNetlistBlock(const TTAMachine::Unit &unit, NetlistBlock &netlistBlock)
virtual ImmediateUnitNavigator immediateUnitNavigator() const
#define THROW_EXCEPTION(exceptionType, message)
Exception wrapper macro that automatically includes file name, line number and function name where th...
NetlistPort & gcuReturnAddressInPort() const
PortPurposeMap glockPorts_
Maps global lock ports.
std::string parameterDependency(int index) const
NetlistBlock & ttaCore() const
PortPurposeMap rstPorts_
Maps reset ports.
Direction
Direction of port.
@ BIDIR
Bidirectional port.
bool hasItem(const std::string &name) const
FUArchitecture & architecture() const
HDB::Direction portDirection(const std::string &port) const
UnitCorrespondenceMap unitCorrespondenceMap_
Maps the ADF units to the netlist blocks.
NetlistPort * raOutPort_
Returns address out port in GCU (ifetch).
const TCEString & name() const
ICDecoderGeneratorPlugin & plugin_
The generator plugin.
bool isBound(const FUPort &port) const
static const std::string DECODER_INSTR_WORD_PORT
Instruction word port name in instruction decoder.
virtual FunctionUnitNavigator functionUnitNavigator() const
bool netlistPortIsMapped(const TTAMachine::Port &adfPort)
const TCEString INSTANCE_SUFFIX
static const std::string DECODER_RESET_PORT
Reset port name in instruction decoder.
void addPort(NetlistPort &port)
std::string type
Type of the parameter.
static void connectClocks(NetlistBlock &block)
const string ADDRESS_PORT_NAME
virtual int operationCount() const
FUEntryMap fuEntryMap_
Maps FU implementations for different FU's.
void mapRFOpcodePort(const NetlistPort &port, NetlistPort &opcodePort)
const string RESET_PORT_NAME
const IDF::MachineImplementation & idf() const
static Signal inferLSUSignal(const std::string &portName)
const TCEString & value() const
RFImplementation & implementation() const
static int instructionMemoryAddressWidth(const TTAMachine::Machine &machine)
virtual bool hasOperation(const std::string &name) const
std::string loadPort() const
@ ADDRESS
Signal holds address.
static void connectResets(NetlistBlock &block)
@ BITMASKED_SRAM_PORT
Signal group type for one port SRAM having read and write capability and bitmask for writing.
const std::string & coreEntityName() const
@ READ_WRITE_REQUEST
Signal to make either read or write request.
NetlistPort & rstPort(const NetlistBlock &block) const
virtual std::string unitName() const
const string IU_NAME_PREFIX
virtual int operationPortCount() const
virtual bool isOutput() const
virtual int portCount() const
NetlistBlock * instructionDecoder_
The instruction decoder block.
std::string errorMessage() const
@ READ_REQUEST_READY
Signal to tell that requested data can be read.
static MachInfoCmdLineOptions options
virtual bool hasOperationPort(const std::string &name) const
static TTAMachine::AddressSpace & instructionMemory(const TTAMachine::Machine &machine)
NetlistPort * raInPort_
Return address in port in GCU (ifetch).
NetlistPort & rfGuardPort(const NetlistBlock &rfBlock) const
bool hasGuardSupport() const
virtual int width() const
std::string name
Name of the parameter.
@ READ_REQUEST
Signal to make read request.
const string PC_LOAD_PORT_NAME
virtual RFPort * port(const std::string &name) const
virtual RegisterFileNavigator registerFileNavigator() const
RFEntryMap rfEntryMap_
Maps RF implementations for different RF's.
std::string architecturePort() const
void addSubBlock(BaseNetlistBlock *subBlock, const std::string &instanceName="")
PortCorrespondenceMap portCorrespondenceMap_
Maps the ADF ports to the netlist ports.
virtual bool hasOperationLowercase(const std::string &name) const
IUPortMap iuPortMap_
Maps the created netlist ports to immediate units.
virtual std::string name() const
const string IMEMADDRWIDTH
unsigned int calculateAddressWidth(TTAMachine::FunctionUnit const *fu) const
Parameter parameter(int index) const
NetlistBlock & instructionDecoder() const
NetlistPort & fuOpcodePort(const NetlistBlock &fuBlock) const
std::string opcodePort() const
NetlistPort & rfOpcodePort(const NetlistPort &port) const
int architecturePortCount() const
void mapClockPort(const NetlistBlock &block, NetlistPort &clkPort)
TCEString checkInstanceName(const TCEString &baseInstanceName, const TCEString &moduleName) const
void mapGlobalLockPort(const NetlistBlock &block, NetlistPort &glockPort)
virtual Socket * outputSocket() const
static const std::string DECODER_LOCK_REQ_OUT_PORT
Lock request out port name in instruction decoder.
void addPortGroup(NetlistPortGroup *portGroup)
virtual bool isInput() const
std::string value
Value of the parameter.
NetlistPort & netlistPort(const TTAMachine::Port &port, Direction dir=IN) const
const string RA_OUT_PORT_NAME
const string GLOBAL_LOCK_PORT_NAME
virtual void completeNetlist(NetlistBlock &netlistBlock, const NetlistGenerator &generator)=0
const std::string & moduleName() const
ComponentType * item(int index) const
void setParameter(const std::string &name, const std::string &type, const std::string &value)
std::string moduleName() const
virtual HWOperation * operation(const std::string &name) const
NetlistPort & immediateUnitWritePort(const TTAMachine::ImmediateUnit &iu) const
const string INSTRUCTIONWORD_PORT_NAME
virtual std::string hdbFile() const
void addFUExternalPortsToNetlist(const HDB::FUImplementation &fuImplementation, NetlistBlock &coreBlock, NetlistBlock &fuBlock, const TTAMachine::FunctionUnit &adfFU)
NetlistBlock * instructionFetch_
The instruction fetch block.
virtual FUPort * operationPort(const std::string &name) const
bool hasOpcodePort(const NetlistPort &port) const
HDB::FUEntry & fuEntry(const std::string &fuName) const
virtual bool hasImplementation() const
FUImplementationLocation & fuImplementation(const std::string &fu) const
FUImplementation & implementation() const
std::string glockPort() const
const string FU_NAME_PREFIX
SpecialRegisterPort * returnAddressPort() const
PortRelationMap fuGuardPortMap_
Maps FU guard ports.
std::string guardPort() const
void mapImmediateUnitWritePort(const TTAMachine::ImmediateUnit &iu, NetlistPort &port)
virtual int width() const
const std::vector< FUGenerated > & FUGenerations() const
FUEntry * fuByEntryID(RowID id) const
Direction
Direction of the port.
Direction direction() const
virtual ULongWord start() const
virtual const Parameter & parameter(const std::string &name) const
Convenience class for input bit ports.
virtual ULongWord end() const
void mapFUGuardPort(const NetlistPort &dataPort, NetlistPort &guardPort)
Convenience class for output ports.
static int instructionMemoryWidth(const TTAMachine::Machine &machine)
FUPortImplementation & architecturePort(int index) const
std::string widthFormula() const
const string CLOCK_PORT_NAME
virtual bool hasArchitecture() const
static Direction translateDirection(HDB::Direction direction)
int externalPortCount() const
const string IFETCH_BLOCK_NAME
int parameterDependencyCount() const
virtual int width() const
friend class GeneratableFUNetlistBlock
RFEntry * rfByEntryID(RowID id) const
std::string widthFormula() const
const string DATA_PORT_NAME
bool hasGlockPort(const NetlistBlock &block) const
Unit * parentUnit() const
void mapNetlistPort(const TTAMachine::Port &adfPort, NetlistPort &netlistPort)