Go to the documentation of this file.
53 "set_module_property";
62 "std.standard.all ieee.std_logic_1164.all ieee.std_logic_arith.all "
63 "work.globals.all work.util.all work.imem_mau.all";
106 if (masterInterfaces == 0) {
107 TCEString msg =
"Couldn't find any Avalon MM Master interfaces.";
108 InvalidData exc(__FILE__, __LINE__,
"SOPCBuilderFileGenerator", msg);
120 IOException exc(__FILE__, __LINE__,
"SOPCBuilderFileGenerator", msg);
124 output <<
"# Generated by SOPCBuilderGenerator" << endl << endl;
153 for (
size_t i = 0; i < top.
portCount(); i++) {
155 if (portName.find(addressPortName) != TCEString::npos) {
170 <<
"# Module properties" << endl
172 <<
property <<
" VERSION 1.0" << endl
177 if (
integrator()->toplevelBlock().netlist().parameterCount() > 0) {
180 stream <<
"}" << endl;
185 <<
property <<
" TOP_LEVEL_HDL_FILE " << toplevelFile << endl
186 <<
property <<
" TOP_LEVEL_HDL_MODULE " <<
toplevelEntity() << endl
187 <<
property <<
" INSTANTIATE_IN_SYSTEM_MODULE true" << endl
188 <<
property <<
" EDITABLE false" << endl
189 <<
property <<
" SIMULATION_MODEL_IN_VERILOG false" << endl
190 <<
property <<
" SIMULATION_MODEL_IN_VHDL false" << endl
191 <<
property <<
" SIMULATION_MODEL_HAS_TULIPS false" << endl
192 <<
property <<
" SIMULATION_MODEL_IS_OBFUSCATED false" << endl
204 stream <<
"# toplevel parameters" << endl;
219 stream << line << endl;
222 <<
" DISPLAY_NAME \"Device family (change if necessary)\""
232 stream <<
"# module hdl files" << endl;
233 for (
unsigned int i = 0; i <
hdlFileList().size(); i++) {
235 <<
" {SYNTHESIS SIMULATION}" << endl;
239 <<
" {SYNTHESIS SIMULATION}" << endl;
249 for (
size_t i = 0; i < top.
portCount(); i++) {
252 bool needToExport =
true;
272 if (fuName.empty()) {
273 TCEString msg =
"Failed to extract FU name from: " + port.
name();
274 InvalidData exc(__FILE__, __LINE__,
"SOPCBuilderFileGenerator", msg);
287 bool isAvalonPort =
false;
289 isAvalonPort =
false;
315 std::map<TCEString, AvalonMMMasterInterface*>::const_iterator iter =
336 std::map<TCEString, AvalonMMMasterInterface*>::iterator iter =
const PlatformIntegrator * integrator() const
void setProperty(const TCEString &propertyName, const TCEString &propertyValue)
void writeGenerics(std::ostream &stream)
void addPort(const ProGe::NetlistPort &port)
virtual ~SOPCBuilderFileGenerator()
static const TCEString SOPC_ASSOCIATED_CLOCK
void writeModuleProperties(std::ostream &stream)
static std::string outputFileName(const std::string &adfFile)
bool startsWith(const std::string &str) const
TCEString extractFUName(const TCEString &port, const TCEString &delimiter) const
TCEString toplevelEntity() const
static const TCEString SOPC_SET_MODULE_PROPERTY
static const TCEString SOPC_ADD_FILE
virtual size_t parameterCount() const
const TCEString & type() const
void exportSignal(const ProGe::NetlistPort &port)
Direction direction() const
virtual void writeProjectFiles()
static const TCEString AVALON_MM_ADDRESS
static const TCEString HDB_AVALON_PREFIX
virtual void writeInterface(std::ostream &stream) const
virtual size_t portCount() const
bool handleAvalonSignal(const ProGe::NetlistPort &port)
#define assert(condition)
const std::vector< TCEString > & memInitFileList() const
bool isValidPort(const ProGe::NetlistPort &port) const
static const TCEString SOPC_EXPORT_NAME
bool realWidthAvailable() const
bool endsWith(const std::string &str) const
void setPort(const TCEString &hdlName, const TCEString &interfaceName, ProGe::Direction direction, int width)
static const TCEString SOPC_MASTER_INT_DECLR
const TCEString & name() const
std::map< TCEString, AvalonMMMasterInterface * > masters_
virtual void writeInterface(std::ostream &stream) const
AvalonMMMasterInterface * getMaster(const TCEString &fuName)
const TCEString & value() const
SOPCBuilderFileGenerator(TCEString toplevelEntity, const PlatformIntegrator *integrator)
static const TCEString SOPC_DEFAULT_GROUP
static const TCEString SOPC_MASTER_INT_NAME
void writeFileList(std::ostream &stream)
static const TCEString TTA_RESET_NAME
static const TCEString SOPC_CLOCK_NAME
const std::vector< TCEString > & hdlFileList() const
static const TCEString SOPC_DEFAULT_VHDL_LIBS
int countAvalonMMMasters() const
static const TCEString PI_DEVICE_FAMILY_GENERIC
virtual const Parameter & parameter(const std::string &name) const
virtual NetlistPort * port(const std::string &portName, bool partialMatch=true)
static const TCEString SOPC_RESET_NAME
static const TCEString SOPC_COMPONENT_FILE_TYPE
void writeInterfaces(std::ostream &stream) const
static const TCEString TTA_CLOCK_NAME