AHDL: Cycle-Shared FIFO (csfifo)
This example implements a cycle-shared FIFO with 256 8-bit words.
The size of the FIFO is defined with the parameters LPM_WIDTH and
LPM_WIDTHAD.
This example uses an Include Statement (shown in blue text) to import the
contents of the Include File containing the Function Prototype for the csfifo function.
An Instance Declaration (shown in red text) implements an instance of the function.
If you are using this function in a FLEX 10K design, MAX+PLUS II will implement the FIFO in
embedded array blocks (EABs).
For more information on using this example in your project, go to:
fifo.tdf
INCLUDE "csfifo.inc";
SUBDESIGN fifo
(
dataf[7..0] : INPUT;
qf[7..0] : OUTPUT;
wreq : INPUT;
rreq : INPUT;
clk : INPUT;
clk2 : INPUT;
clr : INPUT;
threshlevel[7..0] : INPUT;
empty : OUTPUT;
full : OUTPUT;
threshold : OUTPUT;
)
VARIABLE
vxififo : csfifo
WITH (LPM_WIDTH = 8, LPM_NUMWORDS = 256);
BEGIN
-- Input definition for VXI FIFO
vxififo.clock = clk;
vxififo.clockx2 = clk2;
vxififo.clr = clr;
vxififo.data[7..0] = dataf[7..0];
vxififo.threshlevel[7..0] = threshlevel[7..0];
vxififo.wreq = wreq;
vxififo.rreq = rreq;
qf[7..0] = vxififo.q[7..0];
threshold = vxififo.threshold;
empty = vxififo.empty;
full = vxififo.full;
END;
Feedback
Did this information help you?
If not, please log onto mySupport to file a technical request or enhancement.
Altera does not warrant that this solution will work for the customer's intended purpose and disclaims all liability for use of or reliance on the solution.
|