gpt4 book ai didi

verilog - Verilog 中的对数

转载 作者:行者123 更新时间:2023-12-03 01:26:38 32 4
gpt4 key购买 nike

我在verilog中有一个语句,看起来像integer level = log(N)(其中N是一个参数,级别待确定)但我知道我无法在verilog中执行复杂的数学语句,所以我想知道是否有替代解决方案来解决上述问题?

感谢任何反馈!

最佳答案

如果您想要计算以 2 为底的对数,则可以使用内置函数 $clog2()

关于verilog - Verilog 中的对数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5602167/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com