core_debug: Stop logging 256 cycles after trigger

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
pull/267/head
Paul Mackerras 4 years ago
parent 470f1b2140
commit 3361c460b8

@ -114,6 +114,7 @@ architecture behave of core_debug is
signal do_dmi_log_rd : std_ulogic; signal do_dmi_log_rd : std_ulogic;
signal dmi_read_log_data : std_ulogic; signal dmi_read_log_data : std_ulogic;
signal dmi_read_log_data_1 : std_ulogic; signal dmi_read_log_data_1 : std_ulogic;
signal log_trigger_delay : integer range 0 to 255 := 0;


begin begin
-- Single cycle register accesses on DMI except for GSPR data -- Single cycle register accesses on DMI except for GSPR data
@ -152,9 +153,15 @@ begin
if (rst) then if (rst) then
stopping <= '0'; stopping <= '0';
terminated <= '0'; terminated <= '0';
log_trigger_delay <= 0;
else else
if do_log_trigger = '1' then if do_log_trigger = '1' or log_trigger_delay /= 0 then
if log_trigger_delay = 255 then
log_dmi_trigger(1) <= '1'; log_dmi_trigger(1) <= '1';
log_trigger_delay <= 0;
else
log_trigger_delay <= log_trigger_delay + 1;
end if;
end if; end if;
-- Edge detect on dmi_req for 1-shot pulses -- Edge detect on dmi_req for 1-shot pulses
dmi_req_1 <= dmi_req; dmi_req_1 <= dmi_req;

Loading…
Cancel
Save