Go to the documentation of this file.
33 #ifndef TTA_BEM_GENERATOR_HH
34 #define TTA_BEM_GENERATOR_HH
54 class BaseRegisterFile;
55 class OperationTriggeredFormat;
70 typedef std::map<const TTAMachine::Socket*, SocketCodeTable*>
SCTableMap;
72 typedef std::pair<unsigned int, unsigned int>
Encoding;
119 const std::multiset<int>& oppositeFieldWidths,
121 std::multiset<Encoding>& encodings);
123 std::multiset<Encoding>& encodings,
static TTAMachine::Socket & socket(int index, const TTAMachine::Bus &bus, TTAMachine::Socket::Direction direction)
TTAMachine::Machine * machine
the architecture definition of the estimated processor
void assignSocketCodeTable(const TTAMachine::Socket *socket, SocketCodeTable *table)
static int socketCount(const TTAMachine::Bus &bus, TTAMachine::Socket::Direction direction)
std::multiset< int > socketCodeWidthsForBus(const TTAMachine::Bus &bus, TTAMachine::Socket::Direction socketDir) const
std::map< const TTAMachine::Socket *, SocketCodeTable * > SCTableMap
Map type for storing Socket - SocketCodeTable pairs.
unsigned int maxLongImmSlotWidth(const MoveSlot &slot) const
static void addExtraBits(std::multiset< Encoding > &encodings, int bitCount)
SocketCodeTable * socketCodeTable(const TTAMachine::Socket &socket) const
static TTAMachine::Bridge & sourceBridge(int index, const TTAMachine::Bus &bus)
static bool needsSocketCodeTable(const TTAMachine::Socket &socket)
static int requiredIndexWidth(const TTAMachine::BaseRegisterFile ®File)
void addEncodings(ImmediateControlField &field) const
void addLongImmDstRegisterFields(BinaryEncoding &bem) const
SocketCodeTable * suitableSocketCodeTable(const TTAMachine::Socket &socket) const
void addSocketCodeTables(BinaryEncoding &bem)
static void calculateEncodings(const std::multiset< int > &oppositeFieldWidths, bool leftAlignment, std::multiset< Encoding > &encodings)
void addPortCodes(SocketCodeTable &table, const TTAMachine::Socket &socket) const
static int sourceBridgeCount(const TTAMachine::Bus &bus)
std::pair< unsigned int, unsigned int > Encoding
Typedef for encoding (first = encoding, second = extra bits).
BEMGenerator(const TTAMachine::Machine &machine)
void addRiscvFormat(TTAMachine::OperationTriggeredFormat *format, BinaryEncoding &bem) const
void addSubfields(MoveSlot &slot) const
SCTableMap scTableMap_
A map which tells which socket code table belongs to a socket.
static bool hasUnconditionalGuard(const TTAMachine::Bus &bus)
void addTopLevelFields(BinaryEncoding &bem) const
BinaryEncoding * generate()
static bool haveEqualConnections(const TTAMachine::Socket &socket1, const TTAMachine::Socket &socket2)
const TTAMachine::Machine * machine_
The machine for which the BEM is generated.