verilog int unsigned vhdl等效
我想访问 VHDL 中的 Verilog 模块。其中,Verilog 模块具有输入参数:
parameter int unsigned RST_CYC = 100_000;
以下内容是否与映射的正确 VHDL 等效?
constant RST_CYC : unsigned := d"100_000";
I would like to access a Verilog module within VHDL. Among others, the Verilog module has the input parameter:
parameter int unsigned RST_CYC = 100_000;
Is the following the correct VHDL equivalent for mapping?
constant RST_CYC : unsigned := d"100_000";
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我建议坚持使用整数(或自然数,即不能为负数的整数)。所以在这种情况下:
声明一个信号将如下所示:
如果可以的话,坚持使用整数。如果您需要转换为
unsigned
或std_logic_vector
那么您可以执行以下操作:I recommend sticking with integers (or naturals, which are integers that can't go negative). So in this case:
Declaring a signal would look like this:
Stick with integers if you can. If you NEED to convert to
unsigned
orstd_logic_vector
then you can do something like: