OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /openrisc/trunk/orpsocv2/bench/verilog/vpi/verilog
    from Rev 49 to Rev 397
    Reverse comparison

Rev 49 → Rev 397

/vpi_debug_defines.v
198,7 → 198,7
`define CMD_RESET 4'hb
`define CMD_READ_JTAG_ID 4'hc
`define CMD_GDB_DETACH 4'hd
 
`define CMD_WB_RD8 4'he /* Byte read is useful with a system with byte peripherals! */
// commands:
// 4'h1 jtag set instruction register (input: instruction value)
// 4'h2 set debug chain (dbg_set_command here) (input: chain value)
/vpi_debug_module.v
58,6 → 58,7
reg tdi;
reg [31:0] in_data_le, in_data_be;
reg [31:0] incoming_word;
reg err;
integer i;
114,7 → 115,7
// (this is around 20k ns if the flash_crash boot code
// is being booted from, else much bigger, around 10mil ns)
#200_000 main;
#2_000 main;
end
193,7 → 194,7
debug_cpu_rd_ctrl(cpu_ctrl_val);
 
$return_command_data(cpu_ctrl_val);
$return_command_data(4,cpu_ctrl_val);
end
 
287,9 → 288,20
 
wb_read_32(cmd_data, cmd_adr, 16'h3);
 
$return_command_data(cmd_data);
$return_command_data(4,cmd_data);
end
 
`CMD_WB_RD8 :
begin
 
$get_command_address(cmd_adr);
 
wb_read_8(cmd_data, cmd_adr, 16'h0);
 
$return_command_data(1,cmd_data);
end
`CMD_WB_BLOCK_WR32 :
begin
322,7 → 334,7
read_id_code(id);
$return_command_data(id);
$return_command_data(4,id);
end
329,7 → 341,7
`CMD_GDB_DETACH :
begin
 
$display("Debugging client disconnected. Finishing simulation");
$display("(%t)(%m)Debugging client disconnected. Finishing simulation", $time);
$finish();
694,9 → 706,27
if (length>3)
$display("WARNING: Only first data word is stored for writting ( See module %m)");
end
endtask
endtask // wb_read_32
 
// 8-bit read from the wishbone
task wb_read_8;
 
output [31:0] data;
 
input [`DBG_WB_ADR_LEN -1:0] addr;
input [`DBG_WB_LEN_LEN -1:0] length;
 
begin
debug_wishbone_wr_comm(`DBG_WB_READ8, addr, length, 1'b0);
last_wb_cmd = `DBG_WB_READ8; last_wb_cmd_text = "DBG_WB_READ8";
length_global = length + 1;
debug_wishbone_go(1'b1, 1'b0);
data = data_storage[0];
end
endtask // wb_read_8
 
 
// block 32-bit read from the wishbone
// assumes data will be stored into data_storage[]
task wb_block_read_32;
991,16 → 1021,27
gen_clk(1);
if (i[4:0] == 31) // Latching data
if (i[2:0] == 7) // Latching data
incoming_word = {incoming_word[23:0],in_data_be[7:0]};
 
if (i[4:0] == 31)
begin
data_storage[word_pointer] = in_data_be;
data_storage[word_pointer] = incoming_word;
`ifdef DEBUG_INFO
$display("\t\tin_data_be = 0x%x", in_data_be);
$display("\t\tin_data_be = 0x%x", incoming_word);
`endif
word_pointer = word_pointer + 1;
end
end // for (i=0; i<(length_global<<3); i=i+1)
// Copy in any leftovers
if (length_global[1:0] != 0)
begin
data_storage[word_pointer] = incoming_word;
`ifdef DEBUG_INFO
$display("\t\tin_data_be = 0x%x", incoming_word);
`endif
end
end

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.