OpenASIP
2.0
|
#include <DefaultICGenerator.hh>
Public Types | |
typedef std::map< const TTAMachine::Bus *, std::set< TTAMachine::Socket * > > | BusSocketMap |
Private Types | |
typedef std::map< const TTAMachine::Socket *, int > | SocketSignalMap |
typedef std::map< const TTAMachine::Bus *, SocketSignalMap * > | BusAltSignalMap |
Private Member Functions | |
void | writeInterconnectionNetwork (std::ostream &stream) |
void | generateSocketsAndMuxes (const std::string &dstDirectory) |
bool | isGcuPort (const TTAMachine::Port *port) const |
void | generateSocket (TTAMachine::Socket::Direction direction, int portConns, int segmentConns, const std::string &dstDirectory) const |
void | generateInputMux (int segmentConns, std::ofstream &stream) const |
void | generateInputSocketRuleForBus (int bus, int ind, std::ofstream &stream) const |
void | generateOutputSocket (int portConns, int segmentConns, std::ofstream &stream) const |
void | createSignalsForIC (std::ostream &stream) |
void | declareSocketEntities (std::ostream &stream) const |
void | writeBusDumpCode (std::ostream &stream) const |
void | writeBustraceExportCode (std::ostream &stream) const |
bool | socketIsGenerated (const TTAMachine::Socket &socket) |
bool | socketIsGenerated (int segmentConns, int portConns, TTAMachine::Socket::Direction direction) |
std::string | busAltSignal (const TTAMachine::Bus &bus, const TTAMachine::Socket &socket) |
std::string | socketEntityName (TTAMachine::Socket &socket) const |
std::string | inputMuxEntityName (int conns) const |
std::string | outputSocketEntityName (int busConns, int portConns) const |
Static Private Member Functions | |
static void | writeOutputSocketComponentDeclaration (const ProGe::HDL language, int portConns, int segmentConns, int ind, std::ostream &stream) |
static void | writeInputSocketComponentDeclaration (const ProGe::HDL language, int segmentConns, int ind, std::ostream &stream) |
static bool | isBusConnected (const TTAMachine::Bus &bus) |
static std::set< TTAMachine::Socket * > | inputSockets (const TTAMachine::Bus &bus) |
static std::set< TTAMachine::Socket * > | outputSockets (const TTAMachine::Bus &bus) |
static int | inputSocketDataPortWidth (const TTAMachine::Socket &socket) |
static int | outputSocketDataPortWidth (const TTAMachine::Socket &socket, int port) |
static int | maxOutputSocketDataPortWidth (const TTAMachine::Socket &socket) |
static int | busControlWidth (TTAMachine::Socket::Direction direction, int busConns) |
static int | dataControlWidth (TTAMachine::Socket::Direction direction, int portConns) |
static int | simmPortWidth (const TTAMachine::Bus &bus) |
static std::string | inputSocketDataPort (const std::string &socket) |
static std::string | outputSocketDataPort (const std::string &socket, int port) |
static std::string | socketBusControlPort (const std::string &name) |
static std::string | socketDataControlPort (const std::string &name) |
static std::string | simmDataPort (const std::string &busName) |
static std::string | simmControlPort (const std::string &busName) |
static std::string | inputSocketBusPort (int bus) |
static std::string | outputSocketBusPort (int bus) |
static std::string | outputSocketDataPort (int port) |
static std::string | busMuxDataPort (const TTAMachine::Bus &bus, int index) |
static std::string | busMuxControlPort (const TTAMachine::Bus &bus) |
static std::string | busMuxEnablePort (const TTAMachine::Bus &bus) |
static std::string | busWidthGeneric (int bus) |
static std::string | dataWidthGeneric (int port) |
static std::string | simmSocket (const TTAMachine::Bus &bus) |
static std::string | simmSignal (const TTAMachine::Bus &bus) |
static std::string | busSignal (const TTAMachine::Bus &bus) |
static ProGe::Direction | convertDirection (TTAMachine::Socket::Direction direction) |
static std::string | socketFileName (const ProGe::HDL language, TTAMachine::Socket::Direction direction, int portConns, int segmentConns) |
static std::string | busMuxEntityName (TTAMachine::Bus &bus) |
static std::string | indentation (unsigned int level) |
Private Attributes | |
const TTAMachine::Machine & | machine_ |
The machine. More... | |
ProGe::NetlistBlock * | icBlock_ |
The netlist block of IC. More... | |
BusAltSignalMap | altSignalMap_ |
Signal numbers for controlling sockets. More... | |
bool | generateBusTrace_ |
Tells whether to generate bus tracing code. More... | |
bool | exportBustrace_ |
Tells whether to export bustraces to debugger. More... | |
unsigned int | busTraceStartingCycle_ |
The starting cycle for bus tracing. More... | |
TCEString | entityNameStr_ |
ProGe::HDL | language_ |
BusSocketMap | busConnections |
std::set< std::pair< int, int > > | generatedOutputSockets_ |
std::set< std::pair< int, int > > | generatedInputSockets_ |
Additional Inherited Members | |
Protected Member Functions inherited from CentralizedControlICGenerator | |
void | mapSImmDataPort (const std::string &busName, ProGe::NetlistPort &port) |
void | mapSImmCntrlPort (const std::string &busName, ProGe::NetlistPort &port) |
void | mapBusCntrlPortOfSocket (const std::string &socketName, ProGe::NetlistPort &port) |
void | mapDataCntrlPortOfSocket (const std::string &socketName, ProGe::NetlistPort &port) |
void | setGlockPort (ProGe::NetlistPort &glockPort) |
This class generates interconnection network in VHDL/Verilog. The network uses and-or buses.
Definition at line 62 of file DefaultICGenerator.hh.
|
private |
Definition at line 100 of file DefaultICGenerator.hh.
typedef std::map<const TTAMachine::Bus*, std::set<TTAMachine::Socket*> > DefaultICGenerator::BusSocketMap |
Definition at line 65 of file DefaultICGenerator.hh.
|
private |
Definition at line 98 of file DefaultICGenerator.hh.
DefaultICGenerator::DefaultICGenerator | ( | const TTAMachine::Machine & | machine | ) |
The constructor.
Generates the inteconnection network of the given machine.
machine | The machine. |
Definition at line 81 of file DefaultICGenerator.cc.
|
virtual |
void DefaultICGenerator::addICToNetlist | ( | const ProGe::NetlistGenerator & | generator, |
ProGe::NetlistBlock & | coreBlock | ||
) |
Adds the interconnection network block under the given netlist block representing the TTA core and connects it to the FUs, RFs and IUs.
generator | The netlist generator which generated the netlist block. |
coreBlock | The netlist block. |
Definition at line 114 of file DefaultICGenerator.cc.
References abortWithError, ProGe::NetlistBlock::addSubBlock(), assert, ProGe::BIT, ProGe::BIT_VECTOR, busControlWidth(), TTAMachine::Machine::busNavigator(), ProGe::Netlist::connect(), TTAMachine::Machine::controlUnit(), convertDirection(), TTAMachine::Machine::Navigator< ComponentType >::count(), dataControlWidth(), TTAMachine::Socket::direction(), entityNameStr_, ProGe::NetlistGenerator::gcuReturnAddressInPort(), ProGe::NetlistGenerator::gcuReturnAddressOutPort(), TTAMachine::ControlUnit::hasReturnAddressPort(), icBlock_, TTAMachine::Bus::immediateWidth(), ProGe::IN, inputSocketDataPort(), inputSocketDataPortWidth(), isGcuPort(), TTAMachine::Machine::isRISCVMachine(), TTAMachine::Machine::Navigator< ComponentType >::item(), machine_, CentralizedControlICGenerator::mapBusCntrlPortOfSocket(), CentralizedControlICGenerator::mapDataCntrlPortOfSocket(), CentralizedControlICGenerator::mapSImmCntrlPort(), CentralizedControlICGenerator::mapSImmDataPort(), ProGe::BaseNetlistBlock::moduleName(), TTAMachine::Component::name(), ProGe::NetlistBlock::netlist(), ProGe::NetlistGenerator::netlistPort(), ProGe::OUT, outputSocketDataPort(), outputSocketDataPortWidth(), TTAMachine::Socket::port(), ProGe::NetlistBlock::port(), TTAMachine::Socket::portCount(), TTAMachine::ControlUnit::returnAddressPort(), TTAMachine::Socket::segmentCount(), TTAMachine::Socket::setDataPortWidth(), CentralizedControlICGenerator::setGlockPort(), simmControlPort(), simmDataPort(), simmPortWidth(), socketBusControlPort(), socketDataControlPort(), TTAMachine::Machine::socketNavigator(), Conversion::toString(), and TTAMachine::FunctionUnit::triggerPort().
|
private |
Returns the signal name of the given bus for the given output socket.
bus | The bus. |
socket | The socket. |
Definition at line 2332 of file DefaultICGenerator.cc.
References altSignalMap_, assert, busSignal(), MapTools::containsKey(), TTAMachine::Socket::direction(), and Conversion::toString().
Referenced by createSignalsForIC(), and writeInterconnectionNetwork().
|
staticprivate |
Returns the number of bits required to control the bus connections of the given socket.
direction | Direction of the socket. |
busConns | The number of bus connections. |
Definition at line 2129 of file DefaultICGenerator.cc.
References assert, and MathTools::bitLength().
Referenced by addICToNetlist(), generateInputMux(), inputSocketControlValue(), writeInterconnectionNetwork(), and writeOutputSocketComponentDeclaration().
|
staticprivate |
Definition at line 2303 of file DefaultICGenerator.cc.
References TTAMachine::Component::name().
|
staticprivate |
Definition at line 2298 of file DefaultICGenerator.cc.
References TTAMachine::Component::name(), and Conversion::toString().
|
staticprivate |
Definition at line 2308 of file DefaultICGenerator.cc.
References TTAMachine::Component::name().
|
staticprivate |
Definition at line 2503 of file DefaultICGenerator.cc.
References TTAMachine::Component::name().
|
staticprivate |
Returns the name of the signal of the given bus.
bus | The bus. |
Definition at line 2319 of file DefaultICGenerator.cc.
References TTAMachine::Component::name().
Referenced by busAltSignal(), createSignalsForIC(), writeBusDumpCode(), writeBustraceExportCode(), and writeInterconnectionNetwork().
|
staticprivate |
Returns the generic name for width of the given bus.
bus | The bus number. |
Definition at line 2366 of file DefaultICGenerator.cc.
References Conversion::toString().
Referenced by generateInputSocketRuleForBus(), generateOutputSocket(), writeInputSocketComponentDeclaration(), writeInterconnectionNetwork(), and writeOutputSocketComponentDeclaration().
|
staticprivate |
Converts the given socket direction to direction of the corresponding data port in the IC block.
direction | The socket direction. |
Definition at line 2416 of file DefaultICGenerator.cc.
References assert, ProGe::IN, ProGe::OUT, and UNKNOWN.
Referenced by addICToNetlist().
|
private |
Writes the signal declarations of interconnection network to the given stream.
stream | The stream. |
Definition at line 1364 of file DefaultICGenerator.cc.
References busAltSignal(), TTAMachine::Machine::busNavigator(), busSignal(), TTAMachine::Machine::Navigator< ComponentType >::count(), TTAMachine::Bus::immediateWidth(), indentation(), isBusConnected(), TTAMachine::Machine::Navigator< ComponentType >::item(), language_, machine_, maxOutputSocketDataPortWidth(), outputSockets(), simmPortWidth(), simmSignal(), ProGe::VHDL, and TTAMachine::Bus::width().
Referenced by writeInterconnectionNetwork().
|
staticprivate |
Returns the number of bits required to control from which port the data is written to the bus.
socket | Direction of the socket, |
portConns | The number of port connections. |
Definition at line 2152 of file DefaultICGenerator.cc.
References MathTools::bitLength().
Referenced by addICToNetlist(), writeInterconnectionNetwork(), and writeOutputSocketComponentDeclaration().
|
staticprivate |
Returns the generic name for width of the given port.
port | The port number. |
Definition at line 2378 of file DefaultICGenerator.cc.
References Conversion::toString().
Referenced by generateOutputSocket(), writeInterconnectionNetwork(), and writeOutputSocketComponentDeclaration().
|
private |
Declares the socket entities used in the IC.
stream | The stream to write. |
Definition at line 1443 of file DefaultICGenerator.cc.
References generatedInputSockets_, generatedOutputSockets_, indentation(), inputMuxEntityName(), outputSocketEntityName(), ProGe::VHDL, writeInputSocketComponentDeclaration(), and writeOutputSocketComponentDeclaration().
Referenced by writeInterconnectionNetwork().
|
private |
Generates the given input socket to the given stream.
segmentConns | The number of segment connections. |
stream | The stream. |
Definition at line 493 of file DefaultICGenerator.cc.
References assert, busControlWidth(), generateInputSocketRuleForBus(), indentation(), INPUT_SOCKET_DATA_PORT, inputMuxEntityName(), inputSocketBusPort(), language_, SOCKET_BUS_CONTROL_PORT, Conversion::toBinary(), ProGe::Verilog, ProGe::VHDL, and writeInputSocketComponentDeclaration().
Referenced by generateSocket().
|
private |
Generates rule in VHDL for an input socket for the given bus number.
bus | The bus. |
ind | Indentation level. |
stream | The stream to write. |
Definition at line 621 of file DefaultICGenerator.cc.
References busWidthGeneric(), indentation(), INPUT_SOCKET_DATA_PORT, INPUT_SOCKET_DATAW_GENERIC, inputSocketBusPort(), language_, and ProGe::VHDL.
Referenced by generateInputMux().
void DefaultICGenerator::generateInterconnectionNetwork | ( | const std::string & | dstDirectory | ) |
Generates the interconnection network to the given destination directory.
dstDirectory | The destination directory. |
IOException | If an IO error occurs. |
Definition at line 283 of file DefaultICGenerator.cc.
References __func__, FileSystem::createFile(), FileSystem::DIRECTORY_SEPARATOR, generateSocketsAndMuxes(), language_, ProGe::Verilog, and writeInterconnectionNetwork().
|
private |
Generates the output socket to the given stream.
socket | The socket. |
stream | The stream. |
Definition at line 652 of file DefaultICGenerator.cc.
References assert, busWidthGeneric(), dataWidthGeneric(), indentation(), language_, outputSocketBusPort(), outputSocketDataPort(), outputSocketEntityName(), SOCKET_BUS_CONTROL_PORT, SOCKET_DATA_CONTROL_PORT, ProGe::Verilog, ProGe::VHDL, and writeOutputSocketComponentDeclaration().
Referenced by generateSocket().
|
private |
Generates the given socket to a VHDL file in the given directory.
direction | Direction of the socket. |
portConns | The number of port connections. |
segmentConns | The number of segment connections. |
dstDirectory | The destination directory. |
IOException | If the file cannot be created. |
Definition at line 453 of file DefaultICGenerator.cc.
References __func__, assert, FileSystem::createFile(), FileSystem::DIRECTORY_SEPARATOR, generateInputMux(), generateOutputSocket(), language_, socketFileName(), and ProGe::VHDL.
Referenced by generateSocketsAndMuxes().
|
private |
Generates sockets needed in the machine to the given directory.
dstDirectory | The destination directory. |
IOException | If an IO error occurs. |
Definition at line 388 of file DefaultICGenerator.cc.
References TTAMachine::Machine::busNavigator(), TTAMachine::Machine::Navigator< ComponentType >::count(), TTAMachine::Socket::direction(), generatedInputSockets_, generatedOutputSockets_, generateSocket(), TTAMachine::Bus::immediateWidth(), TTAMachine::Machine::Navigator< ComponentType >::item(), machine_, TTAMachine::Socket::OUTPUT, TTAMachine::Socket::portCount(), TTAMachine::Socket::segmentCount(), socketIsGenerated(), and TTAMachine::Machine::socketNavigator().
Referenced by generateInterconnectionNetwork().
|
virtual |
Definition at line 2060 of file DefaultICGenerator.cc.
References busConnections.
|
staticprivate |
Generates an indentation of the given level.
level | The level. |
Definition at line 2513 of file DefaultICGenerator.cc.
Referenced by createSignalsForIC(), declareSocketEntities(), generateInputMux(), generateInputSocketRuleForBus(), generateOutputSocket(), writeBusDumpCode(), writeBustraceExportCode(), writeInputSocketComponentDeclaration(), writeInterconnectionNetwork(), and writeOutputSocketComponentDeclaration().
|
private |
Returns the entity name of the input socket which has the given number of connections.
conns | The number of connections. |
Definition at line 2483 of file DefaultICGenerator.cc.
References entityNameStr_, and Conversion::toString().
Referenced by declareSocketEntities(), generateInputMux(), and socketEntityName().
|
staticprivate |
Returns the name of the data bus port in input socket.
bus | The bus number. |
Definition at line 2269 of file DefaultICGenerator.cc.
References Conversion::toString().
Referenced by generateInputMux(), generateInputSocketRuleForBus(), writeInputSocketComponentDeclaration(), and writeInterconnectionNetwork().
|
virtual |
Returns the control value that selects the given segment if the given input socket is connected to several segments.
socket | The socket. |
segment | The segment. |
NotAvailable | If the socket does not need control or if it is not connected to the given segment. |
Implements CentralizedControlICGenerator.
Definition at line 2042 of file DefaultICGenerator.cc.
References __func__, busControlWidth(), TTAMachine::Socket::direction(), TTAMachine::Socket::segment(), and TTAMachine::Socket::segmentCount().
|
staticprivate |
Returns the name of the data port of the given input socket in the interconnection network.
socket | The socket. |
Definition at line 2190 of file DefaultICGenerator.cc.
Referenced by addICToNetlist(), and writeInterconnectionNetwork().
|
staticprivate |
Calculates the width of the data port of the given input socket.
socket | The socket. |
Definition at line 2070 of file DefaultICGenerator.cc.
References assert, TTAMachine::Socket::direction(), TTAMachine::Socket::port(), TTAMachine::Socket::portCount(), and TTAMachine::Port::width().
Referenced by addICToNetlist(), and writeInterconnectionNetwork().
|
staticprivate |
Returns a set of all the input sockets that are connected to the given bus.
bus | The bus. |
Definition at line 1932 of file DefaultICGenerator.cc.
References TTAMachine::Segment::connection(), TTAMachine::Segment::connectionCount(), TTAMachine::Socket::direction(), TTAMachine::Bus::segment(), and TTAMachine::Bus::segmentCount().
Referenced by isBusConnected().
|
staticprivate |
Checks if given bus is connected to at least one socket.
bus | The bus. |
Definition at line 1913 of file DefaultICGenerator.cc.
References TTAMachine::Segment::connectionCount(), inputSockets(), TTAMachine::Bus::segment(), and TTAMachine::Bus::segmentCount().
Referenced by createSignalsForIC().
bool DefaultICGenerator::isBustraceEnabled | ( | ) |
|
private |
Tests if the given port belongs to GCU
port | The port to be tested |
Definition at line 432 of file DefaultICGenerator.cc.
References TTAMachine::Machine::controlUnit(), machine_, TTAMachine::FunctionUnit::port(), and TTAMachine::Unit::portCount().
Referenced by addICToNetlist(), and writeInterconnectionNetwork().
|
staticprivate |
Returns the maximum width of the data ports of the given output socket.
socket | The socket. |
Definition at line 2106 of file DefaultICGenerator.cc.
References assert, TTAMachine::Socket::direction(), TTAMachine::Socket::port(), TTAMachine::Socket::portCount(), and TTAMachine::Port::width().
Referenced by createSignalsForIC(), and writeInterconnectionNetwork().
|
staticprivate |
Returns the name of the data bus port in output socket.
bus | The bus number. |
Definition at line 2281 of file DefaultICGenerator.cc.
References Conversion::toString().
Referenced by generateOutputSocket(), writeInterconnectionNetwork(), and writeOutputSocketComponentDeclaration().
|
virtual |
Returns the pin of the socket control port that control the given segment connection.
socket | The socket. |
segment | The segment. |
NotAvailable | If the socket is not output socket or if it is not connected to the given segment. |
Implements CentralizedControlICGenerator.
Definition at line 364 of file DefaultICGenerator.cc.
References __func__, TTAMachine::Socket::direction(), TTAMachine::Socket::segment(), and TTAMachine::Socket::segmentCount().
|
virtual |
Returns the control value that selects the given port if the socket is connected to several ports.
socket | The socket. |
port | The port. |
NotAvailable | If the given socket does not need data control or if the given port is not attached to the socket. |
Implements CentralizedControlICGenerator.
Definition at line 2016 of file DefaultICGenerator.cc.
References __func__, TTAMachine::Socket::direction(), TTAMachine::Socket::port(), and TTAMachine::Socket::portCount().
|
staticprivate |
Returns the name of the data port of the given output socket in the interconnection network.
socket | The socket name. |
port | The data port number. |
Definition at line 2204 of file DefaultICGenerator.cc.
References Conversion::toString().
Referenced by addICToNetlist(), generateOutputSocket(), writeInterconnectionNetwork(), and writeOutputSocketComponentDeclaration().
|
staticprivate |
Returns the name of the data port in output socket.
port | The port number. |
Definition at line 2293 of file DefaultICGenerator.cc.
References Conversion::toString().
|
staticprivate |
Returns the width of the data port of the given output socket.
socket | The socket. |
port | The port. |
Definition at line 2090 of file DefaultICGenerator.cc.
References assert, TTAMachine::Socket::direction(), TTAMachine::Socket::port(), TTAMachine::Socket::portCount(), and TTAMachine::Port::width().
Referenced by addICToNetlist().
|
private |
Returns the entity name of the output socket which has the given number of connections.
busConns | The number of bus connections. |
portConns | The number of port connections. |
Definition at line 2496 of file DefaultICGenerator.cc.
References entityNameStr_, and Conversion::toString().
Referenced by declareSocketEntities(), generateOutputSocket(), socketEntityName(), and writeInterconnectionNetwork().
|
staticprivate |
Returns a set of all the output sockets that are connected to the given bus.
bus | The bus. |
Definition at line 1954 of file DefaultICGenerator.cc.
References TTAMachine::Segment::connection(), TTAMachine::Segment::connectionCount(), TTAMachine::Socket::direction(), TTAMachine::Bus::segment(), and TTAMachine::Bus::segmentCount().
Referenced by createSignalsForIC(), and writeInterconnectionNetwork().
void DefaultICGenerator::setBusTraceStartingCycle | ( | unsigned int | cycle | ) |
Sets the starting cycle to be generated to the bus trace.
cycle | The cycle. |
Definition at line 348 of file DefaultICGenerator.cc.
References busTraceStartingCycle_.
void DefaultICGenerator::setExportBustrace | ( | bool | export_bt | ) |
Definition at line 327 of file DefaultICGenerator.cc.
References exportBustrace_.
void DefaultICGenerator::setFPGAOptimization | ( | bool | optimized | ) |
void DefaultICGenerator::setGenerateBusTrace | ( | bool | generate | ) |
Enables or disables generating bus trace code.
generate | Tells whether to generate the bus tracing code. |
Definition at line 337 of file DefaultICGenerator.cc.
References generateBusTrace_.
void DefaultICGenerator::SetHDL | ( | ProGe::HDL | language | ) |
Set HDL
language |
Definition at line 103 of file DefaultICGenerator.cc.
References language_.
|
staticprivate |
Returns the name of the control port for short immediate of the given bus.
busName | Name of the bus. |
Definition at line 2257 of file DefaultICGenerator.cc.
Referenced by addICToNetlist(), and writeInterconnectionNetwork().
|
staticprivate |
Returns the name of the data port for short immediate of the given bus.
busName | Name of the bus. |
Definition at line 2244 of file DefaultICGenerator.cc.
Referenced by addICToNetlist(), and writeInterconnectionNetwork().
|
staticprivate |
Returns the required width of the short immediate port of the given bus.
bus | The bus. |
Definition at line 2170 of file DefaultICGenerator.cc.
References assert, TTAMachine::Bus::immediateWidth(), TTAMachine::Bus::signExtends(), TTAMachine::Bus::width(), and TTAMachine::Bus::zeroExtends().
Referenced by addICToNetlist(), createSignalsForIC(), and writeInterconnectionNetwork().
|
staticprivate |
Returns the name of the signal of short immediate of the given bus.
bus | The bus. |
Definition at line 2402 of file DefaultICGenerator.cc.
References TTAMachine::Component::name().
Referenced by createSignalsForIC(), and writeInterconnectionNetwork().
|
staticprivate |
Returns the name of the socket for short immediate of the given bus.
bus | The bus. |
Definition at line 2390 of file DefaultICGenerator.cc.
References TTAMachine::Component::name().
Referenced by writeInterconnectionNetwork().
|
staticprivate |
Returns the name of the bus connection control port of the given socket.
name | Name of the socket. |
Definition at line 2220 of file DefaultICGenerator.cc.
Referenced by addICToNetlist(), and writeInterconnectionNetwork().
|
staticprivate |
Returns the name of the data control port of the given socket.
name | Name of the socket. |
Definition at line 2232 of file DefaultICGenerator.cc.
Referenced by addICToNetlist(), and writeInterconnectionNetwork().
|
private |
Generates VHDL entity name for the given socket.
direction | Direction of the socket. |
Definition at line 2464 of file DefaultICGenerator.cc.
References assert, TTAMachine::Socket::direction(), inputMuxEntityName(), outputSocketEntityName(), TTAMachine::Socket::portCount(), and TTAMachine::Socket::segmentCount().
Referenced by writeInterconnectionNetwork().
|
staticprivate |
Generates file where to write VHDL definition of the given socket.
direction | Direction of the socket. |
portConns | Number of port connections. |
segmentConns | Number of segment connections. |
Definition at line 2439 of file DefaultICGenerator.cc.
References assert, Conversion::toString(), and ProGe::VHDL.
Referenced by generateSocket().
|
private |
Tells whether the given socket set contains similar socket to the given one.
set | The socket set. |
socket | The socket. |
Definition at line 1978 of file DefaultICGenerator.cc.
References TTAMachine::Socket::direction(), TTAMachine::Socket::portCount(), and TTAMachine::Socket::segmentCount().
Referenced by generateSocketsAndMuxes().
|
private |
Tells whether the given socket set contains similar socket to the given one.
set | The socket set. |
socket | The socket. |
Definition at line 1992 of file DefaultICGenerator.cc.
References assert, generatedInputSockets_, and generatedOutputSockets_.
void DefaultICGenerator::verifyCompatibility | ( | ) | const |
Verifies that the IC generator is compatible with the machine.
InvalidData | If the generator is incompatible. |
Definition at line 306 of file DefaultICGenerator.cc.
References __func__, TTAMachine::Machine::bridgeNavigator(), TTAMachine::Machine::busNavigator(), TTAMachine::Machine::Navigator< ComponentType >::count(), TTAMachine::Machine::Navigator< ComponentType >::item(), machine_, and TTAMachine::Bus::segmentCount().
|
private |
Writes the code that dumps the bus contents to an output file.
stream | The stream to write. |
Definition at line 1671 of file DefaultICGenerator.cc.
References TTAMachine::Machine::busNavigator(), busSignal(), busTraceStartingCycle_, TTAMachine::Machine::Navigator< ComponentType >::count(), indentation(), TTAMachine::Machine::Navigator< ComponentType >::item(), language_, machine_, Conversion::toString(), ProGe::VHDL, and TTAMachine::Bus::width().
Referenced by writeInterconnectionNetwork().
|
private |
Writes the bus dump lines required by the HW debugger.
stream | The stream. |
Definition at line 906 of file DefaultICGenerator.cc.
References TTAMachine::Machine::busNavigator(), busSignal(), TTAMachine::Machine::Navigator< ComponentType >::count(), indentation(), TTAMachine::Machine::Navigator< ComponentType >::item(), and machine_.
Referenced by writeInterconnectionNetwork().
|
staticprivate |
Writes the component interface declaration of the given input socket to the given stream.
segmentConns | The number of segment connections. |
ind | The indentation level. |
stream | The stream to write. |
Definition at line 1593 of file DefaultICGenerator.cc.
References MathTools::bitLength(), busWidthGeneric(), indentation(), INPUT_SOCKET_DATA_PORT, INPUT_SOCKET_DATAW_GENERIC, inputSocketBusPort(), SOCKET_BUS_CONTROL_PORT, and ProGe::VHDL.
Referenced by declareSocketEntities(), and generateInputMux().
|
private |
Writes the interconnection network to the given stream.
stream | The stream. |
Definition at line 947 of file DefaultICGenerator.cc.
References assert, ProGe::BIT_VECTOR, busAltSignal(), busControlWidth(), TTAMachine::Machine::busNavigator(), busSignal(), busWidthGeneric(), TTAMachine::Machine::controlUnit(), TTAMachine::Machine::Navigator< ComponentType >::count(), createSignalsForIC(), dataControlWidth(), TTAMachine::Socket::dataPortWidth(), dataWidthGeneric(), declareSocketEntities(), TTAMachine::Socket::direction(), FileSystem::DIRECTORY_SEPARATOR, DS, entityNameStr_, exportBustrace_, generateBusTrace_, TTAMachine::Socket::hasDataPortWidth(), icBlock_, TTAMachine::Bus::immediateWidth(), indentation(), INPUT_SOCKET_DATA_PORT, INPUT_SOCKET_DATAW_GENERIC, inputSocketBusPort(), inputSocketDataPort(), inputSocketDataPortWidth(), isGcuPort(), TTAMachine::Machine::isRISCVMachine(), TTAMachine::Machine::Navigator< ComponentType >::item(), language_, machine_, maxOutputSocketDataPortWidth(), TTAMachine::Component::name(), ProGe::OUT, outputSocketBusPort(), outputSocketDataPort(), outputSocketEntityName(), outputSockets(), TTAMachine::Segment::parentBus(), TTAMachine::Socket::port(), ProGe::NetlistBlock::port(), TTAMachine::Socket::portCount(), TTAMachine::Socket::segment(), TTAMachine::Socket::segmentCount(), TTAMachine::Bus::signExtends(), simmControlPort(), simmDataPort(), simmPortWidth(), simmSignal(), simmSocket(), SOCKET_BUS_CONTROL_PORT, SOCKET_DATA_CONTROL_PORT, socketBusControlPort(), socketDataControlPort(), socketEntityName(), TTAMachine::Machine::socketNavigator(), Conversion::toString(), TTAMachine::FunctionUnit::triggerPort(), ProGe::VHDL, TTAMachine::Port::width(), TTAMachine::Bus::width(), writeBusDumpCode(), writeBustraceExportCode(), and TTAMachine::Bus::zeroExtends().
Referenced by generateInterconnectionNetwork().
|
staticprivate |
Writes the component interface declaration of the given output socket to the given stream.
portConns | The number of port connections. |
segmentConns | The number of segment connections. |
ind | The indentation level. |
stream | The stream to write. |
Definition at line 1478 of file DefaultICGenerator.cc.
References busControlWidth(), busWidthGeneric(), dataControlWidth(), dataWidthGeneric(), indentation(), outputSocketBusPort(), outputSocketDataPort(), SOCKET_BUS_CONTROL_PORT, SOCKET_DATA_CONTROL_PORT, and ProGe::VHDL.
Referenced by declareSocketEntities(), and generateOutputSocket().
|
private |
Signal numbers for controlling sockets.
Definition at line 208 of file DefaultICGenerator.hh.
Referenced by busAltSignal(), and ~DefaultICGenerator().
|
private |
Definition at line 217 of file DefaultICGenerator.hh.
Referenced by getBusConnections().
|
private |
The starting cycle for bus tracing.
Definition at line 214 of file DefaultICGenerator.hh.
Referenced by setBusTraceStartingCycle(), and writeBusDumpCode().
|
private |
Definition at line 215 of file DefaultICGenerator.hh.
Referenced by addICToNetlist(), inputMuxEntityName(), outputSocketEntityName(), and writeInterconnectionNetwork().
|
private |
Tells whether to export bustraces to debugger.
Definition at line 212 of file DefaultICGenerator.hh.
Referenced by setExportBustrace(), and writeInterconnectionNetwork().
|
private |
Tells whether to generate bus tracing code.
Definition at line 210 of file DefaultICGenerator.hh.
Referenced by setGenerateBusTrace(), and writeInterconnectionNetwork().
|
private |
Definition at line 221 of file DefaultICGenerator.hh.
Referenced by declareSocketEntities(), generateSocketsAndMuxes(), and socketIsGenerated().
|
private |
Definition at line 220 of file DefaultICGenerator.hh.
Referenced by declareSocketEntities(), generateSocketsAndMuxes(), and socketIsGenerated().
|
private |
The netlist block of IC.
Definition at line 206 of file DefaultICGenerator.hh.
Referenced by addICToNetlist(), and writeInterconnectionNetwork().
|
private |
Definition at line 216 of file DefaultICGenerator.hh.
Referenced by createSignalsForIC(), generateInputMux(), generateInputSocketRuleForBus(), generateInterconnectionNetwork(), generateOutputSocket(), generateSocket(), SetHDL(), writeBusDumpCode(), and writeInterconnectionNetwork().
|
private |
The machine.
Definition at line 204 of file DefaultICGenerator.hh.
Referenced by addICToNetlist(), createSignalsForIC(), generateSocketsAndMuxes(), isGcuPort(), verifyCompatibility(), writeBusDumpCode(), writeBustraceExportCode(), and writeInterconnectionNetwork().