3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-06-12 00:53:26 +00:00

Added Verilog lexer and parser support for real values

This commit is contained in:
Clifford Wolf 2014-06-13 11:29:23 +02:00
parent 482d9208aa
commit 7ef0da32cd
4 changed files with 31 additions and 3 deletions

View file

@ -77,6 +77,7 @@ std::string AST::type2str(AstNodeType type)
X(AST_ARGUMENT)
X(AST_RANGE)
X(AST_CONSTANT)
X(AST_REALVALUE)
X(AST_CELLTYPE)
X(AST_IDENTIFIER)
X(AST_PREFIX)
@ -460,6 +461,10 @@ void AstNode::dumpVlog(FILE *f, std::string indent)
fprintf(f, "%zd'b %s", bits.size(), RTLIL::Const(bits).as_string().c_str());
break;
case AST_REALVALUE:
fprintf(f, "%e", realvalue);
break;
case AST_BLOCK:
if (children.size() == 1) {
children[0]->dumpVlog(f, indent);