Skip to content

Commit 2e9a586

Browse files
Merge pull request #112 from the-snowwhite/2019.1_u96-ed
2019.1 u96 ed
2 parents f9a4df7 + 551ed12 commit 2e9a586

File tree

26 files changed

+4706
-1172
lines changed

26 files changed

+4706
-1172
lines changed
Lines changed: 172 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,172 @@
1+
library IEEE;
2+
use IEEE.std_logic_1164.all; -- defines std_logic types
3+
use IEEE.STD_LOGIC_ARITH.ALL;
4+
use IEEE.STD_LOGIC_UNSIGNED.ALL;
5+
6+
-- Copyright (C) 2007, Peter C. Wallace, Mesa Electronics
7+
-- http://www.mesanet.com
8+
--
9+
-- Ported to MYIR ZTURN IO Carrier board:
10+
-- Copyright (C) 2016, Devin Hughes, JD Squared
11+
-- http://www.jd2.com
12+
--
13+
-- This program is is licensed under a disjunctive dual license giving you
14+
-- the choice of one of the two following sets of free software/open source
15+
-- licensing terms:
16+
--
17+
-- * GNU General Public License (GPL), version 2.0 or later
18+
-- * 3-clause BSD License
19+
--
20+
--
21+
-- The GNU GPL License:
22+
--
23+
-- This program is free software; you can redistribute it and/or modify
24+
-- it under the terms of the GNU General Public License as published by
25+
-- the Free Software Foundation; either version 2 of the License, or
26+
-- (at your option) any later version.
27+
--
28+
-- This program is distributed in the hope that it will be useful,
29+
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
30+
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31+
-- GNU General Public License for more details.
32+
--
33+
-- You should have received a copy of the GNU General Public License
34+
-- along with this program; if not, write to the Free Software
35+
-- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
36+
--
37+
--
38+
-- The 3-clause BSD License:
39+
--
40+
-- Redistribution and use in source and binary forms, with or without
41+
-- modification, are permitted provided that the following conditions
42+
-- are met:
43+
--
44+
-- * Redistributions of source code must retain the above copyright
45+
-- notice, this list of conditions and the following disclaimer.
46+
--
47+
-- * Redistributions in binary form must reproduce the above
48+
-- copyright notice, this list of conditions and the following
49+
-- disclaimer in the documentation and/or other materials
50+
-- provided with the distribution.
51+
--
52+
-- * Neither the name of Mesa Electronics nor the names of its
53+
-- contributors may be used to endorse or promote products
54+
-- derived from this software without specific prior written
55+
-- permission.
56+
--
57+
--
58+
-- Disclaimer:
59+
--
60+
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
61+
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
62+
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
63+
-- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
64+
-- COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
65+
-- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
66+
-- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
67+
-- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
68+
-- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
69+
-- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
70+
-- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
71+
-- POSSIBILITY OF SUCH DAMAGE.
72+
--
73+
74+
use work.IDROMConst.all;
75+
76+
package PIN_ULTR_36 is
77+
constant ModuleID : ModuleIDType :=(
78+
(HM2DPLLTag, x"00", ClockLowTag, x"04", HM2DPLLBaseRateAddr&PadT, HM2DPLLNumRegs, x"00", HM2DPLLMPBitMask),
79+
(IOPortTag, x"00", ClockLowTag, x"02", PortAddr&PadT, IOPortNumRegs, x"00", IOPortMPBitMask),
80+
(QcountTag, x"02", ClockLowTag, x"02", QcounterAddr&PadT, QCounterNumRegs, x"00", QCounterMPBitMask),
81+
(StepGenTag, x"02", ClockLowTag, x"08", StepGenRateAddr&PadT, StepGenNumRegs, x"00", StepGenMPBitMask),
82+
(FWIDTag, x"00", ClockLowTag, x"01", FWIDAddr&PadT, FWIDNumRegs, x"00", FWIDMPBitMask),
83+
(PWMTag, x"00", ClockHighTag, x"03", PWMValAddr&PadT, PWMNumRegs, x"00", PWMMPBitMask),
84+
(LEDTag, x"00", ClockLowTag, x"01", LEDAddr&PadT, LEDNumRegs, x"00", LEDMPBitMask),
85+
(NullTag, x"00", NullTag, x"00", NullAddr&PadT, x"00", x"00", x"00000000"),
86+
(NullTag, x"00", NullTag, x"00", NullAddr&PadT, x"00", x"00", x"00000000"),
87+
(NullTag, x"00", NullTag, x"00", NullAddr&PadT, x"00", x"00", x"00000000"),
88+
(NullTag, x"00", NullTag, x"00", NullAddr&PadT, x"00", x"00", x"00000000"),
89+
(NullTag, x"00", NullTag, x"00", NullAddr&PadT, x"00", x"00", x"00000000"),
90+
(NullTag, x"00", NullTag, x"00", NullAddr&PadT, x"00", x"00", x"00000000"),
91+
(NullTag, x"00", NullTag, x"00", NullAddr&PadT, x"00", x"00", x"00000000"),
92+
(NullTag, x"00", NullTag, x"00", NullAddr&PadT, x"00", x"00", x"00000000"),
93+
(NullTag, x"00", NullTag, x"00", NullAddr&PadT, x"00", x"00", x"00000000"),
94+
(NullTag, x"00", NullTag, x"00", NullAddr&PadT, x"00", x"00", x"00000000"),
95+
(NullTag, x"00", NullTag, x"00", NullAddr&PadT, x"00", x"00", x"00000000"),
96+
(NullTag, x"00", NullTag, x"00", NullAddr&PadT, x"00", x"00", x"00000000"),
97+
(NullTag, x"00", NullTag, x"00", NullAddr&PadT, x"00", x"00", x"00000000"),
98+
(NullTag, x"00", NullTag, x"00", NullAddr&PadT, x"00", x"00", x"00000000"),
99+
(NullTag, x"00", NullTag, x"00", NullAddr&PadT, x"00", x"00", x"00000000"),
100+
(NullTag, x"00", NullTag, x"00", NullAddr&PadT, x"00", x"00", x"00000000"),
101+
(NullTag, x"00", NullTag, x"00", NullAddr&PadT, x"00", x"00", x"00000000"),
102+
(NullTag, x"00", NullTag, x"00", NullAddr&PadT, x"00", x"00", x"00000000"),
103+
(NullTag, x"00", NullTag, x"00", NullAddr&PadT, x"00", x"00", x"00000000"),
104+
(NullTag, x"00", NullTag, x"00", NullAddr&PadT, x"00", x"00", x"00000000"),
105+
(NullTag, x"00", NullTag, x"00", NullAddr&PadT, x"00", x"00", x"00000000"),
106+
(NullTag, x"00", NullTag, x"00", NullAddr&PadT, x"00", x"00", x"00000000"),
107+
(NullTag, x"00", NullTag, x"00", NullAddr&PadT, x"00", x"00", x"00000000"),
108+
(NullTag, x"00", NullTag, x"00", NullAddr&PadT, x"00", x"00", x"00000000"),
109+
(NullTag, x"00", NullTag, x"00", NullAddr&PadT, x"00", x"00", x"00000000")
110+
);
111+
112+
113+
constant PinDesc : PinDescType :=(
114+
-- Base func sec unit sec func sec pin -- hostmot2 Header Pin Func
115+
IOPortTag & x"00" & NullTag & NullPin, -- I/O 00 HD_GPIO0_0 03 GPIO
116+
IOPortTag & x"00" & NullTag & NullPin, -- I/O 01 HD_GPIO0_1 05 GPIO
117+
IOPortTag & x"00" & NullTag & NullPin, -- I/O 02 HD_GPIO0_2 07 GPIO
118+
IOPortTag & x"00" & NullTag & NullPin, -- I/O 03 HD_GPIO0_3 09 GPIO
119+
IOPortTag & x"00" & StepGenTag & StepGenDirPin, -- I/O 04 HD_GPIO0_4 11 A Dir
120+
IOPortTag & x"00" & StepGenTag & StepGenStepPin, -- I/O 05 HD_GPIO0_5 13 A Step
121+
IOPortTag & x"01" & StepGenTag & StepGenDirPin, -- I/O 06 HD_GPIO0_6 29 B Dir
122+
IOPortTag & x"01" & StepGenTag & StepGenStepPin, -- I/O 07 HD_GPIO0_7 31 B Step
123+
IOPortTag & x"02" & StepGenTag & StepGenDirPin, -- I/O 08 HD_GPIO0_8 33 C Dir
124+
IOPortTag & x"02" & StepGenTag & StepGenStepPin, -- I/O 09 HD_GPIO0_9 16 C Step
125+
IOPortTag & x"03" & StepGenTag & StepGenDirPin, -- I/O 10 HD_GPIO0_10 18 D Dir
126+
IOPortTag & x"03" & StepGenTag & StepGenStepPin, -- I/O 11 HD_GPIO0_11 20 D Step
127+
IOPortTag & x"00" & HM2DPLLTag & HM2DPLLRefOutPin, -- I/O 12 HD_GPIO0_12 22 DPLL Ref Output
128+
IOPortTag & x"00" & QCountTag & QCountQAPin, -- I/O 13 HD_GPIO0_14 30 Input 1 (Quad A)
129+
IOPortTag & x"00" & QCountTag & QCountQBPin, -- I/O 14 HD_GPIO0_14 32 Input 2 (Quad B)
130+
IOPortTag & x"00" & QCountTag & QCountIdxPin, -- I/O 15 HD_GPIO0_15 34 Input 3 (Quad Idx)
131+
132+
-- Base func sec unit sec func sec pin -- hostmot2 Header Pin Func
133+
IOPortTag & x"00" & NullTag & NullPin, -- I/O 16 SD_GPIO0_16 02 GPIO
134+
IOPortTag & x"00" & PWMTag & PWMAOutPin, -- I/O 17 SD_GPIO0_17 04 PWM
135+
IOPortTag & x"01" & PWMTag & PWMAOutPin, -- I/O 18 SD_GPIO0_18 08 PWM
136+
IOPortTag & x"02" & PWMTag & PWMAOutPin, -- I/O 19 SD_GPIO0_19 10 PWM
137+
IOPortTag & x"04" & StepGenTag & StepGenDirPin, -- I/O 20 SD_GPIO0_20 14 E Dir
138+
IOPortTag & x"04" & StepGenTag & StepGenStepPin, -- I/O 21 SD_GPIO0_21 16 E Step
139+
IOPortTag & x"05" & StepGenTag & StepGenDirPin, -- I/O 22 SD_GPIO0_22 20 F Dir
140+
IOPortTag & x"05" & StepGenTag & StepGenStepPin, -- I/O 23 SD_GPIO0_23 22 F Step
141+
IOPortTag & x"06" & StepGenTag & StepGenDirPin, -- I/O 24 SD_GPIO0_24 26 G Dir
142+
IOPortTag & x"06" & StepGenTag & StepGenStepPin, -- I/O 25 SD_GPIO0_25 28 G Step
143+
IOPortTag & x"07" & StepGenTag & StepGenDirPin, -- I/O 26 SD_GPIO0_26 42 H Dir
144+
IOPortTag & x"07" & StepGenTag & StepGenStepPin, -- I/O 27 SD_GPIO0_27 44 H Step
145+
IOPortTag & x"00" & NullTag & NullPin, -- I/O 28 SD_GPIO0_28 48 GPIO
146+
IOPortTag & x"00" & NullTag & NullPin, -- I/O 29 SD_GPIO0_29 57 GPIO
147+
IOPortTag & x"00" & NullTag & NullPin, -- I/O 30 SD_GPIO0_30 47 GPIO
148+
IOPortTag & x"00" & NullTag & NullPin, -- I/O 31 SD_GPIO0_31 45 GPIO
149+
IOPortTag & x"00" & NullTag & NullPin, -- I/O 32 SD_GPIO0_32 41 GPIO
150+
IOPortTag & x"01" & QCountTag & QCountQAPin, -- I/O 33 SD_GPIO0_33 50 Input 1 (Quad A)
151+
IOPortTag & x"01" & QCountTag & QCountQBPin, -- I/O 34 SD_GPIO0_34 54 Input 2 (Quad B)
152+
IOPortTag & x"01" & QCountTag & QCountIdxPin, -- I/O 35 SD_GPIO0_35 56 Input 3 (Quad Idx)
153+
154+
-- Fill remaining 144 pins
155+
emptypin,emptypin,emptypin,emptypin,emptypin,emptypin,
156+
emptypin,emptypin,emptypin,emptypin,emptypin,emptypin,
157+
158+
emptypin,emptypin,emptypin,emptypin,emptypin,emptypin,emptypin,emptypin,
159+
emptypin,emptypin,emptypin,emptypin,emptypin,emptypin,emptypin,emptypin,
160+
161+
emptypin,emptypin,emptypin,emptypin,emptypin,emptypin,emptypin,emptypin,
162+
emptypin,emptypin,emptypin,emptypin,emptypin,emptypin,emptypin,emptypin,
163+
emptypin,emptypin,emptypin,emptypin,emptypin,emptypin,emptypin,emptypin,
164+
emptypin,emptypin,emptypin,emptypin,emptypin,emptypin,emptypin,emptypin,
165+
emptypin,emptypin,emptypin,emptypin,emptypin,emptypin,emptypin,emptypin,
166+
emptypin,emptypin,emptypin,emptypin,emptypin,emptypin,emptypin,emptypin,
167+
emptypin,emptypin,emptypin,emptypin,emptypin,emptypin,emptypin,emptypin,
168+
emptypin,emptypin,emptypin,emptypin,emptypin,emptypin,emptypin,emptypin,
169+
emptypin,emptypin,emptypin,emptypin,emptypin,emptypin,emptypin,emptypin,
170+
emptypin,emptypin,emptypin,emptypin,emptypin,emptypin,emptypin,emptypin);
171+
172+
end package PIN_ULTR_36;
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
#######################################################################
2+
# Ultra96 Bluetooth UART Modem Signals
3+
#######################################################################
4+
set_property IOSTANDARD LVCMOS18 [get_ports bt*]
5+
#BT_HCI_RTS on Ultra96 / emio_uart0_ctsn
6+
set_property PACKAGE_PIN B7 [get_ports bt_ctsn]
7+
#BT_HCI_CTS on Ultra96 / emio_uart0_rtsn
8+
set_property PACKAGE_PIN B5 [get_ports bt_rtsn]
9+
10+
## Fan signal:
11+
set_property PACKAGE_PIN F4 [get_ports {FAN_PWM}]; # "F4.FAN_PWM"
12+
13+
#######################################################################
14+
# Ultra96 MESA Hostmot2 Signals
15+
#######################################################################
16+
set_property PACKAGE_PIN D7 [get_ports {IOBits[0]}]; # "D7.HD_GPIO_0"
17+
set_property PACKAGE_PIN F8 [get_ports {IOBits[1]}]; # "F8.HD_GPIO_1"
18+
set_property PACKAGE_PIN F7 [get_ports {IOBits[2]}]; # "F7.HD_GPIO_2"
19+
set_property PACKAGE_PIN G7 [get_ports {IOBits[3]}]; # "G7.HD_GPIO_3"
20+
set_property PACKAGE_PIN F6 [get_ports {IOBits[4]}]; # "F6.HD_GPIO_4"
21+
set_property PACKAGE_PIN G5 [get_ports {IOBits[5]}]; # "G5.HD_GPIO_5"
22+
set_property PACKAGE_PIN A6 [get_ports {IOBits[6]}]; # "A6.HD_GPIO_6"
23+
set_property PACKAGE_PIN A7 [get_ports {IOBits[7]}]; # "A7.HD_GPIO_7"
24+
set_property PACKAGE_PIN G6 [get_ports {IOBits[8]}]; # "G6.HD_GPIO_8"
25+
set_property PACKAGE_PIN E6 [get_ports {IOBits[9]}]; # "E6.HD_GPIO_9"
26+
set_property PACKAGE_PIN E5 [get_ports {IOBits[10]}]; # "E5.HD_GPIO_10"
27+
set_property PACKAGE_PIN D6 [get_ports {IOBits[11]}]; # "D6.HD_GPIO_11"
28+
set_property PACKAGE_PIN D5 [get_ports {IOBits[12]}]; # "D5.HD_GPIO_12"
29+
set_property PACKAGE_PIN C7 [get_ports {IOBits[13]}]; # "C7.HD_GPIO_13"
30+
set_property PACKAGE_PIN B6 [get_ports {IOBits[14]}]; # "B6.HD_GPIO_14"
31+
set_property PACKAGE_PIN C5 [get_ports {IOBits[15]}]; # "C5.HD_GPIO_15"
32+
set_property PACKAGE_PIN N2 [get_ports {IOBits[16]}]; # "N2.CSI0_C_P"
33+
set_property PACKAGE_PIN P1 [get_ports {IOBits[17]}]; # "P1.CSI0_C_N"
34+
set_property PACKAGE_PIN N5 [get_ports {IOBits[18]}]; # "N5.CSI0_D0_P"
35+
set_property PACKAGE_PIN N4 [get_ports {IOBits[19]}]; # "N4.CSI0_D0_N"
36+
set_property PACKAGE_PIN M2 [get_ports {IOBits[20]}]; # "M2.CSI0_D1_P"
37+
set_property PACKAGE_PIN M1 [get_ports {IOBits[21]}]; # "M1.CSI0_D1_N"
38+
set_property PACKAGE_PIN M5 [get_ports {IOBits[22]}]; # "M5.CSI0_D2_P"
39+
set_property PACKAGE_PIN M4 [get_ports {IOBits[23]}]; # "M4.CSI0_D2_N"
40+
set_property PACKAGE_PIN L2 [get_ports {IOBits[24]}]; # "L2.CSI0_D3_P"
41+
set_property PACKAGE_PIN L1 [get_ports {IOBits[25]}]; # "L1.CSI0_D3_N"
42+
set_property PACKAGE_PIN P3 [get_ports {IOBits[26]}]; # "P3.CSI1_D0_P"
43+
set_property PACKAGE_PIN R3 [get_ports {IOBits[27]}]; # "R3.CSI1_D0_N"
44+
set_property PACKAGE_PIN U2 [get_ports {IOBits[28]}]; # "U2.CSI1_D1_P"
45+
set_property PACKAGE_PIN U1 [get_ports {IOBits[29]}]; # "U1.CSI1_D1_N"
46+
set_property PACKAGE_PIN T3 [get_ports {IOBits[30]}]; # "T3.CSI1_C_P"
47+
set_property PACKAGE_PIN T2 [get_ports {IOBits[31]}]; # "T2.CSI1_C_N"
48+
set_property PACKAGE_PIN C2 [get_ports {LED[0]}]; # "C2.HSIC_DATA"
49+
set_property PACKAGE_PIN A2 [get_ports {IOBits[32]}]; # "A2.HSIC_STR"
50+
set_property PACKAGE_PIN C3 [get_ports {IOBits[33]}]; # "C3.DSI_D3_N"
51+
set_property PACKAGE_PIN D3 [get_ports {IOBits[34]}]; # "D3.DSI_D3_P"
52+
set_property PACKAGE_PIN D1 [get_ports {IOBits[35]}]; # "D1.DSI_D2_N"
53+
set_property PACKAGE_PIN E1 [get_ports {RATES[0]}]; # "E1.DSI_D2_P"
54+
set_property PACKAGE_PIN E3 [get_ports {RATES[1]}]; # "E3.DSI_D1_N"
55+
set_property PACKAGE_PIN E4 [get_ports {RATES[2]}]; # "E4.DSI_D1_P"
56+
set_property PACKAGE_PIN F1 [get_ports {RATES[3]}]; # "F1.DSI_D0_N"
57+
set_property PACKAGE_PIN G1 [get_ports {RATES[4]}]; # "G1.DSI_D0_P"
58+
59+
# Set the bank voltage for IO Bank 26 to 1.8V
60+
set_property IOSTANDARD LVCMOS18 [get_ports -of_objects [get_iobanks 26]]
61+
62+
# Set the bank voltage for IO Bank 65 to 1.2V
63+
set_property IOSTANDARD LVCMOS12 [get_ports -of_objects [get_iobanks 65]]
64+
65+
# Set the bank voltage for IO Bank 66 to 1.2V
66+
set_property IOSTANDARD LVCMOS12 [get_ports -of_objects [get_iobanks 66]]

0 commit comments

Comments
 (0)