w11 - vhd 0.794
W11 CPU core and support modules
Loading...
Searching...
No Matches
serport_uart_rxtx_tb.vhd
Go to the documentation of this file.
1-- $Id: serport_uart_rxtx_tb.vhd 1181 2019-07-08 17:00:50Z mueller $
2-- SPDX-License-Identifier: GPL-3.0-or-later
3-- Copyright 2007-2016 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4--
5------------------------------------------------------------------------------
6-- Module Name: serport_uart_rxtx_tb - syn
7-- Description: serial port UART - transmitter + receiver (SIM only!)
8--
9-- Dependencies: serport_uart_rx_tb
10-- serport_uart_tx_tb
11-- Target Devices: generic
12-- Tool versions: ghdl 0.18-0.31
13-- Revision History:
14-- Date Rev Version Comment
15-- 2016-01-03 724 1.0 Initial version (copied from serport_uart_rxtx)
16------------------------------------------------------------------------------
17
18library ieee;
19use ieee.std_logic_1164.all;
20use ieee.numeric_std.all;
21
22use work.slvtypes.all;
23
24entity serport_uart_rxtx_tb is -- serial port uart: rx+tx combo
25 generic (
26 CDWIDTH : positive := 13); -- clk divider width
27 port (
28 CLK : in slbit; -- clock
29 RESET : in slbit; -- reset
30 CLKDIV : in slv(CDWIDTH-1 downto 0); -- clock divider setting
31 RXSD : in slbit; -- receive serial data (uart view)
32 RXDATA : out slv8; -- receiver data out
33 RXVAL : out slbit; -- receiver data valid
34 RXERR : out slbit; -- receiver data error (frame error)
35 RXACT : out slbit; -- receiver active
36 TXSD : out slbit; -- transmit serial data (uart view)
37 TXDATA : in slv8; -- transmit data in
38 TXENA : in slbit; -- transmit data enable
39 TXBUSY : out slbit -- transmit busy
40 );
42
43architecture sim of serport_uart_rxtx_tb is
44
45begin
46
47 RX : entity work.serport_uart_rx_tb
48 generic map (
50 port map (
51 CLK => CLK,
52 RESET => RESET,
53 CLKDIV => CLKDIV,
54 RXSD => RXSD,
55 RXDATA => RXDATA,
56 RXVAL => RXVAL,
57 RXERR => RXERR,
58 RXACT => RXACT
59 );
60
61 TX : entity work.serport_uart_tx_tb
62 generic map (
64 port map (
65 CLK => CLK,
66 RESET => RESET,
67 CLKDIV => CLKDIV,
68 TXSD => TXSD,
69 TXDATA => TXDATA,
70 TXENA => TXENA,
71 TXBUSY => TXBUSY
72 );
73
74end sim;
CDWIDTH positive := 13
in CLKDIV slv( CDWIDTH- 1 downto 0)
in CLKDIV slv( CDWIDTH- 1 downto 0)
CDWIDTH positive := 13
in CLKDIV slv( CDWIDTH- 1 downto 0)
std_logic slbit
Definition: slvtypes.vhd:30
std_logic_vector( 7 downto 0) slv8
Definition: slvtypes.vhd:40
std_logic_vector slv
Definition: slvtypes.vhd:31