More small fixes
This commit is contained in:
parent
694f708a32
commit
c7ddf3fa9e
@ -47,10 +47,10 @@ always @ ( * ) begin
|
||||
`ALU_OP_ADD_SIGNED_B: {C_FLAG,OUT[7:0]}=A[7:0]+SIGNED_8B;
|
||||
`ALU_OP_SUB: {C_FLAG,OUT[7:0]}=A[7:0]-B[7:0];
|
||||
`ALU_OP_SUB_REVERSE: {C_FLAG,OUT[7:0]}=B[7:0]-A[7:0];
|
||||
`ALU_OP_AND: begin C_FLAG=0;OUT=A&B; end
|
||||
`ALU_OP_OR: begin C_FLAG=0;OUT=A|B; end
|
||||
`ALU_OP_XOR: begin C_FLAG=0;OUT=A^B; end
|
||||
`ALU_OP_SHIFT_LEFT: begin C_FLAG=(A&16'h80)==16'h80;OUT=A<<B; end
|
||||
`ALU_OP_AND: begin C_FLAG=0;OUT[7:0]=A[7:0]&B[7:0]; end
|
||||
`ALU_OP_OR: begin C_FLAG=0;OUT[7:0]=A[7:0]|B[7:0]; end
|
||||
`ALU_OP_XOR: begin C_FLAG=0;OUT[7:0]=A[7:0]^B[7:0]; end
|
||||
`ALU_OP_SHIFT_LEFT: begin C_FLAG=(A&16'h80)==16'h80;OUT[7:0]=A[7:0]<<B; end
|
||||
endcase
|
||||
end
|
||||
end
|
||||
|
@ -67,14 +67,14 @@ initial begin
|
||||
$dumpvars(0,p,cycles);
|
||||
end
|
||||
`ifdef OTUPUT_JSON_STATISTICS
|
||||
if(!$value$plusargs("VERSION=%s",version)) version="unkown";
|
||||
if(!$value$plusargs("COMMIT=%s",commit)) commit="unkown";
|
||||
if($value$plusargs("STATS=%s",stats_name))begin
|
||||
json_file_descriptor=$fopen(stats_name,"w");
|
||||
$fdisplay(json_file_descriptor,"{\n\"L1_size\":%0d,\n\"9086 verison\":\"%s\",\n\"latest commit\":\"%s\",\n\"Cycles\":[",$rtoi($pow(2,`L1_CACHE_SIZE)),version,commit);
|
||||
first_json_cycle = 1;
|
||||
end else
|
||||
json_file_descriptor=0;
|
||||
if(!$value$plusargs("VERSION=%s",version)) version="unkown";
|
||||
if(!$value$plusargs("COMMIT=%s",commit)) commit="unkown";
|
||||
if($value$plusargs("STATS=%s",stats_name))begin
|
||||
json_file_descriptor=$fopen(stats_name,"w");
|
||||
$fdisplay(json_file_descriptor,"{\n\"L1_size\":%0d,\n\"9086 verison\":\"%s\",\n\"latest commit\":\"%s\",\n\"Cycles\":[",$rtoi($pow(2,`L1_CACHE_SIZE)),version,commit);
|
||||
first_json_cycle = 1;
|
||||
end else
|
||||
json_file_descriptor=0;
|
||||
`endif
|
||||
sane=0;
|
||||
finish=0;
|
||||
@ -117,25 +117,24 @@ always @(new_instruction) begin
|
||||
end
|
||||
`endif
|
||||
|
||||
reg [1:0] finish;
|
||||
|
||||
`ifndef YOSYS
|
||||
string memdump_name;
|
||||
`endif
|
||||
always @(posedge HALT) begin
|
||||
`ifndef YOSYS
|
||||
`ifndef SYNTHESIS
|
||||
|
||||
`ifdef OTUPUT_JSON_STATISTICS
|
||||
reg [128:0] instruction_count_temp;
|
||||
`endif
|
||||
|
||||
string memdump_name;
|
||||
|
||||
always @(posedge HALT) begin
|
||||
if($value$plusargs("MEMDUMP=%s",memdump_name))begin
|
||||
$writememh(memdump_name, sysmem.memory,0,32767);
|
||||
end
|
||||
`endif
|
||||
finish<=2'd1;
|
||||
end
|
||||
finish<=2'd1;
|
||||
end
|
||||
|
||||
`ifdef OTUPUT_JSON_STATISTICS
|
||||
reg [128:0] instruction_count_temp;
|
||||
`endif
|
||||
reg [1:0] finish;
|
||||
|
||||
`ifndef SYNTHESIS
|
||||
reg sane;
|
||||
reg [128:0] cycles;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user