Remove the elaborate_net methods.
These methods are no longer in use, their functionality taked over by a compination of elab_and_eval and NetExpr::synthesize methods.
This commit is contained in:
parent
eb9d037bf0
commit
05f129211e
193
PExpr.h
193
PExpr.h
|
|
@ -36,9 +36,6 @@ class NetScope;
|
||||||
* The PExpr class hierarchy supports the description of
|
* The PExpr class hierarchy supports the description of
|
||||||
* expressions. The parser can generate expression objects from the
|
* expressions. The parser can generate expression objects from the
|
||||||
* source, possibly reducing things that it knows how to reduce.
|
* source, possibly reducing things that it knows how to reduce.
|
||||||
*
|
|
||||||
* The elaborate_net method is used by structural elaboration to build
|
|
||||||
* up a netlist interpretation of the expression.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class PExpr : public LineInfo {
|
class PExpr : public LineInfo {
|
||||||
|
|
@ -98,17 +95,6 @@ class PExpr : public LineInfo {
|
||||||
// evaluation of parameters.
|
// evaluation of parameters.
|
||||||
virtual NetExpr*elaborate_pexpr(Design*des, NetScope*sc) const;
|
virtual NetExpr*elaborate_pexpr(Design*des, NetScope*sc) const;
|
||||||
|
|
||||||
// This method elaborate the expression as gates, for use in a
|
|
||||||
// continuous assign or other wholly structural context.
|
|
||||||
virtual NetNet* elaborate_net(Design*des, NetScope*scope,
|
|
||||||
unsigned lwidth,
|
|
||||||
const NetExpr* rise,
|
|
||||||
const NetExpr* fall,
|
|
||||||
const NetExpr* decay,
|
|
||||||
Link::strength_t drive0 =Link::STRONG,
|
|
||||||
Link::strength_t drive1 =Link::STRONG)
|
|
||||||
const;
|
|
||||||
|
|
||||||
// This method elaborates the expression as gates, but
|
// This method elaborates the expression as gates, but
|
||||||
// restricted for use as l-values of continuous assignments.
|
// restricted for use as l-values of continuous assignments.
|
||||||
virtual NetNet* elaborate_lnet(Design*des, NetScope*scope) const;
|
virtual NetNet* elaborate_lnet(Design*des, NetScope*scope) const;
|
||||||
|
|
@ -163,13 +149,6 @@ class PEConcat : public PExpr {
|
||||||
virtual bool elaborate_sig(Design*des, NetScope*scope) const;
|
virtual bool elaborate_sig(Design*des, NetScope*scope) const;
|
||||||
virtual NetNet* elaborate_lnet(Design*des, NetScope*scope) const;
|
virtual NetNet* elaborate_lnet(Design*des, NetScope*scope) const;
|
||||||
virtual NetNet* elaborate_bi_net(Design*des, NetScope*scope) const;
|
virtual NetNet* elaborate_bi_net(Design*des, NetScope*scope) const;
|
||||||
virtual NetNet* elaborate_net(Design*des, NetScope*scope,
|
|
||||||
unsigned width,
|
|
||||||
const NetExpr* rise,
|
|
||||||
const NetExpr* fall,
|
|
||||||
const NetExpr* decay,
|
|
||||||
Link::strength_t drive0,
|
|
||||||
Link::strength_t drive1) const;
|
|
||||||
virtual NetExpr*elaborate_expr(Design*des, NetScope*,
|
virtual NetExpr*elaborate_expr(Design*des, NetScope*,
|
||||||
int expr_width, bool sys_task_arg) const;
|
int expr_width, bool sys_task_arg) const;
|
||||||
virtual NetEConcat*elaborate_pexpr(Design*des, NetScope*) const;
|
virtual NetEConcat*elaborate_pexpr(Design*des, NetScope*) const;
|
||||||
|
|
@ -236,14 +215,6 @@ class PEFNumber : public PExpr {
|
||||||
int expr_width, bool sys_task_arg) const;
|
int expr_width, bool sys_task_arg) const;
|
||||||
virtual NetExpr*elaborate_pexpr(Design*des, NetScope*sc) const;
|
virtual NetExpr*elaborate_pexpr(Design*des, NetScope*sc) const;
|
||||||
|
|
||||||
virtual NetNet* elaborate_net(Design*des, NetScope*scope,
|
|
||||||
unsigned lwidth,
|
|
||||||
const NetExpr* rise,
|
|
||||||
const NetExpr* fall,
|
|
||||||
const NetExpr* decay,
|
|
||||||
Link::strength_t drive0,
|
|
||||||
Link::strength_t drive1) const;
|
|
||||||
|
|
||||||
virtual void dump(ostream&) const;
|
virtual void dump(ostream&) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
@ -278,15 +249,6 @@ class PEIdent : public PExpr {
|
||||||
NetScope*scope,
|
NetScope*scope,
|
||||||
bool is_force) const;
|
bool is_force) const;
|
||||||
|
|
||||||
// Structural r-values are OK.
|
|
||||||
virtual NetNet* elaborate_net(Design*des, NetScope*scope,
|
|
||||||
unsigned lwidth,
|
|
||||||
const NetExpr* rise,
|
|
||||||
const NetExpr* fall,
|
|
||||||
const NetExpr* decay,
|
|
||||||
Link::strength_t drive0,
|
|
||||||
Link::strength_t drive1) const;
|
|
||||||
|
|
||||||
virtual NetExpr*elaborate_expr(Design*des, NetScope*,
|
virtual NetExpr*elaborate_expr(Design*des, NetScope*,
|
||||||
int expr_width, bool sys_task_arg) const;
|
int expr_width, bool sys_task_arg) const;
|
||||||
virtual NetExpr*elaborate_pexpr(Design*des, NetScope*sc) const;
|
virtual NetExpr*elaborate_pexpr(Design*des, NetScope*sc) const;
|
||||||
|
|
@ -366,38 +328,6 @@ class PEIdent : public PExpr {
|
||||||
NetESignal*net,
|
NetESignal*net,
|
||||||
NetScope*found) const;
|
NetScope*found) const;
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
NetNet* elaborate_net_array_(Design*des, NetScope*scope,
|
|
||||||
NetNet*sig, unsigned lwidth,
|
|
||||||
const NetExpr* rise,
|
|
||||||
const NetExpr* fall,
|
|
||||||
const NetExpr* decay,
|
|
||||||
Link::strength_t drive0,
|
|
||||||
Link::strength_t drive1) const;
|
|
||||||
|
|
||||||
NetNet* elaborate_net_net_(Design*des, NetScope*scope,
|
|
||||||
NetNet*sig, unsigned lwidth,
|
|
||||||
const NetExpr* rise,
|
|
||||||
const NetExpr* fall,
|
|
||||||
const NetExpr* decay,
|
|
||||||
Link::strength_t drive0,
|
|
||||||
Link::strength_t drive1) const;
|
|
||||||
NetNet* elaborate_net_net_idx_up_(Design*des, NetScope*scope,
|
|
||||||
NetNet*sig, unsigned lwidth,
|
|
||||||
const NetExpr* rise,
|
|
||||||
const NetExpr* fall,
|
|
||||||
const NetExpr* decay,
|
|
||||||
Link::strength_t drive0,
|
|
||||||
Link::strength_t drive1) const;
|
|
||||||
NetNet* elaborate_net_bitmux_(Design*des, NetScope*scope,
|
|
||||||
NetNet*sig,
|
|
||||||
const NetExpr* rise,
|
|
||||||
const NetExpr* fall,
|
|
||||||
const NetExpr* decay,
|
|
||||||
Link::strength_t drive0,
|
|
||||||
Link::strength_t drive1) const;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
NetNet* elaborate_lnet_common_(Design*des, NetScope*scope,
|
NetNet* elaborate_lnet_common_(Design*des, NetScope*scope,
|
||||||
bool bidirectional_flag) const;
|
bool bidirectional_flag) const;
|
||||||
|
|
@ -406,8 +336,6 @@ class PEIdent : public PExpr {
|
||||||
|
|
||||||
bool eval_part_select_(Design*des, NetScope*scope, NetNet*sig,
|
bool eval_part_select_(Design*des, NetScope*scope, NetNet*sig,
|
||||||
long&midx, long&lidx) const;
|
long&midx, long&lidx) const;
|
||||||
NetNet*process_select_(Design*des, NetScope*scope, NetNet*sig) const;
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class PENumber : public PExpr {
|
class PENumber : public PExpr {
|
||||||
|
|
@ -423,13 +351,6 @@ class PENumber : public PExpr {
|
||||||
unsigned min, unsigned lval,
|
unsigned min, unsigned lval,
|
||||||
bool&unsized_flag) const;
|
bool&unsized_flag) const;
|
||||||
|
|
||||||
virtual NetNet* elaborate_net(Design*des, NetScope*scope,
|
|
||||||
unsigned lwidth,
|
|
||||||
const NetExpr* rise,
|
|
||||||
const NetExpr* fall,
|
|
||||||
const NetExpr* decay,
|
|
||||||
Link::strength_t drive0,
|
|
||||||
Link::strength_t drive1) const;
|
|
||||||
virtual NetEConst*elaborate_expr(Design*des, NetScope*,
|
virtual NetEConst*elaborate_expr(Design*des, NetScope*,
|
||||||
int expr_width, bool) const;
|
int expr_width, bool) const;
|
||||||
virtual NetExpr*elaborate_pexpr(Design*des, NetScope*sc) const;
|
virtual NetExpr*elaborate_pexpr(Design*des, NetScope*sc) const;
|
||||||
|
|
@ -466,13 +387,6 @@ class PEString : public PExpr {
|
||||||
unsigned min, unsigned lval,
|
unsigned min, unsigned lval,
|
||||||
bool&unsized_flag) const;
|
bool&unsized_flag) const;
|
||||||
|
|
||||||
virtual NetNet* elaborate_net(Design*des, NetScope*scope,
|
|
||||||
unsigned width,
|
|
||||||
const NetExpr* rise,
|
|
||||||
const NetExpr* fall,
|
|
||||||
const NetExpr* decay,
|
|
||||||
Link::strength_t drive0,
|
|
||||||
Link::strength_t drive1) const;
|
|
||||||
virtual NetEConst*elaborate_expr(Design*des, NetScope*,
|
virtual NetEConst*elaborate_expr(Design*des, NetScope*,
|
||||||
int expr_width, bool) const;
|
int expr_width, bool) const;
|
||||||
virtual NetEConst*elaborate_pexpr(Design*des, NetScope*sc) const;
|
virtual NetEConst*elaborate_pexpr(Design*des, NetScope*sc) const;
|
||||||
|
|
@ -498,13 +412,6 @@ class PEUnary : public PExpr {
|
||||||
|
|
||||||
virtual bool elaborate_sig(Design*des, NetScope*scope) const;
|
virtual bool elaborate_sig(Design*des, NetScope*scope) const;
|
||||||
|
|
||||||
virtual NetNet* elaborate_net(Design*des, NetScope*scope,
|
|
||||||
unsigned width,
|
|
||||||
const NetExpr* rise,
|
|
||||||
const NetExpr* fall,
|
|
||||||
const NetExpr* decay,
|
|
||||||
Link::strength_t drive0,
|
|
||||||
Link::strength_t drive1) const;
|
|
||||||
virtual NetExpr*elaborate_expr(Design*des, NetScope*,
|
virtual NetExpr*elaborate_expr(Design*des, NetScope*,
|
||||||
int expr_width, bool sys_task_arg) const;
|
int expr_width, bool sys_task_arg) const;
|
||||||
virtual NetExpr*elaborate_pexpr(Design*des, NetScope*sc) const;
|
virtual NetExpr*elaborate_pexpr(Design*des, NetScope*sc) const;
|
||||||
|
|
@ -512,32 +419,6 @@ class PEUnary : public PExpr {
|
||||||
|
|
||||||
virtual bool is_constant(Module*) const;
|
virtual bool is_constant(Module*) const;
|
||||||
|
|
||||||
private:
|
|
||||||
NetNet* elab_net_uminus_const_logic_(Design*des, NetScope*scope,
|
|
||||||
NetEConst*expr,
|
|
||||||
unsigned width,
|
|
||||||
const NetExpr* rise,
|
|
||||||
const NetExpr* fall,
|
|
||||||
const NetExpr* decay,
|
|
||||||
Link::strength_t drive0,
|
|
||||||
Link::strength_t drive1) const;
|
|
||||||
NetNet* elab_net_uminus_const_real_(Design*des, NetScope*scope,
|
|
||||||
NetECReal*expr,
|
|
||||||
unsigned width,
|
|
||||||
const NetExpr* rise,
|
|
||||||
const NetExpr* fall,
|
|
||||||
const NetExpr* decay,
|
|
||||||
Link::strength_t drive0,
|
|
||||||
Link::strength_t drive1) const;
|
|
||||||
NetNet* elab_net_unary_real_(Design*des, NetScope*scope,
|
|
||||||
NetExpr*expr,
|
|
||||||
unsigned width,
|
|
||||||
const NetExpr* rise,
|
|
||||||
const NetExpr* fall,
|
|
||||||
const NetExpr* decay,
|
|
||||||
Link::strength_t drive0,
|
|
||||||
Link::strength_t drive1) const;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
char op_;
|
char op_;
|
||||||
PExpr*expr_;
|
PExpr*expr_;
|
||||||
|
|
@ -559,13 +440,6 @@ class PEBinary : public PExpr {
|
||||||
|
|
||||||
virtual bool elaborate_sig(Design*des, NetScope*scope) const;
|
virtual bool elaborate_sig(Design*des, NetScope*scope) const;
|
||||||
|
|
||||||
virtual NetNet* elaborate_net(Design*des, NetScope*scope,
|
|
||||||
unsigned width,
|
|
||||||
const NetExpr* rise,
|
|
||||||
const NetExpr* fall,
|
|
||||||
const NetExpr* decay,
|
|
||||||
Link::strength_t drive0,
|
|
||||||
Link::strength_t drive1) const;
|
|
||||||
virtual NetExpr*elaborate_expr(Design*des, NetScope*,
|
virtual NetExpr*elaborate_expr(Design*des, NetScope*,
|
||||||
int expr_width, bool sys_task_arg) const;
|
int expr_width, bool sys_task_arg) const;
|
||||||
virtual NetExpr*elaborate_pexpr(Design*des, NetScope*sc) const;
|
virtual NetExpr*elaborate_pexpr(Design*des, NetScope*sc) const;
|
||||||
|
|
@ -585,52 +459,6 @@ class PEBinary : public PExpr {
|
||||||
|
|
||||||
static void suppress_operand_sign_if_needed_(NetExpr*lp, NetExpr*rp);
|
static void suppress_operand_sign_if_needed_(NetExpr*lp, NetExpr*rp);
|
||||||
|
|
||||||
private:
|
|
||||||
NetNet* elaborate_net_add_(Design*des, NetScope*scope,
|
|
||||||
unsigned lwidth,
|
|
||||||
const NetExpr* rise,
|
|
||||||
const NetExpr* fall,
|
|
||||||
const NetExpr* decay) const;
|
|
||||||
NetNet* elaborate_net_bit_(Design*des, NetScope*scope,
|
|
||||||
unsigned lwidth,
|
|
||||||
const NetExpr* rise,
|
|
||||||
const NetExpr* fall,
|
|
||||||
const NetExpr* decay) const;
|
|
||||||
NetNet* elaborate_net_cmp_(Design*des, NetScope*scope,
|
|
||||||
unsigned lwidth,
|
|
||||||
const NetExpr* rise,
|
|
||||||
const NetExpr* fall,
|
|
||||||
const NetExpr* decay) const;
|
|
||||||
NetNet* elaborate_net_div_(Design*des, NetScope*scope,
|
|
||||||
unsigned lwidth,
|
|
||||||
const NetExpr* rise,
|
|
||||||
const NetExpr* fall,
|
|
||||||
const NetExpr* decay) const;
|
|
||||||
NetNet* elaborate_net_mod_(Design*des, NetScope*scope,
|
|
||||||
unsigned lwidth,
|
|
||||||
const NetExpr* rise,
|
|
||||||
const NetExpr* fall,
|
|
||||||
const NetExpr* decay) const;
|
|
||||||
NetNet* elaborate_net_log_(Design*des, NetScope*scope,
|
|
||||||
unsigned lwidth,
|
|
||||||
const NetExpr* rise,
|
|
||||||
const NetExpr* fall,
|
|
||||||
const NetExpr* decay) const;
|
|
||||||
NetNet* elaborate_net_mul_(Design*des, NetScope*scope,
|
|
||||||
unsigned lwidth,
|
|
||||||
const NetExpr* rise,
|
|
||||||
const NetExpr* fall,
|
|
||||||
const NetExpr* decay) const;
|
|
||||||
NetNet* elaborate_net_pow_(Design*des, NetScope*scope,
|
|
||||||
unsigned lwidth,
|
|
||||||
const NetExpr* rise,
|
|
||||||
const NetExpr* fall,
|
|
||||||
const NetExpr* decay) const;
|
|
||||||
NetNet* elaborate_net_shift_(Design*des, NetScope*scope,
|
|
||||||
unsigned lwidth,
|
|
||||||
const NetExpr* rise,
|
|
||||||
const NetExpr* fall,
|
|
||||||
const NetExpr* decay) const;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -680,13 +508,6 @@ class PETernary : public PExpr {
|
||||||
|
|
||||||
virtual bool elaborate_sig(Design*des, NetScope*scope) const;
|
virtual bool elaborate_sig(Design*des, NetScope*scope) const;
|
||||||
|
|
||||||
virtual NetNet* elaborate_net(Design*des, NetScope*scope,
|
|
||||||
unsigned width,
|
|
||||||
const NetExpr* rise,
|
|
||||||
const NetExpr* fall,
|
|
||||||
const NetExpr* decay,
|
|
||||||
Link::strength_t drive0,
|
|
||||||
Link::strength_t drive1) const;
|
|
||||||
virtual NetExpr*elaborate_expr(Design*des, NetScope*,
|
virtual NetExpr*elaborate_expr(Design*des, NetScope*,
|
||||||
int expr_width, bool sys_task_arg) const;
|
int expr_width, bool sys_task_arg) const;
|
||||||
virtual NetETernary*elaborate_pexpr(Design*des, NetScope*sc) const;
|
virtual NetETernary*elaborate_pexpr(Design*des, NetScope*sc) const;
|
||||||
|
|
@ -720,13 +541,6 @@ class PECallFunction : public PExpr {
|
||||||
|
|
||||||
virtual void dump(ostream &) const;
|
virtual void dump(ostream &) const;
|
||||||
|
|
||||||
virtual NetNet* elaborate_net(Design*des, NetScope*scope,
|
|
||||||
unsigned width,
|
|
||||||
const NetExpr* rise,
|
|
||||||
const NetExpr* fall,
|
|
||||||
const NetExpr* decay,
|
|
||||||
Link::strength_t drive0,
|
|
||||||
Link::strength_t drive1) const;
|
|
||||||
virtual NetExpr*elaborate_expr(Design*des, NetScope*scope,
|
virtual NetExpr*elaborate_expr(Design*des, NetScope*scope,
|
||||||
int expr_wid, bool sys_task_arg) const;
|
int expr_wid, bool sys_task_arg) const;
|
||||||
virtual NetExpr*elaborate_pexpr(Design*des, NetScope*sc) const;
|
virtual NetExpr*elaborate_pexpr(Design*des, NetScope*sc) const;
|
||||||
|
|
@ -743,13 +557,6 @@ class PECallFunction : public PExpr {
|
||||||
|
|
||||||
NetExpr* elaborate_sfunc_(Design*des, NetScope*scope, int expr_wid) const;
|
NetExpr* elaborate_sfunc_(Design*des, NetScope*scope, int expr_wid) const;
|
||||||
NetExpr* elaborate_access_func_(Design*des, NetScope*scope, int expr_wid) const;
|
NetExpr* elaborate_access_func_(Design*des, NetScope*scope, int expr_wid) const;
|
||||||
NetNet* elaborate_net_sfunc_(Design*des, NetScope*scope,
|
|
||||||
unsigned width,
|
|
||||||
const NetExpr* rise,
|
|
||||||
const NetExpr* fall,
|
|
||||||
const NetExpr* decay,
|
|
||||||
Link::strength_t drive0,
|
|
||||||
Link::strength_t drive1) const;
|
|
||||||
unsigned test_width_sfunc_(Design*des, NetScope*scope,
|
unsigned test_width_sfunc_(Design*des, NetScope*scope,
|
||||||
unsigned min, unsigned lval,
|
unsigned min, unsigned lval,
|
||||||
bool&unsized_flag) const;
|
bool&unsized_flag) const;
|
||||||
|
|
|
||||||
3118
elab_net.cc
3118
elab_net.cc
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue