OpenASIP 2.2
Loading...
Searching...
No Matches
AlmaIFIntegrator.hh
Go to the documentation of this file.
1/*
2 Copyright (c) 2002-2016 Tampere University.
3
4 This file is part of TTA-Based Codesign Environment (TCE).
5
6 Permission is hereby granted, free of charge, to any person obtaining a
7 copy of this software and associated documentation files (the "Software"),
8 to deal in the Software without restriction, including without limitation
9 the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 and/or sell copies of the Software, and to permit persons to whom the
11 Software is furnished to do so, subject to the following conditions:
12
13 The above copyright notice and this permission notice shall be included in
14 all copies or substantial portions of the Software.
15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 DEALINGS IN THE SOFTWARE.
23 */
24/**
25 * @file AlmaIFIntegrator.hh
26 *
27 * Declaration of AlmaIFIntegrator class.
28 */
29
30#ifndef TTA_ALMAIF_INTEGRATOR_HH
31#define TTA_ALMAIF_INTEGRATOR_HH
32
33#include "PlatformIntegrator.hh"
34#include "TCEString.hh"
35#include "ProGeTypes.hh"
38
39
41public:
42
44
48 TCEString progeOutputDir, TCEString entityName, TCEString outputDir,
49 TCEString programName, int targetClockFreq,
50 std::ostream& warningStream, std::ostream& errorStream,
51 const MemInfo& imem, MemType dmemType, bool syncReset,
53
54 virtual ~AlmaIFIntegrator();
55
57 virtual bool integrateCore(const ProGe::NetlistBlock& cores, int coreId);
58 virtual void printInfo(std::ostream& stream) const;
59 virtual TCEString deviceFamily() const;
60 virtual void setDeviceFamily(TCEString devFamily);
61 virtual TCEString devicePackage() const;
62 virtual TCEString deviceSpeedClass() const;
63 virtual int targetClockFrequency() const;
64 virtual TCEString pinTag() const;
65 virtual bool chopTaggedSignals() const;
66
68
69
70
71
72protected:
73
74 virtual MemoryGenerator& imemInstance(MemInfo imem, int coreId);
75
77 MemInfo dmem,
79 std::vector<std::string> lsuPorts);
80
81
82
83private:
84 void addMemoryPorts(
85 const TCEString as_name, int data_width, int addr_width,
86 const bool isShared, const bool overrideAsWidth);
87 void addMemoryPorts(
88 const TCEString as_name, int mem_count, int data_width,
89 int addr_width, int strb_width, const bool overrideAsWidth);
90
91 void initAlmaifBlock();
92 void addAlmaifFiles();
93 void copyPlatformFile(const TCEString inputPath,
94 std::vector<TCEString>& fileList, bool isScript = false) const;
96 void findMemories();
97 void exportUnconnectedPorts(int coreId);
98 void connectCoreMemories(MemInfo mem, TCEString mem_name,
99 TCEString mem_block_name, bool seconds);
101 const ProGe::Direction dir, const TCEString name,
102 const TCEString width);
103 void addPortToAlmaIFBlock(const TCEString name,
104 const TCEString width,
105 const ProGe::Direction dir,
106 const TCEString core_name = "");
107 void addPortToAlmaIFBlock(const TCEString name,
108 const int width,
109 const ProGe::Direction dir,
110 const TCEString core_name = "");
112
115
116 static const TCEString DMEM_NAME;
117 static const TCEString PMEM_NAME;
118 static const TCEString AXI_AS_NAME;
121
124
126 std::map<TCEString, MemoryGenerator*> dmemGen_;
127 std::map<TCEString, ProGe::NetlistPort*> almaif_ttacore_ports;
128
130
133
135
137
140 std::string secondDmemName_;
143 std::string secondPmemName_;
147
152 bool dmem_dram_ = false;
153 bool imem_dp_ = false;
154
156};
157
158#endif
virtual bool chopTaggedSignals() const
virtual MemoryGenerator & dmemInstance(MemInfo dmem, TTAMachine::FunctionUnit &lsuArch, std::vector< std::string > lsuPorts)
void exportUnconnectedPorts(int coreId)
virtual int targetClockFrequency() const
std::string secondPmemName_
ProGe::NetlistPortGroup * axiMasterPortGroup()
std::map< TCEString, MemoryGenerator * > dmemGen_
virtual ProjectFileGenerator * projectFileGenerator() const
static const int DEFAULT_LOCAL_MEMORY_WIDTH
virtual void printInfo(std::ostream &stream) const
virtual void setDeviceFamily(TCEString devFamily)
ProGe::NetlistBlock * almaifBlock_
ProGe::NetlistPortGroup * axiSlavePortGroup()
static const TCEString AXI_AS_NAME
virtual void integrateProcessor(const ProGe::NetlistBlock *progeBlock)
static const int DEFAULT_RESERVED_PRIVATE_MEM_SIZE
TCEString axiAddressWidth() const
static const TCEString ALMAIF_MODULE
HDLTemplateInstantiator accelInstantiator_
virtual TCEString devicePackage() const
virtual TCEString deviceFamily() const
MemoryGenerator * imemGen_
std::map< TCEString, ProGe::NetlistPort * > almaif_ttacore_ports
virtual ~AlmaIFIntegrator()
virtual TCEString deviceSpeedClass() const
static const TCEString DMEM_NAME
void addMemoryPorts(const TCEString as_name, int data_width, int addr_width, const bool isShared, const bool overrideAsWidth)
static const TCEString PMEM_NAME
std::string secondDmemName_
virtual bool integrateCore(const ProGe::NetlistBlock &cores, int coreId)
virtual MemoryGenerator & imemInstance(MemInfo imem, int coreId)
void connectCoreMemories(MemInfo mem, TCEString mem_name, TCEString mem_block_name, bool seconds)
virtual TCEString pinTag() const
static const TCEString DEFAULT_DEVICE
void addPortToGroup(ProGe::NetlistPortGroup *port_group, const ProGe::Direction dir, const TCEString name, const TCEString width)
void copyPlatformFile(const TCEString inputPath, std::vector< TCEString > &fileList, bool isScript=false) const
DefaultProjectFileGenerator * fileGen_
void addPortToAlmaIFBlock(const TCEString name, const TCEString width, const ProGe::Direction dir, const TCEString core_name="")
const TTAMachine::Machine * machine() const
std::ostream & warningStream() const
const IDF::MachineImplementation * idf() const
TCEString programName() const
std::ostream & errorStream() const
const ProGe::NetlistBlock & progeBlock() const
Direction
Direction of the port.
Definition ProGeTypes.hh:52
HDL
HDLs supported by ProGe.
Definition ProGeTypes.hh:40