fix bus debugger for read program

This commit is contained in:
Raphael Jacquot 2019-03-18 07:33:52 +01:00
parent dd9faf509e
commit 6fcf04a5c0
2 changed files with 8 additions and 6 deletions

View file

@ -237,7 +237,7 @@ always @(posedge i_clk) begin
end
`ifdef SIM
if (cycle_ctr == 320) begin
if (cycle_ctr == 370) begin
bus_halt <= 1'b1;
$display("BUS %0d: [%d] enough cycles for now", phase, cycle_ctr);
end

View file

@ -289,9 +289,11 @@ always @(posedge i_clk) begin
bus_busy <= 1'b1;
/* data for the debugger */
dbg_bus_info <= 1'b1;
dbg_bus_action <= { 1'b0, ctrl_unit_prog_data[4]};
dbg_bus_data <= ctrl_unit_prog_data[3:0];
if (!ctrl_unit_prog_data[5]) begin
dbg_bus_info <= 1'b1;
dbg_bus_action <= { 1'b0, ctrl_unit_prog_data[4]};
dbg_bus_data <= ctrl_unit_prog_data[3:0];
end
end
/*
* nothing to send, see if we can read, and do it
@ -324,8 +326,8 @@ always @(posedge i_clk) begin
bus_busy <= 1'b0;
end
/* at that poing, weread data in for the debugger */
if (!bus_busy && !alu_busy) begin
/* at that poing, we read data in for the debugger */
if ((!bus_busy && !alu_busy) || bus_read) begin
dbg_bus_info <= 1'b1;
dbg_bus_action <= 2'b10;
dbg_bus_data <= i_bus_nibble_in;