我正在学习 Bluespec System Verilog。
在Shakti处理器的源代码中我找到了这个模块定义:
module mkuart_user#(parameter Bit#(16) baudrate)
(UserInterface#(addr_width,data_width, depth))
provisos(
Add#(a__, 8, data_width),
Add#(b__, 16, data_width),
Mul#(16, c__, data_width),
Mul#(8, d__, data_width),
Add#(2, e__, depth)
);
...some code....
我不明白是怎么回事
Add# and Mul# provisos work in this case.
从语言文档中我了解到
Add#(a__,8,data_width) means a__ + 8 = data_width
and
Mul#(16,c__,data_width)means 16 * c__ = data_width
但是 a__ 和 c__ 是从哪里来的? 我到处找,但没有找到任何东西。