8 #ifndef VERILOGPARSER_DATABASE_H
9 #define VERILOGPARSER_DATABASE_H
40 Range(
int l,
int h) : low(l), high(h) {}
57 GeneralName(std::string
const& n,
int low,
int high) {name = n; range.
low = low; range.
high = high;}
105 NetPin(std::string& n, std::string& p, std::vector<GeneralName>& vNetName)
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;
union VerilogParser::NetPin::Extension extension
extension to handle a net with constant values or a regular net
GeneralName(std::string const &n, int low, int high)
constructor
StringArray(size_type n, const value_type &val, const allocator_type &alloc=allocator_type())
constructor
virtual void verilog_net_declare_cbk(std::string const &net_name, Range const &range)=0
read an net declaration
range with pair of low and high values
GeneralName(std::string const &n="")
constructor
Range(int l, int h)
constructor
std::string net
net name, reserved names VerilogParser::CONSTANT_NET, VerilogParser::GROUP_NETS
virtual void verilog_pin_declare_cbk(std::string const &pin_name, unsigned type, Range const &range)=0
read an pin declaration
GeneralNameArray(const allocator_type &alloc=allocator_type())
constructor
NetPin & operator=(NetPin const &rhs)
assignment
NetPin(std::string &n, std::string &p, Range const &r, int c)
constructor
std::vector< GeneralName > * vNetName
a group of net names if the net is a group of nets
void copy(NetPin const &rhs)
copy function
int low
low value, min infinity if not specified
Extension to handle a net with constant values or a regular net.
virtual void verilog_module_declaration_cbk(std::string const &module_name, std::vector< GeneralName > const &vPinName)
read a module declaration
Describe the connection of pins to nets.
Range range
min infinity if not specified
int constant
constant value if the net is a constant
bison does not support vector very well, so here create a dummy class for string array.
NetPin(std::string &n, std::string &p, std::vector< GeneralName > &vNetName)
constructor
StringArray(const allocator_type &alloc=allocator_type())
constructor
GeneralNameArray(size_type n, const value_type &val, const allocator_type &alloc=allocator_type())
constructor
virtual void verilog_instance_cbk(std::string const ¯o_name, std::string const &inst_name, std::vector< NetPin > const &vNetPin)=0
read an instance.
NetPin(std::string &n, std::string &p, Range const &r=Range())
constructor
std::string name
name string, empty if not specified
NetPin(NetPin const &rhs)
copy constructor
std::iterator_traits< Iterator >::value_type min(Iterator first, Iterator last)
get min of an array
bison does not support vector very well, so here create a dummy class for VerilogParser::GeneralName ...
void verilog_user_cbk_reminder(const char *str) const
remind users to define some optional callback functions at runtime
Base class for verilog database. Only pure virtual functions are defined. User needs to inheritate th...
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
namespace for VerilogParser