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

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.7/] [rtl/] [bplib/] [bpgen/] [bpgenlib.vhd] - Blame information for rev 36

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 29 wfjm
-- $Id: bpgenlib.vhd 637 2015-01-25 18:36:40Z mueller $
2 12 wfjm
--
3 29 wfjm
-- Copyright 2011-2015 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4 12 wfjm
--
5
-- This program is free software; you may redistribute and/or modify it under
6
-- the terms of the GNU General Public License as published by the Free
7
-- Software Foundation, either version 2, or at your option any later version.
8
--
9
-- This program is distributed in the hope that it will be useful, but
10
-- WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
11
-- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12
-- for complete details.
13
--
14
------------------------------------------------------------------------------
15 19 wfjm
-- Package Name:   bpgenlib
16 12 wfjm
-- Description:    Generic Board/Part components
17
-- 
18
-- Dependencies:   -
19 29 wfjm
-- Tool versions:  ise 12.1-14.7; viv 2014.4; ghdl 0.26-0.31
20 12 wfjm
-- Revision History: 
21
-- Date         Rev Version  Comment
22 29 wfjm
-- 2015-01-24   637   1.1.2  add generics to sn_humanio and sn_7segctl
23 22 wfjm
-- 2013-09-21   534   1.1.1  add bp_rs232_4l4l_iob
24 19 wfjm
-- 2013-01-26   476   1.1    moved rbus depended components to bpgenrbuslib
25 18 wfjm
-- 2013-01-06   472   1.0.7  add sn_humanio_demu_rbus
26 13 wfjm
-- 2011-11-16   426   1.0.6  now numeric_std clean
27
-- 2011-10-10   413   1.0.5  add sn_humanio_demu
28 12 wfjm
-- 2011-08-07   404   1.0.4  add RELAY generic for bp_rs232_2l4l_iob
29
-- 2011-08-06   403   1.0.3  add RESET port for bp_rs232_2l4l_iob
30
-- 2011-07-09   391   1.0.2  move in bp_rs232_2l4l_iob from s3boardlib
31
-- 2011-07-08   390   1.0.1  move in sn_(4x7segctl|humanio*) from s3boardlib
32
-- 2011-07-01   386   1.0    Initial version (with rs232_iob's and bp_swibtnled)
33
------------------------------------------------------------------------------
34
 
35
library ieee;
36
use ieee.std_logic_1164.all;
37 13 wfjm
use ieee.numeric_std.all;
38 12 wfjm
 
39
use work.slvtypes.all;
40
 
41
package bpgenlib is
42
 
43
component bp_rs232_2line_iob is         -- iob's for 2 line rs232 (RXD,TXD)
44
  port (
45
    CLK : in slbit;                     -- clock
46
    RXD : out slbit;                    -- receive data (board view)
47
    TXD : in slbit;                     -- transmit data (board view)
48
    I_RXD : in slbit;                   -- pad-i: receive data (board view)
49
    O_TXD : out slbit                   -- pad-o: transmit data (board view)
50
  );
51
end component;
52
 
53
component bp_rs232_4line_iob is         -- iob's for 4 line rs232 (w/ RTS,CTS)
54
  port (
55
    CLK : in slbit;                     -- clock
56
    RXD : out slbit;                    -- receive data (board view)
57
    TXD : in slbit;                     -- transmit data (board view)
58
    CTS_N : out slbit;                  -- clear to send   (act. low)
59
    RTS_N : in slbit;                   -- request to send (act. low)
60
    I_RXD : in slbit;                   -- pad-i: receive data (board view)
61
    O_TXD : out slbit;                  -- pad-o: transmit data (board view)
62
    I_CTS_N : in slbit;                 -- pad-i: clear to send   (act. low)
63
    O_RTS_N : out slbit                 -- pad-o: request to send (act. low)
64
  );
65
end component;
66
 
67
component bp_rs232_2l4l_iob is          -- iob's for dual 2l+4l rs232, w/ select
68
  generic (
69
    RELAY : boolean := false);          -- add a relay stage towards IOB's
70
  port (
71
    CLK : in slbit;                     -- clock
72
    RESET : in slbit := '0';            -- reset
73
    SEL : in slbit;                     -- select, '0' for port 0
74
    RXD : out slbit;                    -- receive data (board view)
75
    TXD : in slbit;                     -- transmit data (board view)
76
    CTS_N : out slbit;                  -- clear to send   (act. low)
77
    RTS_N : in slbit;                   -- request to send (act. low)
78
    I_RXD0 : in slbit;                  -- pad-i: p0: receive data (board view)
79
    O_TXD0 : out slbit;                 -- pad-o: p0: transmit data (board view)
80
    I_RXD1 : in slbit;                  -- pad-i: p1: receive data (board view)
81
    O_TXD1 : out slbit;                 -- pad-o: p1: transmit data (board view)
82
    I_CTS1_N : in slbit;                -- pad-i: p1: clear to send   (act. low)
83
    O_RTS1_N : out slbit                -- pad-o: p1: request to send (act. low)
84
  );
85
end component;
86
 
87 22 wfjm
component bp_rs232_4l4l_iob is          -- iob's for dual 4l+4l rs232, w/ select
88
  generic (
89
    RELAY : boolean := false);          -- add a relay stage towards IOB's
90
  port (
91
    CLK : in slbit;                     -- clock
92
    RESET : in slbit := '0';            -- reset
93
    SEL : in slbit;                     -- select, '0' for port 0
94
    RXD : out slbit;                    -- receive data (board view)
95
    TXD : in slbit;                     -- transmit data (board view)
96
    CTS_N : out slbit;                  -- clear to send   (act. low)
97
    RTS_N : in slbit;                   -- request to send (act. low)
98
    I_RXD0 : in slbit;                  -- pad-i: p0: receive data (board view)
99
    O_TXD0 : out slbit;                 -- pad-o: p0: transmit data (board view)
100
    I_CTS0_N : in slbit;                -- pad-i: p0: clear to send   (act. low)
101
    O_RTS0_N : out slbit;               -- pad-o: p0: request to send (act. low)
102
    I_RXD1 : in slbit;                  -- pad-i: p1: receive data (board view)
103
    O_TXD1 : out slbit;                 -- pad-o: p1: transmit data (board view)
104
    I_CTS1_N : in slbit;                -- pad-i: p1: clear to send   (act. low)
105
    O_RTS1_N : out slbit                -- pad-o: p1: request to send (act. low)
106
  );
107
end component;
108
 
109 12 wfjm
component bp_swibtnled is               -- generic SWI, BTN and LED handling
110
  generic (
111
    SWIDTH : positive := 4;             -- SWI port width
112
    BWIDTH : positive := 4;             -- BTN port width
113
    LWIDTH : positive := 4;             -- LED port width
114
    DEBOUNCE : boolean := true);        -- instantiate debouncer for SWI,BTN
115
  port (
116
    CLK : in slbit;                     -- clock
117
    RESET : in slbit := '0';            -- reset
118
    CE_MSEC : in slbit;                 -- 1 ms clock enable
119
    SWI : out slv(SWIDTH-1 downto 0);   -- switch settings, debounced
120
    BTN : out slv(BWIDTH-1 downto 0);   -- button settings, debounced
121
    LED : in slv(LWIDTH-1 downto 0);    -- led data
122
    I_SWI : in slv(SWIDTH-1 downto 0);  -- pad-i: switches
123
    I_BTN : in slv(BWIDTH-1 downto 0);  -- pad-i: buttons
124
    O_LED : out slv(LWIDTH-1 downto 0)  -- pad-o: leds
125
  );
126
end component;
127
 
128 29 wfjm
component sn_7segctl is                 -- 7 segment display controller
129 12 wfjm
  generic (
130 29 wfjm
    DCWIDTH : positive := 2;            -- digit counter width (2 or 3)
131 12 wfjm
    CDWIDTH : positive := 6);           -- clk divider width (must be >= 5)
132
  port (
133
    CLK : in slbit;                     -- clock
134 29 wfjm
    DIN : in slv(4*(2**DCWIDTH)-1 downto 0);  -- data                16 or 32
135
    DP : in slv((2**DCWIDTH)-1 downto 0);     -- decimal points       4 or  8
136
    ANO_N : out slv((2**DCWIDTH)-1 downto 0); -- anodes    (act.low)  4 or  8
137
    SEG_N : out slv8                          -- segements (act.low)
138 12 wfjm
  );
139
end component;
140
 
141
component sn_humanio is                 -- human i/o handling: swi,btn,led,dsp
142
  generic (
143 29 wfjm
    SWIDTH : positive := 8;             -- SWI port width
144 12 wfjm
    BWIDTH : positive := 4;             -- BTN port width
145 29 wfjm
    LWIDTH : positive := 8;             -- LED port width
146
    DCWIDTH : positive := 2;            -- digit counter width (2 or 3)
147 12 wfjm
    DEBOUNCE : boolean := true);        -- instantiate debouncer for SWI,BTN
148
  port (
149
    CLK : in slbit;                     -- clock
150
    RESET : in slbit := '0';            -- reset
151
    CE_MSEC : in slbit;                 -- 1 ms clock enable
152 29 wfjm
    SWI : out slv(SWIDTH-1 downto 0);   -- switch settings, debounced
153 12 wfjm
    BTN : out slv(BWIDTH-1 downto 0);   -- button settings, debounced
154 29 wfjm
    LED : in slv(LWIDTH-1 downto 0);    -- led data
155
    DSP_DAT : in slv(4*(2**DCWIDTH)-1 downto 0);   -- display data
156
    DSP_DP : in slv((2**DCWIDTH)-1 downto 0);      -- display decimal points
157
    I_SWI : in slv(SWIDTH-1 downto 0);  -- pad-i: switches
158 12 wfjm
    I_BTN : in slv(BWIDTH-1 downto 0);  -- pad-i: buttons
159 29 wfjm
    O_LED : out slv(LWIDTH-1 downto 0); -- pad-o: leds
160
    O_ANO_N : out slv((2**DCWIDTH)-1 downto 0); -- pad-o: disp: anodes (act.low)
161
    O_SEG_N : out slv8                        -- pad-o: disp: segments (act.low)
162 12 wfjm
  );
163
end component;
164
 
165 13 wfjm
component sn_humanio_demu is            -- human i/o handling: swi,btn,led only
166
  generic (
167
    DEBOUNCE : boolean := true);        -- instantiate debouncer for SWI,BTN
168
  port (
169
    CLK : in slbit;                     -- clock
170
    RESET : in slbit := '0';            -- reset
171
    CE_MSEC : in slbit;                 -- 1 ms clock enable
172
    SWI : out slv8;                     -- switch settings, debounced
173
    BTN : out slv4;                     -- button settings, debounced
174
    LED : in slv8;                      -- led data
175
    DSP_DAT : in slv16;                 -- display data
176
    DSP_DP : in slv4;                   -- display decimal points
177
    I_SWI : in slv8;                    -- pad-i: switches
178
    I_BTN : in slv6;                    -- pad-i: buttons
179
    O_LED : out slv8                    -- pad-o: leds
180
  );
181
end component;
182
 
183 12 wfjm
end package bpgenlib;

powered by: WebSVN 2.1.0

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