mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-27 19:05:52 +00:00
Support using IDs as const values
This commit is contained in:
parent
de37070c28
commit
0275f979c8
2 changed files with 7 additions and 1 deletions
|
@ -188,6 +188,11 @@ bool is_reg_wire(RTLIL::SigSpec sig, std::string ®_name)
|
|||
|
||||
void dump_const(std::ostream &f, const RTLIL::Const &data, int width = -1, int offset = 0, bool no_decimal = false, bool escape_comment = false)
|
||||
{
|
||||
if (data.flags & RTLIL::CONST_FLAG_ID) {
|
||||
f << stringf("%s", data.decode_string().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
bool set_signed = (data.flags & RTLIL::CONST_FLAG_SIGNED) != 0;
|
||||
if (width < 0)
|
||||
width = data.bits.size() - offset;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue