diff options
author | Clifford Wolf <clifford@clifford.at> | 2016-02-13 16:52:16 +0100 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2016-02-13 16:52:16 +0100 |
commit | 0d7fd2585e8daec77870f19264644a204e0a8ed4 (patch) | |
tree | 680308c755ff95dde092e26d4e0e33eccc249f62 /passes/fsm | |
parent | a75f94ec4ae411d98d9882e423e0ae02eda4bd37 (diff) | |
download | yosys-0d7fd2585e8daec77870f19264644a204e0a8ed4.tar.gz yosys-0d7fd2585e8daec77870f19264644a204e0a8ed4.tar.bz2 yosys-0d7fd2585e8daec77870f19264644a204e0a8ed4.zip |
Added "int ceil_log2(int)" function
Diffstat (limited to 'passes/fsm')
-rw-r--r-- | passes/fsm/fsm_recode.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/passes/fsm/fsm_recode.cc b/passes/fsm/fsm_recode.cc index aa1e99bef..a4b45295e 100644 --- a/passes/fsm/fsm_recode.cc +++ b/passes/fsm/fsm_recode.cc @@ -85,7 +85,7 @@ static void fsm_recode(RTLIL::Cell *cell, RTLIL::Module *module, FILE *fm_set_fs fsm_data.state_bits = fsm_data.state_table.size(); } else if (encoding == "binary") { - int new_num_state_bits = ceil(log2(fsm_data.state_table.size())); + int new_num_state_bits = ceil_log2(fsm_data.state_table.size()); if (fsm_data.state_bits == new_num_state_bits) { log(" existing encoding is already a packed binary encoding.\n"); return; |