URL
https://opencores.org/ocsvn/v586/v586/trunk
Subversion Repositories v586
Compare Revisions
- This comparison shows the changes necessary to convert path
/v586/trunk
- from Rev 31 to Rev 32
- ↔ Reverse comparison
Rev 31 → Rev 32
/tb/extrom.v
0,0 → 1,48
/* verilator lint_off UNUSED */ |
/* verilator lint_off CASEX */ |
module extrom(clk,rstn,D,A,Q,WEN_BE,req_ram,ack_ram); |
|
output [15:0] Q; |
input clk,rstn; |
input [31:0] A; |
input [15:0] D; |
input [1:0] WEN_BE; |
input req_ram; |
output ack_ram; |
|
reg [7:0] Mem1 [255:0]; |
reg [7:0] Mem2 [255:0]; |
reg [7:0] Mem3 [255:0]; |
reg [7:0] Mem4 [255:0]; |
reg A1r; |
reg [31:0] Qint; |
wire [7:0] A0; |
|
assign A0 = A[9:2]; |
|
reg [5:0] dly_reg; |
|
assign ack_ram = dly_reg[0]; |
|
initial |
begin |
$readmemh("/home/leo/cpu/mem/boot-1.mem" , Mem1 , 0,255); |
$readmemh("/home/leo/cpu/mem/boot-2.mem" , Mem2 , 0,255); |
$readmemh("/home/leo/cpu/mem/boot-3.mem" , Mem3 , 0,255); |
$readmemh("/home/leo/cpu/mem/boot-4.mem" , Mem4 , 0,255); |
end |
|
always @(posedge clk or negedge rstn) |
if (rstn == 0) dly_reg <= 0; |
else if (req_ram == 0) dly_reg <=0; else dly_reg <= {dly_reg[4:0],req_ram}; |
|
// Read process |
always @(posedge clk) Qint[ 7: 0] <= Mem1[A0]; |
always @(posedge clk) Qint[15: 8] <= Mem2[A0]; |
always @(posedge clk) Qint[23:16] <= Mem3[A0]; |
always @(posedge clk) Qint[31:24] <= Mem4[A0]; |
always @(posedge clk) A1r <= A[1]; |
assign Q = A1r ? Qint[31:16] : Qint[15:0]; |
|
|
endmodule |
/tb/extram.v
1,3 → 1,5
/* verilator lint_off UNUSED */ |
/* verilator lint_off CASEX */ |
module extram(clk,DB,A,UB,LB,WEN,OE); |
|
input clk; |
31,30 → 33,17
end |
$display ("filled ram(s)..."); |
|
/* |
$readmemh("linuxstart-1.mem" , Mem1 , 32'h0010000/4,32'h0010000/4+14785/4); |
$readmemh("linuxstart-2.mem" , Mem2 , 32'h0010000/4,32'h0010000/4+14785/4); |
$readmemh("linuxstart-3.mem" , Mem3 , 32'h0010000/4,32'h0010000/4+14785/4); |
$readmemh("linuxstart-4.mem" , Mem4 , 32'h0010000/4,32'h0010000/4+14785/4); |
*/ |
$readmemh("/home/leo/cpu/mem/vmlinux-1.mem", Mem1 , 32'h0100000/4); |
$readmemh("/home/leo/cpu/mem/vmlinux-2.mem", Mem2 , 32'h0100000/4); |
$readmemh("/home/leo/cpu/mem/vmlinux-3.mem", Mem3 , 32'h0100000/4); |
$readmemh("/home/leo/cpu/mem/vmlinux-4.mem", Mem4 , 32'h0100000/4); |
|
$readmemh("vmlinux-1.mem", Mem1 , 32'h0100000/4,32'h0100000/4+2600000/4); |
$readmemh("vmlinux-2.mem", Mem2 , 32'h0100000/4,32'h0100000/4+2600000/4); |
$readmemh("vmlinux-3.mem", Mem3 , 32'h0100000/4,32'h0100000/4+2600000/4); |
$readmemh("vmlinux-4.mem", Mem4 , 32'h0100000/4,32'h0100000/4+2600000/4); |
|
$readmemh("/home/leo/cpu/mem/root-1.mem" , Mem1 , 32'h0400000/4); |
$readmemh("/home/leo/cpu/mem/root-2.mem" , Mem2 , 32'h0400000/4); |
$readmemh("/home/leo/cpu/mem/root-3.mem" , Mem3 , 32'h0400000/4); |
$readmemh("/home/leo/cpu/mem/root-4.mem" , Mem4 , 32'h0400000/4); |
|
$readmemh("root-1.mem" , Mem1 , 32'h0400000/4,32'h0400000/4+524287); |
$readmemh("root-2.mem" , Mem2 , 32'h0400000/4,32'h0400000/4+524287); |
$readmemh("root-3.mem" , Mem3 , 32'h0400000/4,32'h0400000/4+524287); |
$readmemh("root-4.mem" , Mem4 , 32'h0400000/4,32'h0400000/4+524287); |
/* |
$readmemh("boot-1.mem" , Mem1 , 32'h00ffc00/4,32'h00ffc00/4+1023); |
$readmemh("boot-2.mem" , Mem2 , 32'h00ffc00/4,32'h00ffc00/4+1023); |
$readmemh("boot-3.mem" , Mem3 , 32'h00ffc00/4,32'h00ffc00/4+1023); |
$readmemh("boot-4.mem" , Mem4 , 32'h00ffc00/4,32'h00ffc00/4+1023); |
*/ |
|
end |
|
// Read process |