ilang  1.1.4
ILAng: A Modeling and Verification Platform for SoCs
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Macros
absmem.h
1 // --- Hongce Zhang
3 
4 #ifndef ILANG_VTARGET_OUT_ABS_MEM_H__
5 #define ILANG_VTARGET_OUT_ABS_MEM_H__
6 
7 #include <map>
8 #include <set>
9 #include <string>
10 #include <tuple>
11 #include <vector>
12 
14 #include <ilang/vtarget-out/absmem.h>
15 
16 namespace ilang {
17 
19 struct VlgAbsMem {
20  // ---------------------- TYPES --------------- //
25 
26  // ---------------------- MEMBERS --------------- //
28  std::map<unsigned, rport_t> vlg_rports;
30  std::map<unsigned, wport_t> vlg_wports;
32  std::map<unsigned, rport_t> ila_rports;
34  std::map<unsigned, wport_t> ila_wports;
35 
39  unsigned concrete_level;
41  unsigned data_width;
43  unsigned addr_width;
45  std::string ila_map_name;
47  std::string mem_name;
49  std::vector<std::string> assumpts;
50 
51 private:
53  bool checked;
56  static std::set<int> concrete_level_encountered;
57 
58 public:
59  // ------------------CONSTRUCTOR ----------- //
61  VlgAbsMem();
62  // ------------------ MEMBERS ------------- //
64  void SetAddrWidth(unsigned w);
66  void SetDataWidth(unsigned w);
68  std::string MemEQSignalName() const;
71  std::string
73  const std::string& endCond);
75  static void OutputMemFile(std::ostream& os, bool avoid_issue_stage);
77  static bool hasAbsMem();
79  static void ClearAbsMemRecord();
80 
81 }; // class VlgAbsMem
82 
83 }; // namespace ilang
84 
85 #endif // ILANG_VTARGET_OUT_ABS_MEM_H__
type of write port
Definition: verilog_gen.h:57
std::vector< std::string > assumpts
the assumptions it has
Definition: absmem.h:49
static void ClearAbsMemRecord()
reset concrete_level (per-target).
void SetAddrWidth(unsigned w)
SetAddrWidth, if already set, and different -&gt; error.
std::map< unsigned, wport_t > vlg_wports
verilog write ports
Definition: absmem.h:30
std::string ila_map_name
which ila state it is mapped to
Definition: absmem.h:45
std::map< unsigned, rport_t > vlg_rports
verilog read ports
Definition: absmem.h:28
std::map< unsigned, rport_t > ila_rports
ila read ports
Definition: absmem.h:32
std::string mem_name
the name in rfmap
Definition: absmem.h:47
std::string GeneratingMemModuleSignalsInstantiation(VerilogGeneratorBase &gen, const std::string &endCond)
type of read port
Definition: verilog_gen.h:48
std::string MemEQSignalName() const
Get the memeq signal name.
bool read_abstract
whether to abstract the memory read
Definition: absmem.h:37
unsigned addr_width
widths , 0 stands for unknown
Definition: absmem.h:43
std::map< unsigned, wport_t > ila_wports
ila write ports
Definition: absmem.h:34
void SetDataWidth(unsigned w)
SetDataWidth.
Base class of VerilogGenerator.
Definition: verilog_gen.h:31
unsigned concrete_level
how many are considered to be concrete
Definition: absmem.h:39
a struct to store abstract memory
Definition: absmem.h:19
unsigned data_width
widths , 0 stands for unknown
Definition: absmem.h:41
static bool hasAbsMem()
Return true if there are abs mem used (strategy : ALL -&gt; AUTO)
VlgAbsMem()
do nothing
static void OutputMemFile(std::ostream &os, bool avoid_issue_stage)
Output the memory module to the stream.