Skip to content

Commit

Permalink
Fixed code to write firmware design and inverse tables for the TC. (c…
Browse files Browse the repository at this point in the history
  • Loading branch information
aehart authored and skinnari committed Sep 23, 2020
1 parent 4c616ef commit ab3d8e2
Show file tree
Hide file tree
Showing 9 changed files with 455 additions and 749 deletions.
2 changes: 1 addition & 1 deletion L1Trigger/TrackFindingTracklet/interface/ProcessBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace trklet {
//This function processes the name of a TE module to determine the layerdisks and iseed
void initLayerDisksandISeed(unsigned int& layerdisk1, unsigned int& layerdisk2, unsigned int& iSeed);

unsigned int getISeed(std::string name);
unsigned int getISeed(const std::string& name);

protected:
std::string name_;
Expand Down
5 changes: 5 additions & 0 deletions L1Trigger/TrackFindingTracklet/interface/TrackletCalculator.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ namespace trklet {
class MemoryBase;
class AllStubsMemory;
class StubPairsMemory;
class VarInv;
class VarBase;

class TrackletCalculator : public TrackletCalculatorBase {
public:
Expand All @@ -33,6 +35,9 @@ namespace trklet {
std::vector<AllStubsMemory*> innerallstubs_;
std::vector<AllStubsMemory*> outerallstubs_;
std::vector<StubPairsMemory*> stubpairs_;

void writeInvTable(void (*writeLUT)(const VarInv&, const std::string&));
void writeFirmwareDesign(void (*writeDesign)(const std::vector<VarBase*>&, const std::string&));
};
}; // namespace trklet
#endif
8 changes: 4 additions & 4 deletions L1Trigger/TrackFindingTracklet/interface/imath.h
Original file line number Diff line number Diff line change
Expand Up @@ -271,10 +271,10 @@ namespace trklet {
void pipe_increment() { pipe_counter_++; }
void add_delay(int i) { pipe_delays_.push_back(i); }
bool has_delay(int i); //returns true if already have this variable delayed.
static void verilog_print(std::vector<VarBase *> v, std::ofstream &fs) { design_print(v, fs, verilog); }
static void hls_print(std::vector<VarBase *> v, std::ofstream &fs) { design_print(v, fs, hls); }
static void design_print(std::vector<VarBase *> v, std::ofstream &fs, Verilog);
static void design_print(std::vector<VarBase *> v, std::ofstream &fs, HLS);
static void verilog_print(const std::vector<VarBase *>& v, std::ofstream &fs) { design_print(v, fs, verilog); }
static void hls_print(const std::vector<VarBase *>& v, std::ofstream &fs) { design_print(v, fs, hls); }
static void design_print(const std::vector<VarBase *>& v, std::ofstream &fs, Verilog);
static void design_print(const std::vector<VarBase *>& v, std::ofstream &fs, HLS);
static std::string pipe_delay(VarBase *v, int nbits, int delay);
std::string pipe_delays(const int step);
static std::string pipe_delay_wire(VarBase *v, std::string name_delayed, int nbits, int delay);
Expand Down
Loading

0 comments on commit ab3d8e2

Please sign in to comment.