top.v 341 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
module top
(
 input [1:0] x,
 input [1:0] y,
 input [1:0] z,
 input clk,

 input A,
 output reg B
 );
 
 initial begin
    B = 0;
 end

`ifndef BUG
always @(posedge clk) begin
    if (x || y && z)
        B <=  A & z;
    if (x || y && !z)
        B <=  A | x;
end
`else
always @(posedge clk) begin
    B =  z - y + x;
end
`endif

endmodule