data/full_repos/permissive/494148647/src/mbiobus/iobus_address_compare.v
data/verilator_xmls/8025cafb-c435-4d5b-9543-89441b74e1ec.xml
module iobus_address_compare#(
    parameter BASE_ADDRESS = 32'hc0000000,
    parameter ADDRESS_STRIDE = 32'h1000,
    parameter CORE_COUNT = 2
    ) (
    input addr_strobe,
    input [31:0] address,
    output [CORE_COUNT:0] strobe_out
    );

    reg [CORE_COUNT-1:0] core_strobe;
    integer i;


    assign strobe_out[CORE_COUNT-1:0] = core_strobe;


    assign strobe_out[CORE_COUNT] = ~(|core_strobe) & ~(&address[31:29]) & addr_strobe;

    always @(*) begin
        core_strobe = {CORE_COUNT{1'b0}};
        for (i = 0; i < CORE_COUNT; i = i+1)
            if (address == (BASE_ADDRESS + ADDRESS_STRIDE*i))
                core_strobe[i] = addr_strobe;
    end

endmodule
module iobus_address_compare#(
    parameter BASE_ADDRESS = 32'hc0000000,
    parameter ADDRESS_STRIDE = 32'h1000,
    parameter CORE_COUNT = 2
    ) (
    input addr_strobe,
    input [31:0] address,
    output [CORE_COUNT:0] strobe_out
    );


    reg [CORE_COUNT-1:0] core_strobe;
    integer i;


    assign strobe_out[CORE_COUNT-1:0] = core_strobe;


    assign strobe_out[CORE_COUNT] = ~(|core_strobe) & ~(&address[31:29]) & addr_strobe;

    always @(*) begin
        core_strobe = {CORE_COUNT{1'b0}};
        for (i = 0; i < CORE_COUNT; i = i+1)
            if (address == (BASE_ADDRESS + ADDRESS_STRIDE*i))
                core_strobe[i] = addr_strobe;
    end

endmodule