aboutsummaryrefslogtreecommitdiffstats
path: root/doc/using/UART_srcs/vhpi/tb_tty.vhd
diff options
context:
space:
mode:
author1138-4EB <1138-4EB@users.noreply.github.com>2017-12-09 17:34:58 +0100
committertgingold <tgingold@users.noreply.github.com>2017-12-10 12:02:05 +0100
commit8e06c39ed8311aeb36696d9f964550407e1c556e (patch)
tree5c511441a8c0b2a9bb2f5732dd4284ed725ad24a /doc/using/UART_srcs/vhpi/tb_tty.vhd
parent08eb2bfc7144e7698cf570478d6a4e3e81aaf31a (diff)
downloadghdl-8e06c39ed8311aeb36696d9f964550407e1c556e.tar.gz
ghdl-8e06c39ed8311aeb36696d9f964550407e1c556e.tar.bz2
ghdl-8e06c39ed8311aeb36696d9f964550407e1c556e.zip
clean todos
Diffstat (limited to 'doc/using/UART_srcs/vhpi/tb_tty.vhd')
-rw-r--r--doc/using/UART_srcs/vhpi/tb_tty.vhd116
1 files changed, 0 insertions, 116 deletions
diff --git a/doc/using/UART_srcs/vhpi/tb_tty.vhd b/doc/using/UART_srcs/vhpi/tb_tty.vhd
deleted file mode 100644
index 6e1576ed5..000000000
--- a/doc/using/UART_srcs/vhpi/tb_tty.vhd
+++ /dev/null
@@ -1,116 +0,0 @@
---tb_tty.vhd
-LIBRARY ieee;
-USE ieee.std_logic_1164.ALL;
-USE ieee.numeric_std.ALL;
-use work.tty_pkg.all;
-
-ENTITY tb_tty IS
-END tb_tty;
-
-ARCHITECTURE behavior OF tb_tty IS
-
-signal clk : std_logic := '0';
-signal reset : std_logic;
-
-signal data_in : std_logic_vector(7 downto 0);
-signal wdata : std_logic_vector(7 downto 0);
-signal wr_en : std_logic:='1';
-signal wr : std_logic;
-signal rd_en : std_logic;
-signal rd : std_logic;
-signal a : integer;
-signal c : integer;
-
-
-component capitalisation is
- port(
- clk : in std_logic;
- reset : in std_logic;
- --in
- rdata : in std_logic_vector(7 downto 0);
- rd_en : in std_logic;
- rd : out std_logic;
- --out
- wdata : out std_logic_vector(7 downto 0);
- wr_en : in std_logic;
- wr : out std_logic
- );
-end component;
-
- -- Clock period definitions
- constant clk_period : time := 10 ns;
-
-subtype by_te is character;
-type f_byte is file of by_te;
-
-BEGIN
-
---file open
- process
- begin c<=tty_open(0);
- wait;
- end process;
-
---read
-process (clk)
-
-variable b: integer;
-begin
- if rising_edge(CLK) then
- a<= read_enable(0);
- if a=1 then
- data_in<=std_logic_vector(to_unsigned(read_data(0),8));
- rd_en<='1';
- else
- rd_en<='0';
- end if;
- end if;
-
-end process;
-
---write
-process (clk)
-variable b: integer;
-
- begin
- if rising_edge(CLK) then
- if reset='0' then
- if wr='1' then
- b:=to_integer(unsigned(wdata));
- write_data(b);
- end if;
- end if;
- end if;
- end process;
-
- stim_proc : process
- begin
- reset <= '1';
-
- wait for 50 ns;
- reset <='0';
- wait;
- end process;
-
- clk_process :process
- begin
- clk <= '0';
- wait for clk_period/2;
- clk <= '1';
- wait for clk_period/2;
- end process;
-
-engine: capitalisation
- port map(
- clk => clk,
- reset => reset,
- --in
- rdata => data_in,
- rd_en => rd_en,
- rd => rd,
- --out
- wdata => wdata,
- wr_en => wr_en,
- wr => wr
- );
-END;