Pass on lexical position information to NetNet and NetEvent objects.
This commit is contained in:
parent
bb80ee6905
commit
4159a6a6b1
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2000-2022 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 2000-2024 Stephen Williams (steve@icarus.com)
|
||||
* Copyright CERN 2013 / Stephen Williams (steve@icarus.com)
|
||||
*
|
||||
* This source code is free software; you can redistribute it
|
||||
|
|
@ -1553,6 +1553,7 @@ void PGModule::elaborate_scope_mod_instances_(Design*des, Module*mod, NetScope*s
|
|||
void PEvent::elaborate_scope(Design*, NetScope*scope) const
|
||||
{
|
||||
NetEvent*ev = new NetEvent(name_);
|
||||
ev->lexical_pos(lexical_pos_);
|
||||
ev->set_line(*this);
|
||||
scope->add_event(ev);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1209,6 +1209,7 @@ NetNet* PWire::elaborate_sig(Design*des, NetScope*scope) const
|
|||
if (wtype == NetNet::WIRE) sig->devirtualize_pins();
|
||||
sig->set_line(*this);
|
||||
sig->port_type(port_type_);
|
||||
sig->lexical_pos(lexical_pos_);
|
||||
|
||||
if (ivl_discipline_t dis = get_discipline()) {
|
||||
sig->set_discipline(dis);
|
||||
|
|
|
|||
|
|
@ -557,7 +557,7 @@ NetNet::NetNet(NetScope*s, perm_string n, Type t,
|
|||
const netranges_t&unpacked, ivl_type_t use_net_type)
|
||||
: NetObj(s, n, calculate_count(unpacked)),
|
||||
type_(t), port_type_(NOT_A_PORT), coerced_to_uwire_(false),
|
||||
local_flag_(false), net_type_(use_net_type),
|
||||
local_flag_(false), lexical_pos_(0), net_type_(use_net_type),
|
||||
discipline_(0), unpacked_dims_(unpacked),
|
||||
eref_count_(0), lref_count_(0)
|
||||
{
|
||||
|
|
@ -580,7 +580,7 @@ NetNet::NetNet(NetScope*s, perm_string n, Type t,
|
|||
NetNet::NetNet(NetScope*s, perm_string n, Type t, ivl_type_t type)
|
||||
: NetObj(s, n, 1),
|
||||
type_(t), port_type_(NOT_A_PORT), coerced_to_uwire_(false),
|
||||
local_flag_(false), net_type_(type),
|
||||
local_flag_(false), lexical_pos_(0), net_type_(type),
|
||||
discipline_(0),
|
||||
eref_count_(0), lref_count_(0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -695,6 +695,9 @@ class NetNet : public NetObj, public PortType {
|
|||
PortType port_type() const;
|
||||
void port_type(PortType t);
|
||||
|
||||
unsigned lexical_pos() const { return lexical_pos_; }
|
||||
void lexical_pos(unsigned lp) { lexical_pos_ = lp; }
|
||||
|
||||
// If this net net is a port (i.e. a *sub*port net of a module port)
|
||||
// its port index is number of the module it connects through
|
||||
int get_module_port_index() const; // -1 Not connected to port...
|
||||
|
|
@ -819,6 +822,7 @@ class NetNet : public NetObj, public PortType {
|
|||
PortType port_type_ : 3;
|
||||
bool coerced_to_uwire_: 1;
|
||||
bool local_flag_: 1;
|
||||
unsigned lexical_pos_;
|
||||
ivl_type_t net_type_;
|
||||
netuarray_t *array_type_ = nullptr;
|
||||
ivl_discipline_t discipline_;
|
||||
|
|
@ -3421,6 +3425,9 @@ class NetEvent : public LineInfo {
|
|||
|
||||
perm_string name() const;
|
||||
|
||||
unsigned lexical_pos() const { return lexical_pos_; }
|
||||
void lexical_pos(unsigned lp) { lexical_pos_ = lp; }
|
||||
|
||||
bool local_flag() const { return local_flag_; }
|
||||
void local_flag(bool f) { local_flag_ = f; }
|
||||
|
||||
|
|
@ -3455,6 +3462,7 @@ class NetEvent : public LineInfo {
|
|||
|
||||
private:
|
||||
perm_string name_;
|
||||
unsigned lexical_pos_;
|
||||
bool local_flag_;
|
||||
|
||||
// The NetScope class uses these to list the events.
|
||||
|
|
|
|||
Loading…
Reference in New Issue