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.
我有一个 4 位输入 A,我想左右移动。我想知道是否可以只移动输入而不是将移动后的值分配给输出。例如我可以做 B = A<<1 但我不想创建一个新变量。输入本身可以移动,以便我可以在模拟后显示它吗?
您将无法从模块内部更改输入值,但您可以在连接到上述级别的端口时对其进行更改:
module foo (A); input [3:0] A; endmodule module tb; wire [3:0] signal = 4'b0101; foo u_foo (.A(signal << 1)); endmodule