📄 a_fefifo_n4f.tdf
字号:
--a_fefifo ALLOW_RWCYCLE_WHEN_FULL=OFF LPM_NUMWORDS=8192 lpm_widthad=13 OVERFLOW_CHECKING=ON UNDERFLOW_CHECKING=ON aclr clock empty full rreq sclr usedw_out wreq
--VERSION_BEGIN 4.0 cbx_fifo_common 2003:08:19:18:07:00:SJ cbx_lpm_compare 2003:09:10:10:27:44:SJ cbx_lpm_counter 2003:12:16:17:25:44:SJ cbx_lpm_decode 2003:03:25:17:43:04:SJ cbx_mgl 2004:01:13:14:00:54:SJ cbx_stratixii 2003:11:06:16:12:54:SJ VERSION_END
-- Copyright (C) 1988-2004 Altera Corporation
-- Any megafunction design, and related netlist (encrypted or decrypted),
-- support information, device programming or simulation file, and any other
-- associated documentation or information provided by Altera or a partner
-- under Altera's Megafunction Partnership Program may be used only
-- to program PLD devices (but not masked PLD devices) from Altera. Any
-- other use of such megafunction design, netlist, support information,
-- device programming or simulation file, or any other related documentation
-- or information is prohibited for any other purpose, including, but not
-- limited to modification, reverse engineering, de-compiling, or use with
-- any other silicon devices, unless such use is explicitly licensed under
-- a separate agreement with Altera or a megafunction partner. Title to the
-- intellectual property, including patents, copyrights, trademarks, trade
-- secrets, or maskworks, embodied in any such megafunction design, netlist,
-- support information, device programming or simulation file, or any other
-- related documentation or information provided by Altera or a megafunction
-- partner, remains with Altera, the megafunction partner, or their respective
-- licensors. No other licenses, including any licenses needed under any third
-- party's intellectual property, are provided herein.
FUNCTION lpm_counter (aclr, aload, aset, cin, clk_en, clock, cnt_en, data[LPM_WIDTH-1..0], sclr, sload, sset, updown)
WITH ( lpm_avalue, lpm_direction, lpm_modulus, lpm_svalue, lpm_width)
RETURNS ( cout, eq[15..0], q[LPM_WIDTH-1..0]);
--synthesis_resources = lpm_counter 1 lut 2
SUBDESIGN a_fefifo_n4f
(
aclr : input;
clock : input;
empty : output;
full : output;
rreq : input;
sclr : input;
usedw_out[12..0] : output;
wreq : input;
)
VARIABLE
b_full : dffe;
b_non_empty : dffe;
count_usedw : lpm_counter
WITH (
lpm_width = 13
);
equal_af1[12..0] : WIRE;
equal_one[12..0] : WIRE;
is_almost_empty0 : WIRE;
is_almost_empty1 : WIRE;
is_almost_empty10 : WIRE;
is_almost_empty11 : WIRE;
is_almost_empty12 : WIRE;
is_almost_empty2 : WIRE;
is_almost_empty3 : WIRE;
is_almost_empty4 : WIRE;
is_almost_empty5 : WIRE;
is_almost_empty6 : WIRE;
is_almost_empty7 : WIRE;
is_almost_empty8 : WIRE;
is_almost_empty9 : WIRE;
is_almost_full0 : WIRE;
is_almost_full1 : WIRE;
is_almost_full10 : WIRE;
is_almost_full11 : WIRE;
is_almost_full12 : WIRE;
is_almost_full2 : WIRE;
is_almost_full3 : WIRE;
is_almost_full4 : WIRE;
is_almost_full5 : WIRE;
is_almost_full6 : WIRE;
is_almost_full7 : WIRE;
is_almost_full8 : WIRE;
is_almost_full9 : WIRE;
usedw[12..0] : WIRE;
valid_rreq : WIRE;
valid_wreq : WIRE;
BEGIN
b_full.CLK = clock;
b_full.CLRN = (! aclr);
b_full.D = ((b_full.Q & (b_full.Q $ (sclr # rreq))) # (((! b_full.Q) & b_non_empty.Q) & ((! sclr) & ((is_almost_full12 & wreq) & (! rreq)))));
b_non_empty.CLK = clock;
b_non_empty.CLRN = (! aclr);
b_non_empty.D = (((b_full.Q & (b_full.Q $ sclr)) # (((! b_non_empty.Q) & wreq) & (! sclr))) # (((! b_full.Q) & b_non_empty.Q) & (((! b_full.Q) & b_non_empty.Q) $ (sclr # ((is_almost_empty12 & rreq) & (! wreq))))));
count_usedw.aclr = aclr;
count_usedw.clock = clock;
count_usedw.cnt_en = (valid_wreq $ valid_rreq);
count_usedw.sclr = sclr;
count_usedw.updown = valid_wreq;
empty = (! b_non_empty.Q);
equal_af1[] = ( B"0", B"0", B"0", B"0", B"0", B"0", B"0", B"0", B"0", B"0", B"0", B"0", B"0");
equal_one[] = ( B"1", B"1", B"1", B"1", B"1", B"1", B"1", B"1", B"1", B"1", B"1", B"1", B"0");
full = b_full.Q;
is_almost_empty0 = (usedw[0..0] $ equal_one[0..0]);
is_almost_empty1 = ((usedw[1..1] $ equal_one[1..1]) & is_almost_empty0);
is_almost_empty10 = ((usedw[10..10] $ equal_one[10..10]) & is_almost_empty9);
is_almost_empty11 = ((usedw[11..11] $ equal_one[11..11]) & is_almost_empty10);
is_almost_empty12 = ((usedw[12..12] $ equal_one[12..12]) & is_almost_empty11);
is_almost_empty2 = ((usedw[2..2] $ equal_one[2..2]) & is_almost_empty1);
is_almost_empty3 = ((usedw[3..3] $ equal_one[3..3]) & is_almost_empty2);
is_almost_empty4 = ((usedw[4..4] $ equal_one[4..4]) & is_almost_empty3);
is_almost_empty5 = ((usedw[5..5] $ equal_one[5..5]) & is_almost_empty4);
is_almost_empty6 = ((usedw[6..6] $ equal_one[6..6]) & is_almost_empty5);
is_almost_empty7 = ((usedw[7..7] $ equal_one[7..7]) & is_almost_empty6);
is_almost_empty8 = ((usedw[8..8] $ equal_one[8..8]) & is_almost_empty7);
is_almost_empty9 = ((usedw[9..9] $ equal_one[9..9]) & is_almost_empty8);
is_almost_full0 = (usedw[0..0] $ equal_af1[0..0]);
is_almost_full1 = ((usedw[1..1] $ equal_af1[1..1]) & is_almost_full0);
is_almost_full10 = ((usedw[10..10] $ equal_af1[10..10]) & is_almost_full9);
is_almost_full11 = ((usedw[11..11] $ equal_af1[11..11]) & is_almost_full10);
is_almost_full12 = ((usedw[12..12] $ equal_af1[12..12]) & is_almost_full11);
is_almost_full2 = ((usedw[2..2] $ equal_af1[2..2]) & is_almost_full1);
is_almost_full3 = ((usedw[3..3] $ equal_af1[3..3]) & is_almost_full2);
is_almost_full4 = ((usedw[4..4] $ equal_af1[4..4]) & is_almost_full3);
is_almost_full5 = ((usedw[5..5] $ equal_af1[5..5]) & is_almost_full4);
is_almost_full6 = ((usedw[6..6] $ equal_af1[6..6]) & is_almost_full5);
is_almost_full7 = ((usedw[7..7] $ equal_af1[7..7]) & is_almost_full6);
is_almost_full8 = ((usedw[8..8] $ equal_af1[8..8]) & is_almost_full7);
is_almost_full9 = ((usedw[9..9] $ equal_af1[9..9]) & is_almost_full8);
usedw[] = count_usedw.q[];
usedw_out[] = usedw[];
valid_rreq = (rreq & b_non_empty.Q);
valid_wreq = (wreq & (! b_full.Q));
END;
--VALID FILE
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -