You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
6 lines
194 B
6 lines
194 B
3 years ago
|
def hazard_detector(if_id_rs1,if_id_rs2,id_ex_rd,id_ex_memread):
|
||
|
if id_ex_memread and (id_ex_rd==if_id_rs1 or id_ex_rd==if_id_rs2):
|
||
|
stall=1
|
||
|
else:
|
||
|
stall=0
|
||
|
return stall
|