aboutsummaryrefslogtreecommitdiffstats
path: root/frontends/verilog/const2ast.cc
diff options
context:
space:
mode:
authorHenner Zeller <h.zeller@acm.org>2018-07-20 09:37:44 -0700
committerHenner Zeller <h.zeller@acm.org>2018-07-20 09:37:44 -0700
commit68b5d0c3b11588946982939c00fd6febe198e13f (patch)
tree5fa7d4a1b89185e008072bdbd51cbbcd05688280 /frontends/verilog/const2ast.cc
parent1de07eeee22499760d18e00ba32edf64564aa25e (diff)
downloadyosys-68b5d0c3b11588946982939c00fd6febe198e13f.tar.gz
yosys-68b5d0c3b11588946982939c00fd6febe198e13f.tar.bz2
yosys-68b5d0c3b11588946982939c00fd6febe198e13f.zip
Convert more log_error() to log_file_error() where possible.
Mostly statements that span over multiple lines and haven't been caught with the previous conversion.
Diffstat (limited to 'frontends/verilog/const2ast.cc')
-rw-r--r--frontends/verilog/const2ast.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/frontends/verilog/const2ast.cc b/frontends/verilog/const2ast.cc
index 4a58357bf..7848c626d 100644
--- a/frontends/verilog/const2ast.cc
+++ b/frontends/verilog/const2ast.cc
@@ -49,8 +49,7 @@ static int my_decimal_div_by_two(std::vector<uint8_t> &digits)
int carry = 0;
for (size_t i = 0; i < digits.size(); i++) {
if (digits[i] >= 10)
- log_error("Invalid use of [a-fxz?] in decimal constant at %s:%d.\n",
- current_filename.c_str(), get_line_num());
+ log_file_error(current_filename, get_line_num(), "Invalid use of [a-fxz?] in decimal constant.\n");
digits[i] += carry * 10;
carry = digits[i] % 2;
digits[i] /= 2;
@@ -105,8 +104,8 @@ static void my_strtobin(std::vector<RTLIL::State> &data, const char *str, int le
int bits_per_digit = my_ilog2(base-1);
for (auto it = digits.rbegin(), e = digits.rend(); it != e; it++) {
if (*it > (base-1) && *it < 0xf0)
- log_error("Digit larger than %d used in in base-%d constant at %s:%d.\n",
- base-1, base, current_filename.c_str(), get_line_num());
+ log_file_error(current_filename, get_line_num(), "Digit larger than %d used in in base-%d constant.\n",
+ base-1, base);
for (int i = 0; i < bits_per_digit; i++) {
int bitmask = 1 << i;
if (*it == 0xf0)
@@ -238,4 +237,3 @@ AstNode *VERILOG_FRONTEND::const2ast(std::string code, char case_type, bool warn
}
YOSYS_NAMESPACE_END
-