data/full_repos/permissive/205673649/MIPS/Source/unidad_deteccion_riesgo.v
data/verilator_xmls/3e8b9147-7121-47aa-89f0-56b35f5be76a.xml
module unidad_deteccion_riesgo
#(
    parameter LEN = 32,
    parameter NB_ADDRESS_REGISTROS=5  
)
(
    input [NB_ADDRESS_REGISTROS-1:0] i_rs_id,
    input [NB_ADDRESS_REGISTROS-1:0] i_rt_id,
    input [NB_ADDRESS_REGISTROS-1:0] i_rt_ex, 
    input i_memRead_ex,
    output o_flag_stall
);
    assign o_flag_stall = ( (i_memRead_ex == 1'b1) & ((i_rs_id==i_rt_ex) | (i_rt_id==i_rt_ex))) ? 1'b1 : 1'b0;
    
endmodule
module unidad_deteccion_riesgo
#(
    parameter LEN = 32,
    parameter NB_ADDRESS_REGISTROS=5  
)
(
    input [NB_ADDRESS_REGISTROS-1:0] i_rs_id,
    input [NB_ADDRESS_REGISTROS-1:0] i_rt_id,
    input [NB_ADDRESS_REGISTROS-1:0] i_rt_ex, 
    input i_memRead_ex,
    output o_flag_stall
);

    assign o_flag_stall = ( (i_memRead_ex == 1'b1) & ((i_rs_id==i_rt_ex) | (i_rt_id==i_rt_ex))) ? 1'b1 : 1'b0;
    
endmodule