Generate VHDL for no-op statements
This commit is contained in:
parent
e258058cf1
commit
d36bbec5b5
|
|
@ -117,6 +117,16 @@ static int draw_block(vhdl_process *proc, ivl_statement_t stmt)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* A no-op statement. This corresponds to a `null' statement in
|
||||
* VHDL.
|
||||
*/
|
||||
static int draw_noop(vhdl_process *proc, ivl_statement_t stmt)
|
||||
{
|
||||
proc->add_stmt(new vhdl_null_stmt());
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Generate VHDL statements for the given Verilog statement and
|
||||
* add them to the given VHDL process.
|
||||
|
|
@ -128,6 +138,8 @@ int draw_stmt(vhdl_process *proc, ivl_statement_t stmt)
|
|||
return draw_stask(proc, stmt);
|
||||
case IVL_ST_BLOCK:
|
||||
return draw_block(proc, stmt);
|
||||
case IVL_ST_NOOP:
|
||||
return draw_noop(proc, stmt);
|
||||
default:
|
||||
error("No VHDL translation for statement at %s:%d (type = %d)",
|
||||
ivl_stmt_file(stmt), ivl_stmt_lineno(stmt),
|
||||
|
|
|
|||
|
|
@ -363,3 +363,8 @@ void vhdl_const_string::emit(std::ofstream &of, int level) const
|
|||
// isn't always strictly necessary)
|
||||
of << "String'(\"" << value_ << "\")";
|
||||
}
|
||||
|
||||
void vhdl_null_stmt::emit(std::ofstream &of, int level) const
|
||||
{
|
||||
of << "null;";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -142,6 +142,12 @@ public:
|
|||
};
|
||||
|
||||
|
||||
class vhdl_null_stmt : public vhdl_seq_stmt {
|
||||
public:
|
||||
void emit(std::ofstream &of, int level) const;
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* A procedure call. Which is a statement, unlike a function
|
||||
* call which is an expression.
|
||||
|
|
|
|||
Loading…
Reference in New Issue