简体   繁体   English

Verilog中的SystemVerilog typedef等效项

[英]SystemVerilog typedef equivalent in Verilog

Is there any construct I can use in Verilog that would be equal to SystemVerilog's typedef ? 我可以在Verilog中使用与SystemVerilog的typedef相等的任何构造吗?

I know that in SV I can create my own names for type definitions and use it when building up complicated array definitions. 我知道在SV中,我可以为类型定义创建自己的名称,并在构建复杂的数组定义时使用它。 I know that typedef doesn't exist in Verilog standard (ie Verilog-1995). 我知道在Verilog标准(即Verilog-1995)中不存在typedef But is it possible to somehow bypass it? 但是有可能绕开它吗?

Almost all current tools that support Verilog today also support the typedef construct in SystemVerilog. 今天,几乎所有支持Verilog的当前工具也都支持SystemVerilog中的typedef构造。 I would spend your time figuring out how to move to SystemVerilog rather than trying to workaround the lack of it in Verilog. 我将花费您的时间弄清楚如何迁移到SystemVerilog,而不是尝试解决Verilog中缺少它的问题。 The closest thing you could use in Verilog would be a `define statement. 您在Verilog中可以使用的最接近的东西是`define语句。

SystemVerilog具有用户定义的数据类型,而Verilog没有。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM