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

Subversion Repositories spdif_interface

[/] [spdif_interface/] [trunk/] [rtl/] [vhdl/] [tx_package.vhd] - Blame information for rev 48

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

Line No. Rev Author Line
1 45 gedra
----------------------------------------------------------------------
2
----                                                              ----
3
---- WISHBONE SPDIF IP Core                                       ----
4
----                                                              ----
5
---- This file is part of the SPDIF project                       ----
6
---- http://www.opencores.org/cores/spdif_interface/              ----
7
----                                                              ----
8
---- Description                                                  ----
9
---- SPDIF transmitter component package.                         ----
10
----                                                              ----
11
----                                                              ----
12
---- To Do:                                                       ----
13
---- -                                                            ----
14
----                                                              ----
15
---- Author(s):                                                   ----
16
---- - Geir Drange, gedra@opencores.org                           ----
17
----                                                              ----
18
----------------------------------------------------------------------
19
----                                                              ----
20
---- Copyright (C) 2004 Authors and OPENCORES.ORG                 ----
21
----                                                              ----
22
---- This source file may be used and distributed without         ----
23
---- restriction provided that this copyright statement is not    ----
24
---- removed from the file and that any derivative work contains  ----
25
---- the original copyright notice and the associated disclaimer. ----
26
----                                                              ----
27
---- This source file is free software; you can redistribute it   ----
28
---- and/or modify it under the terms of the GNU Lesser General   ----
29
---- Public License as published by the Free Software Foundation; ----
30
---- either version 2.1 of the License, or (at your option) any   ----
31
---- later version.                                               ----
32
----                                                              ----
33
---- This source is distributed in the hope that it will be       ----
34
---- useful, but WITHOUT ANY WARRANTY; without even the implied   ----
35
---- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      ----
36
---- PURPOSE. See the GNU Lesser General Public License for more  ----
37
---- details.                                                     ----
38
----                                                              ----
39
---- You should have received a copy of the GNU Lesser General    ----
40
---- Public License along with this source; if not, download it   ----
41
---- from http://www.opencores.org/lgpl.shtml                     ----
42
----                                                              ----
43
----------------------------------------------------------------------
44
--
45
-- CVS Revision History
46
--
47
-- $Log: not supported by cvs2svn $
48 48 gedra
-- Revision 1.1  2004/07/13 18:30:25  gedra
49
-- Transmitter component declarations.
50
--
51 45 gedra
-- 
52
--
53
 
54
library ieee;
55
use ieee.std_logic_1164.all;
56
 
57
package tx_package is
58
 
59 48 gedra
-- components used in the transmitter
60 45 gedra
 
61
  component gen_control_reg
62
    generic (DATA_WIDTH: integer;
63
             -- note that this vector is (0 to xx), reverse order
64
             ACTIVE_BIT_MASK: std_logic_vector);
65
    port (
66
      clk: in std_logic;         -- clock  
67
      rst: in std_logic; -- reset
68
      ctrl_wr: in std_logic; -- control register write  
69
      ctrl_rd: in std_logic; -- control register read
70
      ctrl_din: in std_logic_vector(DATA_WIDTH - 1 downto 0);
71
      ctrl_dout: out std_logic_vector(DATA_WIDTH - 1 downto 0);
72
      ctrl_bits: out std_logic_vector(DATA_WIDTH - 1 downto 0));
73
  end component;
74
 
75
  component gen_event_reg
76
    generic (DATA_WIDTH: integer);
77
    port (
78
      clk: in std_logic;         -- clock  
79
      rst: in std_logic; -- reset
80
      evt_wr: in std_logic; -- event register write     
81
      evt_rd: in std_logic; -- event register read
82
      evt_din: in std_logic_vector(DATA_WIDTH - 1 downto 0); -- write data
83
      event: in std_logic_vector(DATA_WIDTH - 1 downto 0); -- event vector
84
      evt_mask: in std_logic_vector(DATA_WIDTH - 1 downto 0); -- irq mask
85
      evt_en: in std_logic;               -- irq enable
86
      evt_dout: out std_logic_vector(DATA_WIDTH - 1 downto 0); -- read data
87
      evt_irq: out std_logic); -- interrupt  request
88
  end component;
89
 
90
  component dpram
91
    generic (DATA_WIDTH: positive;
92
             RAM_WIDTH: positive);
93
    port (
94
      clk: in std_logic;
95
      rst: in std_logic; -- reset is optional, not used here
96
      din: in std_logic_vector(DATA_WIDTH - 1 downto 0);
97
      wr_en: in std_logic;
98
      rd_en: in std_logic;
99
      wr_addr: in std_logic_vector(RAM_WIDTH - 1 downto 0);
100
      rd_addr: in std_logic_vector(RAM_WIDTH - 1 downto 0);
101
      dout: out std_logic_vector(DATA_WIDTH - 1 downto 0));
102
  end component;
103
 
104
  component tx_wb_decoder
105
    generic (DATA_WIDTH: integer;
106
             ADDR_WIDTH: integer);
107
    port (
108
      wb_clk_i: in std_logic;             -- wishbone clock
109
      wb_rst_i: in std_logic;             -- reset signal
110
      wb_sel_i: in std_logic;             -- select input
111
      wb_stb_i: in std_logic;             -- strobe input
112
      wb_we_i: in std_logic;              -- write enable
113
      wb_cyc_i: in std_logic;             -- cycle input
114
      wb_bte_i: in std_logic_vector(1 downto 0);  -- burts type extension
115
      wb_cti_i: in std_logic_vector(2 downto 0);  -- cycle type identifier
116
      wb_adr_i: in std_logic_vector(ADDR_WIDTH - 1 downto 0);  -- address
117
      data_out: in std_logic_vector(DATA_WIDTH - 1 downto 0); -- internal bus
118
      wb_ack_o: out std_logic;            -- acknowledge
119
      wb_dat_o: out std_logic_vector(DATA_WIDTH - 1 downto 0);  -- data out
120
      version_rd: out std_logic;          -- Version register read 
121
      config_rd: out std_logic;           -- Config register read
122
      config_wr: out std_logic;           -- Config register write
123
      chstat_rd: out std_logic;           -- Channel Status register read
124
      chstat_wr: out std_logic;           -- Channel Status register write
125
      intmask_rd: out std_logic;          -- Interrupt mask register read
126
      intmask_wr: out std_logic;          -- Interrupt mask register write
127
      intstat_rd: out std_logic;          -- Interrupt status register read
128
      intstat_wr: out std_logic;          -- Interrupt status register read
129
      mem_wr: out std_logic;              -- Sample memory write
130 48 gedra
      user_data_wr: out std_logic;        -- User data write
131
      ch_status_wr: out std_logic);       -- Ch. status write
132 45 gedra
  end component;
133 48 gedra
 
134
  component tx_ver_reg
135
    generic (DATA_WIDTH: integer;
136
             ADDR_WIDTH: integer;
137
             USER_DATA_BUF: integer;
138
             CH_STAT_BUF: integer);
139
    port (
140
      ver_rd: in std_logic; -- version register read
141
      ver_dout: out std_logic_vector(DATA_WIDTH - 1 downto 0));
142
  end component;
143
 
144
  component tx_bitbuf
145
    generic (ENABLE_BUFFER: integer range 0 to 1);
146
    port (
147
      wb_clk_i: in std_logic;             -- clock
148
      wb_rst_i: in std_logic;             -- reset
149
      buf_wr: in std_logic;               -- buffer write strobe
150
      wb_adr_i: in std_logic_vector(4 downto 0);  -- address
151
      wb_dat_i: in std_logic_vector(15 downto 0);  -- data
152
      buf_data_a: out std_logic_vector(191 downto 0);
153
      buf_data_b: out std_logic_vector(191 downto 0));
154
  end component;
155 45 gedra
 
156
end tx_package;

powered by: WebSVN 2.1.0

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