mirror of
https://github.com/wfjm/w11.git
synced 2026-04-25 20:01:57 +00:00
initial source upload (no docs yet)
This commit is contained in:
21
rtl/vlib/xlib/Makefile
Normal file
21
rtl/vlib/xlib/Makefile
Normal file
@@ -0,0 +1,21 @@
|
||||
# $Id: Makefile 311 2010-06-30 17:52:37Z mueller $
|
||||
#
|
||||
# Revision History:
|
||||
# Date Rev Version omment
|
||||
# 2007-12-08 100 1.0 Initial version
|
||||
#
|
||||
VBOM_all = $(wildcard *.vbom)
|
||||
NGC_all = $(VBOM_all:.vbom=.ngc)
|
||||
#
|
||||
.phony : all clean
|
||||
#
|
||||
all : $(NGC_all)
|
||||
#
|
||||
clean : ise_clean
|
||||
#
|
||||
#----
|
||||
#
|
||||
include $(RETROBASE)/rtl/vlib/Makefile.xflow
|
||||
#
|
||||
include $(VBOM_all:.vbom=.dep_xst)
|
||||
#
|
||||
4
rtl/vlib/xlib/iob_keeper_gen.vbom
Normal file
4
rtl/vlib/xlib/iob_keeper_gen.vbom
Normal file
@@ -0,0 +1,4 @@
|
||||
# libs
|
||||
../slvtypes.vhd
|
||||
# design
|
||||
iob_keeper_gen.vhd
|
||||
63
rtl/vlib/xlib/iob_keeper_gen.vhd
Normal file
63
rtl/vlib/xlib/iob_keeper_gen.vhd
Normal file
@@ -0,0 +1,63 @@
|
||||
-- $Id: iob_keeper_gen.vhd 314 2010-07-09 17:38:41Z mueller $
|
||||
--
|
||||
-- Copyright 2010- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
--
|
||||
-- This program is free software; you may redistribute and/or modify it under
|
||||
-- the terms of the GNU General Public License as published by the Free
|
||||
-- Software Foundation, either version 2, or at your option any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful, but
|
||||
-- WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
|
||||
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
-- for complete details.
|
||||
--
|
||||
------------------------------------------------------------------------------
|
||||
-- Module Name: iob_keeper_gen - sim
|
||||
-- Description: keeper for IOB, vector
|
||||
--
|
||||
-- Dependencies: -
|
||||
-- Test bench: -
|
||||
-- Target Devices: generic Spartan, Virtex
|
||||
-- Tool versions: xst 8.1, 8.2, 9.1, 9.2; ghdl 0.18-0.25
|
||||
-- Revision History:
|
||||
-- Date Rev Version Comment
|
||||
-- 2010-06-03 299 1.1 add explicit R_KEEP and driver
|
||||
-- 2008-05-22 148 1.0 Initial version
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
library ieee;
|
||||
use ieee.std_logic_1164.all;
|
||||
|
||||
use work.slvtypes.all;
|
||||
use work.xlib.all;
|
||||
|
||||
entity iob_keeper_gen is -- keeper for IOB, vector
|
||||
generic (
|
||||
DWIDTH : positive := 16); -- data port width
|
||||
port (
|
||||
PAD : inout slv(DWIDTH-1 downto 0) -- i/o pad
|
||||
);
|
||||
end iob_keeper_gen;
|
||||
|
||||
-- Is't possible to directly use 'PAD<='H' in proc_pad. Introduced R_KEEP and
|
||||
-- the explicit driver 'PAD<=R_KEEP' to state the keeper function more clearly.
|
||||
|
||||
architecture sim of iob_keeper_gen is
|
||||
signal R_KEEP : slv(DWIDTH-1 downto 0) := (others=>'W');
|
||||
begin
|
||||
|
||||
proc_keep: process (PAD)
|
||||
begin
|
||||
for i in PAD'range loop
|
||||
if PAD(i) = '1' then
|
||||
R_KEEP(i) <= 'H';
|
||||
elsif PAD(i) = '0' then
|
||||
R_KEEP(i) <= 'L';
|
||||
elsif PAD(i)='X' or PAD(i)='U' then
|
||||
R_KEEP(i) <= 'W';
|
||||
end if;
|
||||
end loop;
|
||||
PAD <= R_KEEP;
|
||||
end process proc_keep;
|
||||
|
||||
end sim;
|
||||
7
rtl/vlib/xlib/iob_reg_i.vbom
Normal file
7
rtl/vlib/xlib/iob_reg_i.vbom
Normal file
@@ -0,0 +1,7 @@
|
||||
# libs
|
||||
../slvtypes.vhd
|
||||
xlib.vhd
|
||||
# components
|
||||
iob_reg_i_gen.vbom
|
||||
# design
|
||||
iob_reg_i.vhd
|
||||
61
rtl/vlib/xlib/iob_reg_i.vhd
Normal file
61
rtl/vlib/xlib/iob_reg_i.vhd
Normal file
@@ -0,0 +1,61 @@
|
||||
-- $Id: iob_reg_i.vhd 314 2010-07-09 17:38:41Z mueller $
|
||||
--
|
||||
-- Copyright 2007- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
--
|
||||
-- This program is free software; you may redistribute and/or modify it under
|
||||
-- the terms of the GNU General Public License as published by the Free
|
||||
-- Software Foundation, either version 2, or at your option any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful, but
|
||||
-- WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
|
||||
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
-- for complete details.
|
||||
--
|
||||
------------------------------------------------------------------------------
|
||||
-- Module Name: iob_reg_i - syn
|
||||
-- Description: Registered IOB, input only
|
||||
--
|
||||
-- Dependencies: -
|
||||
-- Test bench: -
|
||||
-- Target Devices: generic Spartan, Virtex
|
||||
-- Tool versions: xst 8.1, 8.2, 9.1, 9.2; ghdl 0.18-0.25
|
||||
-- Revision History:
|
||||
-- Date Rev Version Comment
|
||||
-- 2007-12-16 101 1.0.1 add INIT generic port
|
||||
-- 2007-12-08 100 1.0 Initial version
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
library ieee;
|
||||
use ieee.std_logic_1164.all;
|
||||
|
||||
use work.slvtypes.all;
|
||||
use work.xlib.all;
|
||||
|
||||
entity iob_reg_i is -- registered IOB, input
|
||||
generic (
|
||||
INIT : slbit := '0'); -- initial state
|
||||
port (
|
||||
CLK : in slbit; -- clock
|
||||
CE : in slbit := '1'; -- clock enable
|
||||
DI : out slbit; -- input data
|
||||
PAD : in slbit -- i/o pad
|
||||
);
|
||||
end iob_reg_i;
|
||||
|
||||
|
||||
architecture syn of iob_reg_i is
|
||||
|
||||
begin
|
||||
|
||||
IOB : iob_reg_i_gen
|
||||
generic map (
|
||||
DWIDTH => 1,
|
||||
INIT => INIT)
|
||||
port map (
|
||||
CLK => CLK,
|
||||
CE => CE,
|
||||
DI(0) => DI,
|
||||
PAD(0) => PAD
|
||||
);
|
||||
|
||||
end syn;
|
||||
4
rtl/vlib/xlib/iob_reg_i_gen.vbom
Normal file
4
rtl/vlib/xlib/iob_reg_i_gen.vbom
Normal file
@@ -0,0 +1,4 @@
|
||||
# libs
|
||||
../slvtypes.vhd
|
||||
# design
|
||||
iob_reg_i_gen.vhd
|
||||
67
rtl/vlib/xlib/iob_reg_i_gen.vhd
Normal file
67
rtl/vlib/xlib/iob_reg_i_gen.vhd
Normal file
@@ -0,0 +1,67 @@
|
||||
-- $Id: iob_reg_i_gen.vhd 314 2010-07-09 17:38:41Z mueller $
|
||||
--
|
||||
-- Copyright 2007- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
--
|
||||
-- This program is free software; you may redistribute and/or modify it under
|
||||
-- the terms of the GNU General Public License as published by the Free
|
||||
-- Software Foundation, either version 2, or at your option any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful, but
|
||||
-- WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
|
||||
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
-- for complete details.
|
||||
--
|
||||
------------------------------------------------------------------------------
|
||||
-- Module Name: iob_reg_i_gen - syn
|
||||
-- Description: Registered IOB, input only, vector
|
||||
--
|
||||
-- Dependencies: -
|
||||
-- Test bench: -
|
||||
-- Target Devices: generic Spartan, Virtex
|
||||
-- Tool versions: xst 8.1, 8.2, 9.1, 9.2; ghdl 0.18-0.25
|
||||
-- Revision History:
|
||||
-- Date Rev Version Comment
|
||||
-- 2007-12-16 101 1.0.1 add INIT generic port
|
||||
-- 2007-12-08 100 1.0 Initial version
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
library ieee;
|
||||
use ieee.std_logic_1164.all;
|
||||
|
||||
use work.slvtypes.all;
|
||||
use work.xlib.all;
|
||||
|
||||
entity iob_reg_i_gen is -- registered IOB, input, vector
|
||||
generic (
|
||||
DWIDTH : positive := 16; -- data port width
|
||||
INIT : slbit := '0'); -- initial state
|
||||
port (
|
||||
CLK : in slbit; -- clock
|
||||
CE : in slbit := '1'; -- clock enable
|
||||
DI : out slv(DWIDTH-1 downto 0); -- input data
|
||||
PAD : in slv(DWIDTH-1 downto 0) -- i/o pad
|
||||
);
|
||||
end iob_reg_i_gen;
|
||||
|
||||
|
||||
architecture syn of iob_reg_i_gen is
|
||||
|
||||
signal R_DI : slv(DWIDTH-1 downto 0) := (others=>INIT);
|
||||
|
||||
attribute iob : string;
|
||||
attribute iob of R_DI : signal is "true";
|
||||
|
||||
begin
|
||||
|
||||
proc_regs: process (CLK)
|
||||
begin
|
||||
if CLK'event and CLK='1' then
|
||||
if CE = '1' then
|
||||
R_DI <= PAD;
|
||||
end if;
|
||||
end if;
|
||||
end process proc_regs;
|
||||
|
||||
DI <= R_DI;
|
||||
|
||||
end syn;
|
||||
6
rtl/vlib/xlib/iob_reg_io_gen.vbom
Normal file
6
rtl/vlib/xlib/iob_reg_io_gen.vbom
Normal file
@@ -0,0 +1,6 @@
|
||||
# libs
|
||||
../slvtypes.vhd
|
||||
# components
|
||||
[ghdl,isim]iob_keeper_gen.vbom
|
||||
# design
|
||||
iob_reg_io_gen.vhd
|
||||
123
rtl/vlib/xlib/iob_reg_io_gen.vhd
Normal file
123
rtl/vlib/xlib/iob_reg_io_gen.vhd
Normal file
@@ -0,0 +1,123 @@
|
||||
-- $Id: iob_reg_io_gen.vhd 314 2010-07-09 17:38:41Z mueller $
|
||||
--
|
||||
-- Copyright 2007-2008 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
--
|
||||
-- This program is free software; you may redistribute and/or modify it under
|
||||
-- the terms of the GNU General Public License as published by the Free
|
||||
-- Software Foundation, either version 2, or at your option any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful, but
|
||||
-- WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
|
||||
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
-- for complete details.
|
||||
--
|
||||
------------------------------------------------------------------------------
|
||||
-- Module Name: iob_reg_io_gen - syn
|
||||
-- Description: Registered IOB, in/output, vector
|
||||
--
|
||||
-- Dependencies: iob_keeper_gen [sim only]
|
||||
-- Test bench: -
|
||||
-- Target Devices: generic Spartan, Virtex
|
||||
-- Tool versions: xst 8.1, 8.2, 9.1, 9.2; ghdl 0.18-0.25
|
||||
-- Revision History:
|
||||
-- Date Rev Version Comment
|
||||
-- 2008-05-22 149 1.0.4 use internally TE to match OBUFT T polarity
|
||||
-- 2008-05-22 148 1.0.3 remove UNISIM prim's; PULL implemented only for sim
|
||||
-- 2008-05-18 147 1.0.2 add PULL generic, to enable PULL-UP,-DOWN or KEEPER
|
||||
-- 2007-12-16 101 1.0.1 add INIT generic ports
|
||||
-- 2007-12-08 100 1.0 Initial version
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
library ieee;
|
||||
use ieee.std_logic_1164.all;
|
||||
|
||||
use work.slvtypes.all;
|
||||
use work.xlib.all;
|
||||
|
||||
entity iob_reg_io_gen is -- registered IOB, in/output, vector
|
||||
generic (
|
||||
DWIDTH : positive := 16; -- data port width
|
||||
INITI : slbit := '0'; -- initial state ( in flop)
|
||||
INITO : slbit := '0'; -- initial state (out flop)
|
||||
INITE : slbit := '0'; -- initial state ( oe flop)
|
||||
PULL : string := "NONE"); -- pull-up,-down or keeper
|
||||
port (
|
||||
CLK : in slbit; -- clock
|
||||
CEI : in slbit := '1'; -- clock enable ( in flops)
|
||||
CEO : in slbit := '1'; -- clock enable (out flops)
|
||||
OE : in slbit; -- output enable
|
||||
DI : out slv(DWIDTH-1 downto 0); -- input data (read from pad)
|
||||
DO : in slv(DWIDTH-1 downto 0); -- output data (write to pad)
|
||||
PAD : inout slv(DWIDTH-1 downto 0) -- i/o pad
|
||||
);
|
||||
end iob_reg_io_gen;
|
||||
|
||||
|
||||
architecture syn of iob_reg_io_gen is
|
||||
|
||||
signal R_TE : slbit := not INITE;
|
||||
signal R_DI : slv(DWIDTH-1 downto 0) := (others=>INITI);
|
||||
signal R_DO : slv(DWIDTH-1 downto 0) := (others=>INITO);
|
||||
|
||||
constant all_z : slv(DWIDTH-1 downto 0) := (others=>'Z');
|
||||
constant all_l : slv(DWIDTH-1 downto 0) := (others=>'L');
|
||||
constant all_h : slv(DWIDTH-1 downto 0) := (others=>'H');
|
||||
|
||||
attribute iob : string;
|
||||
attribute iob of R_TE : signal is "true";
|
||||
attribute iob of R_DI : signal is "true";
|
||||
attribute iob of R_DO : signal is "true";
|
||||
|
||||
begin
|
||||
|
||||
assert PULL="NONE" or PULL="UP" or PULL="DOWN" or PULL="KEEP"
|
||||
report "assert(PULL): only NONE, UP, DOWN, OR KEEP supported"
|
||||
severity failure;
|
||||
|
||||
proc_regs: process (CLK)
|
||||
begin
|
||||
if CLK'event and CLK='1' then
|
||||
R_TE <= not OE;
|
||||
if CEI = '1' then
|
||||
R_DI <= to_x01(PAD);
|
||||
end if;
|
||||
if CEO = '1' then
|
||||
R_DO <= DO;
|
||||
end if;
|
||||
end if;
|
||||
end process proc_regs;
|
||||
|
||||
proc_comb: process (R_TE, R_DO)
|
||||
begin
|
||||
if R_TE = '1' then
|
||||
PAD <= all_z;
|
||||
else
|
||||
PAD <= R_DO;
|
||||
end if;
|
||||
end process proc_comb;
|
||||
|
||||
DI <= R_DI;
|
||||
|
||||
-- Note: PULL (UP, DOWN or KEEP) is only implemented for simulation, not
|
||||
-- for inference in synthesis. Use pin attributes in UCF's or use
|
||||
-- iob_reg_io_gen_unisim
|
||||
--
|
||||
-- synthesis translate_off
|
||||
|
||||
PULL_UP: if PULL = "UP" generate
|
||||
PAD <= all_h;
|
||||
end generate PULL_UP;
|
||||
|
||||
PULL_DOWN: if PULL = "DOWN" generate
|
||||
PAD <= all_l;
|
||||
end generate PULL_DOWN;
|
||||
|
||||
PULL_KEEP: if PULL = "KEEP" generate
|
||||
KEEPER : iob_keeper_gen
|
||||
generic map (DWIDTH => DWIDTH)
|
||||
port map (PAD => PAD);
|
||||
end generate PULL_KEEP;
|
||||
|
||||
-- synthesis translate_on
|
||||
|
||||
end syn;
|
||||
7
rtl/vlib/xlib/iob_reg_o.vbom
Normal file
7
rtl/vlib/xlib/iob_reg_o.vbom
Normal file
@@ -0,0 +1,7 @@
|
||||
# libs
|
||||
../slvtypes.vhd
|
||||
xlib.vhd
|
||||
# components
|
||||
iob_reg_o_gen.vbom
|
||||
# design
|
||||
iob_reg_o.vhd
|
||||
61
rtl/vlib/xlib/iob_reg_o.vhd
Normal file
61
rtl/vlib/xlib/iob_reg_o.vhd
Normal file
@@ -0,0 +1,61 @@
|
||||
-- $Id: iob_reg_o.vhd 314 2010-07-09 17:38:41Z mueller $
|
||||
--
|
||||
-- Copyright 2007- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
--
|
||||
-- This program is free software; you may redistribute and/or modify it under
|
||||
-- the terms of the GNU General Public License as published by the Free
|
||||
-- Software Foundation, either version 2, or at your option any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful, but
|
||||
-- WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
|
||||
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
-- for complete details.
|
||||
--
|
||||
------------------------------------------------------------------------------
|
||||
-- Module Name: iob_reg_i - syn
|
||||
-- Description: Registered IOB, output only
|
||||
--
|
||||
-- Dependencies: -
|
||||
-- Test bench: -
|
||||
-- Target Devices: generic Spartan, Virtex
|
||||
-- Tool versions: xst 8.1, 8.2, 9.1, 9.2; ghdl 0.18-0.25
|
||||
-- Revision History:
|
||||
-- Date Rev Version Comment
|
||||
-- 2007-12-16 101 1.0.1 add INIT generic port
|
||||
-- 2007-12-08 100 1.0 Initial version
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
library ieee;
|
||||
use ieee.std_logic_1164.all;
|
||||
|
||||
use work.slvtypes.all;
|
||||
use work.xlib.all;
|
||||
|
||||
entity iob_reg_o is -- registered IOB, output
|
||||
generic (
|
||||
INIT : slbit := '0'); -- initial state
|
||||
port (
|
||||
CLK : in slbit; -- clock
|
||||
CE : in slbit := '1'; -- clock enable
|
||||
DO : in slbit; -- output data
|
||||
PAD : out slbit -- i/o pad
|
||||
);
|
||||
end iob_reg_o;
|
||||
|
||||
|
||||
architecture syn of iob_reg_o is
|
||||
|
||||
begin
|
||||
|
||||
IOB : iob_reg_o_gen
|
||||
generic map (
|
||||
DWIDTH => 1,
|
||||
INIT => INIT)
|
||||
port map (
|
||||
CLK => CLK,
|
||||
CE => CE,
|
||||
DO(0) => DO,
|
||||
PAD(0) => PAD
|
||||
);
|
||||
|
||||
end syn;
|
||||
4
rtl/vlib/xlib/iob_reg_o_gen.vbom
Normal file
4
rtl/vlib/xlib/iob_reg_o_gen.vbom
Normal file
@@ -0,0 +1,4 @@
|
||||
# libs
|
||||
../slvtypes.vhd
|
||||
# design
|
||||
iob_reg_o_gen.vhd
|
||||
67
rtl/vlib/xlib/iob_reg_o_gen.vhd
Normal file
67
rtl/vlib/xlib/iob_reg_o_gen.vhd
Normal file
@@ -0,0 +1,67 @@
|
||||
-- $Id: iob_reg_o_gen.vhd 314 2010-07-09 17:38:41Z mueller $
|
||||
--
|
||||
-- Copyright 2007- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
--
|
||||
-- This program is free software; you may redistribute and/or modify it under
|
||||
-- the terms of the GNU General Public License as published by the Free
|
||||
-- Software Foundation, either version 2, or at your option any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful, but
|
||||
-- WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
|
||||
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
-- for complete details.
|
||||
--
|
||||
------------------------------------------------------------------------------
|
||||
-- Module Name: iob_reg_o_gen - syn
|
||||
-- Description: Registered IOB, output only, vector
|
||||
--
|
||||
-- Dependencies: -
|
||||
-- Test bench: -
|
||||
-- Target Devices: generic Spartan, Virtex
|
||||
-- Tool versions: xst 8.1, 8.2, 9.1, 9.2; ghdl 0.18-0.25
|
||||
-- Revision History:
|
||||
-- Date Rev Version Comment
|
||||
-- 2007-12-16 101 1.0.1 add INIT generic port
|
||||
-- 2007-12-08 100 1.0 Initial version
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
library ieee;
|
||||
use ieee.std_logic_1164.all;
|
||||
|
||||
use work.slvtypes.all;
|
||||
use work.xlib.all;
|
||||
|
||||
entity iob_reg_o_gen is -- registered IOB, output, vector
|
||||
generic (
|
||||
DWIDTH : positive := 16; -- data port width
|
||||
INIT : slbit := '0'); -- initial state
|
||||
port (
|
||||
CLK : in slbit; -- clock
|
||||
CE : in slbit := '1'; -- clock enable
|
||||
DO : in slv(DWIDTH-1 downto 0); -- output data
|
||||
PAD : out slv(DWIDTH-1 downto 0) -- i/o pad
|
||||
);
|
||||
end iob_reg_o_gen;
|
||||
|
||||
|
||||
architecture syn of iob_reg_o_gen is
|
||||
|
||||
signal R_DO : slv(DWIDTH-1 downto 0) := (others=>INIT);
|
||||
|
||||
attribute iob : string;
|
||||
attribute iob of R_DO : signal is "true";
|
||||
|
||||
begin
|
||||
|
||||
proc_regs: process (CLK)
|
||||
begin
|
||||
if CLK'event and CLK='1' then
|
||||
if CE = '1' then
|
||||
R_DO <= DO;
|
||||
end if;
|
||||
end if;
|
||||
end process proc_regs;
|
||||
|
||||
PAD <= R_DO;
|
||||
|
||||
end syn;
|
||||
154
rtl/vlib/xlib/xlib.vhd
Normal file
154
rtl/vlib/xlib/xlib.vhd
Normal file
@@ -0,0 +1,154 @@
|
||||
-- $Id: xlib.vhd 314 2010-07-09 17:38:41Z mueller $
|
||||
--
|
||||
-- Copyright 2007-2008 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
--
|
||||
-- This program is free software; you may redistribute and/or modify it under
|
||||
-- the terms of the GNU General Public License as published by the Free
|
||||
-- Software Foundation, either version 2, or at your option any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful, but
|
||||
-- WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
|
||||
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
-- for complete details.
|
||||
--
|
||||
------------------------------------------------------------------------------
|
||||
-- Package Name: xlib
|
||||
-- Description: Xilinx specific components
|
||||
--
|
||||
-- Dependencies: -
|
||||
-- Tool versions: xst 8.1, 8.2, 9.1, 9.2; ghdl 0.18-0.25
|
||||
-- Revision History:
|
||||
-- Date Rev Version Comment
|
||||
-- 2008-05-23 149 1.0.4 add iob_io(_gen)
|
||||
-- 2008-05-22 148 1.0.3 add iob_keeper(_gen);
|
||||
-- 2008-05-18 147 1.0.2 add PULL generic to iob_reg_io(_gen)
|
||||
-- 2007-12-16 101 1.0.1 add INIT generic ports
|
||||
-- 2007-12-08 100 1.0 Initial version
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
library ieee;
|
||||
use ieee.std_logic_1164.all;
|
||||
|
||||
use work.slvtypes.all;
|
||||
|
||||
package xlib is
|
||||
|
||||
component iob_reg_i is -- registered IOB, input
|
||||
generic (
|
||||
INIT : slbit := '0'); -- initial state
|
||||
port (
|
||||
CLK : in slbit; -- clock
|
||||
CE : in slbit := '1'; -- clock enable
|
||||
DI : out slbit; -- input data
|
||||
PAD : in slbit -- i/o pad
|
||||
);
|
||||
end component;
|
||||
|
||||
component iob_reg_i_gen is -- registered IOB, input, vector
|
||||
generic (
|
||||
DWIDTH : positive := 16; -- data port width
|
||||
INIT : slbit := '0'); -- initial state
|
||||
port (
|
||||
CLK : in slbit; -- clock
|
||||
CE : in slbit := '1'; -- clock enable
|
||||
DI : out slv(DWIDTH-1 downto 0); -- input data
|
||||
PAD : in slv(DWIDTH-1 downto 0) -- i/o pad
|
||||
);
|
||||
end component;
|
||||
|
||||
component iob_reg_o is -- registered IOB, output
|
||||
generic (
|
||||
INIT : slbit := '0'); -- initial state
|
||||
port (
|
||||
CLK : in slbit; -- clock
|
||||
CE : in slbit := '1'; -- clock enable
|
||||
DO : in slbit; -- output data
|
||||
PAD : out slbit -- i/o pad
|
||||
);
|
||||
end component;
|
||||
|
||||
component iob_reg_o_gen is -- registered IOB, output, vector
|
||||
generic (
|
||||
DWIDTH : positive := 16; -- data port width
|
||||
INIT : slbit := '0'); -- initial state
|
||||
port (
|
||||
CLK : in slbit; -- clock
|
||||
CE : in slbit := '1'; -- clock enable
|
||||
DO : in slv(DWIDTH-1 downto 0); -- output data
|
||||
PAD : out slv(DWIDTH-1 downto 0) -- i/o pad
|
||||
);
|
||||
end component;
|
||||
|
||||
component iob_reg_io is -- registered IOB, in/output
|
||||
generic (
|
||||
INITI : slbit := '0'; -- initial state ( in flop)
|
||||
INITO : slbit := '0'; -- initial state (out flop)
|
||||
INITE : slbit := '0'; -- initial state ( oe flop)
|
||||
PULL : string := "NONE"); -- pull-up,-down or keeper
|
||||
port (
|
||||
CLK : in slbit; -- clock
|
||||
CEI : in slbit := '1'; -- clock enable ( in flops)
|
||||
CEO : in slbit := '1'; -- clock enable (out flops)
|
||||
OE : in slbit; -- output enable
|
||||
DI : out slbit; -- input data (read from pad)
|
||||
DO : in slbit; -- output data (write to pad)
|
||||
PAD : inout slbit -- i/o pad
|
||||
);
|
||||
end component;
|
||||
|
||||
component iob_reg_io_gen is -- registered IOB, in/output, vector
|
||||
generic (
|
||||
DWIDTH : positive := 16; -- data port width
|
||||
INITI : slbit := '0'; -- initial state ( in flop)
|
||||
INITO : slbit := '0'; -- initial state (out flop)
|
||||
INITE : slbit := '0'; -- initial state ( oe flop)
|
||||
PULL : string := "NONE"); -- pull-up,-down or keeper
|
||||
port (
|
||||
CLK : in slbit; -- clock
|
||||
CEI : in slbit := '1'; -- clock enable ( in flops)
|
||||
CEO : in slbit := '1'; -- clock enable (out flops)
|
||||
OE : in slbit; -- output enable
|
||||
DI : out slv(DWIDTH-1 downto 0); -- input data (read from pad)
|
||||
DO : in slv(DWIDTH-1 downto 0); -- output data (write to pad)
|
||||
PAD : inout slv(DWIDTH-1 downto 0) -- i/o pad
|
||||
);
|
||||
end component;
|
||||
|
||||
component iob_io is -- un-registered IOB, in/output
|
||||
generic (
|
||||
PULL : string := "NONE"); -- pull-up,-down or keeper
|
||||
port (
|
||||
OE : in slbit; -- output enable
|
||||
DI : out slbit; -- input data (read from pad)
|
||||
DO : in slbit; -- output data (write to pad)
|
||||
PAD : inout slbit -- i/o pad
|
||||
);
|
||||
end component;
|
||||
|
||||
component iob_io_gen is -- un-registered IOB, in/output, vector
|
||||
generic (
|
||||
DWIDTH : positive := 16; -- data port width
|
||||
PULL : string := "NONE"); -- pull-up,-down or keeper
|
||||
port (
|
||||
OE : in slbit; -- output enable
|
||||
DI : out slv(DWIDTH-1 downto 0); -- input data (read from pad)
|
||||
DO : in slv(DWIDTH-1 downto 0); -- output data (write to pad)
|
||||
PAD : inout slv(DWIDTH-1 downto 0) -- i/o pad
|
||||
);
|
||||
end component;
|
||||
|
||||
component iob_keeper is -- keeper for IOB
|
||||
port (
|
||||
PAD : inout slbit -- i/o pad
|
||||
);
|
||||
end component;
|
||||
|
||||
component iob_keeper_gen is -- keeper for IOB, vector
|
||||
generic (
|
||||
DWIDTH : positive := 16); -- data port width
|
||||
port (
|
||||
PAD : inout slv(DWIDTH-1 downto 0) -- i/o pad
|
||||
);
|
||||
end component;
|
||||
|
||||
end xlib;
|
||||
Reference in New Issue
Block a user