w11 - vhd 0.794
W11 CPU core and support modules
Loading...
Searching...
No Matches
serport_uart_rxtx_ab.vhd
Go to the documentation of this file.
1-- $Id: serport_uart_rxtx_ab.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_ab - syn
7-- Description: serial port UART - transmitter-receiver + autobauder
8--
9-- Dependencies: serport_uart_autobaud
10-- serport_uart_rxtx
11-- Test bench: -
12-- Target Devices: generic
13-- Tool versions: ise 8.2-14.7; viv 2014.4-2016.2; ghdl 0.18-0.33
14--
15-- Synthesized (xst):
16-- Date Rev ise Target flop lutl lutm slic t peri
17-- 2015-04-12 666 14.7 131013 xc6slx16-2 100 142 0 48 s 6.2
18-- 2010-12-25 348 12.1 M53d xc3s1000-4 99 197 - 124 s 9.8
19--
20-- Revision History:
21-- Date Rev Version Comment
22-- 2015-02-01 641 1.2 add CLKDIV_F for autobaud;
23-- 2011-10-22 417 1.1.1 now numeric_std clean
24-- 2010-12-26 348 1.1 add ABCLKDIV port for clock divider setting
25-- 2007-06-24 60 1.0 Initial version
26------------------------------------------------------------------------------
27-- NOTE: for test bench usage a copy of all serport_* entities, with _tb
28-- !!!! appended to the name, has been created in the /tb sub folder.
29-- !!!! Ensure to update the copy when this file is changed !!
30
31library ieee;
32use ieee.std_logic_1164.all;
33use ieee.numeric_std.all;
34
35use work.slvtypes.all;
36use work.serportlib.all;
37
38entity serport_uart_rxtx_ab is -- serial port uart: rx+tx+autobaud
39 generic (
40 CDWIDTH : positive := 13; -- clk divider width
41 CDINIT: natural := 15); -- clk divider initial/reset setting
42 port (
43 CLK : in slbit; -- clock
44 CE_MSEC : in slbit; -- 1 msec clock enable
45 RESET : in slbit; -- reset
46 RXSD : in slbit; -- receive serial data (uart view)
47 RXDATA : out slv8; -- receiver data out
48 RXVAL : out slbit; -- receiver data valid
49 RXERR : out slbit; -- receiver data error (frame error)
50 RXACT : out slbit; -- receiver active
51 TXSD : out slbit; -- transmit serial data (uart view)
52 TXDATA : in slv8; -- transmit data in
53 TXENA : in slbit; -- transmit data enable
54 TXBUSY : out slbit; -- transmit busy
55 ABACT : out slbit; -- autobaud active; if 1 clkdiv invalid
56 ABDONE : out slbit; -- autobaud resync done
57 ABCLKDIV : out slv(CDWIDTH-1 downto 0); -- autobaud clock divider setting
58 ABCLKDIV_F : out slv3 -- autobaud clock divider fraction
59 );
61
62architecture syn of serport_uart_rxtx_ab is
63
64 signal CLKDIV : slv(CDWIDTH-1 downto 0) := slv(to_unsigned(0, CDWIDTH));
65 signal CLKDIV_F : slv3 := (others=>'0');
66 signal ABACT_L : slbit := '0'; -- local readable copy of ABACT
67 signal UART_RESET : slbit := '0';
68
69begin
70
72 generic map (
74 CDINIT => CDINIT)
75 port map (
76 CLK => CLK,
78 RESET => RESET,
79 RXSD => RXSD,
80 CLKDIV => CLKDIV,
82 ACT => ABACT_L,
83 DONE => ABDONE
84 );
85
87 ABACT <= ABACT_L;
90
92 generic map (
94 port map (
95 CLK => CLK,
97 CLKDIV => CLKDIV,
98 RXSD => RXSD,
99 RXDATA => RXDATA,
100 RXVAL => RXVAL,
101 RXERR => RXERR,
102 RXACT => RXACT,
103 TXSD => TXSD,
104 TXDATA => TXDATA,
105 TXENA => TXENA,
106 TXBUSY => TXBUSY
107 );
108
109end syn;
out CLKDIV slv( CDWIDTH- 1 downto 0)
slv3 :=( others => '0') CLKDIV_F
slv( CDWIDTH- 1 downto 0) := slv( to_unsigned( 0, CDWIDTH) ) CLKDIV
out ABCLKDIV slv( CDWIDTH- 1 downto 0)
CDWIDTH positive := 13
in CLKDIV slv( CDWIDTH- 1 downto 0)
std_logic_vector( 2 downto 0) slv3
Definition: slvtypes.vhd:35
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