-
Notifications
You must be signed in to change notification settings - Fork 523
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'steveicarus:master' into part-select-address-overflow
- Loading branch information
Showing
118 changed files
with
1,366 additions
and
356 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,7 @@ cscope.* | |
|
||
# Object files and libraries | ||
*.[oa] | ||
*.so | ||
|
||
gmon*.out | ||
gmon*.txt | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright (c) 2004-2019 Stephen Williams ([email protected]) | ||
* Copyright (c) 2004-2024 Stephen Williams ([email protected]) | ||
* | ||
* This source code is free software; you can redistribute it | ||
* and/or modify it in source code form under the terms of the GNU | ||
|
@@ -21,8 +21,8 @@ | |
|
||
# include "PEvent.h" | ||
|
||
PEvent::PEvent(perm_string n) | ||
: name_(n) | ||
PEvent::PEvent(perm_string n, unsigned lexical_pos) | ||
: name_(n), lexical_pos_(lexical_pos) | ||
{ | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
#ifndef IVL_PEvent_H | ||
#define IVL_PEvent_H | ||
/* | ||
* Copyright (c) 2000-2019 Stephen Williams ([email protected]) | ||
* Copyright (c) 2000-2024 Stephen Williams ([email protected]) | ||
* | ||
* This source code is free software; you can redistribute it | ||
* and/or modify it in source code form under the terms of the GNU | ||
|
@@ -36,17 +36,20 @@ class PEvent : public PNamedItem { | |
public: | ||
// The name is a perm-allocated string. It is the simple name | ||
// of the event, without any scope. | ||
explicit PEvent(perm_string name); | ||
explicit PEvent(perm_string name, unsigned lexical_pos); | ||
~PEvent(); | ||
|
||
perm_string name() const; | ||
|
||
unsigned lexical_pos() const { return lexical_pos_; } | ||
|
||
void elaborate_scope(Design*des, NetScope*scope) const; | ||
|
||
SymbolType symbol_type() const; | ||
|
||
private: | ||
perm_string name_; | ||
unsigned lexical_pos_; | ||
|
||
private: // not implemented | ||
PEvent(const PEvent&); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright (c) 1998-2021 Stephen Williams <[email protected]> | ||
* Copyright (c) 1998-2024 Stephen Williams <[email protected]> | ||
* Copyright CERN 2013 / Stephen Williams ([email protected]) | ||
* | ||
* This source code is free software; you can redistribute it | ||
|
@@ -360,19 +360,19 @@ const verireal& PEFNumber::value() const | |
return *value_; | ||
} | ||
|
||
PEIdent::PEIdent(const pform_name_t&that) | ||
: path_(that), no_implicit_sig_(false) | ||
PEIdent::PEIdent(const pform_name_t&that, unsigned lexical_pos) | ||
: path_(that), lexical_pos_(lexical_pos), no_implicit_sig_(false) | ||
{ | ||
} | ||
|
||
PEIdent::PEIdent(perm_string s, bool no_implicit_sig) | ||
: no_implicit_sig_(no_implicit_sig) | ||
PEIdent::PEIdent(perm_string s, unsigned lexical_pos, bool no_implicit_sig) | ||
: lexical_pos_(lexical_pos), no_implicit_sig_(no_implicit_sig) | ||
{ | ||
path_.name.push_back(name_component_t(s)); | ||
} | ||
|
||
PEIdent::PEIdent(PPackage*pkg, const pform_name_t&that) | ||
: path_(pkg, that), no_implicit_sig_(true) | ||
PEIdent::PEIdent(PPackage*pkg, const pform_name_t&that, unsigned lexical_pos) | ||
: path_(pkg, that), lexical_pos_(lexical_pos), no_implicit_sig_(true) | ||
{ | ||
} | ||
|
||
|
@@ -426,7 +426,7 @@ void PEIdent::declare_implicit_nets(LexicalScope*scope, NetNet::Type type) | |
|
||
ss = ss->parent_scope(); | ||
} | ||
PWire*net = new PWire(name, type, NetNet::NOT_A_PORT); | ||
PWire*net = new PWire(name, lexical_pos_, type, NetNet::NOT_A_PORT); | ||
net->set_file(get_file()); | ||
net->set_lineno(get_lineno()); | ||
scope->wires[name] = net; | ||
|
@@ -440,7 +440,7 @@ void PEIdent::declare_implicit_nets(LexicalScope*scope, NetNet::Type type) | |
bool PEIdent::has_aa_term(Design*des, NetScope*scope) const | ||
{ | ||
symbol_search_results sr; | ||
if (!symbol_search(this, des, scope, path_, &sr)) | ||
if (!symbol_search(this, des, scope, path_, lexical_pos_, &sr)) | ||
return false; | ||
|
||
// Class properties are not considered automatic since a non-blocking | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
#ifndef IVL_PScope_H | ||
#define IVL_PScope_H | ||
/* | ||
* Copyright (c) 2008-2021 Stephen Williams ([email protected]) | ||
* Copyright (c) 2008-2024 Stephen Williams ([email protected]) | ||
* | ||
* This source code is free software; you can redistribute it | ||
* and/or modify it in source code form under the terms of the GNU | ||
|
@@ -121,6 +121,8 @@ class LexicalScope { | |
bool overridable; | ||
// Whether the parameter is a type parameter | ||
bool type_flag = false; | ||
// The lexical position of the declaration | ||
unsigned lexical_pos = 0; | ||
|
||
SymbolType symbol_type() const; | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright (c) 1999-2021 Stephen Williams ([email protected]) | ||
* Copyright (c) 1999-2024 Stephen Williams ([email protected]) | ||
* | ||
* This source code is free software; you can redistribute it | ||
* and/or modify it in source code form under the terms of the GNU | ||
|
@@ -25,10 +25,11 @@ | |
using namespace std; | ||
|
||
PWire::PWire(perm_string n, | ||
unsigned lp, | ||
NetNet::Type t, | ||
NetNet::PortType pt, | ||
PWSRType rt) | ||
: name_(n), type_(t), port_type_(pt), signed_(false), | ||
: name_(n), lexical_pos_(lp), type_(t), port_type_(pt), signed_(false), | ||
port_set_(false), net_set_(false), is_scalar_(false), | ||
error_cnt_(0), discipline_(0) | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
#ifndef IVL_PWire_H | ||
#define IVL_PWire_H | ||
/* | ||
* Copyright (c) 1998-2021 Stephen Williams ([email protected]) | ||
* Copyright (c) 1998-2024 Stephen Williams ([email protected]) | ||
* | ||
* This source code is free software; you can redistribute it | ||
* and/or modify it in source code form under the terms of the GNU | ||
|
@@ -55,13 +55,16 @@ class PWire : public PNamedItem { | |
|
||
public: | ||
PWire(perm_string name, | ||
unsigned lexical_pos, | ||
NetNet::Type t, | ||
NetNet::PortType pt, | ||
PWSRType rt = SR_NET); | ||
|
||
// Return a hierarchical name. | ||
perm_string basename() const; | ||
|
||
unsigned lexical_pos() const { return lexical_pos_; } | ||
|
||
NetNet::Type get_wire_type() const; | ||
bool set_wire_type(NetNet::Type); | ||
|
||
|
@@ -88,7 +91,7 @@ class PWire : public PNamedItem { | |
// Write myself to the specified stream. | ||
void dump(std::ostream&out, unsigned ind=4) const; | ||
|
||
NetNet* elaborate_sig(Design*, NetScope*scope) const; | ||
NetNet* elaborate_sig(Design*, NetScope*scope); | ||
|
||
SymbolType symbol_type() const; | ||
|
||
|
@@ -99,13 +102,16 @@ class PWire : public PNamedItem { | |
|
||
private: | ||
perm_string name_; | ||
unsigned lexical_pos_; | ||
NetNet::Type type_; | ||
NetNet::PortType port_type_; | ||
bool signed_; | ||
|
||
// Whether the wire is variable declared with the const keyword. | ||
bool is_const_ = false; | ||
|
||
bool is_elaborating_ = false; | ||
|
||
// These members hold expressions for the bit width of the | ||
// wire. If they do not exist, the wire is 1 bit wide. If they | ||
// do exist, they represent the packed dimensions of the | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright (c) 1998-2021 Stephen Williams ([email protected]) | ||
* Copyright (c) 1998-2024 Stephen Williams ([email protected]) | ||
* | ||
* This source code is free software; you can redistribute it | ||
* and/or modify it in source code form under the terms of the GNU | ||
|
@@ -396,17 +396,17 @@ PReturn::~PReturn() | |
delete expr_; | ||
} | ||
|
||
PTrigger::PTrigger(PPackage*pkg, const pform_name_t&ev) | ||
: event_(pkg, ev) | ||
PTrigger::PTrigger(PPackage*pkg, const pform_name_t&ev, unsigned lexical_pos) | ||
: event_(pkg, ev), lexical_pos_(lexical_pos) | ||
{ | ||
} | ||
|
||
PTrigger::~PTrigger() | ||
{ | ||
} | ||
|
||
PNBTrigger::PNBTrigger(const pform_name_t&ev, PExpr*dly) | ||
: event_(ev), dly_(dly) | ||
PNBTrigger::PNBTrigger(const pform_name_t&ev, unsigned lexical_pos, PExpr*dly) | ||
: event_(ev), lexical_pos_(lexical_pos), dly_(dly) | ||
{ | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
#ifndef IVL_Statement_H | ||
#define IVL_Statement_H | ||
/* | ||
* Copyright (c) 1998-2021 Stephen Williams ([email protected]) | ||
* Copyright (c) 1998-2024 Stephen Williams ([email protected]) | ||
* | ||
* This source code is free software; you can redistribute it | ||
* and/or modify it in source code form under the terms of the GNU | ||
|
@@ -599,26 +599,28 @@ class PReturn : public Statement { | |
class PTrigger : public Statement { | ||
|
||
public: | ||
explicit PTrigger(PPackage*pkg, const pform_name_t&ev); | ||
explicit PTrigger(PPackage*pkg, const pform_name_t&ev, unsigned lexical_pos); | ||
~PTrigger(); | ||
|
||
virtual NetProc* elaborate(Design*des, NetScope*scope) const; | ||
virtual void dump(std::ostream&out, unsigned ind) const; | ||
|
||
private: | ||
pform_scoped_name_t event_; | ||
unsigned lexical_pos_; | ||
}; | ||
|
||
class PNBTrigger : public Statement { | ||
public: | ||
explicit PNBTrigger(const pform_name_t&ev, PExpr*dly); | ||
explicit PNBTrigger(const pform_name_t&ev, unsigned lexical_pos, PExpr*dly); | ||
~PNBTrigger(); | ||
|
||
virtual NetProc* elaborate(Design*des, NetScope*scope) const; | ||
virtual void dump(std::ostream&out, unsigned ind) const; | ||
|
||
private: | ||
pform_name_t event_; | ||
unsigned lexical_pos_; | ||
PExpr*dly_; | ||
}; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.