Go to the documentation of this file.
64 std::map<std::string, unsigned> ASUserCounts;
65 std::map<std::string, unsigned> lockFUCounts;
68 if (fu->hasAddressSpace()) {
69 lockFUCounts[fu->addressSpace()->name()]++;
74 if (fu->hasAddressSpace()) {
75 ASUserCounts[fu->addressSpace()->name()]++;
79 for (
auto asUserCount : ASUserCounts) {
80 unsigned LSUCount(asUserCount.second);
82 if (lockFUCounts.count(asUserCount.first) > 0) {
83 LSUCount -= lockFUCounts[asUserCount.first];
88 "Can not create test bench for TTA address spaces shared by "
105 if (targetLang !=
VHDL) {
115 "db_pc_start : in std_logic_vector(IMEMADDRWIDTH-1 downto 0);\n"
116 "db_tta_nreset : in std_logic;\n"
117 "db_lockrq : in std_logic;");
120 "db_pc_start => (others => '0'),\n"
121 "db_tta_nreset => '1',\n"
122 "db_lockrq => '0',");
129 progeDataDir/
"tb"/
"testbench.vhdl.tmpl",
130 targetBaseDir/
"tb"/
"testbench.vhdl");
132 progeDataDir/
"tb"/
"clkgen.vhdl",
133 targetBaseDir/
"tb"/
"clkgen.vhdl");
static bool createDirectory(const std::string &path)
const ProGeContext & context_
The ProGe context for additional information.
virtual void write(const Path &targetBaseDir, HDL targetLang=VHDL) const override
const TTAMachine::Machine & adf() const
static std::vector< const TTAMachine::FunctionUnit * > findLockUnits(const TTAMachine::Machine &machine)
std::string icDecoderParameterValue(const std::string &name) const
#define THROW_EXCEPTION(exceptionType, message)
Exception wrapper macro that automatically includes file name, line number and function name where th...
virtual FunctionUnitNavigator functionUnitNavigator() const
const IDF::MachineImplementation & idf() const
const std::string & coreEntityName() const
std::string errorMessage() const
ProcessorWrapperBlock * proc_
The block that wraps the processor and instantiates memories for the GCU and LSUs.
virtual void write(const Path &targetBaseDir, HDL targetLang=VHDL) const override
void replacePlaceholder(const std::string &key, const std::string &replacer, bool append=false)
virtual ~TestBenchBlock()
HDL
HDLs supported by ProGe.
const std::string & moduleName() const
void instantiateTemplateFile(const std::string &templateFile, const std::string &dstFile)
static std::string dataDirPath(const std::string &prog)