00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef _COMPILE_VEC_
00025 #define _COMPILE_VEC_
00026
00027 #include "compile_scal.hh"
00028 #include "loop.hh"
00029
00030 extern int gMaxCopyDelay;
00031
00032
00034
00037
00038
00039 class VectorCompiler : public ScalarCompiler
00040 {
00041
00042 public:
00043
00044 VectorCompiler (const string& name, const string& super, int numInputs, int numOutputs)
00045 : ScalarCompiler(name,super,numInputs,numOutputs)
00046 {}
00047
00048 VectorCompiler (Klass* k) : ScalarCompiler(k)
00049 {}
00050 virtual void compileMultiSignal (Tree L);
00051
00052 protected:
00053
00054 virtual string CS (Tree sig);
00055 virtual string generateCode (Tree sig);
00056 virtual string generateCacheCode(Tree sig, const string& exp);
00057 virtual void generateDelayLine(const string& ctype, const string& vname, int mxd, const string& exp);
00058 virtual string generateVariableStore(Tree sig, const string& exp);
00059 virtual string generateFixDelay (Tree sig, Tree exp, Tree delay);
00060 virtual string generateDelayVec(Tree sig, const string& exp, const string& ctype, const string& vname, int mxd);
00061 virtual void vectorLoop (const string& tname, const string& dlname, const string& cexp);
00062 virtual void dlineLoop ( const string& tname, const string& dlname, int delay, const string& cexp);
00063
00064 bool needSeparateLoop(Tree sig);
00065
00066 };
00067
00068
00069 #endif