mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-15 13:28:59 +00:00
Fix use of signed integers in JSON back-end
Signed-off-by: Clifford Wolf <clifford@clifford.at>
This commit is contained in:
parent
2353d28ff2
commit
1dd156f516
|
@ -93,8 +93,10 @@ struct JsonWriter
|
||||||
f << get_string(param.second.decode_string());
|
f << get_string(param.second.decode_string());
|
||||||
else if (GetSize(param.second.bits) > 32)
|
else if (GetSize(param.second.bits) > 32)
|
||||||
f << get_string(param.second.as_string());
|
f << get_string(param.second.as_string());
|
||||||
else
|
else if ((param.second.flags & RTLIL::ConstFlags::CONST_FLAG_SIGNED) != 0)
|
||||||
f << stringf("%d", param.second.as_int());
|
f << stringf("%d", param.second.as_int());
|
||||||
|
else
|
||||||
|
f << stringf("%u", param.second.as_int());
|
||||||
first = false;
|
first = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue