Go to the documentation of this file.
57 coreBlock_(processorBlock.shallowCopy()) {
95 for (
size_t i = 0; i < processorBlock.
packageCount(); i++) {
96 procPackages.insert(processorBlock.
package(i));
99 for (
auto packageStr : procPackages) {
113 const Path& targetBaseDir,
HDL targetLang)
const {
125 const int unusedBits = std::ceil(std::log2(imemWidthInMaus));
129 const int unusedBits = std::ceil(std::log2(imemWidthInMaus));
131 std::to_string(unusedBits);
136 "tb/imem_init.img",
true);
139 std::string accessTrace = std::string(
"core") +
141 "_imem_access_trace.dump";
150 {{SigT::READ_DATA, SigT::FETCHBLOCK},
151 {SigT::READ_WRITE_REQUEST, SigT::READ_REQUEST}});
154 coreImemPort.
portBySignal(SigT::ADDRESS), 0, unusedBits,
155 realAddrWidth - unusedBits);
158 imemBlock->memoryPort(), coreImemPort,
159 {{SigT::ADDRESS, SigT::ADDRESS},
160 {SigT::READ_DATA, SigT::FETCHBLOCK},
161 {SigT::READ_WRITE_REQUEST, SigT::READ_REQUEST}});
164 imemBlock->memoryPort()
165 .portBySignal(SigT::WRITE_BITMASK)
166 .setToStatic(StaticSignal::VCC);
167 imemBlock->memoryPort()
168 .portBySignal(SigT::WRITEMODE)
169 .setToStatic(StaticSignal::VCC);
170 imemBlock->memoryPort()
171 .portBySignal(SigT::WRITE_DATA)
172 .setToStatic(StaticSignal::GND);
173 coreImemPort.portBySignal(SigT::READ_REQUEST_READY)
174 .setToStatic(StaticSignal::GND);
190 if (!netlist().connect(dmemBlock->
memoryPort(), coreDmemPort)) {
193 "Could not connect two port groups together.");
198 ProcessorWrapperBlock::addDataMemory2(
212 if (!netlist().connect(dmemBlock->
memoryPort(), coreDmemPort)) {
215 "Could not connect two port groups together.");
220 ProcessorWrapperBlock::connectLockStatus(
223 coreBlock_->port(
"locked") !=
nullptr &&
224 "Could not found lock status port.");
225 if (!netlist().connect(*coreBlock_->port(
"locked"), topLockStatusPort)) {
228 "Could not connect \"locked\" signal to the toplevel");
237 ProcessorWrapperBlock::handleUnconnectedPorts() {
238 for (
size_t i = 0; i < coreBlock_->portCount(); i++) {
244 netlist().connect(*topPort, port);
NetlistPort * addPort(NetlistPort *port)
void addSubBlock(BaseNetlistBlock *subBlock, const std::string &instanceName="")
const std::string fetchBlockDataWidth() const
const ProGeContext & context_
@ BYTEMASKED_SRAM_PORT
Signal group type for one port SRAM having read and write capability and bitmask for writing with sep...
void connectLockStatus(const NetlistPort &topPCInitPort)
virtual void writeSelf(const Path &targetBaseDir, HDL targetLang=VHDL) const
bool isRISCVMachine() const
const TTAMachine::Machine & adf() const
static NetlistPort * resetPort(Direction direction=IN)
void addInstructionMemory(const NetlistPortGroup &)
std::string widthFormula() const
virtual const std::string & package(size_t idx) const
virtual AddressSpace * addressSpace() const
BaseNetlistBlock * coreBlock_
The target TTA processor.
virtual const Netlist & netlist() const
void addDataMemory2(const MemoryBusInterface &)
static std::string toString(const T &source)
virtual ~ProcessorWrapperBlock()
bool connect(const NetlistPort &port1, const NetlistPort &port2, int port1FirstBit, int port2FirstBit, int width=1)
@ INSTRUCTION_LINE
Signal group type for serial TTA instruction bus.
virtual size_t portGroupCount() const
#define assert(condition)
const NetlistPortGroup & memoryPort() const
virtual ControlUnit * controlUnit() const
#define THROW_EXCEPTION(exceptionType, message)
Exception wrapper macro that automatically includes file name, line number and function name where th...
virtual size_t portCount() const
virtual size_t packageCount() const
void addPackage(const std::string &packageName)
const NetlistPortGroup & memoryPort() const
const GlobalPackage & globalPackage() const
ProcessorWrapperBlock()=delete
void addDataMemory(const MemoryBusInterface &)
virtual const NetlistPortGroup & portGroup(size_t index) const
@ BITMASKED_SRAM_PORT
Signal group type for one port SRAM having read and write capability and bitmask for writing.
const std::string & coreEntityName() const
virtual NetlistPort * clone(bool asMirrored=false) const
SignalGroup assignedSignalGroup() const
static NetlistPort * clockPort(Direction direction=IN)
const std::string fetchBlockAddressWidth() const
TCEString addressSpace() const
virtual void write(const Path &targetBaseDir, HDL targetLang=VHDL) const override
void handleUnconnectedPorts()
bool hasStaticValue() const
const NetlistPort & portBySignal(SignalType type) const
HDL
HDLs supported by ProGe.
const std::string name() const
SignalGroupType type() const
virtual ULongWord end() const
Convenience class for output ports.
virtual void write(const Path &targetBaseDir, HDL targetLang=VHDL) const override
void setAccessTraceFile(const std::string filename)