📄 cntr_778.tdf
字号:
--lpm_counter DEVICE_FAMILY="Cyclone II" lpm_direction="UP" lpm_width=2 clock cnt_en q sclr
--VERSION_BEGIN 5.1 cbx_cycloneii 2005:08:30:10:31:44:SJ cbx_lpm_add_sub 2005:09:30:12:13:06:SJ cbx_lpm_compare 2005:07:12:04:41:28:SJ cbx_lpm_counter 2005:08:24:10:49:38:SJ cbx_lpm_decode 2005:04:28:09:28:48:SJ cbx_mgl 2005:10:09:07:39:04:SJ cbx_stratix 2005:10:07:15:53:08:SJ cbx_stratixii 2005:07:27:05:50:56:SJ VERSION_END
-- Copyright (C) 1991-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 cycloneii_lcell_comb (cin, dataa, datab, datac, datad)
WITH ( LUT_MASK, SUM_LUTC_INPUT)
RETURNS ( combout, cout);
FUNCTION cycloneii_lcell_ff (aclr, clk, datain, ena, sclr, sdata, sload)
RETURNS ( regout);
--synthesis_resources = lut 2 reg 2
SUBDESIGN cntr_778
(
clock : input;
cnt_en : input;
q[1..0] : output;
sclr : input;
)
VARIABLE
counter_comb_bita0 : cycloneii_lcell_comb
WITH (
LUT_MASK = "5A90",
SUM_LUTC_INPUT = "cin"
);
counter_comb_bita1 : cycloneii_lcell_comb
WITH (
LUT_MASK = "5A90",
SUM_LUTC_INPUT = "cin"
);
counter_reg_bit4a[1..0] : cycloneii_lcell_ff;
aclr_actual : WIRE;
clk_en : NODE;
data[1..0] : NODE;
external_cin : WIRE;
s_val[1..0] : WIRE;
safe_q[1..0] : WIRE;
sload : NODE;
sset : NODE;
updown_dir : WIRE;
BEGIN
counter_comb_bita[1..0].cin = ( counter_comb_bita[0].cout, external_cin);
counter_comb_bita[1..0].dataa = ( counter_reg_bit4a[1..0].regout);
counter_comb_bita[1..0].datab = ( updown_dir, updown_dir);
counter_comb_bita[1..0].datad = ( B"1", B"1");
counter_reg_bit4a[].aclr = aclr_actual;
counter_reg_bit4a[].clk = clock;
counter_reg_bit4a[].datain = ( counter_comb_bita[1..0].combout);
counter_reg_bit4a[].ena = (clk_en & (((sclr # sset) # sload) # cnt_en));
counter_reg_bit4a[].sdata = ((! sclr) & ((sset & s_val[]) # ((! sset) & data[])));
counter_reg_bit4a[].sload = ((sclr # sset) # sload);
aclr_actual = B"0";
clk_en = VCC;
data[] = GND;
external_cin = B"1";
q[] = safe_q[];
s_val[] = B"11";
safe_q[] = counter_reg_bit4a[].regout;
sload = GND;
sset = GND;
updown_dir = B"1";
END;
--VALID FILE
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -