Bitstream Interpretation Library (BIL)  0.1
Correlator.hpp
Go to the documentation of this file.
1 
6 #pragma once
7 #ifndef BIL_CORRELATOR_HPP
8 #define BIL_CORRELATOR_HPP
9 
10 #include <map>
15 #include <xdl/model/Design.hpp>
16 #include <xdlrc/model/Device.hpp>
17 
18 
19 namespace bil {
20 
28  class Correlator {
29  public:
30 
39  void run(DeviceCfgDb& db, const Design& design, const Device& device, CfgExtractor& cfgExtractor);
40 
41 
42  private:
43 
44  void gatherCorrelationUnits(size_t tileTypeIndex, const Design& design, const Device& device, CfgExtractor& cfgExtractor);
45  void buildPIPControlSetMap(const PIPControlSets& pipControlSets);
46  void initPIPStates(size_t pipCount, size_t cfgBitCount);
47  void isolatePIPs(CorrelationUnits& correlationUnits);
48  void writePIPsToDb(TileTypeCfgDb& tileTypeDb);
49  void getCfgBitPositions(BitPositions &bitPositions, const PIPBitValues& pipBitValues) const;
50  void getCfgBitValues(PIPBitValues& pipBitValues, const BitPositions &bitPositions) const;
51 
52  CorrelationUnits m_tileUnits;
53  CorrelationUnits m_pipStates;
54  typedef std::map<size_t, const PIPControlSet*> pipControlSetMap_t;
55  pipControlSetMap_t m_pipControlSetMap;
56 
57  TileIndices m_tileIndices;
58  std::vector<boost::uint32_t> m_buffer;
59 
60  };
61 
62 }
63 
64 #endif