mirror of
https://github.com/Silicon1602/srdl2sv.git
synced 2024-12-22 06:58:41 +00:00
Closes #9: Error returns from regblock now actually get processed by AHB widget
This commit is contained in:
parent
031e413d17
commit
33c92c8994
@ -135,7 +135,7 @@ module srdl2sv_amba3ahblite #(
|
|||||||
begin
|
begin
|
||||||
// Defaults
|
// Defaults
|
||||||
HREADYOUT = 1'b1;
|
HREADYOUT = 1'b1;
|
||||||
HRESP = 1'b0;
|
HRESP = OKAY;
|
||||||
|
|
||||||
// When reading back, the data of the bit that was accessed over the bus
|
// When reading back, the data of the bit that was accessed over the bus
|
||||||
// should be at byte 0 of the HRDATA bus and bits that were not accessed
|
// should be at byte 0 of the HRDATA bus and bits that were not accessed
|
||||||
@ -174,15 +174,17 @@ module srdl2sv_amba3ahblite #(
|
|||||||
widget_if_w_vld_next = operation_q == WRITE;
|
widget_if_w_vld_next = operation_q == WRITE;
|
||||||
widget_if_r_vld_next = operation_q == READ;
|
widget_if_r_vld_next = operation_q == READ;
|
||||||
|
|
||||||
if (widget_if.err && widget_if.rdy)
|
if (HTRANS == BUSY)
|
||||||
begin
|
|
||||||
fsm_next = FSM_ERR_0;
|
|
||||||
end
|
|
||||||
else if (HTRANS == BUSY)
|
|
||||||
begin
|
begin
|
||||||
// Wait
|
// Wait
|
||||||
fsm_next = FSM_TRANS;
|
fsm_next = FSM_TRANS;
|
||||||
end
|
end
|
||||||
|
else if (widget_if.err && widget_if.rdy)
|
||||||
|
begin
|
||||||
|
HREADYOUT = 0;
|
||||||
|
HRESP = ERROR;
|
||||||
|
fsm_next = FSM_ERR_1;
|
||||||
|
end
|
||||||
else if (HTRANS == NONSEQ)
|
else if (HTRANS == NONSEQ)
|
||||||
begin
|
begin
|
||||||
// Another unrelated access is coming
|
// Another unrelated access is coming
|
||||||
@ -306,3 +308,4 @@ module srdl2sv_amba3ahblite #(
|
|||||||
endgenerate
|
endgenerate
|
||||||
|
|
||||||
endmodule
|
endmodule
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user