Guest
Hi,
I want to make an assignment to a output signal in the same block but I need to keep some information and for that I need to do a double assignment in the same block. Can you please take a look:
parameter VALID_BIT = 0;
[...]
if(data_in_cfg[VALID_BIT] == 0) begin
data_out_cfg <= {DATA_WIDTH{1'b1}};
data_out_cfg[VALID_BIT] <= 1'b0;
end else begin
data_out_cfg <= (data_in_cfg >> BIT_NUMBERS);
data_out_cfg[VALID_BIT] <= 1'b1;
end
I want to make an assignment to a output signal in the same block but I need to keep some information and for that I need to do a double assignment in the same block. Can you please take a look:
parameter VALID_BIT = 0;
[...]
if(data_in_cfg[VALID_BIT] == 0) begin
data_out_cfg <= {DATA_WIDTH{1'b1}};
data_out_cfg[VALID_BIT] <= 1'b0;
end else begin
data_out_cfg <= (data_in_cfg >> BIT_NUMBERS);
data_out_cfg[VALID_BIT] <= 1'b1;
end