This repository was archived by the owner on Oct 20, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 114
Expand file tree
/
Copy pathxil.pkg.vhdl
More file actions
134 lines (114 loc) · 4.51 KB
/
xil.pkg.vhdl
File metadata and controls
134 lines (114 loc) · 4.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
-- EMACS settings: -*- tab-width: 2; indent-tabs-mode: t -*-
-- vim: tabstop=2:shiftwidth=2:noexpandtab
-- kate: tab-width 2; replace-tabs off; indent-width 2;
-- =============================================================================
-- Authors: Patrick Lehmann
--
-- Entity: VHDL package for component declarations, types and functions
-- associated to the PoC.xil namespace
--
-- Description:
-- -------------------------------------
-- This package declares types and components for
-- - Xilinx ChipScope Pro IPCores (ICON, ILA, VIO)
-- - Xilinx Dynamic Reconfiguration Port (DRP) related types
-- - SystemMonitor for FPGA core temperature measurement and fan control
-- (see PoC.io.FanControl)
-- - Component declarations for Xilinx related modules
--
-- License:
-- =============================================================================
-- Copyright 2007-2015 Technische Universitaet Dresden - Germany
-- Chair of VLSI-Design, Diagnostics and Architecture
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-- =============================================================================
library IEEE;
use IEEE.STD_LOGIC_1164.all;
use IEEE.NUMERIC_STD.all;
library PoC;
use PoC.utils.all;
use PoC.vectors.all;
package xil is
-- ChipScope
-- ==========================================================================
subtype T_XIL_CHIPSCOPE_CONTROL is std_logic_vector(35 downto 0);
type T_XIL_CHIPSCOPE_CONTROL_VECTOR is array (natural range <>) of T_XIL_CHIPSCOPE_CONTROL;
-- Dynamic Reconfiguration Port (DRP)
-- ==========================================================================
subtype T_XIL_DRP_ADDRESS is T_SLV_16;
subtype T_XIL_DRP_DATA is T_SLV_16;
type T_XIL_DRP_ADDRESS_VECTOR is array (natural range <>) of T_XIL_DRP_ADDRESS;
type T_XIL_DRP_DATA_VECTOR is array (natural range <>) of T_XIL_DRP_DATA;
type T_XIL_DRP_BUS_IN is record
Clock : std_logic;
Enable : std_logic;
ReadWrite : std_logic;
Address : T_XIL_DRP_ADDRESS;
Data : T_XIL_DRP_DATA;
end record;
constant C_XIL_DRP_BUS_IN_EMPTY : T_XIL_DRP_BUS_IN := (
Clock => '0',
Enable => '0',
ReadWrite => '0',
Address => (others => '0'),
Data => (others => '0'));
type T_XIL_DRP_BUS_OUT is record
Data : T_XIL_DRP_DATA;
Ack : std_logic;
end record;
constant C_XIL_DRP_BUS_OUT_EMPTY : T_XIL_DRP_BUS_OUT := (
Ack => '0',
Data => (others => '0'));
type T_XIL_DRP_CONFIG is record
Address : T_XIL_DRP_ADDRESS;
Mask : T_XIL_DRP_DATA;
Data : T_XIL_DRP_DATA;
end record;
-- define array indices
constant C_XIL_DRP_MAX_CONFIG_COUNT : positive := 8;
subtype T_XIL_DRP_CONFIG_INDEX is integer range 0 to C_XIL_DRP_MAX_CONFIG_COUNT - 1;
type T_XIL_DRP_CONFIG_VECTOR is array (natural range <>) of T_XIL_DRP_CONFIG;
type T_XIL_DRP_CONFIG_SET is record
Configs : T_XIL_DRP_CONFIG_VECTOR(T_XIL_DRP_CONFIG_INDEX);
LastIndex : T_XIL_DRP_CONFIG_INDEX;
end record;
type T_XIL_DRP_CONFIG_ROM is array (natural range <>) of T_XIL_DRP_CONFIG_SET;
constant C_XIL_DRP_CONFIG_EMPTY : T_XIL_DRP_CONFIG := (
Address => (others => '0'),
Data => (others => '0'),
Mask => (others => '0')
);
constant C_XIL_DRP_CONFIG_SET_EMPTY : T_XIL_DRP_CONFIG_SET := (
Configs => (others => C_XIL_DRP_CONFIG_EMPTY),
LastIndex => 0
);
component xil_ChipScopeICON is
generic (
PORTS : positive
);
port (
ControlBus : inout T_XIL_CHIPSCOPE_CONTROL_VECTOR(PORTS - 1 downto 0)
);
end component;
component xil_SystemMonitor is
port (
Reset : in std_logic; -- Reset signal for the System Monitor control logic
Alarm_UserTemp : out std_logic; -- Temperature-sensor alarm output
Alarm_OverTemp : out std_logic; -- Over-Temperature alarm output
Alarm : out std_logic; -- OR'ed output of all the alarms
VP : in std_logic; -- Dedicated analog input pair
VN : in std_logic
);
end component;
end package;