parent
644465ccc1
commit
365960df9d
2
PExpr.h
2
PExpr.h
|
|
@ -66,7 +66,7 @@ class PExpr : public LineInfo {
|
||||||
// The expr_type is an output argument that gives the
|
// The expr_type is an output argument that gives the
|
||||||
// calculated type for the expression.
|
// calculated type for the expression.
|
||||||
//
|
//
|
||||||
// The unsigned_flag is set to true if the expression is
|
// The unsized_flag is set to true if the expression is
|
||||||
// unsized and therefore expandable. This happens if a
|
// unsized and therefore expandable. This happens if a
|
||||||
// sub-expression is an unsized literal. Some expressions make
|
// sub-expression is an unsized literal. Some expressions make
|
||||||
// special use of that.
|
// special use of that.
|
||||||
|
|
|
||||||
|
|
@ -1660,7 +1660,7 @@ unsigned PEIdent::test_width(Design*des, NetScope*scope,
|
||||||
}
|
}
|
||||||
|
|
||||||
// This is a parameter. If it is sized (meaning it was
|
// This is a parameter. If it is sized (meaning it was
|
||||||
// declared with range expresions) then the range
|
// declared with range expressions) then the range
|
||||||
// expressions would have been caught above. So if we
|
// expressions would have been caught above. So if we
|
||||||
// got there there we know this is an unsized constant.
|
// got there there we know this is an unsized constant.
|
||||||
expr_width_ = par->expr_width();
|
expr_width_ = par->expr_width();
|
||||||
|
|
@ -2766,7 +2766,7 @@ unsigned PEUnary::test_width(Design*des, NetScope*scope,
|
||||||
{
|
{
|
||||||
switch (op_) {
|
switch (op_) {
|
||||||
case '!':
|
case '!':
|
||||||
case '&': // Reductin AND
|
case '&': // Reduction AND
|
||||||
case '|': // Reduction OR
|
case '|': // Reduction OR
|
||||||
case '^': // Reduction XOR
|
case '^': // Reduction XOR
|
||||||
case 'A': // Reduction NAND (~&)
|
case 'A': // Reduction NAND (~&)
|
||||||
|
|
|
||||||
|
|
@ -2238,7 +2238,7 @@ NetProc* PCondit::elaborate(Design*des, NetScope*scope) const
|
||||||
cerr << get_fileline() << ": debug: Elaborate condition statement"
|
cerr << get_fileline() << ": debug: Elaborate condition statement"
|
||||||
<< " with conditional: " << *expr_ << endl;
|
<< " with conditional: " << *expr_ << endl;
|
||||||
|
|
||||||
// Run a test-width on the shift amount so that its types are
|
// Run a test-width on the condition so that its types are
|
||||||
// worked out for elaboration later on.
|
// worked out for elaboration later on.
|
||||||
ivl_variable_type_t rtype = IVL_VT_NO_TYPE;
|
ivl_variable_type_t rtype = IVL_VT_NO_TYPE;
|
||||||
bool rflag = false;
|
bool rflag = false;
|
||||||
|
|
@ -2260,7 +2260,7 @@ NetProc* PCondit::elaborate(Design*des, NetScope*scope) const
|
||||||
// If the condition of the conditional statement is constant,
|
// If the condition of the conditional statement is constant,
|
||||||
// then look at the value and elaborate either the if statement
|
// then look at the value and elaborate either the if statement
|
||||||
// or the else statement. I don't need both. If there is no
|
// or the else statement. I don't need both. If there is no
|
||||||
// else_ statement, the use an empty block as a noop.
|
// else_ statement, then use an empty block as a noop.
|
||||||
if (NetEConst*ce = dynamic_cast<NetEConst*>(expr)) {
|
if (NetEConst*ce = dynamic_cast<NetEConst*>(expr)) {
|
||||||
verinum val = ce->value();
|
verinum val = ce->value();
|
||||||
if (debug_elaborate) {
|
if (debug_elaborate) {
|
||||||
|
|
@ -2853,7 +2853,7 @@ NetProc* PEventStatement::elaborate_st(Design*des, NetScope*scope,
|
||||||
assert(expr_[idx]->expr());
|
assert(expr_[idx]->expr());
|
||||||
|
|
||||||
/* If the expression is an identifier that matches a
|
/* If the expression is an identifier that matches a
|
||||||
named event, then handle this case all at once at
|
named event, then handle this case all at once and
|
||||||
skip the rest of the expression handling. */
|
skip the rest of the expression handling. */
|
||||||
|
|
||||||
if (PEIdent*id = dynamic_cast<PEIdent*>(expr_[idx]->expr())) {
|
if (PEIdent*id = dynamic_cast<PEIdent*>(expr_[idx]->expr())) {
|
||||||
|
|
|
||||||
|
|
@ -254,7 +254,7 @@ NetNet* NetEBComp::synthesize(Design*des, NetScope*scope)
|
||||||
//
|
//
|
||||||
// Note 2: The operand expressions may be signed even if the
|
// Note 2: The operand expressions may be signed even if the
|
||||||
// sig that comes out of synthesis is unsigned. The $signed()
|
// sig that comes out of synthesis is unsigned. The $signed()
|
||||||
// function markes the expression but doesn't change the
|
// function marks the expression but doesn't change the
|
||||||
// underlying signals.
|
// underlying signals.
|
||||||
bool signed_compare = left_->has_sign() && right_->has_sign();
|
bool signed_compare = left_->has_sign() && right_->has_sign();
|
||||||
if (debug_elaborate) {
|
if (debug_elaborate) {
|
||||||
|
|
@ -945,7 +945,7 @@ NetNet* NetEUReduce::synthesize(Design*des, NetScope*scope)
|
||||||
* for us:
|
* for us:
|
||||||
*
|
*
|
||||||
* - Expression elaboration already converted the offset expression into
|
* - Expression elaboration already converted the offset expression into
|
||||||
* cannonical form, so we don't have to worry about that here.
|
* canonical form, so we don't have to worry about that here.
|
||||||
*/
|
*/
|
||||||
NetNet* NetESelect::synthesize(Design *des, NetScope*scope)
|
NetNet* NetESelect::synthesize(Design *des, NetScope*scope)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue