Go to the documentation of this file.
33 #ifndef TTA_NETLIST_GENERATOR_HH
34 #define TTA_NETLIST_GENERATOR_HH
49 class MachineImplementation;
56 class FUImplementation;
65 class BaseRegisterFile;
73 class ICDecoderGeneratorPlugin;
79 class GeneratableFUNetlistBlock;
94 TCEString entityNameStr, std::ostream& warningStream);
161 typedef std::multimap<const TTAMachine::Port*, NetlistPort*>
164 typedef std::map<const TTAMachine::Unit*, NetlistBlock*>
171 typedef std::map<const TTAMachine::ImmediateUnit*, NetlistPort*>
238 const std::string& portName);
NetlistBlock & instructionFetch() const
bool isParameterizable(const std::string ¶mName, const HDB::FUEntry *fuEntry) const
NetlistBlock & instructionDecompressor() const
NetlistBlock * instructionDecompressor_
The instruction decompressor block.
bool hasGlockReqPort(const NetlistBlock &block) const
static const std::string DECODER_LOCK_STATUS_PORT
void addFUToNetlist(const IDF::FUImplementationLocation &location, NetlistBlock &netlistBlock, std::ostream &warningStream)
void mapFUOpcodePort(const NetlistBlock &block, NetlistPort &opcodePort)
void mapLoadPort(const NetlistPort &port, NetlistPort &loadPort)
PortRelationMap loadPortMap_
Maps loads ports.
static const std::string DECOMP_INSTR_WORD_PORT
Instruction word port name in decompressor.
PortRelationMap rfOpcodePortMap_
Maps opcode ports.
TTAMachine::Machine * machine
the architecture definition of the estimated processor
PortPurposeMap clkPorts_
Maps clock ports.
void addGCUToNetlist(NetlistBlock &toplevelBlock, int imemWidthInMAUs)
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
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)
NetlistGenerator(const ProGeContext &context, ICDecoderGeneratorPlugin &plugin)
void addBaseRFToNetlist(const ProGeOptions &options, const TTAMachine::BaseRegisterFile ®File, const IDF::RFImplementationLocation &location, NetlistBlock &netlistBlock, const std::string &blockNamePrefix)
std::map< const TTAMachine::Unit *, NetlistBlock * > UnitCorrespondenceMap
Map type to map ADF Units to NetlistBlocks.
void mapResetPort(const NetlistBlock &block, NetlistPort &resetPort)
void addIUToNetlist(const ProGeOptions &options, const IDF::RFImplementationLocation &location, NetlistBlock &netlistBlock)
std::map< std::string, HDB::FUEntry * > FUEntryMap
Map type for FUImplementation.
NetlistPort & fuGuardPort(const NetlistPort &fuPort) const
static const std::string DECODER_PC_OPCODE_PORT
PC opcode port name in instruction decoder.
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
NetlistPort & loadPort(const NetlistPort &port) const
static const std::string DECOMP_GLOCK_PORT
Global lock out port name in decompressor.
PortPurposeMap glockReqPorts_
Maps global lock request ports.
NetlistBlock & netlistBlock(const TTAMachine::Unit &unit) const
static const std::string FETCHBLOCK_PORT_NAME
static bool isLSUDataPort(const TTAMachine::FunctionUnit &adfFU, const std::string &portName)
static int opcodePortWidth(const HDB::FUEntry &fu, std::ostream &warningStream)
static const std::string DECODER_LOCK_REQ_IN_PORT
Lock request in port name in instruction decoder.
void addRFToNetlist(const ProGeOptions &options, const IDF::RFImplementationLocation &location, NetlistBlock &netlistBlock)
GeneratableFUNetlistBlock * addGeneratableFUsToNetlist(const IDF::FUGenerated &fug, NetlistBlock &netlistBlock)
const ProGeContext & context_
NetlistPort & gcuReturnAddressOutPort() const
NetlistPort & clkPort(const NetlistBlock &block) const
static const std::string DECODER_CLOCK_PORT
Clock port name in instruction decoder.
void mapRFGuardPort(const NetlistBlock &block, NetlistPort &guardPort)
virtual ~NetlistGenerator()
PortPurposeMap fuOpcodePorts_
Maps FU opcode ports.
void mapNetlistBlock(const TTAMachine::Unit &unit, NetlistBlock &netlistBlock)
const ProGeContext & context() const
NetlistPort & gcuReturnAddressInPort() const
PortPurposeMap glockPorts_
Maps global lock ports.
PortPurposeMap rstPorts_
Maps reset ports.
NetlistBlock & ttaCore() const
Direction
Direction of port.
UnitCorrespondenceMap unitCorrespondenceMap_
Maps the ADF units to the netlist blocks.
NetlistPort * raOutPort_
Returns address out port in GCU (ifetch).
ICDecoderGeneratorPlugin & plugin_
The generator plugin.
static const std::string DECODER_INSTR_WORD_PORT
Instruction word port name in instruction decoder.
bool netlistPortIsMapped(const TTAMachine::Port &adfPort)
static const std::string DECODER_RESET_PORT
Reset port name in instruction decoder.
FUEntryMap fuEntryMap_
Maps FU implementations for different FU's.
void mapRFOpcodePort(const NetlistPort &port, NetlistPort &opcodePort)
static Signal inferLSUSignal(const std::string &portName)
static int instructionMemoryAddressWidth(const TTAMachine::Machine &machine)
std::map< const NetlistPort *, NetlistPort * > PortRelationMap
Map type for NetlistPorts.
static const std::string DECOMP_LOCK_REQ_IN_PORT
Lock request in port name in decompressor.
std::map< const NetlistBlock *, NetlistPort * > PortPurposeMap
Map type for NetlistPorts.
NetlistPort & rstPort(const NetlistBlock &block) const
NetlistBlock * instructionDecoder_
The instruction decoder block.
static MachInfoCmdLineOptions options
static TTAMachine::AddressSpace & instructionMemory(const TTAMachine::Machine &machine)
NetlistPort * raInPort_
Return address in port in GCU (ifetch).
NetlistPort & rfGuardPort(const NetlistBlock &rfBlock) const
RFEntryMap rfEntryMap_
Maps RF implementations for different RF's.
std::multimap< const TTAMachine::Port *, NetlistPort * > PortCorrespondenceMap
Multimap type to map ADF ports to NetlistPorts.
PortCorrespondenceMap portCorrespondenceMap_
Maps the ADF ports to the netlist ports.
IUPortMap iuPortMap_
Maps the created netlist ports to immediate units.
unsigned int calculateAddressWidth(TTAMachine::FunctionUnit const *fu) const
NetlistBlock & instructionDecoder() const
NetlistPort & fuOpcodePort(const NetlistBlock &fuBlock) const
NetlistPort & rfOpcodePort(const NetlistPort &port) const
void mapClockPort(const NetlistBlock &block, NetlistPort &clkPort)
TCEString checkInstanceName(const TCEString &baseInstanceName, const TCEString &moduleName) const
void mapGlobalLockPort(const NetlistBlock &block, NetlistPort &glockPort)
static const std::string DECODER_LOCK_REQ_OUT_PORT
Lock request out port name in instruction decoder.
NetlistPort & netlistPort(const TTAMachine::Port &port, Direction dir=IN) const
NetlistPort & immediateUnitWritePort(const TTAMachine::ImmediateUnit &iu) const
void addFUExternalPortsToNetlist(const HDB::FUImplementation &fuImplementation, NetlistBlock &coreBlock, NetlistBlock &fuBlock, const TTAMachine::FunctionUnit &adfFU)
std::map< const TTAMachine::ImmediateUnit *, NetlistPort * > IUPortMap
Map type for port of immediate units.
NetlistBlock * instructionFetch_
The instruction fetch block.
bool hasOpcodePort(const NetlistPort &port) const
HDB::FUEntry & fuEntry(const std::string &fuName) const
PortRelationMap fuGuardPortMap_
Maps FU guard ports.
void mapImmediateUnitWritePort(const TTAMachine::ImmediateUnit &iu, NetlistPort &port)
Direction
Direction of the port.
void mapFUGuardPort(const NetlistPort &dataPort, NetlistPort &guardPort)
static const std::string ADDR_WIDTH
static int instructionMemoryWidth(const TTAMachine::Machine &machine)
std::map< std::string, HDB::RFEntry * > RFEntryMap
Map type for RFImplementation.
static Direction translateDirection(HDB::Direction direction)
bool hasGlockPort(const NetlistBlock &block) const
void mapNetlistPort(const TTAMachine::Port &adfPort, NetlistPort &netlistPort)