OpenCores
URL https://opencores.org/ocsvn/pdp8/pdp8/trunk

Subversion Repositories pdp8

[/] [pdp8/] [trunk/] [pdp8/] [uart/] [uart_types.vhd] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 trurl
-------------------------------------------------------------------
2
--!
3
--! PDP-8 Processor
4
--!
5
--! \brief
6
--!      UART Interface Type Definitions
7
--!
8
--! \details
9
--!      This package contains all the type information that is
10
--!      required to use and UART-based Serial Interface device.
11
--!
12
--!      The UART-based devices are:
13
--!      -# KL8E Serial Interface (TTY1 and TTY2)
14
--!      -# PR8E Serial Line Printer (LPR)
15
--!      -# PR8E Interface to Serial Paper Tape Reader
16
--!
17
--! \file
18
--!      uart_types.vhd
19
--!
20
--! \author
21
--!      Rob Doyle - doyle (at) cox (dot) net
22
--!
23
--------------------------------------------------------------------
24
--
25
--  Copyright (C) 2009, 2010, 2011, 2012 Rob Doyle
26
--
27
-- This source file may be used and distributed without
28
-- restriction provided that this copyright statement is not
29
-- removed from the file and that any derivative work contains
30
-- the original copyright notice and the associated disclaimer.
31
--
32
-- This source file is free software; you can redistribute it
33
-- and/or modify it under the terms of the GNU Lesser General
34
-- Public License as published by the Free Software Foundation;
35
-- version 2.1 of the License.
36
--
37
-- This source is distributed in the hope that it will be
38
-- useful, but WITHOUT ANY WARRANTY; without even the implied
39
-- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
40
-- PURPOSE. See the GNU Lesser General Public License for more
41
-- details.
42
--
43
-- You should have received a copy of the GNU Lesser General
44
-- Public License along with this source; if not, download it
45
-- from http://www.gnu.org/licenses/lgpl.txt
46
--
47
--------------------------------------------------------------------
48
--
49
-- Comments are formatted for doxygen
50
--
51
 
52
library ieee;
53
use ieee.std_logic_1164.all;
54
 
55
--
56
--! Type definitions required for UARTS
57
--
58
 
59
package uart_types is
60
 
61
    --
62
    -- Baud Rate Select
63
    --
64
 
65
    subtype  uartBR_t     is std_logic_vector(0 to 3);           --! Baud Rate Configuration type
66
    constant uartBR1200   : uartBR_t := "0000";                 --! 1200 Baud
67
    constant uartBR2400   : uartBR_t := "0001";                 --! 2400 Baud
68
    constant uartBR4800   : uartBR_t := "0010";                 --! 4800 Baud
69
    constant uartBR9600   : uartBR_t := "0011";                 --! 9600 Baud
70
    constant uartBR19200  : uartBR_t := "0100";                 --! 19200 Baud
71
    constant uartBR38400  : uartBR_t := "0101";                 --! 38400 Baud
72
    constant uartBR57600  : uartBR_t := "0110";                 --! 57600 Baud
73
    constant uartBR115200 : uartBR_t := "0111";                 --! 115200 Baud
74
 
75
    --
76
    -- Handshaking Select
77
    --
78
 
79
    subtype  uartHS_t     is std_logic_vector(0 to 1);          --! Handshaking type
80
    constant uartHSnone   : uartHS_t := "00";                   --! No handshaking
81
    constant uartHShw     : uartHS_t := "01";                   --! Hardware handshaking
82
    constant uartHSsw     : uartHS_t := "10";                   --! Software (XON/XOFF) handshaking
83
    constant uartHSres    : uartHS_t := "11";                   --! Reserved
84
 
85
    --
86
    -- ASCII Constants
87
    --
88
 
89
    subtype  ascii_t    is std_logic_vector(0 to 7);
90
 
91
    constant xon        : ascii_t := x"11";                     --! XON (^Q)
92
    constant xoff       : ascii_t := x"13";                     --! XON (^S)
93
 
94
end uart_types;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.