5 #ifndef ILANG_VTARGET_OUT_DIRECTIVE_H__
6 #define ILANG_VTARGET_OUT_DIRECTIVE_H__
13 #include <ilang/verilog-in/verilog_analysis_wrapper.h>
15 #include <ilang/vtarget-out/absmem.h>
55 typedef std::function<bool(const std::string&, const SignalInfoBase&)>
58 typedef std::function<std::pair<unsigned, unsigned>(
const std::string&)>
69 static bool beginsWith(
const std::string& c,
const std::string& s);
85 void Clear(
bool reset_vlg);
96 const std::string& outside_name);
99 const std::string& ila_state_name,
100 const std::map<unsigned, rport_t>& rports,
101 const std::map<unsigned, wport_t>& wports,
102 int ila_addr_width,
int ila_data_width,
110 const std::string& ila_state_name,
bool abs_read);
116 const std::string& ila_state_name,
bool abs_read,
int,
121 const std::string& endCond);
127 std::pair<std::string, unsigned int>
128 KeepMemoryPorts(
const std::string& mem_name,
const std::string& port_name,
129 bool caller_build_wire);
180 #endif // ILANG_VTARGET_OUT_DIRECTIVE_H__
type of write port
Definition: verilog_gen.h:57
bool _reset_vlg
whether to reset this vlg (reset to rst or dummy_reset)
Definition: directive.h:154
Used in Verilog Verification Target Generation for dealing with interface directives.
Definition: directive.h:28
void VlgAddTopInteface(VerilogGeneratorBase &gen) const
Add signals to the wrapper_generator.
void RegisterExtraWire(const std::string &io_name, const std::string &outside_name)
Register the extra wire to connect (for extra wire)
std::vector< vlg_sig_t > vlg_sigs_t
Type of Verilog signals (a vector)
Definition: verilog_gen.h:83
std::function< void(const std::string &)> assmpt_inserter_t
Type of call back function to insert assumptions.
Definition: directive.h:61
mod_inst_rec_t mod_inst_rec
a map of port-name -> (tp, signal name)
Definition: directive.h:143
void SetMemName(const std::string &directive, const std::string &ila_state_name, bool abs_read)
type of read port
Definition: verilog_gen.h:48
void RegisterInterface(const SignalInfoBase &vlg_sig, const std::string &refstr, ila_input_checker_t chk, ila_mem_checker_t mget)
Used to tell this module about the refinement relations.
void SetMemNameAndWidth(const std::string &directive, const std::string &ila_state_name, bool abs_read, int, int)
vlg_sig_vec_t output_wires
wires to be declared as output and wire
Definition: directive.h:148
vlg_sig_vec_t input_wires
wires to be declared as input and wire
Definition: directive.h:146
static bool isSpecialUnknownFunction(const FuncPtr &func_ptr)
a function to determine if a function (no arg) is an unknown special directive
static bool isSpecialStateDirMem(const std::string &c)
a function to determine if a state map refstr is special directie (**???)
std::pair< inf_dir_t, std::string > inf_connector_t
Type of interface connector.
Definition: directive.h:47
std::function< std::pair< unsigned, unsigned >const std::string &)> ila_mem_checker_t
Type of call back function to find information about a memory.
Definition: directive.h:59
void ConnectModuleInputAddWire(const std::string &short_name, unsigned width)
a shortcut to connect module and add wire
VerilogGeneratorBase::vlg_sig_t vlg_sig_t
Using vlg-out's signal type.
Definition: directive.h:51
std::map< std::string, VlgAbsMem > abs_mems
ila-mem-name -> abs
Definition: directive.h:152
std::string GetAbsMemInstString(VerilogGeneratorBase &gen, const std::string &endCond)
Return the memory instantiation string.
Func::FuncPtr FuncPtr
Pointer type for normal use of Func.
Definition: func.h:83
void ModuleInstSanityCheck(VerilogGeneratorBase &gen) const
static bool isSpecialUnknownFunctionName(const std::string &funcname)
a function to determine if a function name is an unknown special directive
IntefaceDirectiveRecorder(bool reset_vlg)
Check if an interface needs to be declare as top module I/O.
Definition: directive.h:81
static bool beginsWith(const std::string &c, const std::string &s)
Return if a string 'c' begins with string 's'.
std::string GetVlgModInstString(VerilogGeneratorBase &gen) const
Return a string used for instantiating.
static bool isSpecialInputDir(const std::string &c)
Return true if 'c' is special input directive.
void Clear(bool reset_vlg)
clear all internal storage
void ConnectModuleOutputAddWire(const std::string &short_name, unsigned width)
a shortcut to connect module and add wire
Class to hold signal info.
Definition: verilog_analysis_wrapper.h:112
Base class of VerilogGenerator.
Definition: verilog_gen.h:31
std::function< bool(const std::string &, const SignalInfoBase &)> ila_input_checker_t
ILA input compatible checker type.
Definition: directive.h:56
static bool isSpecialInputDirCompatibleWith(const std::string &c, const SignalInfoBase &vlg_sig)
Check for compatibility.
void InsertAbsMemAssmpt(assmpt_inserter_t inserter)
Insert memory abstractions' assumptions.
std::pair< std::string, unsigned int > KeepMemoryPorts(const std::string &mem_name, const std::string &port_name, bool caller_build_wire)
std::string ConnectMemory(const std::string &directive, const std::string &ila_state_name, const std::map< unsigned, rport_t > &rports, const std::map< unsigned, wport_t > &wports, int ila_addr_width, int ila_data_width, bool abs_read)
Register the connection of signals related to a memory.
inf_dir_t
Type interface directives.
Definition: directive.h:31
std::map< std::string, inf_connector_t > mod_inst_rec_t
Type of interface connector storage.
Definition: directive.h:49
vlg_sig_vec_t internal_wires
wires to be declared as just wire
Definition: directive.h:150
std::pair< vlg_name_t, int > vlg_sig_t
Type of Verilog signal, name & bw.
Definition: verilog_gen.h:81
a class to handle state-mapping directives in the refinement relations
Definition: directive.h:164
VerilogGeneratorBase::vlg_sigs_t vlg_sig_vec_t
Using vlg-out's signal vector type.
Definition: directive.h:53
static bool isSpecialStateDir(const std::string &c)
a function to determine if a state map refstr is special directie (**???)