jlon
Newbie level 4
I'm doing a simple Logical Unit module with a few logical functions working on 16-bit values. I want to trigger this logic with a statement run off clocked logic in another module... so I put a "strobe" input and made that the only thing that triggers:
But Symplify warns of an incomplete sensitivity list... Recently I've learned to heed the synthesizer's warnings, but is this one really valid, given what I mentioned about the design intention, above?
Code:
module mod_logic_unit (
input wire strobe,
input wire [1:0] operation,
input wire [15:0] opA, opB
output wire [15:0] result,
output wire Z, N, S, V
);
reg [15:0] resultr; assign result = resultr;
reg Zr; assign Z = Zr;
reg Nr; assign N = Nr;
reg Sr; assign S = Sr;
reg Vr; assign V = Vr;
always @ (strobe)
begin
resultr <= 16'h0000;
case (operation)
`LU_AND : resultr <= opA & opB;
`LU_OR : resultr <= opA | opB;
`LU_XOR : resultr <= opA ^ opB;
`LU_NOT : resultr <= ~opA;
endcase
Zr = (resultr == 0) ? 1 : 0;
Nr = (resultr[15] == 1) ? 1 : 0;
Vr = 0;
Sr = Nr ^ Vr ;
end
endmodule