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

Subversion Repositories 8051

[/] [8051/] [trunk/] [rtl/] [verilog/] [oc8051_ram_top.v] - Diff between revs 46 and 82

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 46 Rev 82
Line 42... Line 42...
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
//
//
// CVS Revision History
// CVS Revision History
//
//
// $Log: not supported by cvs2svn $
// $Log: not supported by cvs2svn $
 
// Revision 1.4  2002/09/30 17:33:59  simont
 
// prepared header
 
//
//
//
 
 
// synopsys translate_off
// synopsys translate_off
`include "oc8051_timescale.v"
`include "oc8051_timescale.v"
// synopsys translate_on
// synopsys translate_on
Line 65... Line 68...
// bit_data_in  (in)  bit data input [oc8051_alu.desCy]
// bit_data_in  (in)  bit data input [oc8051_alu.desCy]
// bit_data_out (out)  bit data output [oc8051_ram_sel.bit_in]
// bit_data_out (out)  bit data output [oc8051_ram_sel.bit_in]
//
//
 
 
input clk, wr, bit_addr, bit_data_in, rst;
input clk, wr, bit_addr, bit_data_in, rst;
input [7:0] rd_addr, wr_addr, wr_data;
input [7:0] wr_data;
 
input [7:0] rd_addr, wr_addr;
output bit_data_out;
output bit_data_out;
output [7:0] rd_data;
output [7:0] rd_data;
 
 
 
 
// rd_addr_m    read address modified
// rd_addr_m    read address modified
// wr_addr_m    write address modified
// wr_addr_m    write address modified
// wr_data_m    write data modified
// wr_data_m    write data modified
reg [7:0] rd_addr_m, wr_addr_m, wr_data_m;
reg [7:0] wr_data_m;
 
reg [7:0] rd_addr_m, wr_addr_m;
 
 
// bit_addr_r   bit addresable instruction (registerd)
// bit_addr_r   bit addresable instruction (registerd)
reg bit_addr_r;
reg bit_addr_r;
reg [2:0] bit_select;
reg [2:0] bit_select;
 
 
Line 108... Line 113...
end
end
 
 
always @(wr_addr or bit_addr_r)
always @(wr_addr or bit_addr_r)
begin
begin
  casex ({bit_addr_r, wr_addr[7]})
  casex ({bit_addr_r, wr_addr[7]})
    2'b10: wr_addr_m = {4'b0010, wr_addr[6:3]};
    2'b10: wr_addr_m = {8'h00, 4'b0010, wr_addr[6:3]};
    2'b11: wr_addr_m = {1'b1, wr_addr[6:3], 3'b000};
    2'b11: wr_addr_m = {8'h00, 1'b1, wr_addr[6:3], 3'b000};
    default: wr_addr_m = wr_addr;
    default: wr_addr_m = wr_addr;
  endcase
  endcase
end
end
 
 
always @(rd_data or bit_select or bit_data_in or wr_data or bit_addr_r)
always @(rd_data or bit_select or bit_data_in or wr_data or bit_addr_r)

powered by: WebSVN 2.1.0

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