projects
/
yosys.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
88fbdd4
)
Fixed handling of unsized constants in verilog frontend
author
Clifford Wolf
<clifford@clifford.at>
Fri, 24 Jan 2014 14:05:24 +0000
(15:05 +0100)
committer
Clifford Wolf
<clifford@clifford.at>
Fri, 24 Jan 2014 14:05:24 +0000
(15:05 +0100)
frontends/verilog/const2ast.cc
patch
|
blob
|
history
diff --git
a/frontends/verilog/const2ast.cc
b/frontends/verilog/const2ast.cc
index e38ff2047c9f6aa7be12c5374c6202dc2d18f5b2..c95ce5dc4a97af7c83320c65ec60f22cceb05e35 100644
(file)
--- a/
frontends/verilog/const2ast.cc
+++ b/
frontends/verilog/const2ast.cc
@@
-99,7
+99,7
@@
static void my_strtobin(std::vector<RTLIL::State> &data, const char *str, int le
int bits_per_digit = my_ilog2(base-1);
if (len_in_bits < 0)
- len_in_bits =
digits.size() * bits_per_digit
;
+ len_in_bits =
std::max<int>(digits.size() * bits_per_digit, 32)
;
data.clear();
data.resize(len_in_bits);
@@
-157,7
+157,7
@@
AstNode *VERILOG_FRONTEND::const2ast(std::string code, char case_type)
if (*endptr == 0)
return AstNode::mkconst_int(intval, true);
- //
variable length
constant
+ //
unsized
constant
if (str == endptr)
intval = -1;