📄 orcacomp.vhd
字号:
COMPONENT sp8kaGENERIC( DATA_WIDTH : in Integer := 18; REGMODE : String := "NOREG"; RESETMODE : String := "SYNC"; CSDECODE : String := "000"; WRITEMODE : String := "NORMAL"; GSR : String := "DISABLED"; initval_00 : string := "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000"; initval_01 : string := "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000"; initval_02 : string := "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000"; initval_03 : string := "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000"; initval_04 : string := "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000"; initval_05 : string := "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000"; initval_06 : string := "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000"; initval_07 : string := "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000"; initval_08 : string := "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000"; initval_09 : string := "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000"; initval_0a : string := "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000"; initval_0b : string := "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000"; initval_0c : string := "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000"; initval_0d : string := "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000"; initval_0e : string := "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000"; initval_0f : string := "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000"; initval_10 : string := "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000"; initval_11 : string := "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000"; initval_12 : string := "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000"; initval_13 : string := "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000"; initval_14 : string := "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000"; initval_15 : string := "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000"; initval_16 : string := "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000"; initval_17 : string := "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000"; initval_18 : string := "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000"; initval_19 : string := "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000"; initval_1a : string := "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000"; initval_1b : string := "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000"; initval_1c : string := "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000"; initval_1d : string := "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000"; initval_1e : string := "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000"; initval_1f : string := "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000" );PORT( di0, di1, di2, di3, di4, di5, di6, di7, di8 : in std_logic := 'X'; di9, di10, di11, di12, di13, di14, di15, di16, di17 : in std_logic := 'X'; ad0, ad1, ad2, ad3, ad4, ad5, ad6, ad7, ad8 : in std_logic := 'X'; ad9, ad10, ad11, ad12 : in std_logic := 'X'; ce, clk, we, cs0, cs1, cs2, rst : in std_logic := 'X'; do0, do1, do2, do3, do4, do5, do6, do7, do8 : out std_logic := 'X'; do9, do10, do11, do12, do13, do14, do15, do16, do17 : out std_logic := 'X' );END COMPONENT;--COMPONENT bbwPORT( b: INOUT std_logic := 'X'; i: IN std_logic := 'X'; t: IN std_logic := 'X'; o: OUT std_logic);END COMPONENT;--COMPONENT obwPORT( i: IN std_logic := 'X'; t: IN std_logic := 'X'; o: OUT std_logic);END COMPONENT;--COMPONENT ilvdsPORT( a : IN std_logic := 'X'; an: IN std_logic := 'X'; z : OUT std_logic );END COMPONENT;--COMPONENT olvdsPORT( a : IN std_logic := 'X'; z : OUT std_logic ; zn : OUT std_logic );END COMPONENT;--COMPONENT bbPORT( b: INOUT std_logic := 'X'; i: IN std_logic := 'X'; t: IN std_logic := 'X'; o: OUT std_logic);END COMPONENT;--COMPONENT bbpdPORT( b: INOUT std_logic := 'X'; i: IN std_logic := 'X'; t: IN std_logic := 'X'; o: OUT std_logic);END COMPONENT;--COMPONENT bbpuPORT( b: INOUT std_logic := 'X'; i: IN std_logic := 'X'; t: IN std_logic := 'X'; o: OUT std_logic);END COMPONENT;--COMPONENT ibPORT( i: IN std_logic := 'X'; o: OUT std_logic);END COMPONENT;--COMPONENT ibpdPORT( i: IN std_logic := 'X'; o: OUT std_logic);END COMPONENT;--COMPONENT ibpuPORT( i: IN std_logic := 'X'; o: OUT std_logic);END COMPONENT;--COMPONENT obPORT( i: IN std_logic := 'X'; o: OUT std_logic);END COMPONENT;--COMPONENT obzPORT( i: IN std_logic := 'X'; t: IN std_logic := 'X'; o: OUT std_logic);END COMPONENT;--COMPONENT obzpdPORT( i: IN std_logic := 'X'; t: IN std_logic := 'X'; o: OUT std_logic);END COMPONENT;--COMPONENT obzpuPORT( i: IN std_logic := 'X'; t: IN std_logic := 'X'; o: OUT std_logic);END COMPONENT;--COMPONENT dcsGENERIC( DCSMODE : String := "POS");PORT( clk0 : IN std_logic; clk1 : IN std_logic; sel : IN std_logic; dcsout : OUT std_logic);END COMPONENT;--component EPLLB generic( FIN : string := "100.0"; CLKI_DIV : string := "1"; CLKOP_DIV : string := "8"; CLKFB_DIV : string := "1"; FDEL : string := "1"; FB_MODE : string := "CLOCKTREE"; WAKE_ON_LOCK : string := "off"); port( CLKI : in STD_ULOGIC; RST : in STD_ULOGIC; CLKFB : in STD_ULOGIC; CLKOP : out STD_ULOGIC; LOCK : out STD_ULOGIC );end component;--component EHXPLLB generic( FIN : string := "100.0"; CLKI_DIV : string := "1"; CLKOP_DIV : string := "1"; CLKFB_DIV : string := "1"; FDEL : string := "1"; FB_MODE : string := "CLOCKTREE"; CLKOK_DIV : string := "2"; WAKE_ON_LOCK : string := "off"; DELAY_CNTL : string := "STATIC"; PHASEADJ : string := "0"; DUTY : string := "4"); port( CLKI : in STD_ULOGIC; CLKFB : in STD_ULOGIC; RST : in STD_ULOGIC := '0'; DDAMODE : in STD_ULOGIC; DDAIZR : in STD_ULOGIC; DDAILAG : in STD_ULOGIC; DDAIDEL0 : in STD_ULOGIC; DDAIDEL1 : in STD_ULOGIC; DDAIDEL2 : in STD_ULOGIC; CLKOP : out STD_ULOGIC; CLKOS : out STD_ULOGIC; CLKOK : out STD_ULOGIC; LOCK : out STD_ULOGIC; DDAOZR : out STD_ULOGIC; DDAOLAG : out STD_ULOGIC; DDAODEL0 : out STD_ULOGIC; DDAODEL1 : out STD_ULOGIC; DDAODEL2 : out STD_ULOGIC);end component;--------Component ORCALUT4------component ORCALUT4 generic( INIT : bit_vector); port( A : in STD_ULOGIC; B : in STD_ULOGIC; C : in STD_ULOGIC; D : in STD_ULOGIC; Z : out STD_ULOGIC );end component;------Component ORCALUT5------component ORCALUT5 generic( INIT : bit_vector); port( A : in STD_ULOGIC; B : in STD_ULOGIC; C : in STD_ULOGIC; D : in STD_ULOGIC; E : in STD_ULOGIC; Z : out STD_ULOGIC );end component;------Component ORCALUT6------component ORCALUT6 generic( INIT : bit_vector); port( A : in STD_ULOGIC; B : in STD_ULOGIC; C : in STD_ULOGIC; D : in STD_ULOGIC; E : in STD_ULOGIC; F : in STD_ULOGIC; Z : out STD_ULOGIC );end component;------Component ORCALUT7------component ORCALUT7 generic( INIT : bit_vector); port( A : in STD_ULOGIC; B : in STD_ULOGIC; C : in STD_ULOGIC; D : in STD_ULOGIC; E : in STD_ULOGIC; F : in STD_ULOGIC; G : in STD_ULOGIC; Z : out STD_ULOGIC );end component;------Component ORCALUT8------component ORCALUT8 generic( INIT : bit_vector); port( A : in STD_ULOGIC; B : in STD_ULOGIC; C : in STD_ULOGIC; D : in STD_ULOGIC; E : in STD_ULOGIC; F : in STD_ULOGIC; G : in STD_ULOGIC; H : in STD_ULOGIC; Z : out STD_ULOGIC );end component;--component MULT2 port( A0 : in STD_ULOGIC; A1 : in STD_ULOGIC; A2 : in STD_ULOGIC; A3 : in STD_ULOGIC; B0 : in STD_ULOGIC; B1 : in STD_ULOGIC; B2 : in STD_ULOGIC; B3 : in STD_ULOGIC; CI : in STD_ULOGIC; P0 : out STD_ULOGIC; P1 : out STD_ULOGIC; CO : out STD_ULOGIC);end component;--component IDDRXB generic( REGSET : string := "RESET"); port( D : in STD_LOGIC; ECLK : in STD_LOGIC; SCLK : in STD_LOGIC; LSR : in STD_LOGIC; CE : in STD_LOGIC; DDRCLKPOL : in STD_LOGIC; QA : out STD_LOGIC; QB : out STD_LOGIC );end component;--component ODDRXB generic( REGSET : string := "RESET"); port( DA : in STD_LOGIC; DB : in STD_LOGIC; CLK : in STD_LOGIC; LSR : in STD_LOGIC; Q : out STD_LOGIC );end component;--component CCU2 generic ( inject1_0 : string := "YES"; inject1_1 : string := "YES"; init0: string := "0x0000"; init1: string := "0x0000" ); port ( A0,A1 : in std_ulogic; B0,B1 : in std_ulogic; C0,C1 : in std_ulogic; D0,D1 : in std_ulogic; CIN : in std_ulogic; S0,S1 : out std_ulogic; COUT0,COUT1 : out std_ulogic );end component;--component DQSBUFB generic(DEL_ADJ : string := "PLUS"; DEL_VAL : string := "0"); port( DQSI : in STD_LOGIC; CLK : in STD_LOGIC; READ : in STD_LOGIC; DQSDEL : in STD_LOGIC; DQSO : out STD_LOGIC; DDRCLKPOL : out STD_LOGIC; DQSC : out STD_LOGIC; PRMBDET : out STD_LOGIC );end component;--component DQSDLL generic(DEL_ADJ : string := "PLUS"; DEL_VAL : string := "0"; LOCK_SENSITIVITY : string := "LOW"); port( CLK : in STD_ULOGIC; RST : in STD_ULOGIC; UDDCNTL : in STD_ULOGIC; LOCK : out STD_ULOGIC; DQSDEL : out STD_ULOGIC );end component;--end Components;package body Components is function str2std(L: string) return std_logic_vector is variable vpos : integer := 0; -- Index of last valid bit in val. variable lpos : integer; -- Index of next unused char in L. variable val : std_logic_vector(1 to L'right); -- lenth of the vector. begin lpos := L'left; while lpos <= L'right and vpos < VAL'length loop if L(lpos) = '0' then vpos := vpos + 1; val(vpos) := '0'; elsif L(lpos) = '1' then vpos := vpos + 1; val(vpos) := '1'; else exit; -- Bit values must be '0' or '1'. end if; lpos := lpos + 1; end loop; return val; end str2std; function str2int( L : string) return integer is variable ok: boolean; variable pos: integer:=1; variable sign: integer := 1; variable rval: integer := 0; variable value: integer := 0; begin ok := FALSE; if pos < L'right and (L(pos) = '-' or L(pos) = '+') then if L(pos) = '-' then sign := -1; end if; pos := pos + 1; end if; -- Once the optional leading sign is removed, an integer can -- contain only the digits '0' through '9' and the '_' -- (underscore) character. VHDL disallows two successive -- underscores, and leading or trailing underscores. if pos <= L'right and L(pos) >= '0' and L(pos) <= '9' then while pos <= L'right loop if L(pos) >= '0' and L(pos) <= '9' then rval := rval * 10 + character'pos(L(pos)) - character'pos('0'); ok := TRUE; elsif L(pos) = '_' then if pos = L'right or L(pos + 1) < '0' or L(pos + 1) > '9' then ok := FALSE; exit; end if; else exit; end if; pos := pos + 1; end loop; end if; value := sign * rval; RETURN(value); end str2int; function str2real( L: string) return real is variable p
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -