Hello Sabina,
Thank you for your support.
Here is the Verilog code
module main(K,Y,B,A);
output K;
output Y;
input A;
input B;
reg [1:0] m;
reg [1:0] n;
always @(m[1],m[0],B, A)
begin
case({B,A})
2'b11 : begin
m[0] = 1'b0 ;
m[1] = 1'b1 ;
end
default :
begin
m[0] = 1'b1 ;
m[1] = 1'b1 ;
end
endcase
Y = m[0];
K = m[1];
case ({m[1],m[0]})
2'b11 : begin
n[0] = 1'b0 ;
n[1] = 1'b1 ;
end
default :
begin
n[0] = 1'b1 ;
n[1] = 1'b1 ;
end
endcase
Y = n[0];
K = n[1];
end
endmodule
The idea is I want to assign sequentially different values to the outputs (Y and K), in the first place it gets the values from the first case block, then output gets an update from the second case block.