data/full_repos/permissive/123218339/amIForwarding.v
data/verilator_xmls/3b5e198c-a110-4b11-8e40-865e4c6bcfb8.xml
module amIForwarding(clock, nrst, start, MY_NODE_ID, destinationID, iamForwarding, done);
	input clock, nrst, start;
	input [`WORD_WIDTH-1:0] MY_NODE_ID, destinationID;
    output iamForwarding, done;


    reg iamForwarding_buf, done_buf;
   
    always @ (posedge clock) begin
        if (!nrst) begin
            iamForwarding_buf <= 0;
            done_buf <= 0;
        end
        else begin
            if (start && !done_buf) begin
                if (MY_NODE_ID == destinationID)
                    iamForwarding_buf = 1;
                else begin
                    iamForwarding_buf = 0;

                end
                done_buf = 1;
            end
        end
    end

    assign iamForwarding = iamForwarding_buf;
    assign done = done_buf;
endmodule
module amIForwarding(clock, nrst, start, MY_NODE_ID, destinationID, iamForwarding, done);

	input clock, nrst, start;
	input [`WORD_WIDTH-1:0] MY_NODE_ID, destinationID;
    output iamForwarding, done;


    reg iamForwarding_buf, done_buf;
   
    always @ (posedge clock) begin
        if (!nrst) begin
            iamForwarding_buf <= 0;
            done_buf <= 0;
        end
        else begin
            if (start && !done_buf) begin
                if (MY_NODE_ID == destinationID)
                    iamForwarding_buf = 1;
                else begin
                    iamForwarding_buf = 0;

                end
                done_buf = 1;
            end
        end
    end

    assign iamForwarding = iamForwarding_buf;
    assign done = done_buf;
endmodule