3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-06-06 06:03:23 +00:00

Added AstNode::asInt()

This commit is contained in:
Clifford Wolf 2014-08-21 17:11:51 +02:00
parent 490d7a5bf2
commit 085c8e873d
3 changed files with 24 additions and 2 deletions

View file

@ -30,7 +30,7 @@ AST::AstNode *AST::dpi_call(const std::string &rtype, const std::string &fname,
if (argtypes[i] == "real" || argtypes[i] == "shortreal")
log(" arg %d (%s): %f\n", i, argtypes[i].c_str(), args[i]->asReal(args[i]->is_signed));
else
log(" arg %d (%s): %d\n", i, argtypes[i].c_str(), args[i]->bitsAsConst().as_int());
log(" arg %d (%s): %lld\n", i, argtypes[i].c_str(), (long long)args[i]->asInt(args[i]->is_signed));
if (rtype == "real" || rtype == "shortreal") {
newNode = new AstNode(AST_REALVALUE);