URL
https://opencores.org/ocsvn/8051/8051/trunk
[/] [8051/] [trunk/] [rtl/] [verilog/] [oc8051_psw.v] - Diff between revs 116 and 117
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 116 |
Rev 117 |
Line 42... |
Line 42... |
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
//
|
//
|
// CVS Revision History
|
// CVS Revision History
|
//
|
//
|
// $Log: not supported by cvs2svn $
|
// $Log: not supported by cvs2svn $
|
|
// Revision 1.10 2003/04/07 14:58:02 simont
|
|
// change sfr's interface.
|
|
//
|
// Revision 1.9 2003/01/13 14:14:41 simont
|
// Revision 1.9 2003/01/13 14:14:41 simont
|
// replace some modules
|
// replace some modules
|
//
|
//
|
// Revision 1.8 2002/11/05 17:23:54 simont
|
// Revision 1.8 2002/11/05 17:23:54 simont
|
// add module oc8051_sfr, 256 bytes internal ram
|
// add module oc8051_sfr, 256 bytes internal ram
|
Line 85... |
Line 88... |
input [7:0] wr_addr, data_in;
|
input [7:0] wr_addr, data_in;
|
|
|
output [1:0] bank_sel;
|
output [1:0] bank_sel;
|
output [7:0] data_out;
|
output [7:0] data_out;
|
|
|
reg [7:0] data;
|
reg [7:1] data;
|
wire wr_psw;
|
wire wr_psw;
|
|
|
assign wr_psw = (wr & (wr_addr==`OC8051_SFR_PSW) && !wr_bit);
|
assign wr_psw = (wr & (wr_addr==`OC8051_SFR_PSW) && !wr_bit);
|
|
|
assign bank_sel = wr_psw ? data_in[4:3]:data[4:3];
|
assign bank_sel = wr_psw ? data_in[4:3]:data[4:3];
|
assign data_out = data;
|
assign data_out = {data[7:1], p};
|
|
|
//
|
//
|
//case writing to psw
|
//case writing to psw
|
always @(posedge clk or posedge rst)
|
always @(posedge clk or posedge rst)
|
begin
|
begin
|
Line 132... |
Line 135... |
data[2] <= #1 ov_in;
|
data[2] <= #1 ov_in;
|
|
|
end
|
end
|
endcase
|
endcase
|
end
|
end
|
data[0] <= #1 p;
|
|
end
|
end
|
end
|
end
|
|
|
endmodule
|
endmodule
|
|
|
No newline at end of file
|
No newline at end of file
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.