Fixed a small bug in log generation and did some cleanup

This commit is contained in:
(Tim) Efthimis Kritikos 2023-10-31 19:01:34 +00:00
parent 8a62b89a13
commit 49335a2c2f
3 changed files with 12 additions and 11 deletions

View File

@ -276,11 +276,11 @@ always @(posedge clock) begin
/*************** DATA READ ***************/
`define finished_read \
DATA_DIR <= 0; \
VALID_DATA <= 1;\
if ( read_request == 0 ) begin \
biu_state <= `BIU_NEXT_ACTION;\
VALID_DATA <= 0;\
end
end else \
VALID_DATA <= 1;
`BIU_GET_ALIGNED_DATA:begin
`ifdef DEBUG_DATA_READ_WRITES
if(Wbit==1)

View File

@ -65,6 +65,7 @@ initial begin
json_file_descriptor=0;
`endif
sane=0;
finish=0;
end
//integer killswitch=0;
@ -81,7 +82,7 @@ end
`ifdef OTUPUT_JSON_STATISTICS
reg first_json_cycle;
always @(negedge clock)begin
if(finish < 2 && json_file_descriptor!=0)begin
if(finish < 2 && json_file_descriptor!=0 && sane)begin
$fdisplay(json_file_descriptor,"%s{\"C\":%0d,\"L1\":%0d,\"VDI\":%0d,\"JMP\":%0d}",first_json_cycle?"":",",cycles,L1_SIZE_STAT,VALID_INSTRUCTION_STAT,jump_req);
first_json_cycle <= 0;
end