OpenASIP
2.0
|
#include <NetlistGenerator.hh>
Static Public Attributes | |
static const std::string | DECODER_INSTR_WORD_PORT |
Instruction word port name in instruction decoder. More... | |
static const std::string | DECODER_RESET_PORT = RESET_PORT_NAME |
Reset port name in instruction decoder. More... | |
static const std::string | DECODER_CLOCK_PORT = CLOCK_PORT_NAME |
Clock port name in instruction decoder. More... | |
static const std::string | DECODER_RA_LOAD_PORT |
RA load port name in instruction decoder. More... | |
static const std::string | DECODER_PC_LOAD_PORT |
PC load port name in instruction decoder. More... | |
static const std::string | DECODER_PC_OPCODE_PORT |
PC opcode port name in instruction decoder. More... | |
static const std::string | DECODER_LOCK_REQ_OUT_PORT |
Lock request out port name in instruction decoder. More... | |
static const std::string | DECODER_LOCK_REQ_IN_PORT |
Lock request in port name in instruction decoder. More... | |
static const std::string | DECODER_LOCK_STATUS_PORT |
static const std::string | DECOMP_LOCK_REQ_IN_PORT |
Lock request in port name in decompressor. More... | |
static const std::string | DECOMP_GLOCK_PORT |
Global lock out port name in decompressor. More... | |
static const std::string | DECOMP_INSTR_WORD_PORT |
Instruction word port name in decompressor. More... | |
static const std::string | ADDR_WIDTH |
static const std::string | FETCHBLOCK_PORT_NAME = "fetchblock" |
Private Types | |
typedef std::multimap< const TTAMachine::Port *, NetlistPort * > | PortCorrespondenceMap |
Multimap type to map ADF ports to NetlistPorts. More... | |
typedef std::map< const TTAMachine::Unit *, NetlistBlock * > | UnitCorrespondenceMap |
Map type to map ADF Units to NetlistBlocks. More... | |
typedef std::map< const NetlistPort *, NetlistPort * > | PortRelationMap |
Map type for NetlistPorts. More... | |
typedef std::map< const NetlistBlock *, NetlistPort * > | PortPurposeMap |
Map type for NetlistPorts. More... | |
typedef std::map< const TTAMachine::ImmediateUnit *, NetlistPort * > | IUPortMap |
Map type for port of immediate units. More... | |
typedef std::map< std::string, HDB::FUEntry * > | FUEntryMap |
Map type for FUImplementation. More... | |
typedef std::map< std::string, HDB::RFEntry * > | RFEntryMap |
Map type for RFImplementation. More... | |
Static Private Member Functions | |
static bool | isLSUDataPort (const TTAMachine::FunctionUnit &adfFU, const std::string &portName) |
static Signal | inferLSUSignal (const std::string &portName) |
static int | opcodePortWidth (const HDB::FUEntry &fu, std::ostream &warningStream) |
static int | opcodePortWidth (const TTAMachine::ControlUnit &gcu) |
static TTAMachine::FUPort & | findCorrespondingPort (const TTAMachine::FunctionUnit &fuToSearch, const TTAMachine::FunctionUnit &origFU, const std::string &portName) |
static int | instructionMemoryAddressWidth (const TTAMachine::Machine &machine) |
static int | instructionMemoryWidth (const TTAMachine::Machine &machine) |
static TTAMachine::AddressSpace & | instructionMemory (const TTAMachine::Machine &machine) |
static Direction | translateDirection (HDB::Direction direction) |
Friends | |
class | GeneratableFUNetlistBlock |
Generates a netlist of processor building blocks. [DEPRECATED]
Definition at line 84 of file NetlistGenerator.hh.
|
private |
Map type for FUImplementation.
Definition at line 174 of file NetlistGenerator.hh.
|
private |
Map type for port of immediate units.
Definition at line 172 of file NetlistGenerator.hh.
|
private |
Multimap type to map ADF ports to NetlistPorts.
Definition at line 162 of file NetlistGenerator.hh.
|
private |
Map type for NetlistPorts.
Definition at line 169 of file NetlistGenerator.hh.
|
private |
Map type for NetlistPorts.
Definition at line 167 of file NetlistGenerator.hh.
|
private |
Map type for RFImplementation.
Definition at line 176 of file NetlistGenerator.hh.
|
private |
Map type to map ADF Units to NetlistBlocks.
Definition at line 165 of file NetlistGenerator.hh.
ProGe::NetlistGenerator::NetlistGenerator | ( | const ProGeContext & | context, |
ICDecoderGeneratorPlugin & | plugin | ||
) |
Definition at line 159 of file NetlistGenerator.cc.
|
virtual |
The destructor.
Definition at line 168 of file NetlistGenerator.cc.
References MapTools::deleteAllValues(), fuEntryMap_, and rfEntryMap_.
|
private |
Adds the RF or IU identified by the given RFImplementationLocation instance to the netlist.
regFile | The corresponding RF (or IU) in ADF. |
location | The RFImplementationLocation instance. |
netlist | The netlist. |
blockNamePrefix | Prefix to be added to the block name. |
IOException | If the HDB that contains the implementation cannot be accessed. |
InvalidData | If the RF entry in HDB does not have an implementation or architecture or if the HDB does not have the entry defined in the RFImplementationLocation instance at all. |
Definition at line 1351 of file NetlistGenerator.cc.
References __func__, ProGe::NetlistBlock::addSubBlock(), HDB::RFEntry::architecture(), assert, HDB::BIDIR, ProGe::BIT, ProGe::BIT_VECTOR, checkInstanceName(), clkPort(), ProGe::Netlist::connect(), HDB::RFPortImplementation::direction(), HDB::ExternalPort::direction(), Exception::errorMessage(), glockPort(), HDB::RFEntry::hasArchitecture(), HDB::RFArchitecture::hasGuardSupport(), HDB::RFEntry::hasImplementation(), ProGe::Netlist::hasParameter(), IDF::UnitImplementationLocation::hdbFile(), IDF::UnitImplementationLocation::id(), HDB::RFEntry::implementation(), implementation, HDB::IN, ProGe::IN, TTAMachine::Port::inputSocket(), IU_NAME_PREFIX, HDB::PortImplementation::loadPort(), loadPort(), mapClockPort(), mapGlobalLockPort(), mapImmediateUnitWritePort(), mapLoadPort(), mapNetlistBlock(), mapNetlistPort(), mapResetPort(), mapRFGuardPort(), mapRFOpcodePort(), HDB::Parameter::name, HDB::PortImplementation::name(), HDB::ExternalPort::name(), TTAMachine::Component::name(), ProGe::Parameter::name(), ProGe::NetlistBlock::netlist(), TTAMachine::BaseRegisterFile::numberOfRegisters(), HDB::RFPortImplementation::opcodePort(), HDB::RFPortImplementation::opcodePortWidthFormula(), HDB::OUT, ProGe::OUT, TTAMachine::Port::outputSocket(), ProGe::NetlistBlock::parameter(), HDB::ExternalPort::parameterDependency(), HDB::ExternalPort::parameterDependencyCount(), TTAMachine::BaseRegisterFile::port(), portCorrespondenceMap_, TTAMachine::Unit::portCount(), TCEString::replace(), MathTools::requiredBits(), RF_NAME_PREFIX, HDB::HDBManager::rfByEntryID(), rfEntryMap_, rstPort(), ProGe::NetlistBlock::setParameter(), ProGe::Netlist::setParameter(), HDB::RFArchitecture::size(), Conversion::toString(), translateDirection(), HDB::Parameter::type, ProGe::Parameter::type(), IDF::UnitImplementationLocation::unitName(), HDB::Parameter::value, ProGe::Parameter::value(), TTAMachine::BaseRegisterFile::width(), HDB::RFArchitecture::width(), and HDB::ExternalPort::widthFormula().
Referenced by addIUToNetlist(), and addRFToNetlist().
|
private |
Adds external ports defined in HDB into netlist.
Also attempts to recognize LSU memory bus ports and assign them into corresponding NetlistGroup. Recognition is now done by seeking external ports having specific patterns (see inferLSUSignal()).
Definition at line 1189 of file NetlistGenerator.cc.
References __func__, ProGe::NetlistPortGroup::addPort(), ProGe::NetlistBlock::addPortGroup(), TTAMachine::FunctionUnit::addressSpace(), ProGe::BIT_VECTOR, ProGe::BITMASKED_SRAM_PORT, ProGe::Netlist::connect(), HDB::ExternalPort::direction(), HDB::FUImplementation::externalPort(), HDB::FUImplementation::externalPortCount(), TTAMachine::FunctionUnit::hasAddressSpace(), ProGe::Netlist::hasParameter(), inferLSUSignal(), ProGe::BaseNetlistBlock::instanceName(), isLSUDataPort(), HDB::ExternalPort::name(), TTAMachine::Component::name(), ProGe::Parameter::name(), ProGe::NetlistBlock::netlist(), ProGe::NetlistBlock::parameter(), HDB::ExternalPort::parameterDependency(), HDB::ExternalPort::parameterDependencyCount(), TCEString::replace(), ProGe::NetlistBlock::setParameter(), ProGe::Netlist::setParameter(), translateDirection(), ProGe::Parameter::type(), ProGe::Parameter::value(), and HDB::ExternalPort::widthFormula().
Referenced by addFUToNetlist().
|
private |
Adds the FU identified by the given FUImplementationLocation instance to the netlist.
location | The FUImplementationLocation instance. |
netlist | The netlist block under where FU is added. |
IOException | If the HDB that contains the implementation cannot be accessed. |
InvalidData | If the MachineImplementation instance is erroneous or if HDB erroneous. |
Definition at line 974 of file NetlistGenerator.cc.
References __func__, addFUExternalPortsToNetlist(), ProGe::NetlistBlock::addSubBlock(), ProGe::ProGeContext::adf(), HDB::FUEntry::architecture(), HDB::FUArchitecture::architecture(), HDB::FUPortImplementation::architecturePort(), HDB::FUImplementation::architecturePort(), HDB::FUImplementation::architecturePortCount(), ProGe::BIT, ProGe::BIT_VECTOR, calculateAddressWidth(), checkInstanceName(), HDB::HWBlockImplementation::clkPort(), clkPort(), ProGe::Netlist::connect(), context_, Exception::errorMessage(), findCorrespondingPort(), FU_NAME_PREFIX, HDB::HDBManager::fuByEntryID(), fuEntryMap_, TTAMachine::Machine::functionUnitNavigator(), HDB::HWBlockImplementation::glockPort(), glockPort(), HDB::FUImplementation::glockReqPort(), glockReqPort(), HDB::FUPortImplementation::guardPort(), TTAMachine::FunctionUnit::hasAddressSpace(), HDB::FUEntry::hasArchitecture(), HDB::FUEntry::hasImplementation(), TTAMachine::Machine::Navigator< ComponentType >::hasItem(), IDF::UnitImplementationLocation::hdbFile(), IDF::UnitImplementationLocation::id(), HDB::FUEntry::implementation(), ProGe::IN, isLSU(), isParameterizable(), TTAMachine::FUPort::isTriggering(), TTAMachine::Machine::Navigator< ComponentType >::item(), HDB::PortImplementation::loadPort(), loadPort(), mapClockPort(), mapFUGuardPort(), mapFUOpcodePort(), mapGlobalLockPort(), mapGlobalLockRequestPort(), mapLoadPort(), mapNetlistBlock(), mapNetlistPort(), mapResetPort(), HDB::HWBlockImplementation::moduleName(), HDB::Parameter::name, HDB::PortImplementation::name(), TTAMachine::Component::name(), ProGe::NetlistBlock::netlist(), HDB::FUImplementation::opcodePort(), opcodePortWidth(), ProGe::OUT, HDB::FUImplementation::parameter(), HDB::FUImplementation::parameterCount(), HDB::FUArchitecture::portDirection(), HDB::HWBlockImplementation::rstPort(), rstPort(), ProGe::NetlistBlock::setParameter(), TTAMachine::BaseFUPort::setWidth(), Conversion::toString(), translateDirection(), HDB::Parameter::type, IDF::UnitImplementationLocation::unitName(), HDB::Parameter::value, TTAMachine::BaseFUPort::width(), and HDB::FUPortImplementation::widthFormula().
Referenced by generate().
|
private |
Adds the global control unit to the netlist as sub-block of the given top-level block.
toplevelBlock | The top-level block of the netlist. |
imemWidthInMAUs | Width of the instruction memory in MAUs. |
Definition at line 692 of file NetlistGenerator.cc.
References __func__, ProGe::NetlistBlock::addParameter(), ProGe::NetlistBlock::addPortGroup(), ProGe::ADDRESS, ADDRESS_PORT_NAME, ProGe::NetlistBlock::addSubBlock(), ProGe::ProGeContext::adf(), assert, ProGe::BIT, ProGe::BIT_VECTOR, BUSY_PORT_NAME, ProGe::CLOCK, CLOCK_PORT_NAME, ProGe::Netlist::connect(), ProGe::Netlist::connectClocks(), ProGe::Netlist::connectResets(), context_, TTAMachine::Machine::controlUnit(), ProGe::CORE_HALT_STATUS, ProGe::ProGeContext::coreEntityName(), DATA_PORT_NAME, DECODER_BLOCK_NAME, DECODER_CLOCK_PORT, DECODER_INSTR_WORD_PORT, DECODER_LOCK_REQ_IN_PORT, DECODER_LOCK_REQ_OUT_PORT, DECODER_LOCK_STATUS_PORT, DECODER_PC_LOAD_PORT, DECODER_PC_OPCODE_PORT, DECODER_RA_LOAD_PORT, DECODER_RESET_PORT, DECOMPRESSOR_BLOCK_NAME, FETCH_PORT_NAME, ProGe::FETCHBLOCK, FETCHBLOCK_PORT_NAME, GLOBAL_LOCK_PORT_NAME, IFETCH_BLOCK_NAME, IMEMADDRWIDTH, IMEMWIDTHFORMULA, ProGe::IN, ProGe::INSTRUCTION_LINE, instructionDecoder_, instructionDecompressor_, instructionFetch_, INSTRUCTIONWIDTH, INSTRUCTIONWORD_PORT_NAME, TTAMachine::Port::isInput(), TTAMachine::Port::isOutput(), TTAMachine::Machine::isRISCVMachine(), loadPort(), LOCK_PORT_NAME, LOCK_REQUEST_PORT_NAME, LOCK_STATUS_PORT_NAME, ProGe::LOW, mapClockPort(), mapLoadPort(), mapNetlistPort(), mapResetPort(), TTAMachine::Port::name(), ProGe::NetlistBlock::netlist(), netlistPortIsMapped(), opcodePortWidth(), TTAMachine::FunctionUnit::operationPortCount(), ProGe::OUT, PC_IN_PORT_NAME, PC_LOAD_PORT_NAME, PC_OPCODE_PORT_NAME, TTAMachine::FunctionUnit::port(), TTAMachine::Unit::portCount(), RA_IN_PORT_NAME, RA_LOAD_PORT_NAME, RA_OUT_PORT_NAME, raInPort_, raOutPort_, READ_ENABLE_PORT_NAME, ProGe::READ_REQUEST, ProGe::READ_REQUEST_READY, ProGe::RESET, RESET_PORT_NAME, TTAMachine::ControlUnit::returnAddressPort(), Conversion::toString(), TTAMachine::FunctionUnit::triggerPort(), and TTAMachine::Port::width().
Referenced by generate().
|
private |
Definition at line 898 of file NetlistGenerator.cc.
References ProGe::GeneratableFUNetlistBlock::addInOperand(), ProGe::GeneratableFUNetlistBlock::addOutOperand(), ProGe::NetlistBlock::addSubBlock(), ProGe::ProGeContext::adf(), ProGe::BIT, ProGe::BIT_VECTOR, clkPort(), ProGe::Netlist::connect(), context_, TTAMachine::Machine::functionUnitNavigator(), GeneratableFUNetlistBlock, glockPort(), glockReqPort(), ProGe::IN, TTAMachine::Port::isInput(), TTAMachine::Machine::Navigator< ComponentType >::item(), mapClockPort(), mapFUOpcodePort(), mapGlobalLockPort(), mapGlobalLockRequestPort(), mapNetlistBlock(), mapResetPort(), IDF::FUGenerated::name(), ProGe::NetlistBlock::netlist(), TTAMachine::FunctionUnit::operationCount(), ProGe::OUT, TTAMachine::FunctionUnit::port(), TTAMachine::Unit::portCount(), and rstPort().
Referenced by generate().
|
private |
Adds the IU identified by the given RFImplementationLocation instance to the netlist.
location | The RFImplementationLocation instance. |
netlist | The netlist. |
IOException | If the HDB that contains the implementation cannot be accessed. |
InvalidData | If the MachineImplementation instance or HDB is erroneous. |
Definition at line 1318 of file NetlistGenerator.cc.
References __func__, addBaseRFToNetlist(), ProGe::ProGeContext::adf(), context_, TTAMachine::Machine::Navigator< ComponentType >::hasItem(), TTAMachine::Machine::immediateUnitNavigator(), TTAMachine::Machine::Navigator< ComponentType >::item(), IU_NAME_PREFIX, netlistBlock(), options, and IDF::UnitImplementationLocation::unitName().
Referenced by generate().
|
private |
Adds the RF identified by the given RFImplementationLocation instance to the netlist.
location | The RFImplementationLocation instance. |
netlist | The netlist. |
IOException | If the HDB that contains the implementation cannot be accessed. |
InvalidData | If the MachineImplementation instance or HDB is erroneous. |
Definition at line 1289 of file NetlistGenerator.cc.
References __func__, addBaseRFToNetlist(), ProGe::ProGeContext::adf(), context_, TTAMachine::Machine::Navigator< ComponentType >::hasItem(), TTAMachine::Machine::Navigator< ComponentType >::item(), netlistBlock(), options, TTAMachine::Machine::registerFileNavigator(), RF_NAME_PREFIX, and IDF::UnitImplementationLocation::unitName().
Referenced by generate().
|
private |
Calculates the address width of an address space in FU
Invalid | data If the FU doesn't have an address space or the address space is invalid |
Definition at line 1856 of file NetlistGenerator.cc.
References __func__, TTAMachine::FunctionUnit::addressSpace(), TTAMachine::AddressSpace::end(), TTAMachine::FunctionUnit::hasAddressSpace(), TTAMachine::Component::name(), and TTAMachine::AddressSpace::start().
Referenced by addFUToNetlist().
|
private |
Return fixed instance name if instance name is equal to module name.
baseInstanceName | Default name for a component instance |
moduleName | Name for the component module defined in HDB |
Definition at line 2080 of file NetlistGenerator.cc.
References INSTANCE_SUFFIX, and TCEString::lower().
Referenced by addBaseRFToNetlist(), and addFUToNetlist().
NetlistPort & ProGe::NetlistGenerator::clkPort | ( | const NetlistBlock & | block | ) | const |
Returns the clock port of the given block in the netlist.
block | The block in the netlist. |
InstanceNotFound | If the netlist does not contain the port. |
Definition at line 425 of file NetlistGenerator.cc.
References __func__, clkPorts_, ProGe::BaseNetlistBlock::instanceName(), and ProGe::BaseNetlistBlock::moduleName().
Referenced by addBaseRFToNetlist(), addFUToNetlist(), addGeneratableFUsToNetlist(), DefaultICDecoderGenerator::addRV32MicroCode(), DefaultICDecoderGenerator::generateDebuggerCode(), and mapClockPort().
|
inline |
Definition at line 125 of file NetlistGenerator.hh.
References context_.
Referenced by DefaultICDecoderGenerator::generate().
|
staticprivate |
Finds the corresponding ports from the given function units.
fuToSearch | The FU that is searched for the corresponding port. |
origFU | The original FU. |
portName | Name of the port in the original FU. |
InstanceNotFound | If there is no corresponding port. |
Definition at line 1963 of file NetlistGenerator.cc.
References __func__, assert, TTAMachine::FunctionUnit::hasOperation(), TTAMachine::FunctionUnit::hasOperationPort(), TTAMachine::HWOperation::io(), TTAMachine::HWOperation::isBound(), TTAMachine::HWOperation::name(), TTAMachine::Component::name(), TTAMachine::FunctionUnit::operation(), TTAMachine::FunctionUnit::operationCount(), TTAMachine::FunctionUnit::operationPort(), TTAMachine::HWOperation::port(), and THROW_EXCEPTION.
Referenced by addFUToNetlist().
FUEntry & ProGe::NetlistGenerator::fuEntry | ( | const std::string & | fuName | ) | const |
Returns the FU entry which was selected to represent the given FU.
fuName | Name of the FU in ADF. |
InstanceNotFound | If the netlist is not created yet or if there was no FU entry for the given FU. |
Definition at line 657 of file NetlistGenerator.cc.
References __func__, and fuEntryMap_.
Referenced by isParameterizable().
NetlistPort & ProGe::NetlistGenerator::fuGuardPort | ( | const NetlistPort & | fuPort | ) | const |
Returns the guard port of the given FU data port.
fuPort | The FU data port. |
InstanceNotFound | If the netlist does not contain the port. |
Definition at line 402 of file NetlistGenerator.cc.
References __func__, fuGuardPortMap_, ProGe::BaseNetlistBlock::instanceName(), ProGe::BaseNetlistBlock::moduleName(), ProGe::NetlistPort::name(), and ProGe::NetlistPort::parentBlock().
Referenced by DefaultDecoderGenerator::completeDecoderBlock().
NetlistPort & ProGe::NetlistGenerator::fuOpcodePort | ( | const NetlistBlock & | fuBlock | ) | const |
Returns the opcode port of the given FU.
fuBlock | The FU. |
InstanceNotFound | If the given FU does not have an opcode port. |
Definition at line 380 of file NetlistGenerator.cc.
References __func__, fuOpcodePorts_, ProGe::BaseNetlistBlock::instanceName(), and ProGe::BaseNetlistBlock::moduleName().
Referenced by DefaultDecoderGenerator::completeDecoderBlock().
NetlistPort & ProGe::NetlistGenerator::gcuReturnAddressInPort | ( | ) | const |
Returns the return address in port of GCU.
InstanceNotFound | If GCU does not have the port. |
Definition at line 551 of file NetlistGenerator.cc.
References __func__, and raInPort_.
Referenced by DefaultICGenerator::addICToNetlist(), and DefaultICDecoderGenerator::generateDebuggerCode().
NetlistPort & ProGe::NetlistGenerator::gcuReturnAddressOutPort | ( | ) | const |
Returns the return address out port of GCU.
InstanceNotFound | If GCU does not have the port. |
Definition at line 567 of file NetlistGenerator.cc.
References __func__, and raOutPort_.
Referenced by DefaultICGenerator::addICToNetlist().
NetlistBlock * ProGe::NetlistGenerator::generate | ( | const ProGeOptions & | options, |
int | imemWidthInMAUs, | ||
TCEString | entityNameStr = TOPLEVEL_BLOCK_DEFAULT_NAME , |
||
std::ostream & | warningStream = std::cerr |
||
) |
Generates the netlist block of the processor.
imemWidthInMAUs | Width of instruction memory in MAUs. |
entityNameStr | The name string used to make the netlist blocks uniquely named. |
IOException | If some of the HDBs given in IDF cannot be accessed. |
InvalidData | If HDB or IDF is invalid. |
OutOfRange | If the given width of instruction memory is not positive |
InstanceNotFound | Something missing missing from HDB. |
Definition at line 188 of file NetlistGenerator.cc.
References __func__, addFUToNetlist(), addGCUToNetlist(), addGeneratableFUsToNetlist(), addIUToNetlist(), ProGe::NetlistBlock::addPackage(), addRFToNetlist(), ProGe::ICDecoderGeneratorPlugin::completeNetlist(), context_, coreBlock_, ProGe::ProGeContext::coreEntityName(), IDF::MachineImplementation::FUGenerations(), IDF::MachineImplementation::fuImplementation(), ProGe::ProGeContext::idf(), IDF::MachineImplementation::iuImplementation(), options, plugin_, and IDF::MachineImplementation::rfImplementation().
Referenced by ProGe::ProcessorGenerator::generateProcessor().
NetlistPort & ProGe::NetlistGenerator::glockPort | ( | const NetlistBlock & | block | ) | const |
Returns the global lock port of the given block in the netlist.
block | The block in the netlist. |
InstanceNotFound | If the netlist does not contain the port. |
Definition at line 477 of file NetlistGenerator.cc.
References __func__, glockPorts_, ProGe::BaseNetlistBlock::instanceName(), and ProGe::BaseNetlistBlock::moduleName().
Referenced by addBaseRFToNetlist(), addFUToNetlist(), addGeneratableFUsToNetlist(), DefaultDecoderGenerator::addGlockPortToDecoder(), and mapGlobalLockPort().
NetlistPort & ProGe::NetlistGenerator::glockReqPort | ( | const NetlistBlock & | block | ) | const |
Returns the global lock request port of the given block in the netlist.
block | The block in the netlist. |
InstanceNotFound | If the netlist does not contain the port. |
Definition at line 510 of file NetlistGenerator.cc.
References __func__, glockReqPorts_, ProGe::BaseNetlistBlock::instanceName(), and ProGe::BaseNetlistBlock::moduleName().
Referenced by addFUToNetlist(), addGeneratableFUsToNetlist(), DefaultDecoderGenerator::addLockReqPortToDecoder(), and mapGlobalLockRequestPort().
bool ProGe::NetlistGenerator::hasGlockPort | ( | const NetlistBlock & | block | ) | const |
Tells whether the given netlist block has a global lock port.
block | The netlist block. |
Definition at line 465 of file NetlistGenerator.cc.
References MapTools::containsKey(), and glockPorts_.
Referenced by DefaultDecoderGenerator::addGlockPortToDecoder(), and DefaultDecoderGenerator::glockPortWidth().
bool ProGe::NetlistGenerator::hasGlockReqPort | ( | const NetlistBlock & | block | ) | const |
Tells whether the given netlist block has global lock request port.
block | The netlist block. |
Definition at line 497 of file NetlistGenerator.cc.
References MapTools::containsKey(), and glockReqPorts_.
Referenced by DefaultDecoderGenerator::addLockReqPortToDecoder(), and DefaultDecoderGenerator::glockRequestWidth().
bool ProGe::NetlistGenerator::hasOpcodePort | ( | const NetlistPort & | port | ) | const |
Returns true if the given RF port has opcode port. Otherwise, returns false.
Definition at line 322 of file NetlistGenerator.cc.
References MapTools::containsKey(), and rfOpcodePortMap_.
Referenced by DefaultDecoderGenerator::completeDecoderBlock().
NetlistPort & ProGe::NetlistGenerator::immediateUnitWritePort | ( | const TTAMachine::ImmediateUnit & | iu | ) | const |
Returns a netlist port that is the write port of the given immediate unit.
iu | The immediate unit. |
InstanceNotFound | If the port is not found. |
Definition at line 532 of file NetlistGenerator.cc.
References __func__, iuPortMap_, and TTAMachine::Component::name().
Referenced by DefaultDecoderGenerator::completeDecoderBlock().
|
staticprivate |
Definition at line 2151 of file NetlistGenerator.cc.
References ProGe::ADDRESS, ProGe::LOW, ProGe::READ_DATA, ProGe::READ_WRITE_REQUEST, ProGe::UNDEFINED, ProGe::WRITE_BITMASK, ProGe::WRITE_DATA, and ProGe::WRITEMODE.
Referenced by addFUExternalPortsToNetlist().
NetlistBlock & ProGe::NetlistGenerator::instructionDecoder | ( | ) | const |
Returns the instruction decoder block in the netlist.
InstanceNotFound | If there is no instruction decoder in the netlist. |
Definition at line 600 of file NetlistGenerator.cc.
References __func__, and instructionDecoder_.
Referenced by DefaultICDecoderGenerator::addRV32MicroCode(), DefaultDecoderGenerator::completeDecoderBlock(), DefaultICDecoderGenerator::generateDebuggerCode(), and DefaultDecoderGenerator::opcodeWidth().
NetlistBlock & ProGe::NetlistGenerator::instructionDecompressor | ( | ) | const |
Returns the instruction decompressor block in the netlist.
InstanceNotFound | If there is no instruction decompressor in the netlist. |
Definition at line 636 of file NetlistGenerator.cc.
References __func__, and instructionDecompressor_.
Referenced by DefaultICDecoderGenerator::addRV32MicroCode().
NetlistBlock & ProGe::NetlistGenerator::instructionFetch | ( | ) | const |
Returns the instruction fetch block in the netlist.
InstanceNotFound | If there is no instruction fetch in the netlist. |
Definition at line 617 of file NetlistGenerator.cc.
References __func__, and instructionFetch_.
Referenced by DefaultICDecoderGenerator::addDummyIfetchDebugPorts(), DefaultICDecoderGenerator::addInstructioRegisterBypass(), DefaultICDecoderGenerator::addRV32MicroCode(), DefaultICDecoderGenerator::generate(), and DefaultICDecoderGenerator::generateDebuggerCode().
|
staticprivate |
Returns the address space that represents the instruction memory of the given machine.
machine | The machine. |
IllegalMachine | If the machine does not have the instruction memory address space. |
Definition at line 2041 of file NetlistGenerator.cc.
References __func__, TTAMachine::FunctionUnit::addressSpace(), TTAMachine::Machine::controlUnit(), and machine.
Referenced by instructionMemoryAddressWidth(), and instructionMemoryWidth().
|
staticprivate |
Explores the given machine for the width of the instruction memory address.
machine | The machine. |
IllegalMachine | If the machine is erroneous. |
Definition at line 2009 of file NetlistGenerator.cc.
References TTAMachine::AddressSpace::end(), instructionMemory(), machine, and MathTools::requiredBits().
|
staticprivate |
Explores the given machine for the width of the instruction memory.
machine | The machine. |
IllegalMachine | If the machine is erroneous. |
Definition at line 2023 of file NetlistGenerator.cc.
References instructionMemory(), machine, and TTAMachine::AddressSpace::width().
|
private |
(Ugly) heursitics for identifying an LSU.
If it has an address space and implements a memory operation, it is an LSU
fu | Function unit to be tested |
Definition at line 2102 of file NetlistGenerator.cc.
References TTAMachine::FunctionUnit::hasAddressSpace(), and TTAMachine::FunctionUnit::hasOperationLowercase().
Referenced by addFUToNetlist().
|
staticprivate |
(Ugly) heuristics for identifying an LSU data memory port.
The identification is made by partial match of the port's name.
portName | The port name given in HDB. |
Definition at line 2132 of file NetlistGenerator.cc.
References TTAMachine::FunctionUnit::hasAddressSpace().
Referenced by addFUExternalPortsToNetlist().
|
private |
Checks if the given parameter is defined parametrizable in the given FUImplementation
paramName | Name of the parameter |
fuImplementation | FUImplementation to be tested |
Definition at line 1832 of file NetlistGenerator.cc.
References HDB::FUEntry::architecture(), HDB::FUPortImplementation::architecturePort(), HDB::FUImplementation::architecturePort(), HDB::FUImplementation::architecturePortCount(), fuEntry(), HDB::FUArchitecture::hasParameterizedWidth(), HDB::FUEntry::implementation(), and HDB::FUPortImplementation::widthFormula().
Referenced by addFUToNetlist().
NetlistPort & ProGe::NetlistGenerator::loadPort | ( | const NetlistPort & | port | ) | const |
Returns the load enable port of the given port in the netlist.
port | The architectural port in the netlist. |
InstanceNotFound | If the netlist does not contain the port. |
Definition at line 304 of file NetlistGenerator.cc.
References __func__, ProGe::BaseNetlistBlock::instanceName(), loadPortMap_, ProGe::BaseNetlistBlock::moduleName(), ProGe::NetlistPort::name(), and ProGe::NetlistPort::parentBlock().
Referenced by addBaseRFToNetlist(), addFUToNetlist(), addGCUToNetlist(), DefaultDecoderGenerator::completeDecoderBlock(), and mapLoadPort().
|
private |
Maps the given clock port for the given block.
block | The netlist block. |
clkPort | The clock port of the block. |
Definition at line 1733 of file NetlistGenerator.cc.
References assert, clkPort(), clkPorts_, and MapTools::containsKey().
Referenced by addBaseRFToNetlist(), addFUToNetlist(), addGCUToNetlist(), and addGeneratableFUsToNetlist().
|
private |
Maps the given guard port for the given FU data port.
dataPort | The data port. |
guardPort | The guard port. |
Definition at line 1803 of file NetlistGenerator.cc.
References assert, MapTools::containsKey(), and fuGuardPortMap_.
Referenced by addFUToNetlist().
|
private |
Maps the given opcode port for the given FU block.
block | The FU block. |
opcodePort | The opcode port of the FU block. |
Definition at line 1719 of file NetlistGenerator.cc.
References assert, MapTools::containsKey(), and fuOpcodePorts_.
Referenced by addFUToNetlist(), and addGeneratableFUsToNetlist().
|
private |
Maps the given global lock port for the given block.
block | The netlist block. |
glockPort | The global lock port of the block. |
Definition at line 1761 of file NetlistGenerator.cc.
References assert, MapTools::containsKey(), glockPort(), and glockPorts_.
Referenced by addBaseRFToNetlist(), addFUToNetlist(), and addGeneratableFUsToNetlist().
void ProGe::NetlistGenerator::mapGlobalLockRequestPort | ( | const NetlistBlock & | block, |
NetlistPort & | glockReqPort | ||
) |
Maps the given global lock request port for the given block.
block | The netlist block. |
glockReqPort | The global lock request port of the block. |
Definition at line 1775 of file NetlistGenerator.cc.
References assert, MapTools::containsKey(), glockReqPort(), and glockReqPorts_.
Referenced by addFUToNetlist(), and addGeneratableFUsToNetlist().
|
private |
Maps the given netlist port as a write port of the given immediate unit.
iu | The immediate unit. |
port | The netlist port. |
Definition at line 1818 of file NetlistGenerator.cc.
References iuPortMap_.
Referenced by addBaseRFToNetlist().
|
private |
Maps the given load port for the given architectural port.
port | The architectural port in the netlist. |
loadPort | The load port of the architectural port. |
Definition at line 1691 of file NetlistGenerator.cc.
References assert, MapTools::containsKey(), loadPort(), and loadPortMap_.
Referenced by addBaseRFToNetlist(), addFUToNetlist(), addGCUToNetlist(), and ProGe::GeneratableFUNetlistBlock::addInOperand().
|
private |
Maps the given ADF Function Unit to the given netlist block.
adfFU | The Function Unit in ADF (Machine Object Model). |
netlistBlock | The corresponding block in the netlist. |
Definition at line 1668 of file NetlistGenerator.cc.
References assert, MapTools::containsKey(), netlistBlock(), and unitCorrespondenceMap_.
Referenced by addBaseRFToNetlist(), addFUToNetlist(), and addGeneratableFUsToNetlist().
|
private |
Maps the given ADF port to the given netlist port.
adfPort | The port in ADF (Machine Object Model). |
netlistPort | The corresponding port in the netlist. |
Definition at line 1650 of file NetlistGenerator.cc.
References assert, ProGe::NetlistPort::direction(), netlistPort(), and portCorrespondenceMap_.
Referenced by addBaseRFToNetlist(), addFUToNetlist(), addGCUToNetlist(), ProGe::GeneratableFUNetlistBlock::addInOperand(), and ProGe::GeneratableFUNetlistBlock::addOutOperand().
|
private |
Maps the given reset port for the given block.
block | The netlist block. |
resetPort | The reset port of the block. |
Definition at line 1747 of file NetlistGenerator.cc.
References assert, MapTools::containsKey(), and rstPorts_.
Referenced by addBaseRFToNetlist(), addFUToNetlist(), addGCUToNetlist(), and addGeneratableFUsToNetlist().
|
private |
Maps the given guard port for the given RF block.
block | The netlist block. |
guardPort | The guard port of the block. |
Definition at line 1789 of file NetlistGenerator.cc.
References assert, MapTools::containsKey(), and rfGuardPorts_.
Referenced by addBaseRFToNetlist().
|
private |
Maps the given opcode port for the given architectural RF port.
port | The architectural port in the netlist. |
opcodePort | The opcode port of the architectural port. |
Definition at line 1705 of file NetlistGenerator.cc.
References assert, MapTools::containsKey(), and rfOpcodePortMap_.
Referenced by addBaseRFToNetlist().
NetlistBlock & ProGe::NetlistGenerator::netlistBlock | ( | const TTAMachine::Unit & | unit | ) | const |
Returns the netlist block which is corresponding to the given unit in the machine object model.
unit | The Unit in the machine object model |
InstanceNotFound | If the netlist does not contain the block. |
Definition at line 283 of file NetlistGenerator.cc.
References __func__, TTAMachine::Component::name(), and unitCorrespondenceMap_.
Referenced by DefaultDecoderGenerator::addGlockPortToDecoder(), addIUToNetlist(), DefaultDecoderGenerator::addLockReqPortToDecoder(), addRFToNetlist(), DefaultDecoderGenerator::completeDecoderBlock(), DefaultDecoderGenerator::glockPortWidth(), DefaultDecoderGenerator::glockRequestWidth(), and mapNetlistBlock().
NetlistPort & ProGe::NetlistGenerator::netlistPort | ( | const TTAMachine::Port & | port, |
Direction | dir = IN |
||
) | const |
Returns the netlist port which is corresponding to the given port in the machine object model.
port | The port in the machine object model |
InstanceNotFound | If the netlist does not contain the port. |
Definition at line 247 of file NetlistGenerator.cc.
References __func__, ProGe::IN, TTAMachine::Port::isInput(), TTAMachine::Port::isOutput(), TTAMachine::Port::name(), TTAMachine::Component::name(), ProGe::OUT, TTAMachine::Port::parentUnit(), and portCorrespondenceMap_.
Referenced by DefaultICGenerator::addICToNetlist(), DefaultDecoderGenerator::completeDecoderBlock(), and mapNetlistPort().
|
private |
Returns true if the given ADF port is mapped to some netlist port.
adfPort | The port in ADF (Machine Object Model). |
Definition at line 1681 of file NetlistGenerator.cc.
References portCorrespondenceMap_.
Referenced by addGCUToNetlist().
|
staticprivate |
Calculates the required opcode port width for the given FU.
fu | The FU. |
warningStream | Output stream where warnings are written |
InvalidData | If the HDB is missing some information. |
Definition at line 1889 of file NetlistGenerator.cc.
References HDB::FUEntry::architecture(), HDB::FUArchitecture::architecture(), assert, HDB::FUEntry::hasArchitecture(), HDB::FUEntry::hasImplementation(), HDB::FUEntry::implementation(), implementation, TTAMachine::HWOperation::name(), TTAMachine::FunctionUnit::operation(), TTAMachine::FunctionUnit::operationCount(), and MathTools::requiredBits().
Referenced by addFUToNetlist(), and addGCUToNetlist().
|
staticprivate |
Calculates the required opcode port width for the given GCU.
gcu | The GCU. |
Definition at line 1937 of file NetlistGenerator.cc.
References TTAMachine::HWOperation::name(), TTAMachine::FunctionUnit::operation(), TTAMachine::FunctionUnit::operationCount(), and MathTools::requiredBits().
HDB::RFEntry & ProGe::NetlistGenerator::rfEntry | ( | const std::string & | rfName | ) | const |
Returns the RF entry which was selected to represent the given RF.
fuName | Name of the RF in ADF. |
InstanceNotFound | If the netlist is not created yet or if there was no RF entry for the given RF. |
Definition at line 676 of file NetlistGenerator.cc.
References __func__, and rfEntryMap_.
Referenced by DefaultDecoderGenerator::sacEnabled().
NetlistPort & ProGe::NetlistGenerator::rfGuardPort | ( | const NetlistBlock & | rfBlock | ) | const |
Returns the guard port of the given RF block in the netlist.
rfBlock | The RF block in the netlist. |
InstanceNotFound | If the netlist does not contain the port. |
Definition at line 357 of file NetlistGenerator.cc.
References __func__, ProGe::BaseNetlistBlock::instanceName(), ProGe::BaseNetlistBlock::moduleName(), and rfGuardPorts_.
Referenced by DefaultDecoderGenerator::completeDecoderBlock().
NetlistPort & ProGe::NetlistGenerator::rfOpcodePort | ( | const NetlistPort & | port | ) | const |
Returns the opcode port of the given RF port in the netlist.
port | The architectural RF port in the netlist. |
InstanceNotFound | If the netlist does not contain the port. |
Definition at line 334 of file NetlistGenerator.cc.
References __func__, ProGe::BaseNetlistBlock::instanceName(), ProGe::BaseNetlistBlock::moduleName(), ProGe::NetlistPort::name(), ProGe::NetlistPort::parentBlock(), and rfOpcodePortMap_.
Referenced by DefaultDecoderGenerator::completeDecoderBlock().
NetlistPort & ProGe::NetlistGenerator::rstPort | ( | const NetlistBlock & | block | ) | const |
Returns the reset port of the given block in the netlist.
block | The block in the netlist. |
InstanceNotFound | If the netlist does not contain the port. |
Definition at line 446 of file NetlistGenerator.cc.
References __func__, ProGe::BaseNetlistBlock::instanceName(), ProGe::BaseNetlistBlock::moduleName(), and rstPorts_.
Referenced by addBaseRFToNetlist(), addFUToNetlist(), addGeneratableFUsToNetlist(), DefaultICDecoderGenerator::addRV32MicroCode(), and DefaultICDecoderGenerator::generateDebuggerCode().
|
staticprivate |
Definition at line 2059 of file NetlistGenerator.cc.
References assert, HDB::BIDIR, ProGe::BIDIR, HDB::IN, ProGe::IN, HDB::OUT, and ProGe::OUT.
Referenced by addBaseRFToNetlist(), addFUExternalPortsToNetlist(), and addFUToNetlist().
NetlistBlock & ProGe::NetlistGenerator::ttaCore | ( | ) | const |
Returns the TTA core block in the netlist.
InstanceNotFound | If there is no instruction decoder in the netlist. |
Definition at line 584 of file NetlistGenerator.cc.
References __func__, and coreBlock_.
|
friend |
Definition at line 85 of file NetlistGenerator.hh.
Referenced by addGeneratableFUsToNetlist().
|
static |
Definition at line 152 of file NetlistGenerator.hh.
|
private |
Maps clock ports.
Definition at line 258 of file NetlistGenerator.hh.
Referenced by clkPort(), and mapClockPort().
|
private |
Definition at line 246 of file NetlistGenerator.hh.
Referenced by addFUToNetlist(), addGCUToNetlist(), addGeneratableFUsToNetlist(), addIUToNetlist(), addRFToNetlist(), context(), and generate().
|
private |
The TTA core block.
Definition at line 274 of file NetlistGenerator.hh.
Referenced by generate(), and ttaCore().
|
static |
Clock port name in instruction decoder.
Definition at line 132 of file NetlistGenerator.hh.
Referenced by addGCUToNetlist().
|
static |
Instruction word port name in instruction decoder.
Definition at line 128 of file NetlistGenerator.hh.
Referenced by addGCUToNetlist().
|
static |
Lock request in port name in instruction decoder.
Definition at line 142 of file NetlistGenerator.hh.
Referenced by addGCUToNetlist().
|
static |
Lock request out port name in instruction decoder.
Definition at line 140 of file NetlistGenerator.hh.
Referenced by addGCUToNetlist().
|
static |
Definition at line 144 of file NetlistGenerator.hh.
Referenced by addGCUToNetlist().
|
static |
PC load port name in instruction decoder.
Definition at line 136 of file NetlistGenerator.hh.
Referenced by addGCUToNetlist().
|
static |
PC opcode port name in instruction decoder.
Definition at line 138 of file NetlistGenerator.hh.
Referenced by addGCUToNetlist().
|
static |
RA load port name in instruction decoder.
Definition at line 134 of file NetlistGenerator.hh.
Referenced by addGCUToNetlist().
|
static |
Reset port name in instruction decoder.
Definition at line 130 of file NetlistGenerator.hh.
Referenced by addGCUToNetlist().
|
static |
Global lock out port name in decompressor.
Definition at line 148 of file NetlistGenerator.hh.
|
static |
Instruction word port name in decompressor.
Definition at line 150 of file NetlistGenerator.hh.
|
static |
Lock request in port name in decompressor.
Definition at line 146 of file NetlistGenerator.hh.
|
static |
Definition at line 154 of file NetlistGenerator.hh.
Referenced by addGCUToNetlist().
|
private |
Maps FU implementations for different FU's.
Definition at line 282 of file NetlistGenerator.hh.
Referenced by addFUToNetlist(), fuEntry(), and ~NetlistGenerator().
|
private |
Maps FU guard ports.
Definition at line 268 of file NetlistGenerator.hh.
Referenced by fuGuardPort(), and mapFUGuardPort().
|
private |
Maps FU opcode ports.
Definition at line 270 of file NetlistGenerator.hh.
Referenced by fuOpcodePort(), and mapFUOpcodePort().
|
private |
Maps global lock ports.
Definition at line 264 of file NetlistGenerator.hh.
Referenced by glockPort(), hasGlockPort(), and mapGlobalLockPort().
|
private |
Maps global lock request ports.
Definition at line 266 of file NetlistGenerator.hh.
Referenced by glockReqPort(), hasGlockReqPort(), and mapGlobalLockRequestPort().
|
private |
The instruction decoder block.
Definition at line 276 of file NetlistGenerator.hh.
Referenced by addGCUToNetlist(), and instructionDecoder().
|
private |
The instruction decompressor block.
Definition at line 278 of file NetlistGenerator.hh.
Referenced by addGCUToNetlist(), and instructionDecompressor().
|
private |
The instruction fetch block.
Definition at line 280 of file NetlistGenerator.hh.
Referenced by addGCUToNetlist(), and instructionFetch().
|
private |
Maps the created netlist ports to immediate units.
Definition at line 272 of file NetlistGenerator.hh.
Referenced by immediateUnitWritePort(), and mapImmediateUnitWritePort().
|
private |
Maps loads ports.
Definition at line 254 of file NetlistGenerator.hh.
Referenced by loadPort(), and mapLoadPort().
|
private |
|
private |
Maps the ADF ports to the netlist ports.
Definition at line 250 of file NetlistGenerator.hh.
Referenced by addBaseRFToNetlist(), mapNetlistPort(), netlistPort(), and netlistPortIsMapped().
|
private |
Return address in port in GCU (ifetch).
Definition at line 286 of file NetlistGenerator.hh.
Referenced by addGCUToNetlist(), and gcuReturnAddressInPort().
|
private |
Returns address out port in GCU (ifetch).
Definition at line 288 of file NetlistGenerator.hh.
Referenced by addGCUToNetlist(), and gcuReturnAddressOutPort().
|
private |
Maps RF implementations for different RF's.
Definition at line 284 of file NetlistGenerator.hh.
Referenced by addBaseRFToNetlist(), rfEntry(), and ~NetlistGenerator().
|
private |
Maps RF guard ports.
Definition at line 262 of file NetlistGenerator.hh.
Referenced by mapRFGuardPort(), and rfGuardPort().
|
private |
Maps opcode ports.
Definition at line 256 of file NetlistGenerator.hh.
Referenced by hasOpcodePort(), mapRFOpcodePort(), and rfOpcodePort().
|
private |
Maps reset ports.
Definition at line 260 of file NetlistGenerator.hh.
Referenced by mapResetPort(), and rstPort().
|
private |
Maps the ADF units to the netlist blocks.
Definition at line 252 of file NetlistGenerator.hh.
Referenced by mapNetlistBlock(), and netlistBlock().