MCPcopy Create free account
hub / github.com/chipsalliance/Surelog / decompiledValue

Method decompiledValue

src/Expression/Value.cpp:298–324  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

296}
297
298std::string SValue::decompiledValue() {
299 Value::Type valueType = getType();
300 std::string result;
301 switch (valueType) {
302 case Value::Type::Scalar:
303 result = std::to_string(m_value.u_int);
304 break;
305 case Value::Type::Double:
306 result = std::to_string(m_value.d_int);
307 break;
308 case Value::Type::Binary:
309 result = (m_size ? std::to_string(m_size) : "") + std::string("'b") +
310 NumUtils::toBinary(m_size, m_value.d_int);
311 break;
312 case Value::Type::Hexadecimal:
313 result = (m_size ? std::to_string(m_size) : "") + std::string("'h") +
314 NumUtils::binToHex(NumUtils::toBinary(m_size, m_value.d_int));
315 break;
316 case Value::Type::Integer:
317 result = std::to_string(m_value.s_int);
318 break;
319 default:
320 result = std::to_string(m_value.u_int);
321 break;
322 }
323 return result;
324}
325
326int32_t SValue::vpiValType() {
327 Value::Type valueType = getType();

Callers 8

constantFromValueMethod · 0.80
compileTypeDefMethod · 0.80
compileTypespecMethod · 0.80
lateBindingMethod · 0.80
getValueMethod · 0.80
compileExpressionMethod · 0.80
elab_parameters_Method · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected