URL
https://opencores.org/ocsvn/apbi2c/apbi2c/trunk
[/] [apbi2c/] [trunk/] [rtl/] [fifo.v] - Diff between revs 16 and 18
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 16 |
Rev 18 |
Line 24... |
Line 24... |
////
|
////
|
////
|
////
|
////
|
////
|
////
|
////
|
//// Author(s): - Felipe Fernandes Da Costa, fefe2560@gmail.com
|
//// Author(s): - Felipe Fernandes Da Costa, fefe2560@gmail.com
|
//// Ronal Dario Celaya
|
//// Ronal Dario Celaya ,rcelaya.dario@gmail.com
|
////
|
////
|
/////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////
|
////
|
////
|
////
|
////
|
//// Copyright (C) 2009 Authors and OPENCORES.ORG
|
//// Copyright (C) 2009 Authors and OPENCORES.ORG
|
Line 96... |
Line 96... |
|
|
reg [AWIDTH-1:0] wr_ptr;
|
reg [AWIDTH-1:0] wr_ptr;
|
reg [AWIDTH-1:0] rd_ptr;
|
reg [AWIDTH-1:0] rd_ptr;
|
reg [AWIDTH:0] counter;
|
reg [AWIDTH:0] counter;
|
|
|
reg last_was_write;
|
|
|
|
//Write pointer
|
//Write pointer
|
always@(posedge clock)
|
always@(posedge clock)
|
begin
|
begin
|
if (reset)
|
if (reset)
|
Line 144... |
Line 143... |
counter <= counter + 1'b1;
|
counter <= counter + 1'b1;
|
end
|
end
|
end
|
end
|
end
|
end
|
|
|
assign f_full = (counter == DEPTH -1) ; //(!last_was_write | last_position != {AWIDTH{1'b0}} )? 1'b1:1'b0;
|
assign f_full = (counter == DEPTH- 1) ;
|
assign f_empty = (counter == {AWIDTH{1'b0}}); //(last_was_write)? 1'b1:1'b0;
|
assign f_empty = (counter == {AWIDTH{1'b0}});
|
assign wr_en_ram = wr_en;
|
assign wr_en_ram = wr_en;
|
assign rd_en_ram = rd_en;
|
assign rd_en_ram = rd_en;
|
assign data_out = data_ram_out;
|
assign data_out = data_ram_out;
|
|
|
dp_ram #(DWIDTH, AWIDTH)
|
dp_ram #(DWIDTH, AWIDTH)
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.