8#ifndef VERILOGPARSER_DATABASE_H
9#define VERILOGPARSER_DATABASE_H
105 NetPin(std::string& n, std::string& p, std::vector<GeneralName>& vNetName)
110 extension.vNetName =
new std::vector<GeneralName>();
130 if (
net ==
"VerilogParser::GROUP_NETS")
140 if (
net ==
"VerilogParser::GROUP_NETS")
147 if (
net ==
"VerilogParser::CONSTANT_NET")
151 else if (
net ==
"VerilogParser::GROUP_NETS")
164 typedef std::vector<std::string> base_type;
165 using base_type::size_type;
166 using base_type::value_type;
167 using base_type::allocator_type;
173 : base_type(alloc) {}
178 StringArray(size_type n,
const value_type& val,
const allocator_type& alloc = allocator_type())
179 : base_type(n, val, alloc) {}
188 typedef std::vector<GeneralName> base_type;
189 using base_type::size_type;
190 using base_type::value_type;
191 using base_type::allocator_type;
197 : base_type(alloc) {}
202 GeneralNameArray(size_type n,
const value_type& val,
const allocator_type& alloc = allocator_type())
203 : base_type(n, val, alloc) {}
230 virtual void verilog_instance_cbk(std::string
const& macro_name, std::string
const& inst_name, std::vector<NetPin>
const& vNetPin) = 0;
GeneralNameArray(const allocator_type &alloc=allocator_type())
constructor
GeneralNameArray(size_type n, const value_type &val, const allocator_type &alloc=allocator_type())
constructor
StringArray(size_type n, const value_type &val, const allocator_type &alloc=allocator_type())
constructor
StringArray(const allocator_type &alloc=allocator_type())
constructor
Base class for verilog database. Only pure virtual functions are defined. User needs to inheritate ...
void verilog_user_cbk_reminder(const char *str) const
remind users to define some optional callback functions at runtime
virtual void verilog_assignment_cbk(std::string const &target_name, Range const &target_range, std::string const &source_name, Range const &source_range)
read an assignment
virtual void verilog_instance_cbk(std::string const ¯o_name, std::string const &inst_name, std::vector< NetPin > const &vNetPin)=0
read an instance.
virtual void verilog_net_declare_cbk(std::string const &net_name, Range const &range)=0
read an net declaration
virtual void verilog_module_declaration_cbk(std::string const &module_name, std::vector< GeneralName > const &vPinName)
read a module declaration
virtual void verilog_pin_declare_cbk(std::string const &pin_name, unsigned type, Range const &range)=0
read an pin declaration
namespace for VerilogParser
std::string name
name string, empty if not specified
GeneralName(std::string const &n, int low, int high)
constructor
GeneralName(std::string const &n="")
constructor
Range range
min infinity if not specified
void copy(NetPin const &rhs)
copy function
NetPin(NetPin const &rhs)
copy constructor
NetPin & operator=(NetPin const &rhs)
assignment
std::string net
net name, reserved names VerilogParser::CONSTANT_NET, VerilogParser::GROUP_NETS
NetPin(std::string &n, std::string &p, std::vector< GeneralName > &vNetName)
constructor
NetPin(std::string &n, std::string &p, Range const &r, int c)
constructor
NetPin(std::string &n, std::string &p, Range const &r=Range())
constructor
union VerilogParser::NetPin::Extension extension
extension to handle a net with constant values or a regular net
range with pair of low and high values
int low
low value, min infinity if not specified
Range(int l, int h)
constructor
Extension to handle a net with constant values or a regular net.
std::vector< GeneralName > * vNetName
a group of net names if the net is a group of nets
int constant
constant value if the net is a constant