Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想要参数化模块。它有以下定义:
module example (...); parameter A = 2; parameter B = 2; parameter C = A + B; endmodule
但是,当我打印出参数值时,我得到 A = 2、B = 2 和 C = 1...任何想法为什么?
找到了解决方案 - 使用 localparam。
module example (...); parameter A = 2; parameter B = 2; localparam C = A + B; endmodule