📄 a_dpfifo_3rr.tdf
字号:
--a_dpfifo ADD_RAM_OUTPUT_REGISTER="ON" ALLOW_RWCYCLE_WHEN_FULL="OFF" DEVICE_FAMILY="Cyclone" LPM_NUMWORDS=256 LPM_SHOWAHEAD="OFF" lpm_width=8 lpm_widthu=8 OVERFLOW_CHECKING="ON" UNDERFLOW_CHECKING="ON" aclr clock data empty full q rreq sclr usedw wreq lpm_hint="RAM_BLOCK_TYPE=M4K" RAM_BLOCK_TYPE="M4K"
--VERSION_BEGIN 5.0 cbx_altdpram 2004:11:30:11:29:56:SJ cbx_altsyncram 2005:03:24:13:58:56:SJ cbx_cycloneii 2004:12:20:14:28:52:SJ cbx_fifo_common 2004:12:13:14:26:24:SJ cbx_lpm_add_sub 2005:04:12:13:30:42:SJ cbx_lpm_compare 2004:11:30:11:30:40:SJ cbx_lpm_counter 2005:02:02:04:37:10:SJ cbx_lpm_decode 2004:12:13:14:19:12:SJ cbx_lpm_mux 2004:12:13:14:16:38:SJ cbx_mgl 2005:04:13:17:26:48:SJ cbx_scfifo 2005:03:10:10:52:20:SJ cbx_stratix 2005:03:14:17:09:02:SJ cbx_stratixii 2004:12:22:13:27:12:SJ cbx_util_mgl 2005:04:04:13:50:06:SJ VERSION_END
-- Copyright (C) 1988-2005 Altera Corporation
-- Your use of Altera Corporation's design tools, logic functions
-- and other software and tools, and its AMPP partner logic
-- functions, and any output files any of the foregoing
-- (including device programming or simulation files), and any
-- associated documentation or information are expressly subject
-- to the terms and conditions of the Altera Program License
-- Subscription Agreement, Altera MegaCore Function License
-- Agreement, or other applicable license agreement, including,
-- without limitation, that your use is for the sole purpose of
-- programming logic devices manufactured by Altera and sold by
-- Altera or its authorized distributors. Please refer to the
-- applicable agreement for further details.
FUNCTION altsyncram_vf31 (address_a[7..0], address_b[7..0], clock0, clock1, clocken1, data_a[7..0], wren_a)
RETURNS ( q_b[7..0]);
FUNCTION cntr_sd8 (aclr, clock, cnt_en, sclr)
RETURNS ( cout, q[6..0]);
FUNCTION cntr_bc7 (aclr, clock, cnt_en, sclr, updown)
RETURNS ( cout, q[7..0]);
FUNCTION cntr_td8 (aclr, clock, cnt_en, sclr)
RETURNS ( cout, q[7..0]);
--synthesis_resources = lut 47 M4K 1
SUBDESIGN a_dpfifo_3rr
(
aclr : input;
clock : input;
data[7..0] : input;
empty : output;
full : output;
q[7..0] : output;
rreq : input;
sclr : input;
usedw[7..0] : output;
wreq : input;
)
VARIABLE
FIFOram : altsyncram_vf31;
empty_dff : dffe;
full_dff : dffe;
low_addressa[7..0] : dffe;
rd_ptr_lsb : dffe;
usedw_is_0_dff : dffe;
usedw_is_1_dff : dffe;
wrreq_delay : dffe;
almost_full_comparer_aeb_int : WIRE;
almost_full_comparer_aeb : WIRE;
almost_full_comparer_dataa[7..0] : WIRE;
almost_full_comparer_datab[7..0] : WIRE;
two_comparison_aeb_int : WIRE;
two_comparison_aeb : WIRE;
two_comparison_dataa[7..0] : WIRE;
two_comparison_datab[7..0] : WIRE;
rd_ptr_msb : cntr_sd8;
usedw_counter : cntr_bc7;
wr_ptr : cntr_td8;
asynch_read_counter_enable : WIRE;
empty_out : WIRE;
full_out : WIRE;
pulse_ram_output : WIRE;
ram_read_address[7..0] : WIRE;
rd_ptr[7..0] : WIRE;
usedw_is_0 : WIRE;
usedw_is_1 : WIRE;
usedw_is_2 : WIRE;
usedw_will_be_0 : WIRE;
usedw_will_be_1 : WIRE;
valid_rreq : WIRE;
valid_wreq : WIRE;
wait_state : WIRE;
BEGIN
FIFOram.address_a[] = wr_ptr.q[];
FIFOram.address_b[] = ram_read_address[];
FIFOram.clock0 = clock;
FIFOram.clock1 = clock;
FIFOram.clocken1 = pulse_ram_output;
FIFOram.data_a[] = data[];
FIFOram.wren_a = valid_wreq;
empty_dff.CLK = clock;
empty_dff.CLRN = (! aclr);
empty_dff.D = ((! (usedw_will_be_0 # wait_state)) & (! sclr));
full_dff.CLK = clock;
full_dff.CLRN = (! aclr);
full_dff.D = ((! sclr) & (((valid_wreq & (! valid_rreq)) & almost_full_comparer_aeb) # (full_dff.Q & (! (valid_wreq $ valid_rreq)))));
low_addressa[].CLK = clock;
low_addressa[].CLRN = (! aclr);
low_addressa[].D = ((! sclr) & ((asynch_read_counter_enable & rd_ptr[]) # ((! asynch_read_counter_enable) & low_addressa[].Q)));
rd_ptr_lsb.CLK = clock;
rd_ptr_lsb.CLRN = (! aclr);
rd_ptr_lsb.D = ((! rd_ptr_lsb.Q) & (! sclr));
rd_ptr_lsb.ENA = (asynch_read_counter_enable # sclr);
usedw_is_0_dff.CLK = clock;
usedw_is_0_dff.CLRN = (! aclr);
usedw_is_0_dff.D = (! usedw_will_be_0);
usedw_is_1_dff.CLK = clock;
usedw_is_1_dff.CLRN = (! aclr);
usedw_is_1_dff.D = usedw_will_be_1;
wrreq_delay.CLK = clock;
wrreq_delay.CLRN = (! aclr);
wrreq_delay.D = ((! sclr) & valid_wreq);
IF (almost_full_comparer_dataa[] == almost_full_comparer_datab[]) THEN
almost_full_comparer_aeb_int = VCC;
ELSE
almost_full_comparer_aeb_int = GND;
END IF;
almost_full_comparer_aeb = almost_full_comparer_aeb_int;
almost_full_comparer_dataa[] = B"11111111";
almost_full_comparer_datab[] = usedw_counter.q[];
IF (two_comparison_dataa[] == two_comparison_datab[]) THEN
two_comparison_aeb_int = VCC;
ELSE
two_comparison_aeb_int = GND;
END IF;
two_comparison_aeb = two_comparison_aeb_int;
two_comparison_dataa[] = usedw_counter.q[];
two_comparison_datab[] = ( B"000000", B"1", B"0");
rd_ptr_msb.aclr = aclr;
rd_ptr_msb.clock = clock;
rd_ptr_msb.cnt_en = (asynch_read_counter_enable & (! rd_ptr_lsb.Q));
rd_ptr_msb.sclr = sclr;
usedw_counter.aclr = aclr;
usedw_counter.clock = clock;
usedw_counter.cnt_en = (valid_wreq $ valid_rreq);
usedw_counter.sclr = sclr;
usedw_counter.updown = valid_wreq;
wr_ptr.aclr = aclr;
wr_ptr.clock = clock;
wr_ptr.cnt_en = valid_wreq;
wr_ptr.sclr = sclr;
asynch_read_counter_enable = pulse_ram_output;
empty = empty_out;
empty_out = (! empty_dff.Q);
full = full_out;
full_out = full_dff.Q;
pulse_ram_output = valid_rreq;
q[] = FIFOram.q_b[];
ram_read_address[] = (((! asynch_read_counter_enable) & low_addressa[].Q) # (asynch_read_counter_enable & rd_ptr[]));
rd_ptr[] = ( rd_ptr_msb.q[], (! rd_ptr_lsb.Q));
usedw[] = usedw_counter.q[];
usedw_is_0 = (! usedw_is_0_dff.Q);
usedw_is_1 = usedw_is_1_dff.Q;
usedw_is_2 = two_comparison_aeb;
usedw_will_be_0 = (! ((! sclr) & (! (((usedw_is_1 & valid_rreq) & (! valid_wreq)) # (usedw_is_0 & (! (valid_wreq $ valid_rreq)))))));
usedw_will_be_1 = ((! sclr) & ((((usedw_is_2 & (! valid_wreq)) & valid_rreq) # (usedw_is_1 & (! (valid_wreq $ valid_rreq)))) # ((usedw_is_0 & valid_wreq) & (! valid_rreq))));
valid_rreq = (rreq & (! empty_out));
valid_wreq = (wreq & (! full_out));
wait_state = (usedw_will_be_1 & valid_wreq);
END;
--VALID FILE
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -