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)
|