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

Subversion Repositories 8051

[/] [8051/] [trunk/] [rtl/] [verilog/] [oc8051_rom.v] - Diff between revs 109 and 149

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

Rev 109 Rev 149
Line 42... Line 42...
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
//
//
// CVS Revision History
// CVS Revision History
//
//
// $Log: not supported by cvs2svn $
// $Log: not supported by cvs2svn $
 
// Revision 1.2  2003/04/03 19:17:19  simont
 
// add `include "oc8051_defines.v"
 
//
// Revision 1.1  2003/04/02 11:16:22  simont
// Revision 1.1  2003/04/02 11:16:22  simont
// initial inport
// initial inport
//
//
// Revision 1.4  2002/10/23 17:00:18  simont
// Revision 1.4  2002/10/23 17:00:18  simont
// signal es_int=1'b0
// signal es_int=1'b0
Line 54... Line 57...
// prepared header
// prepared header
//
//
//
//
`include "oc8051_defines.v"
`include "oc8051_defines.v"
 
 
module oc8051_rom (rst, clk, addr, ea_int, data1, data2, data3);
module oc8051_rom (rst, clk, addr, ea_int, data_o);
 
 
//parameter INT_ROM_WID= 15;
//parameter INT_ROM_WID= 15;
 
 
input rst, clk;
input rst, clk;
input [15:0] addr;
input [15:0] addr;
//input [22:0] addr;
//input [22:0] addr;
output ea_int;
output ea_int;
output [7:0] data1, data2, data3;
output [31:0] data_o;
 
 
reg [7:0] data1, data2, data3;
reg [31:0] data_o;
wire ea;
wire ea;
 
 
reg ea_int;
reg ea_int;
 
 
 
 
Line 883... Line 886...
 
 
`else
`else
 
 
 
 
reg [7:0] buff [0:65535]; //64kb
reg [7:0] buff [0:65535]; //64kb
//reg [7:0] buff [8388607:0];  //8Mb
 
 
 
assign ea = 1'b0;
assign ea = 1'b0;
 
 
initial
initial
begin
begin
//  for (i=0; i<65536; i=i+1)
 
//    buff [i] = 8'h00;
 
  $readmemh("../../../bench/in/oc8051_rom.in", buff);
  $readmemh("../../../bench/in/oc8051_rom.in", buff);
end
end
 
 
always @(posedge clk or posedge rst)
always @(posedge clk or posedge rst)
 if (rst)
 if (rst)
   ea_int <= #1 1'b1;
   ea_int <= #1 1'b1;
  else ea_int <= #1 !ea;
  else ea_int <= #1 !ea;
 
 
always @(posedge clk)
always @(posedge clk)
begin
begin
  data1 <= #1 buff [addr];
  data_o <= #1 {buff[addr+3], buff[addr+2], buff[addr+1], buff[addr]};
  data2 <= #1 buff [addr+1];
 
  data3 <= #1 buff [addr+2];
 
end
end
 
 
 
 
`endif
`endif
 
 

powered by: WebSVN 2.1.0

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