OpenASIP 2.2
Loading...
Searching...
No Matches
AutomagicTools.hh
Go to the documentation of this file.
1/*
2 Copyright (c) 2002-2017 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 AutomagicTools.hh
26*
27* Tools for automated TTA generation.
28*
29* @author Lasse Lehtonen 2017 (lasse.lehtonen-no.spam-tut.fi)
30*/
31
32#pragma once
33
34#include <unordered_map>
36#include "FUGenerated.hh"
37#include "FunctionUnit.hh"
38#include "ImmediateUnit.hh"
39#include "ProGeOptions.hh"
40#include "RegisterFile.hh"
41#include "OperationDAG.hh"
42
43namespace Automagic {
44 std::string findHDBPath(std::string name);
45
47 const std::string& option, std::vector<std::string> list,
48 bool enableAll = true);
49
50 std::vector<IDF::FUGenerated::DAGOperation>
51 generateableDAGOperations(const std::vector<IDF::FUGenerated::Info> infos,
52 std::ostream& verbose);
53
54 std::vector<IDF::FUGenerated::Info> createFUGeneratableOperationInfos(
55 const ProGeOptions& options, std::ostream& verbose);
56
59 const std::vector<IDF::FUGenerated::Info>& infos,
60 const std::vector<IDF::FUGenerated::DAGOperation> dagops);
61
64 std::ostream& verbose);
65
68 std::ostream& verbose);
69
72 std::ostream& verbose);
73
74 bool canGenerateFromDAG(const OperationDAG& dag,
75 const std::vector<IDF::FUGenerated::Info> infos,
76 std::vector<IDF::FUGenerated::Info>* subops);
77
78 int dagLatency(const OperationDAG& dag,
79 const std::unordered_map<std::string, int>& maxOpLatency);
81 const OperationDAG& dag, OperationDAGNode& node,
82 const std::unordered_map<std::string, int>& maxOpLatency,
83 bool allowDifference = true);
84
86 const std::unordered_map<std::string, int>& maxOpLatency);
87
89 ProGe::HDL language);
90}
static MachInfoCmdLineOptions options
Definition MachInfo.cc:46
int dagLatency(const OperationDAG &dag, const std::unordered_map< std::string, int > &maxOpLatency)
bool checkForSelectableIU(const ProGeOptions &options, TTAMachine::ImmediateUnit &iu, IDF::IUImplementationLocation &loc, std::ostream &verbose)
std::vector< IDF::FUGenerated::DAGOperation > generateableDAGOperations(const std::vector< IDF::FUGenerated::Info > infos, std::ostream &verbose)
std::string findHDBPath(std::string name)
int maxLatencyToNode(const OperationDAG &dag, OperationDAGNode &node, const std::unordered_map< std::string, int > &maxOpLatency, bool allowDifference=true)
bool findInOptionList(const std::string &option, std::vector< std::string > list, bool enableAll=true)
std::vector< IDF::FUGenerated::Info > createFUGeneratableOperationInfos(const ProGeOptions &options, std::ostream &verbose)
bool languageMatches(HDB::BlockImplementationFile::Format format, ProGe::HDL language)
int nodeLatency(OperationDAGNode &node, const std::unordered_map< std::string, int > &maxOpLatency)
bool checkForSelectableFU(const ProGeOptions &options, TTAMachine::FunctionUnit &fu, IDF::FUImplementationLocation &loc, std::ostream &verbose)
bool canGenerateFromDAG(const OperationDAG &dag, const std::vector< IDF::FUGenerated::Info > infos, std::vector< IDF::FUGenerated::Info > *subops)
bool checkForGeneratableFU(const ProGeOptions &options, TTAMachine::FunctionUnit &fu, IDF::FUGenerated &fug, const std::vector< IDF::FUGenerated::Info > &infos, const std::vector< IDF::FUGenerated::DAGOperation > dagops)
bool checkForSelectableRF(const ProGeOptions &options, TTAMachine::RegisterFile &rf, IDF::RFImplementationLocation &loc, std::ostream &verbose)
HDL
HDLs supported by ProGe.
Definition ProGeTypes.hh:40