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

Subversion Repositories funbase_ip_library

[/] [funbase_ip_library/] [trunk/] [TUT/] [ip.hwp.interface/] [eth_lan91c111_ctrl/] [1.0/] [vhd/] [lan91c111_ctrl_pkg.vhd] - Blame information for rev 145

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 145 lanttu
-- package for constants
2
 
3
library ieee;
4
use ieee.std_logic_1164.all;
5
 
6
package lan91c111_ctrl_pkg is
7
 
8
  constant lan91_data_width_c : integer := 32;
9
 
10
  -- Note: LAN91C111 has 15 bits wide address bus, which they index from 1 to 15.
11
  -- Altera (for S180 dev board) erroneously lists total of 20 bits ranging
12
  -- from 0 to 19, but the traces on the PCB for bits 0 and 16...19 go
13
  -- nowhere!
14
  constant lan91_addr_width_c : integer := 15;
15
 
16
  -- LAN91C111 very cleverly uses only 3 bits of its 15 bit wide
17
  -- address bus. Apparently, about two or three more bits are used for
18
  -- indexing multiple LAN91C111 devices on the same bus, but you couldn't
19
  -- easily do that anyway because they all default to the same base address.
20
  -- (You could configure that with an EEPROM.)
21
 
22
  constant real_addr_width_c : integer := 3;
23
  constant base_addr_c : std_logic_vector(lan91_addr_width_c-real_addr_width_c-1 downto 0) := "000000110000";
24
 
25
  -- To clarify this (this was a bit difficult to first find in the datasheet, so I had to
26
  -- reverse-engineer):
27
  -- A15 A14 A13 A12 A11 A10 A09 A08 A07 A06 A05 A04 A03 A02 A01
28
  --  0   0   0   0   0   0   1   1   0   0   0   0  |REAL ADDR|
29
  -- |        I call this part base_addr_c          |
30
 
31
  constant tx_len_w_c : integer := 11;
32
  constant sleep_time_w_c : integer := 32;
33
  constant submodules_c : integer := 3;
34
 
35
  -- MAC address of the device
36
  constant MAC_addr_c : std_logic_vector( 47 downto 0 ) := x"ACDCABBACD00";
37
--  constant MAC_addr_c : std_logic_vector( 47 downto 0 ) := x"000000000000";
38
 
39
  constant MAC_len_c : integer := 6;
40
  constant eth_header_len_c : integer := 20;  -- STATUS WORD, BYTE COUNT, dst MAC,
41
                                              -- src MAC, type, CONTROL
42
                                              -- BYTE/LAST DATA BYTE, total 20
43
                                              -- bytes or 10 words.
44
  constant eth_checksum_len_c : integer := 4;
45
 
46
  -- sleeping times
47
  constant clk_hz_c : integer := 25000000;  -- used only to calculate sleeping
48
                                            -- times.
49
 
50
  constant max_sleep_c : integer := clk_hz_c*3+1;
51
 
52
  -- sleeping times
53
  constant power_up_sleep_c : integer := 75000;  -- 3 ms with 25MHz
54
  constant reset_sleep_c : integer := 125;  -- 5 us with 25MHz
55
 
56
 
57
end lan91c111_ctrl_pkg;

powered by: WebSVN 2.1.0

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