mirror of
https://github.com/mist-devel/mist-board.git
synced 2026-01-27 04:11:51 +00:00
Added files from PLL_FastRAM patch
This commit is contained in:
174
cores/minimig/rtl/cycloneiii/7mhzclk.mif
Normal file
174
cores/minimig/rtl/cycloneiii/7mhzclk.mif
Normal file
@@ -0,0 +1,174 @@
|
||||
-- Copyright (C) 1991-2012 Altera Corporation
|
||||
-- Your use of Altera Corporation's design tools, logic functions
|
||||
-- and other software and tools, and its AMPP partner logic
|
||||
-- functions, and any output files from any of the foregoing
|
||||
-- (including device programming or simulation files), and any
|
||||
-- associated documentation or information are expressly subject
|
||||
-- to the terms and conditions of the Altera Program License
|
||||
-- Subscription Agreement, Altera MegaCore Function License
|
||||
-- Agreement, or other applicable license agreement, including,
|
||||
-- without limitation, that your use is for the sole purpose of
|
||||
-- programming logic devices manufactured by Altera and sold by
|
||||
-- Altera or its authorized distributors. Please refer to the
|
||||
-- applicable agreement for further details.
|
||||
|
||||
-- MIF file representing initial state of PLL Scan Chain
|
||||
-- Device Family: Cyclone III
|
||||
-- Device Part: -
|
||||
-- Device Speed Grade: 8
|
||||
-- PLL Scan Chain: Fast PLL (144 bits)
|
||||
-- File Name: /home/amr/FPGA/MiST/minimig/rtl/cycloneiii/7mhzclk.mif
|
||||
-- Generated: Sun Mar 3 22:10:32 2013
|
||||
|
||||
WIDTH=1;
|
||||
DEPTH=144;
|
||||
|
||||
ADDRESS_RADIX=UNS;
|
||||
DATA_RADIX=UNS;
|
||||
|
||||
CONTENT BEGIN
|
||||
0 : 0; -- Reserved Bits = 0 (1 bit(s))
|
||||
1 : 0; -- Reserved Bits = 0 (1 bit(s))
|
||||
2 : 0; -- Loop Filter Capacitance = 0 (2 bit(s)) (Setting 0)
|
||||
3 : 0;
|
||||
4 : 1; -- Loop Filter Resistance = 16 (5 bit(s)) (Setting 16)
|
||||
5 : 0;
|
||||
6 : 0;
|
||||
7 : 0;
|
||||
8 : 0;
|
||||
9 : 0; -- VCO Post Scale = 0 (1 bit(s)) (VCO post-scale divider counter value = 2)
|
||||
10 : 0; -- Reserved Bits = 0 (5 bit(s))
|
||||
11 : 0;
|
||||
12 : 0;
|
||||
13 : 0;
|
||||
14 : 0;
|
||||
15 : 0; -- Charge Pump Current = 1 (3 bit(s)) (Setting 1)
|
||||
16 : 0;
|
||||
17 : 1;
|
||||
18 : 0; -- N counter: Bypass = 0 (1 bit(s))
|
||||
19 : 0; -- N counter: High Count = 3 (8 bit(s))
|
||||
20 : 0;
|
||||
21 : 0;
|
||||
22 : 0;
|
||||
23 : 0;
|
||||
24 : 0;
|
||||
25 : 1;
|
||||
26 : 1;
|
||||
27 : 1; -- N counter: Odd Division = 1 (1 bit(s))
|
||||
28 : 0; -- N counter: Low Count = 2 (8 bit(s))
|
||||
29 : 0;
|
||||
30 : 0;
|
||||
31 : 0;
|
||||
32 : 0;
|
||||
33 : 0;
|
||||
34 : 1;
|
||||
35 : 0;
|
||||
36 : 0; -- M counter: Bypass = 0 (1 bit(s))
|
||||
37 : 0; -- M counter: High Count = 42 (8 bit(s))
|
||||
38 : 0;
|
||||
39 : 1;
|
||||
40 : 0;
|
||||
41 : 1;
|
||||
42 : 0;
|
||||
43 : 1;
|
||||
44 : 0;
|
||||
45 : 0; -- M counter: Odd Division = 0 (1 bit(s))
|
||||
46 : 0; -- M counter: Low Count = 42 (8 bit(s))
|
||||
47 : 0;
|
||||
48 : 1;
|
||||
49 : 0;
|
||||
50 : 1;
|
||||
51 : 0;
|
||||
52 : 1;
|
||||
53 : 0;
|
||||
54 : 0; -- clk0 counter: Bypass = 0 (1 bit(s))
|
||||
55 : 0; -- clk0 counter: High Count = 2 (8 bit(s))
|
||||
56 : 0;
|
||||
57 : 0;
|
||||
58 : 0;
|
||||
59 : 0;
|
||||
60 : 0;
|
||||
61 : 1;
|
||||
62 : 0;
|
||||
63 : 0; -- clk0 counter: Odd Division = 0 (1 bit(s))
|
||||
64 : 0; -- clk0 counter: Low Count = 2 (8 bit(s))
|
||||
65 : 0;
|
||||
66 : 0;
|
||||
67 : 0;
|
||||
68 : 0;
|
||||
69 : 0;
|
||||
70 : 1;
|
||||
71 : 0;
|
||||
72 : 0; -- clk1 counter: Bypass = 0 (1 bit(s))
|
||||
73 : 0; -- clk1 counter: High Count = 8 (8 bit(s))
|
||||
74 : 0;
|
||||
75 : 0;
|
||||
76 : 0;
|
||||
77 : 1;
|
||||
78 : 0;
|
||||
79 : 0;
|
||||
80 : 0;
|
||||
81 : 0; -- clk1 counter: Odd Division = 0 (1 bit(s))
|
||||
82 : 0; -- clk1 counter: Low Count = 8 (8 bit(s))
|
||||
83 : 0;
|
||||
84 : 0;
|
||||
85 : 0;
|
||||
86 : 1;
|
||||
87 : 0;
|
||||
88 : 0;
|
||||
89 : 0;
|
||||
90 : 0; -- clk2 counter: Bypass = 0 (1 bit(s))
|
||||
91 : 0; -- clk2 counter: High Count = 2 (8 bit(s))
|
||||
92 : 0;
|
||||
93 : 0;
|
||||
94 : 0;
|
||||
95 : 0;
|
||||
96 : 0;
|
||||
97 : 1;
|
||||
98 : 0;
|
||||
99 : 0; -- clk2 counter: Odd Division = 0 (1 bit(s))
|
||||
100 : 0; -- clk2 counter: Low Count = 2 (8 bit(s))
|
||||
101 : 0;
|
||||
102 : 0;
|
||||
103 : 0;
|
||||
104 : 0;
|
||||
105 : 0;
|
||||
106 : 1;
|
||||
107 : 0;
|
||||
108 : 1; -- clk3 counter: Bypass = 1 (1 bit(s))
|
||||
109 : 0; -- clk3 counter: High Count = 0 (8 bit(s))
|
||||
110 : 0;
|
||||
111 : 0;
|
||||
112 : 0;
|
||||
113 : 0;
|
||||
114 : 0;
|
||||
115 : 0;
|
||||
116 : 0;
|
||||
117 : 0; -- clk3 counter: Odd Division = 0 (1 bit(s))
|
||||
118 : 0; -- clk3 counter: Low Count = 0 (8 bit(s))
|
||||
119 : 0;
|
||||
120 : 0;
|
||||
121 : 0;
|
||||
122 : 0;
|
||||
123 : 0;
|
||||
124 : 0;
|
||||
125 : 0;
|
||||
126 : 1; -- clk4 counter: Bypass = 1 (1 bit(s))
|
||||
127 : 0; -- clk4 counter: High Count = 0 (8 bit(s))
|
||||
128 : 0;
|
||||
129 : 0;
|
||||
130 : 0;
|
||||
131 : 0;
|
||||
132 : 0;
|
||||
133 : 0;
|
||||
134 : 0;
|
||||
135 : 0; -- clk4 counter: Odd Division = 0 (1 bit(s))
|
||||
136 : 0; -- clk4 counter: Low Count = 0 (8 bit(s))
|
||||
137 : 0;
|
||||
138 : 0;
|
||||
139 : 0;
|
||||
140 : 0;
|
||||
141 : 0;
|
||||
142 : 0;
|
||||
143 : 0;
|
||||
END;
|
||||
174
cores/minimig/rtl/cycloneiii/8mhzclk.mif
Normal file
174
cores/minimig/rtl/cycloneiii/8mhzclk.mif
Normal file
@@ -0,0 +1,174 @@
|
||||
-- Copyright (C) 1991-2012 Altera Corporation
|
||||
-- Your use of Altera Corporation's design tools, logic functions
|
||||
-- and other software and tools, and its AMPP partner logic
|
||||
-- functions, and any output files from any of the foregoing
|
||||
-- (including device programming or simulation files), and any
|
||||
-- associated documentation or information are expressly subject
|
||||
-- to the terms and conditions of the Altera Program License
|
||||
-- Subscription Agreement, Altera MegaCore Function License
|
||||
-- Agreement, or other applicable license agreement, including,
|
||||
-- without limitation, that your use is for the sole purpose of
|
||||
-- programming logic devices manufactured by Altera and sold by
|
||||
-- Altera or its authorized distributors. Please refer to the
|
||||
-- applicable agreement for further details.
|
||||
|
||||
-- MIF file representing initial state of PLL Scan Chain
|
||||
-- Device Family: Cyclone III
|
||||
-- Device Part: -
|
||||
-- Device Speed Grade: 8
|
||||
-- PLL Scan Chain: Fast PLL (144 bits)
|
||||
-- File Name: /home/amr/FPGA/MiST/minimig/rtl/cycloneiii/8mhzclk.mif
|
||||
-- Generated: Sun Mar 3 22:12:22 2013
|
||||
|
||||
WIDTH=1;
|
||||
DEPTH=144;
|
||||
|
||||
ADDRESS_RADIX=UNS;
|
||||
DATA_RADIX=UNS;
|
||||
|
||||
CONTENT BEGIN
|
||||
0 : 0; -- Reserved Bits = 0 (1 bit(s))
|
||||
1 : 0; -- Reserved Bits = 0 (1 bit(s))
|
||||
2 : 0; -- Loop Filter Capacitance = 0 (2 bit(s)) (Setting 0)
|
||||
3 : 0;
|
||||
4 : 1; -- Loop Filter Resistance = 16 (5 bit(s)) (Setting 16)
|
||||
5 : 0;
|
||||
6 : 0;
|
||||
7 : 0;
|
||||
8 : 0;
|
||||
9 : 1; -- VCO Post Scale = 1 (1 bit(s)) (VCO post-scale divider counter value = 1)
|
||||
10 : 0; -- Reserved Bits = 0 (5 bit(s))
|
||||
11 : 0;
|
||||
12 : 0;
|
||||
13 : 0;
|
||||
14 : 0;
|
||||
15 : 0; -- Charge Pump Current = 1 (3 bit(s)) (Setting 1)
|
||||
16 : 0;
|
||||
17 : 1;
|
||||
18 : 0; -- N counter: Bypass = 0 (1 bit(s))
|
||||
19 : 0; -- N counter: High Count = 2 (8 bit(s))
|
||||
20 : 0;
|
||||
21 : 0;
|
||||
22 : 0;
|
||||
23 : 0;
|
||||
24 : 0;
|
||||
25 : 1;
|
||||
26 : 0;
|
||||
27 : 1; -- N counter: Odd Division = 1 (1 bit(s))
|
||||
28 : 0; -- N counter: Low Count = 1 (8 bit(s))
|
||||
29 : 0;
|
||||
30 : 0;
|
||||
31 : 0;
|
||||
32 : 0;
|
||||
33 : 0;
|
||||
34 : 0;
|
||||
35 : 1;
|
||||
36 : 0; -- M counter: Bypass = 0 (1 bit(s))
|
||||
37 : 0; -- M counter: High Count = 64 (8 bit(s))
|
||||
38 : 1;
|
||||
39 : 0;
|
||||
40 : 0;
|
||||
41 : 0;
|
||||
42 : 0;
|
||||
43 : 0;
|
||||
44 : 0;
|
||||
45 : 0; -- M counter: Odd Division = 0 (1 bit(s))
|
||||
46 : 0; -- M counter: Low Count = 64 (8 bit(s))
|
||||
47 : 1;
|
||||
48 : 0;
|
||||
49 : 0;
|
||||
50 : 0;
|
||||
51 : 0;
|
||||
52 : 0;
|
||||
53 : 0;
|
||||
54 : 0; -- clk0 counter: Bypass = 0 (1 bit(s))
|
||||
55 : 0; -- clk0 counter: High Count = 5 (8 bit(s))
|
||||
56 : 0;
|
||||
57 : 0;
|
||||
58 : 0;
|
||||
59 : 0;
|
||||
60 : 1;
|
||||
61 : 0;
|
||||
62 : 1;
|
||||
63 : 1; -- clk0 counter: Odd Division = 1 (1 bit(s))
|
||||
64 : 0; -- clk0 counter: Low Count = 4 (8 bit(s))
|
||||
65 : 0;
|
||||
66 : 0;
|
||||
67 : 0;
|
||||
68 : 0;
|
||||
69 : 1;
|
||||
70 : 0;
|
||||
71 : 0;
|
||||
72 : 0; -- clk1 counter: Bypass = 0 (1 bit(s))
|
||||
73 : 0; -- clk1 counter: High Count = 18 (8 bit(s))
|
||||
74 : 0;
|
||||
75 : 0;
|
||||
76 : 1;
|
||||
77 : 0;
|
||||
78 : 0;
|
||||
79 : 1;
|
||||
80 : 0;
|
||||
81 : 0; -- clk1 counter: Odd Division = 0 (1 bit(s))
|
||||
82 : 0; -- clk1 counter: Low Count = 18 (8 bit(s))
|
||||
83 : 0;
|
||||
84 : 0;
|
||||
85 : 1;
|
||||
86 : 0;
|
||||
87 : 0;
|
||||
88 : 1;
|
||||
89 : 0;
|
||||
90 : 0; -- clk2 counter: Bypass = 0 (1 bit(s))
|
||||
91 : 0; -- clk2 counter: High Count = 5 (8 bit(s))
|
||||
92 : 0;
|
||||
93 : 0;
|
||||
94 : 0;
|
||||
95 : 0;
|
||||
96 : 1;
|
||||
97 : 0;
|
||||
98 : 1;
|
||||
99 : 1; -- clk2 counter: Odd Division = 1 (1 bit(s))
|
||||
100 : 0; -- clk2 counter: Low Count = 4 (8 bit(s))
|
||||
101 : 0;
|
||||
102 : 0;
|
||||
103 : 0;
|
||||
104 : 0;
|
||||
105 : 1;
|
||||
106 : 0;
|
||||
107 : 0;
|
||||
108 : 1; -- clk3 counter: Bypass = 1 (1 bit(s))
|
||||
109 : 0; -- clk3 counter: High Count = 0 (8 bit(s))
|
||||
110 : 0;
|
||||
111 : 0;
|
||||
112 : 0;
|
||||
113 : 0;
|
||||
114 : 0;
|
||||
115 : 0;
|
||||
116 : 0;
|
||||
117 : 0; -- clk3 counter: Odd Division = 0 (1 bit(s))
|
||||
118 : 0; -- clk3 counter: Low Count = 0 (8 bit(s))
|
||||
119 : 0;
|
||||
120 : 0;
|
||||
121 : 0;
|
||||
122 : 0;
|
||||
123 : 0;
|
||||
124 : 0;
|
||||
125 : 0;
|
||||
126 : 1; -- clk4 counter: Bypass = 1 (1 bit(s))
|
||||
127 : 0; -- clk4 counter: High Count = 0 (8 bit(s))
|
||||
128 : 0;
|
||||
129 : 0;
|
||||
130 : 0;
|
||||
131 : 0;
|
||||
132 : 0;
|
||||
133 : 0;
|
||||
134 : 0;
|
||||
135 : 0; -- clk4 counter: Odd Division = 0 (1 bit(s))
|
||||
136 : 0; -- clk4 counter: Low Count = 0 (8 bit(s))
|
||||
137 : 0;
|
||||
138 : 0;
|
||||
139 : 0;
|
||||
140 : 0;
|
||||
141 : 0;
|
||||
142 : 0;
|
||||
143 : 0;
|
||||
END;
|
||||
32
cores/minimig/rtl/cycloneiii/MyPLL.cmp
Normal file
32
cores/minimig/rtl/cycloneiii/MyPLL.cmp
Normal file
@@ -0,0 +1,32 @@
|
||||
--Copyright (C) 1991-2012 Altera Corporation
|
||||
--Your use of Altera Corporation's design tools, logic functions
|
||||
--and other software and tools, and its AMPP partner logic
|
||||
--functions, and any output files from any of the foregoing
|
||||
--(including device programming or simulation files), and any
|
||||
--associated documentation or information are expressly subject
|
||||
--to the terms and conditions of the Altera Program License
|
||||
--Subscription Agreement, Altera MegaCore Function License
|
||||
--Agreement, or other applicable license agreement, including,
|
||||
--without limitation, that your use is for the sole purpose of
|
||||
--programming logic devices manufactured by Altera and sold by
|
||||
--Altera or its authorized distributors. Please refer to the
|
||||
--applicable agreement for further details.
|
||||
|
||||
|
||||
component MyPLL
|
||||
PORT
|
||||
(
|
||||
areset : IN STD_LOGIC := '0';
|
||||
configupdate : IN STD_LOGIC := '0';
|
||||
inclk0 : IN STD_LOGIC := '0';
|
||||
scanclk : IN STD_LOGIC := '1';
|
||||
scanclkena : IN STD_LOGIC := '0';
|
||||
scandata : IN STD_LOGIC := '0';
|
||||
c0 : OUT STD_LOGIC ;
|
||||
c1 : OUT STD_LOGIC ;
|
||||
c2 : OUT STD_LOGIC ;
|
||||
locked : OUT STD_LOGIC ;
|
||||
scandataout : OUT STD_LOGIC ;
|
||||
scandone : OUT STD_LOGIC
|
||||
);
|
||||
end component;
|
||||
19
cores/minimig/rtl/cycloneiii/MyPLL.ppf
Normal file
19
cores/minimig/rtl/cycloneiii/MyPLL.ppf
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE pinplan>
|
||||
<pinplan intended_family="Cyclone III" variation_name="MyPLL" megafunction_name="ALTPLL" specifies="all_ports">
|
||||
<global>
|
||||
<pin name="areset" direction="input" scope="external" />
|
||||
<pin name="configupdate" direction="input" scope="external" />
|
||||
<pin name="inclk0" direction="input" scope="external" source="clock" />
|
||||
<pin name="scanclk" direction="input" scope="external" source="clock" />
|
||||
<pin name="scanclkena" direction="input" scope="external" />
|
||||
<pin name="scandata" direction="input" scope="external" />
|
||||
<pin name="c0" direction="output" scope="external" source="clock" />
|
||||
<pin name="c1" direction="output" scope="external" source="clock" />
|
||||
<pin name="c2" direction="output" scope="external" source="clock" />
|
||||
<pin name="locked" direction="output" scope="external" />
|
||||
<pin name="scandataout" direction="output" scope="external" />
|
||||
<pin name="scandone" direction="output" scope="external" />
|
||||
|
||||
</global>
|
||||
</pinplan>
|
||||
5
cores/minimig/rtl/cycloneiii/MyPLL.qip
Normal file
5
cores/minimig/rtl/cycloneiii/MyPLL.qip
Normal file
@@ -0,0 +1,5 @@
|
||||
set_global_assignment -name IP_TOOL_NAME "ALTPLL"
|
||||
set_global_assignment -name IP_TOOL_VERSION "12.0"
|
||||
set_global_assignment -name VHDL_FILE [file join $::quartus(qip_path) "MyPLL.vhd"]
|
||||
set_global_assignment -name MISC_FILE [file join $::quartus(qip_path) "MyPLL.cmp"]
|
||||
set_global_assignment -name MISC_FILE [file join $::quartus(qip_path) "MyPLL.ppf"]
|
||||
468
cores/minimig/rtl/cycloneiii/MyPLL.vhd
Normal file
468
cores/minimig/rtl/cycloneiii/MyPLL.vhd
Normal file
@@ -0,0 +1,468 @@
|
||||
-- megafunction wizard: %ALTPLL%
|
||||
-- GENERATION: STANDARD
|
||||
-- VERSION: WM1.0
|
||||
-- MODULE: altpll
|
||||
|
||||
-- ============================================================
|
||||
-- File Name: MyPLL.vhd
|
||||
-- Megafunction Name(s):
|
||||
-- altpll
|
||||
--
|
||||
-- Simulation Library Files(s):
|
||||
-- altera_mf
|
||||
-- ============================================================
|
||||
-- ************************************************************
|
||||
-- THIS IS A WIZARD-GENERATED FILE. DO NOT EDIT THIS FILE!
|
||||
--
|
||||
-- 12.0 Build 232 07/05/2012 SP 1 SJ Web Edition
|
||||
-- ************************************************************
|
||||
|
||||
|
||||
--Copyright (C) 1991-2012 Altera Corporation
|
||||
--Your use of Altera Corporation's design tools, logic functions
|
||||
--and other software and tools, and its AMPP partner logic
|
||||
--functions, and any output files from any of the foregoing
|
||||
--(including device programming or simulation files), and any
|
||||
--associated documentation or information are expressly subject
|
||||
--to the terms and conditions of the Altera Program License
|
||||
--Subscription Agreement, Altera MegaCore Function License
|
||||
--Agreement, or other applicable license agreement, including,
|
||||
--without limitation, that your use is for the sole purpose of
|
||||
--programming logic devices manufactured by Altera and sold by
|
||||
--Altera or its authorized distributors. Please refer to the
|
||||
--applicable agreement for further details.
|
||||
|
||||
|
||||
LIBRARY ieee;
|
||||
USE ieee.std_logic_1164.all;
|
||||
|
||||
LIBRARY altera_mf;
|
||||
USE altera_mf.all;
|
||||
|
||||
ENTITY MyPLL IS
|
||||
PORT
|
||||
(
|
||||
areset : IN STD_LOGIC := '0';
|
||||
configupdate : IN STD_LOGIC := '0';
|
||||
inclk0 : IN STD_LOGIC := '0';
|
||||
scanclk : IN STD_LOGIC := '1';
|
||||
scanclkena : IN STD_LOGIC := '0';
|
||||
scandata : IN STD_LOGIC := '0';
|
||||
c0 : OUT STD_LOGIC ;
|
||||
c1 : OUT STD_LOGIC ;
|
||||
c2 : OUT STD_LOGIC ;
|
||||
locked : OUT STD_LOGIC ;
|
||||
scandataout : OUT STD_LOGIC ;
|
||||
scandone : OUT STD_LOGIC
|
||||
);
|
||||
END MyPLL;
|
||||
|
||||
|
||||
ARCHITECTURE SYN OF mypll IS
|
||||
|
||||
SIGNAL sub_wire0 : STD_LOGIC_VECTOR (4 DOWNTO 0);
|
||||
SIGNAL sub_wire1 : STD_LOGIC ;
|
||||
SIGNAL sub_wire2 : STD_LOGIC ;
|
||||
SIGNAL sub_wire3 : STD_LOGIC ;
|
||||
SIGNAL sub_wire4 : STD_LOGIC ;
|
||||
SIGNAL sub_wire5 : STD_LOGIC ;
|
||||
SIGNAL sub_wire6 : STD_LOGIC ;
|
||||
SIGNAL sub_wire7 : STD_LOGIC ;
|
||||
SIGNAL sub_wire8 : STD_LOGIC_VECTOR (1 DOWNTO 0);
|
||||
SIGNAL sub_wire9_bv : BIT_VECTOR (0 DOWNTO 0);
|
||||
SIGNAL sub_wire9 : STD_LOGIC_VECTOR (0 DOWNTO 0);
|
||||
|
||||
|
||||
|
||||
COMPONENT altpll
|
||||
GENERIC (
|
||||
bandwidth_type : STRING;
|
||||
clk0_divide_by : NATURAL;
|
||||
clk0_duty_cycle : NATURAL;
|
||||
clk0_multiply_by : NATURAL;
|
||||
clk0_phase_shift : STRING;
|
||||
clk1_divide_by : NATURAL;
|
||||
clk1_duty_cycle : NATURAL;
|
||||
clk1_multiply_by : NATURAL;
|
||||
clk1_phase_shift : STRING;
|
||||
clk2_divide_by : NATURAL;
|
||||
clk2_duty_cycle : NATURAL;
|
||||
clk2_multiply_by : NATURAL;
|
||||
clk2_phase_shift : STRING;
|
||||
compensate_clock : STRING;
|
||||
inclk0_input_frequency : NATURAL;
|
||||
intended_device_family : STRING;
|
||||
lpm_hint : STRING;
|
||||
lpm_type : STRING;
|
||||
operation_mode : STRING;
|
||||
pll_type : STRING;
|
||||
port_activeclock : STRING;
|
||||
port_areset : STRING;
|
||||
port_clkbad0 : STRING;
|
||||
port_clkbad1 : STRING;
|
||||
port_clkloss : STRING;
|
||||
port_clkswitch : STRING;
|
||||
port_configupdate : STRING;
|
||||
port_fbin : STRING;
|
||||
port_inclk0 : STRING;
|
||||
port_inclk1 : STRING;
|
||||
port_locked : STRING;
|
||||
port_pfdena : STRING;
|
||||
port_phasecounterselect : STRING;
|
||||
port_phasedone : STRING;
|
||||
port_phasestep : STRING;
|
||||
port_phaseupdown : STRING;
|
||||
port_pllena : STRING;
|
||||
port_scanaclr : STRING;
|
||||
port_scanclk : STRING;
|
||||
port_scanclkena : STRING;
|
||||
port_scandata : STRING;
|
||||
port_scandataout : STRING;
|
||||
port_scandone : STRING;
|
||||
port_scanread : STRING;
|
||||
port_scanwrite : STRING;
|
||||
port_clk0 : STRING;
|
||||
port_clk1 : STRING;
|
||||
port_clk2 : STRING;
|
||||
port_clk3 : STRING;
|
||||
port_clk4 : STRING;
|
||||
port_clk5 : STRING;
|
||||
port_clkena0 : STRING;
|
||||
port_clkena1 : STRING;
|
||||
port_clkena2 : STRING;
|
||||
port_clkena3 : STRING;
|
||||
port_clkena4 : STRING;
|
||||
port_clkena5 : STRING;
|
||||
port_extclk0 : STRING;
|
||||
port_extclk1 : STRING;
|
||||
port_extclk2 : STRING;
|
||||
port_extclk3 : STRING;
|
||||
self_reset_on_loss_lock : STRING;
|
||||
width_clock : NATURAL;
|
||||
scan_chain_mif_file : STRING
|
||||
);
|
||||
PORT (
|
||||
areset : IN STD_LOGIC ;
|
||||
configupdate : IN STD_LOGIC ;
|
||||
inclk : IN STD_LOGIC_VECTOR (1 DOWNTO 0);
|
||||
scanclk : IN STD_LOGIC ;
|
||||
scanclkena : IN STD_LOGIC ;
|
||||
scandata : IN STD_LOGIC ;
|
||||
scandataout : OUT STD_LOGIC ;
|
||||
scandone : OUT STD_LOGIC ;
|
||||
clk : OUT STD_LOGIC_VECTOR (4 DOWNTO 0);
|
||||
locked : OUT STD_LOGIC
|
||||
);
|
||||
END COMPONENT;
|
||||
|
||||
BEGIN
|
||||
sub_wire9_bv(0 DOWNTO 0) <= "0";
|
||||
sub_wire9 <= To_stdlogicvector(sub_wire9_bv);
|
||||
sub_wire4 <= sub_wire0(0);
|
||||
sub_wire2 <= sub_wire0(2);
|
||||
sub_wire1 <= sub_wire0(1);
|
||||
c1 <= sub_wire1;
|
||||
c2 <= sub_wire2;
|
||||
locked <= sub_wire3;
|
||||
c0 <= sub_wire4;
|
||||
scandataout <= sub_wire5;
|
||||
scandone <= sub_wire6;
|
||||
sub_wire7 <= inclk0;
|
||||
sub_wire8 <= sub_wire9(0 DOWNTO 0) & sub_wire7;
|
||||
|
||||
altpll_component : altpll
|
||||
GENERIC MAP (
|
||||
bandwidth_type => "AUTO",
|
||||
clk0_divide_by => 540,
|
||||
clk0_duty_cycle => 50,
|
||||
clk0_multiply_by => 2269,
|
||||
clk0_phase_shift => "0",
|
||||
clk1_divide_by => 20,
|
||||
clk1_duty_cycle => 50,
|
||||
clk1_multiply_by => 21,
|
||||
clk1_phase_shift => "0",
|
||||
clk2_divide_by => 540,
|
||||
clk2_duty_cycle => 50,
|
||||
clk2_multiply_by => 2269,
|
||||
clk2_phase_shift => "-2500",
|
||||
compensate_clock => "CLK0",
|
||||
inclk0_input_frequency => 37037,
|
||||
intended_device_family => "Cyclone III",
|
||||
lpm_hint => "CBX_MODULE_PREFIX=MyPLL",
|
||||
lpm_type => "altpll",
|
||||
operation_mode => "NORMAL",
|
||||
pll_type => "AUTO",
|
||||
port_activeclock => "PORT_UNUSED",
|
||||
port_areset => "PORT_USED",
|
||||
port_clkbad0 => "PORT_UNUSED",
|
||||
port_clkbad1 => "PORT_UNUSED",
|
||||
port_clkloss => "PORT_UNUSED",
|
||||
port_clkswitch => "PORT_UNUSED",
|
||||
port_configupdate => "PORT_USED",
|
||||
port_fbin => "PORT_UNUSED",
|
||||
port_inclk0 => "PORT_USED",
|
||||
port_inclk1 => "PORT_UNUSED",
|
||||
port_locked => "PORT_USED",
|
||||
port_pfdena => "PORT_UNUSED",
|
||||
port_phasecounterselect => "PORT_UNUSED",
|
||||
port_phasedone => "PORT_UNUSED",
|
||||
port_phasestep => "PORT_UNUSED",
|
||||
port_phaseupdown => "PORT_UNUSED",
|
||||
port_pllena => "PORT_UNUSED",
|
||||
port_scanaclr => "PORT_UNUSED",
|
||||
port_scanclk => "PORT_USED",
|
||||
port_scanclkena => "PORT_USED",
|
||||
port_scandata => "PORT_USED",
|
||||
port_scandataout => "PORT_USED",
|
||||
port_scandone => "PORT_USED",
|
||||
port_scanread => "PORT_UNUSED",
|
||||
port_scanwrite => "PORT_UNUSED",
|
||||
port_clk0 => "PORT_USED",
|
||||
port_clk1 => "PORT_USED",
|
||||
port_clk2 => "PORT_USED",
|
||||
port_clk3 => "PORT_UNUSED",
|
||||
port_clk4 => "PORT_UNUSED",
|
||||
port_clk5 => "PORT_UNUSED",
|
||||
port_clkena0 => "PORT_UNUSED",
|
||||
port_clkena1 => "PORT_UNUSED",
|
||||
port_clkena2 => "PORT_UNUSED",
|
||||
port_clkena3 => "PORT_UNUSED",
|
||||
port_clkena4 => "PORT_UNUSED",
|
||||
port_clkena5 => "PORT_UNUSED",
|
||||
port_extclk0 => "PORT_UNUSED",
|
||||
port_extclk1 => "PORT_UNUSED",
|
||||
port_extclk2 => "PORT_UNUSED",
|
||||
port_extclk3 => "PORT_UNUSED",
|
||||
self_reset_on_loss_lock => "OFF",
|
||||
width_clock => 5,
|
||||
scan_chain_mif_file => "7mhzclk.mif"
|
||||
)
|
||||
PORT MAP (
|
||||
areset => areset,
|
||||
configupdate => configupdate,
|
||||
inclk => sub_wire8,
|
||||
scanclk => scanclk,
|
||||
scanclkena => scanclkena,
|
||||
scandata => scandata,
|
||||
clk => sub_wire0,
|
||||
locked => sub_wire3,
|
||||
scandataout => sub_wire5,
|
||||
scandone => sub_wire6
|
||||
);
|
||||
|
||||
|
||||
|
||||
END SYN;
|
||||
|
||||
-- ============================================================
|
||||
-- CNX file retrieval info
|
||||
-- ============================================================
|
||||
-- Retrieval info: PRIVATE: ACTIVECLK_CHECK STRING "0"
|
||||
-- Retrieval info: PRIVATE: BANDWIDTH STRING "1.000"
|
||||
-- Retrieval info: PRIVATE: BANDWIDTH_FEATURE_ENABLED STRING "1"
|
||||
-- Retrieval info: PRIVATE: BANDWIDTH_FREQ_UNIT STRING "MHz"
|
||||
-- Retrieval info: PRIVATE: BANDWIDTH_PRESET STRING "Low"
|
||||
-- Retrieval info: PRIVATE: BANDWIDTH_USE_AUTO STRING "1"
|
||||
-- Retrieval info: PRIVATE: BANDWIDTH_USE_PRESET STRING "0"
|
||||
-- Retrieval info: PRIVATE: CLKBAD_SWITCHOVER_CHECK STRING "0"
|
||||
-- Retrieval info: PRIVATE: CLKLOSS_CHECK STRING "0"
|
||||
-- Retrieval info: PRIVATE: CLKSWITCH_CHECK STRING "0"
|
||||
-- Retrieval info: PRIVATE: CNX_NO_COMPENSATE_RADIO STRING "0"
|
||||
-- Retrieval info: PRIVATE: CREATE_CLKBAD_CHECK STRING "0"
|
||||
-- Retrieval info: PRIVATE: CREATE_INCLK1_CHECK STRING "0"
|
||||
-- Retrieval info: PRIVATE: CUR_DEDICATED_CLK STRING "c0"
|
||||
-- Retrieval info: PRIVATE: CUR_FBIN_CLK STRING "c0"
|
||||
-- Retrieval info: PRIVATE: DEVICE_SPEED_GRADE STRING "8"
|
||||
-- Retrieval info: PRIVATE: DIV_FACTOR0 NUMERIC "1"
|
||||
-- Retrieval info: PRIVATE: DIV_FACTOR1 NUMERIC "20"
|
||||
-- Retrieval info: PRIVATE: DIV_FACTOR2 NUMERIC "1"
|
||||
-- Retrieval info: PRIVATE: DUTY_CYCLE0 STRING "50.00000000"
|
||||
-- Retrieval info: PRIVATE: DUTY_CYCLE1 STRING "50.00000000"
|
||||
-- Retrieval info: PRIVATE: DUTY_CYCLE2 STRING "50.00000000"
|
||||
-- Retrieval info: PRIVATE: EFF_OUTPUT_FREQ_VALUE0 STRING "113.449997"
|
||||
-- Retrieval info: PRIVATE: EFF_OUTPUT_FREQ_VALUE1 STRING "28.350000"
|
||||
-- Retrieval info: PRIVATE: EFF_OUTPUT_FREQ_VALUE2 STRING "113.449997"
|
||||
-- Retrieval info: PRIVATE: EXPLICIT_SWITCHOVER_COUNTER STRING "0"
|
||||
-- Retrieval info: PRIVATE: EXT_FEEDBACK_RADIO STRING "0"
|
||||
-- Retrieval info: PRIVATE: GLOCKED_COUNTER_EDIT_CHANGED STRING "1"
|
||||
-- Retrieval info: PRIVATE: GLOCKED_FEATURE_ENABLED STRING "0"
|
||||
-- Retrieval info: PRIVATE: GLOCKED_MODE_CHECK STRING "0"
|
||||
-- Retrieval info: PRIVATE: GLOCK_COUNTER_EDIT NUMERIC "1048575"
|
||||
-- Retrieval info: PRIVATE: HAS_MANUAL_SWITCHOVER STRING "1"
|
||||
-- Retrieval info: PRIVATE: INCLK0_FREQ_EDIT STRING "27.000"
|
||||
-- Retrieval info: PRIVATE: INCLK0_FREQ_UNIT_COMBO STRING "MHz"
|
||||
-- Retrieval info: PRIVATE: INCLK1_FREQ_EDIT STRING "100.000"
|
||||
-- Retrieval info: PRIVATE: INCLK1_FREQ_EDIT_CHANGED STRING "1"
|
||||
-- Retrieval info: PRIVATE: INCLK1_FREQ_UNIT_CHANGED STRING "1"
|
||||
-- Retrieval info: PRIVATE: INCLK1_FREQ_UNIT_COMBO STRING "MHz"
|
||||
-- Retrieval info: PRIVATE: INTENDED_DEVICE_FAMILY STRING "Cyclone III"
|
||||
-- Retrieval info: PRIVATE: INT_FEEDBACK__MODE_RADIO STRING "1"
|
||||
-- Retrieval info: PRIVATE: LOCKED_OUTPUT_CHECK STRING "1"
|
||||
-- Retrieval info: PRIVATE: LONG_SCAN_RADIO STRING "1"
|
||||
-- Retrieval info: PRIVATE: LVDS_MODE_DATA_RATE STRING "Not Available"
|
||||
-- Retrieval info: PRIVATE: LVDS_MODE_DATA_RATE_DIRTY NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: LVDS_PHASE_SHIFT_UNIT0 STRING "deg"
|
||||
-- Retrieval info: PRIVATE: LVDS_PHASE_SHIFT_UNIT1 STRING "ps"
|
||||
-- Retrieval info: PRIVATE: LVDS_PHASE_SHIFT_UNIT2 STRING "ps"
|
||||
-- Retrieval info: PRIVATE: MIG_DEVICE_SPEED_GRADE STRING "Any"
|
||||
-- Retrieval info: PRIVATE: MIRROR_CLK0 STRING "0"
|
||||
-- Retrieval info: PRIVATE: MIRROR_CLK1 STRING "0"
|
||||
-- Retrieval info: PRIVATE: MIRROR_CLK2 STRING "0"
|
||||
-- Retrieval info: PRIVATE: MULT_FACTOR0 NUMERIC "1"
|
||||
-- Retrieval info: PRIVATE: MULT_FACTOR1 NUMERIC "21"
|
||||
-- Retrieval info: PRIVATE: MULT_FACTOR2 NUMERIC "1"
|
||||
-- Retrieval info: PRIVATE: NORMAL_MODE_RADIO STRING "1"
|
||||
-- Retrieval info: PRIVATE: OUTPUT_FREQ0 STRING "113.45000000"
|
||||
-- Retrieval info: PRIVATE: OUTPUT_FREQ1 STRING "100.00000000"
|
||||
-- Retrieval info: PRIVATE: OUTPUT_FREQ2 STRING "113.45000000"
|
||||
-- Retrieval info: PRIVATE: OUTPUT_FREQ_MODE0 STRING "1"
|
||||
-- Retrieval info: PRIVATE: OUTPUT_FREQ_MODE1 STRING "0"
|
||||
-- Retrieval info: PRIVATE: OUTPUT_FREQ_MODE2 STRING "1"
|
||||
-- Retrieval info: PRIVATE: OUTPUT_FREQ_UNIT0 STRING "MHz"
|
||||
-- Retrieval info: PRIVATE: OUTPUT_FREQ_UNIT1 STRING "MHz"
|
||||
-- Retrieval info: PRIVATE: OUTPUT_FREQ_UNIT2 STRING "MHz"
|
||||
-- Retrieval info: PRIVATE: PHASE_RECONFIG_FEATURE_ENABLED STRING "1"
|
||||
-- Retrieval info: PRIVATE: PHASE_RECONFIG_INPUTS_CHECK STRING "0"
|
||||
-- Retrieval info: PRIVATE: PHASE_SHIFT0 STRING "0.00000000"
|
||||
-- Retrieval info: PRIVATE: PHASE_SHIFT1 STRING "0.00000000"
|
||||
-- Retrieval info: PRIVATE: PHASE_SHIFT2 STRING "-2.50000000"
|
||||
-- Retrieval info: PRIVATE: PHASE_SHIFT_STEP_ENABLED_CHECK STRING "0"
|
||||
-- Retrieval info: PRIVATE: PHASE_SHIFT_UNIT0 STRING "deg"
|
||||
-- Retrieval info: PRIVATE: PHASE_SHIFT_UNIT1 STRING "ps"
|
||||
-- Retrieval info: PRIVATE: PHASE_SHIFT_UNIT2 STRING "ns"
|
||||
-- Retrieval info: PRIVATE: PLL_ADVANCED_PARAM_CHECK STRING "0"
|
||||
-- Retrieval info: PRIVATE: PLL_ARESET_CHECK STRING "1"
|
||||
-- Retrieval info: PRIVATE: PLL_AUTOPLL_CHECK NUMERIC "1"
|
||||
-- Retrieval info: PRIVATE: PLL_ENHPLL_CHECK NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: PLL_FASTPLL_CHECK NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: PLL_FBMIMIC_CHECK STRING "0"
|
||||
-- Retrieval info: PRIVATE: PLL_LVDS_PLL_CHECK NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: PLL_PFDENA_CHECK STRING "0"
|
||||
-- Retrieval info: PRIVATE: PLL_TARGET_HARCOPY_CHECK NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: PRIMARY_CLK_COMBO STRING "inclk0"
|
||||
-- Retrieval info: PRIVATE: RECONFIG_FILE STRING "7mhzclk.mif"
|
||||
-- Retrieval info: PRIVATE: SACN_INPUTS_CHECK STRING "1"
|
||||
-- Retrieval info: PRIVATE: SCAN_FEATURE_ENABLED STRING "1"
|
||||
-- Retrieval info: PRIVATE: SELF_RESET_LOCK_LOSS STRING "0"
|
||||
-- Retrieval info: PRIVATE: SHORT_SCAN_RADIO STRING "0"
|
||||
-- Retrieval info: PRIVATE: SPREAD_FEATURE_ENABLED STRING "0"
|
||||
-- Retrieval info: PRIVATE: SPREAD_FREQ STRING "50.000"
|
||||
-- Retrieval info: PRIVATE: SPREAD_FREQ_UNIT STRING "KHz"
|
||||
-- Retrieval info: PRIVATE: SPREAD_PERCENT STRING "0.500"
|
||||
-- Retrieval info: PRIVATE: SPREAD_USE STRING "0"
|
||||
-- Retrieval info: PRIVATE: SRC_SYNCH_COMP_RADIO STRING "0"
|
||||
-- Retrieval info: PRIVATE: STICKY_CLK0 STRING "1"
|
||||
-- Retrieval info: PRIVATE: STICKY_CLK1 STRING "1"
|
||||
-- Retrieval info: PRIVATE: STICKY_CLK2 STRING "1"
|
||||
-- Retrieval info: PRIVATE: SWITCHOVER_COUNT_EDIT NUMERIC "1"
|
||||
-- Retrieval info: PRIVATE: SWITCHOVER_FEATURE_ENABLED STRING "1"
|
||||
-- Retrieval info: PRIVATE: SYNTH_WRAPPER_GEN_POSTFIX STRING "0"
|
||||
-- Retrieval info: PRIVATE: USE_CLK0 STRING "1"
|
||||
-- Retrieval info: PRIVATE: USE_CLK1 STRING "1"
|
||||
-- Retrieval info: PRIVATE: USE_CLK2 STRING "1"
|
||||
-- Retrieval info: PRIVATE: USE_CLKENA0 STRING "0"
|
||||
-- Retrieval info: PRIVATE: USE_CLKENA1 STRING "0"
|
||||
-- Retrieval info: PRIVATE: USE_CLKENA2 STRING "0"
|
||||
-- Retrieval info: PRIVATE: USE_MIL_SPEED_GRADE NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: ZERO_DELAY_RADIO STRING "0"
|
||||
-- Retrieval info: LIBRARY: altera_mf altera_mf.altera_mf_components.all
|
||||
-- Retrieval info: CONSTANT: BANDWIDTH_TYPE STRING "AUTO"
|
||||
-- Retrieval info: CONSTANT: CLK0_DIVIDE_BY NUMERIC "540"
|
||||
-- Retrieval info: CONSTANT: CLK0_DUTY_CYCLE NUMERIC "50"
|
||||
-- Retrieval info: CONSTANT: CLK0_MULTIPLY_BY NUMERIC "2269"
|
||||
-- Retrieval info: CONSTANT: CLK0_PHASE_SHIFT STRING "0"
|
||||
-- Retrieval info: CONSTANT: CLK1_DIVIDE_BY NUMERIC "20"
|
||||
-- Retrieval info: CONSTANT: CLK1_DUTY_CYCLE NUMERIC "50"
|
||||
-- Retrieval info: CONSTANT: CLK1_MULTIPLY_BY NUMERIC "21"
|
||||
-- Retrieval info: CONSTANT: CLK1_PHASE_SHIFT STRING "0"
|
||||
-- Retrieval info: CONSTANT: CLK2_DIVIDE_BY NUMERIC "540"
|
||||
-- Retrieval info: CONSTANT: CLK2_DUTY_CYCLE NUMERIC "50"
|
||||
-- Retrieval info: CONSTANT: CLK2_MULTIPLY_BY NUMERIC "2269"
|
||||
-- Retrieval info: CONSTANT: CLK2_PHASE_SHIFT STRING "-2500"
|
||||
-- Retrieval info: CONSTANT: COMPENSATE_CLOCK STRING "CLK0"
|
||||
-- Retrieval info: CONSTANT: INCLK0_INPUT_FREQUENCY NUMERIC "37037"
|
||||
-- Retrieval info: CONSTANT: INTENDED_DEVICE_FAMILY STRING "Cyclone III"
|
||||
-- Retrieval info: CONSTANT: LPM_TYPE STRING "altpll"
|
||||
-- Retrieval info: CONSTANT: OPERATION_MODE STRING "NORMAL"
|
||||
-- Retrieval info: CONSTANT: PLL_TYPE STRING "AUTO"
|
||||
-- Retrieval info: CONSTANT: PORT_ACTIVECLOCK STRING "PORT_UNUSED"
|
||||
-- Retrieval info: CONSTANT: PORT_ARESET STRING "PORT_USED"
|
||||
-- Retrieval info: CONSTANT: PORT_CLKBAD0 STRING "PORT_UNUSED"
|
||||
-- Retrieval info: CONSTANT: PORT_CLKBAD1 STRING "PORT_UNUSED"
|
||||
-- Retrieval info: CONSTANT: PORT_CLKLOSS STRING "PORT_UNUSED"
|
||||
-- Retrieval info: CONSTANT: PORT_CLKSWITCH STRING "PORT_UNUSED"
|
||||
-- Retrieval info: CONSTANT: PORT_CONFIGUPDATE STRING "PORT_USED"
|
||||
-- Retrieval info: CONSTANT: PORT_FBIN STRING "PORT_UNUSED"
|
||||
-- Retrieval info: CONSTANT: PORT_INCLK0 STRING "PORT_USED"
|
||||
-- Retrieval info: CONSTANT: PORT_INCLK1 STRING "PORT_UNUSED"
|
||||
-- Retrieval info: CONSTANT: PORT_LOCKED STRING "PORT_USED"
|
||||
-- Retrieval info: CONSTANT: PORT_PFDENA STRING "PORT_UNUSED"
|
||||
-- Retrieval info: CONSTANT: PORT_PHASECOUNTERSELECT STRING "PORT_UNUSED"
|
||||
-- Retrieval info: CONSTANT: PORT_PHASEDONE STRING "PORT_UNUSED"
|
||||
-- Retrieval info: CONSTANT: PORT_PHASESTEP STRING "PORT_UNUSED"
|
||||
-- Retrieval info: CONSTANT: PORT_PHASEUPDOWN STRING "PORT_UNUSED"
|
||||
-- Retrieval info: CONSTANT: PORT_PLLENA STRING "PORT_UNUSED"
|
||||
-- Retrieval info: CONSTANT: PORT_SCANACLR STRING "PORT_UNUSED"
|
||||
-- Retrieval info: CONSTANT: PORT_SCANCLK STRING "PORT_USED"
|
||||
-- Retrieval info: CONSTANT: PORT_SCANCLKENA STRING "PORT_USED"
|
||||
-- Retrieval info: CONSTANT: PORT_SCANDATA STRING "PORT_USED"
|
||||
-- Retrieval info: CONSTANT: PORT_SCANDATAOUT STRING "PORT_USED"
|
||||
-- Retrieval info: CONSTANT: PORT_SCANDONE STRING "PORT_USED"
|
||||
-- Retrieval info: CONSTANT: PORT_SCANREAD STRING "PORT_UNUSED"
|
||||
-- Retrieval info: CONSTANT: PORT_SCANWRITE STRING "PORT_UNUSED"
|
||||
-- Retrieval info: CONSTANT: PORT_clk0 STRING "PORT_USED"
|
||||
-- Retrieval info: CONSTANT: PORT_clk1 STRING "PORT_USED"
|
||||
-- Retrieval info: CONSTANT: PORT_clk2 STRING "PORT_USED"
|
||||
-- Retrieval info: CONSTANT: PORT_clk3 STRING "PORT_UNUSED"
|
||||
-- Retrieval info: CONSTANT: PORT_clk4 STRING "PORT_UNUSED"
|
||||
-- Retrieval info: CONSTANT: PORT_clk5 STRING "PORT_UNUSED"
|
||||
-- Retrieval info: CONSTANT: PORT_clkena0 STRING "PORT_UNUSED"
|
||||
-- Retrieval info: CONSTANT: PORT_clkena1 STRING "PORT_UNUSED"
|
||||
-- Retrieval info: CONSTANT: PORT_clkena2 STRING "PORT_UNUSED"
|
||||
-- Retrieval info: CONSTANT: PORT_clkena3 STRING "PORT_UNUSED"
|
||||
-- Retrieval info: CONSTANT: PORT_clkena4 STRING "PORT_UNUSED"
|
||||
-- Retrieval info: CONSTANT: PORT_clkena5 STRING "PORT_UNUSED"
|
||||
-- Retrieval info: CONSTANT: PORT_extclk0 STRING "PORT_UNUSED"
|
||||
-- Retrieval info: CONSTANT: PORT_extclk1 STRING "PORT_UNUSED"
|
||||
-- Retrieval info: CONSTANT: PORT_extclk2 STRING "PORT_UNUSED"
|
||||
-- Retrieval info: CONSTANT: PORT_extclk3 STRING "PORT_UNUSED"
|
||||
-- Retrieval info: CONSTANT: SELF_RESET_ON_LOSS_LOCK STRING "OFF"
|
||||
-- Retrieval info: CONSTANT: WIDTH_CLOCK NUMERIC "5"
|
||||
-- Retrieval info: CONSTANT: scan_chain_mif_file STRING "7mhzclk.mif"
|
||||
-- Retrieval info: USED_PORT: @clk 0 0 5 0 OUTPUT_CLK_EXT VCC "@clk[4..0]"
|
||||
-- Retrieval info: USED_PORT: @inclk 0 0 2 0 INPUT_CLK_EXT VCC "@inclk[1..0]"
|
||||
-- Retrieval info: USED_PORT: areset 0 0 0 0 INPUT GND "areset"
|
||||
-- Retrieval info: USED_PORT: c0 0 0 0 0 OUTPUT_CLK_EXT VCC "c0"
|
||||
-- Retrieval info: USED_PORT: c1 0 0 0 0 OUTPUT_CLK_EXT VCC "c1"
|
||||
-- Retrieval info: USED_PORT: c2 0 0 0 0 OUTPUT_CLK_EXT VCC "c2"
|
||||
-- Retrieval info: USED_PORT: configupdate 0 0 0 0 INPUT GND "configupdate"
|
||||
-- Retrieval info: USED_PORT: inclk0 0 0 0 0 INPUT_CLK_EXT GND "inclk0"
|
||||
-- Retrieval info: USED_PORT: locked 0 0 0 0 OUTPUT GND "locked"
|
||||
-- Retrieval info: USED_PORT: scanclk 0 0 0 0 INPUT_CLK_EXT VCC "scanclk"
|
||||
-- Retrieval info: USED_PORT: scanclkena 0 0 0 0 INPUT GND "scanclkena"
|
||||
-- Retrieval info: USED_PORT: scandata 0 0 0 0 INPUT GND "scandata"
|
||||
-- Retrieval info: USED_PORT: scandataout 0 0 0 0 OUTPUT VCC "scandataout"
|
||||
-- Retrieval info: USED_PORT: scandone 0 0 0 0 OUTPUT VCC "scandone"
|
||||
-- Retrieval info: CONNECT: @areset 0 0 0 0 areset 0 0 0 0
|
||||
-- Retrieval info: CONNECT: @configupdate 0 0 0 0 configupdate 0 0 0 0
|
||||
-- Retrieval info: CONNECT: @inclk 0 0 1 1 GND 0 0 0 0
|
||||
-- Retrieval info: CONNECT: @inclk 0 0 1 0 inclk0 0 0 0 0
|
||||
-- Retrieval info: CONNECT: @scanclk 0 0 0 0 scanclk 0 0 0 0
|
||||
-- Retrieval info: CONNECT: @scanclkena 0 0 0 0 scanclkena 0 0 0 0
|
||||
-- Retrieval info: CONNECT: @scandata 0 0 0 0 scandata 0 0 0 0
|
||||
-- Retrieval info: CONNECT: c0 0 0 0 0 @clk 0 0 1 0
|
||||
-- Retrieval info: CONNECT: c1 0 0 0 0 @clk 0 0 1 1
|
||||
-- Retrieval info: CONNECT: c2 0 0 0 0 @clk 0 0 1 2
|
||||
-- Retrieval info: CONNECT: locked 0 0 0 0 @locked 0 0 0 0
|
||||
-- Retrieval info: CONNECT: scandataout 0 0 0 0 @scandataout 0 0 0 0
|
||||
-- Retrieval info: CONNECT: scandone 0 0 0 0 @scandone 0 0 0 0
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL MyPLL.vhd TRUE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL MyPLL.ppf TRUE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL MyPLL.inc FALSE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL MyPLL.cmp TRUE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL MyPLL.bsf FALSE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL MyPLL_inst.vhd FALSE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL MyPLL.mif TRUE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL 7mhzclk.mif TRUE
|
||||
-- Retrieval info: LIB_FILE: altera_mf
|
||||
-- Retrieval info: CBX_MODULE_PREFIX: ON
|
||||
43
cores/minimig/rtl/cycloneiii/MyPLLReconfig.cmp
Normal file
43
cores/minimig/rtl/cycloneiii/MyPLLReconfig.cmp
Normal file
@@ -0,0 +1,43 @@
|
||||
--Copyright (C) 1991-2012 Altera Corporation
|
||||
--Your use of Altera Corporation's design tools, logic functions
|
||||
--and other software and tools, and its AMPP partner logic
|
||||
--functions, and any output files from any of the foregoing
|
||||
--(including device programming or simulation files), and any
|
||||
--associated documentation or information are expressly subject
|
||||
--to the terms and conditions of the Altera Program License
|
||||
--Subscription Agreement, Altera MegaCore Function License
|
||||
--Agreement, or other applicable license agreement, including,
|
||||
--without limitation, that your use is for the sole purpose of
|
||||
--programming logic devices manufactured by Altera and sold by
|
||||
--Altera or its authorized distributors. Please refer to the
|
||||
--applicable agreement for further details.
|
||||
|
||||
|
||||
component MyPLLReconfig
|
||||
PORT
|
||||
(
|
||||
clock : IN STD_LOGIC ;
|
||||
counter_param : IN STD_LOGIC_VECTOR (2 DOWNTO 0);
|
||||
counter_type : IN STD_LOGIC_VECTOR (3 DOWNTO 0);
|
||||
data_in : IN STD_LOGIC_VECTOR (8 DOWNTO 0);
|
||||
pll_areset_in : IN STD_LOGIC := '0';
|
||||
pll_scandataout : IN STD_LOGIC ;
|
||||
pll_scandone : IN STD_LOGIC ;
|
||||
read_param : IN STD_LOGIC ;
|
||||
reconfig : IN STD_LOGIC ;
|
||||
reset : IN STD_LOGIC ;
|
||||
reset_rom_address : IN STD_LOGIC := '0';
|
||||
rom_data_in : IN STD_LOGIC := '0';
|
||||
write_from_rom : IN STD_LOGIC := '0';
|
||||
write_param : IN STD_LOGIC ;
|
||||
busy : OUT STD_LOGIC ;
|
||||
data_out : OUT STD_LOGIC_VECTOR (8 DOWNTO 0);
|
||||
pll_areset : OUT STD_LOGIC ;
|
||||
pll_configupdate : OUT STD_LOGIC ;
|
||||
pll_scanclk : OUT STD_LOGIC ;
|
||||
pll_scanclkena : OUT STD_LOGIC ;
|
||||
pll_scandata : OUT STD_LOGIC ;
|
||||
rom_address_out : OUT STD_LOGIC_VECTOR (7 DOWNTO 0);
|
||||
write_rom_ena : OUT STD_LOGIC
|
||||
);
|
||||
end component;
|
||||
4
cores/minimig/rtl/cycloneiii/MyPLLReconfig.qip
Normal file
4
cores/minimig/rtl/cycloneiii/MyPLLReconfig.qip
Normal file
@@ -0,0 +1,4 @@
|
||||
set_global_assignment -name IP_TOOL_NAME "ALTPLL_RECONFIG"
|
||||
set_global_assignment -name IP_TOOL_VERSION "12.0"
|
||||
set_global_assignment -name VHDL_FILE [file join $::quartus(qip_path) "MyPLLReconfig.vhd"]
|
||||
set_global_assignment -name MISC_FILE [file join $::quartus(qip_path) "MyPLLReconfig.cmp"]
|
||||
2472
cores/minimig/rtl/cycloneiii/MyPLLReconfig.vhd
Normal file
2472
cores/minimig/rtl/cycloneiii/MyPLLReconfig.vhd
Normal file
File diff suppressed because it is too large
Load Diff
24
cores/minimig/rtl/cycloneiii/PLLROM1.cmp
Normal file
24
cores/minimig/rtl/cycloneiii/PLLROM1.cmp
Normal file
@@ -0,0 +1,24 @@
|
||||
--Copyright (C) 1991-2012 Altera Corporation
|
||||
--Your use of Altera Corporation's design tools, logic functions
|
||||
--and other software and tools, and its AMPP partner logic
|
||||
--functions, and any output files from any of the foregoing
|
||||
--(including device programming or simulation files), and any
|
||||
--associated documentation or information are expressly subject
|
||||
--to the terms and conditions of the Altera Program License
|
||||
--Subscription Agreement, Altera MegaCore Function License
|
||||
--Agreement, or other applicable license agreement, including,
|
||||
--without limitation, that your use is for the sole purpose of
|
||||
--programming logic devices manufactured by Altera and sold by
|
||||
--Altera or its authorized distributors. Please refer to the
|
||||
--applicable agreement for further details.
|
||||
|
||||
|
||||
component PLLROM1
|
||||
PORT
|
||||
(
|
||||
address : IN STD_LOGIC_VECTOR (7 DOWNTO 0);
|
||||
clock : IN STD_LOGIC := '1';
|
||||
rden : IN STD_LOGIC := '1';
|
||||
q : OUT STD_LOGIC_VECTOR (0 DOWNTO 0)
|
||||
);
|
||||
end component;
|
||||
4
cores/minimig/rtl/cycloneiii/PLLROM1.qip
Normal file
4
cores/minimig/rtl/cycloneiii/PLLROM1.qip
Normal file
@@ -0,0 +1,4 @@
|
||||
set_global_assignment -name IP_TOOL_NAME "ROM: 1-PORT"
|
||||
set_global_assignment -name IP_TOOL_VERSION "12.0"
|
||||
set_global_assignment -name VHDL_FILE [file join $::quartus(qip_path) "PLLROM1.vhd"]
|
||||
set_global_assignment -name MISC_FILE [file join $::quartus(qip_path) "PLLROM1.cmp"]
|
||||
174
cores/minimig/rtl/cycloneiii/PLLROM1.vhd
Normal file
174
cores/minimig/rtl/cycloneiii/PLLROM1.vhd
Normal file
@@ -0,0 +1,174 @@
|
||||
-- megafunction wizard: %ROM: 1-PORT%
|
||||
-- GENERATION: STANDARD
|
||||
-- VERSION: WM1.0
|
||||
-- MODULE: altsyncram
|
||||
|
||||
-- ============================================================
|
||||
-- File Name: PLLROM1.vhd
|
||||
-- Megafunction Name(s):
|
||||
-- altsyncram
|
||||
--
|
||||
-- Simulation Library Files(s):
|
||||
-- altera_mf
|
||||
-- ============================================================
|
||||
-- ************************************************************
|
||||
-- THIS IS A WIZARD-GENERATED FILE. DO NOT EDIT THIS FILE!
|
||||
--
|
||||
-- 12.0 Build 232 07/05/2012 SP 1 SJ Web Edition
|
||||
-- ************************************************************
|
||||
|
||||
|
||||
--Copyright (C) 1991-2012 Altera Corporation
|
||||
--Your use of Altera Corporation's design tools, logic functions
|
||||
--and other software and tools, and its AMPP partner logic
|
||||
--functions, and any output files from any of the foregoing
|
||||
--(including device programming or simulation files), and any
|
||||
--associated documentation or information are expressly subject
|
||||
--to the terms and conditions of the Altera Program License
|
||||
--Subscription Agreement, Altera MegaCore Function License
|
||||
--Agreement, or other applicable license agreement, including,
|
||||
--without limitation, that your use is for the sole purpose of
|
||||
--programming logic devices manufactured by Altera and sold by
|
||||
--Altera or its authorized distributors. Please refer to the
|
||||
--applicable agreement for further details.
|
||||
|
||||
|
||||
LIBRARY ieee;
|
||||
USE ieee.std_logic_1164.all;
|
||||
|
||||
LIBRARY altera_mf;
|
||||
USE altera_mf.all;
|
||||
|
||||
ENTITY PLLROM1 IS
|
||||
PORT
|
||||
(
|
||||
address : IN STD_LOGIC_VECTOR (7 DOWNTO 0);
|
||||
clock : IN STD_LOGIC := '1';
|
||||
rden : IN STD_LOGIC := '1';
|
||||
q : OUT STD_LOGIC_VECTOR (0 DOWNTO 0)
|
||||
);
|
||||
END PLLROM1;
|
||||
|
||||
|
||||
ARCHITECTURE SYN OF pllrom1 IS
|
||||
|
||||
SIGNAL sub_wire0 : STD_LOGIC_VECTOR (0 DOWNTO 0);
|
||||
|
||||
|
||||
|
||||
COMPONENT altsyncram
|
||||
GENERIC (
|
||||
address_aclr_a : STRING;
|
||||
clock_enable_input_a : STRING;
|
||||
clock_enable_output_a : STRING;
|
||||
init_file : STRING;
|
||||
intended_device_family : STRING;
|
||||
lpm_hint : STRING;
|
||||
lpm_type : STRING;
|
||||
numwords_a : NATURAL;
|
||||
operation_mode : STRING;
|
||||
outdata_aclr_a : STRING;
|
||||
outdata_reg_a : STRING;
|
||||
widthad_a : NATURAL;
|
||||
width_a : NATURAL;
|
||||
width_byteena_a : NATURAL
|
||||
);
|
||||
PORT (
|
||||
address_a : IN STD_LOGIC_VECTOR (7 DOWNTO 0);
|
||||
clock0 : IN STD_LOGIC ;
|
||||
q_a : OUT STD_LOGIC_VECTOR (0 DOWNTO 0);
|
||||
rden_a : IN STD_LOGIC
|
||||
);
|
||||
END COMPONENT;
|
||||
|
||||
BEGIN
|
||||
q <= sub_wire0(0 DOWNTO 0);
|
||||
|
||||
altsyncram_component : altsyncram
|
||||
GENERIC MAP (
|
||||
address_aclr_a => "NONE",
|
||||
clock_enable_input_a => "BYPASS",
|
||||
clock_enable_output_a => "BYPASS",
|
||||
init_file => "./rtl/100Mhz.mif",
|
||||
intended_device_family => "Cyclone III",
|
||||
lpm_hint => "ENABLE_RUNTIME_MOD=NO",
|
||||
lpm_type => "altsyncram",
|
||||
numwords_a => 256,
|
||||
operation_mode => "ROM",
|
||||
outdata_aclr_a => "NONE",
|
||||
outdata_reg_a => "CLOCK0",
|
||||
widthad_a => 8,
|
||||
width_a => 1,
|
||||
width_byteena_a => 1
|
||||
)
|
||||
PORT MAP (
|
||||
address_a => address,
|
||||
clock0 => clock,
|
||||
rden_a => rden,
|
||||
q_a => sub_wire0
|
||||
);
|
||||
|
||||
|
||||
|
||||
END SYN;
|
||||
|
||||
-- ============================================================
|
||||
-- CNX file retrieval info
|
||||
-- ============================================================
|
||||
-- Retrieval info: PRIVATE: ADDRESSSTALL_A NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: AclrAddr NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: AclrByte NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: AclrOutput NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: BYTE_ENABLE NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: BYTE_SIZE NUMERIC "8"
|
||||
-- Retrieval info: PRIVATE: BlankMemory NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: CLOCK_ENABLE_INPUT_A NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: CLOCK_ENABLE_OUTPUT_A NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: Clken NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: IMPLEMENT_IN_LES NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: INIT_FILE_LAYOUT STRING "PORT_A"
|
||||
-- Retrieval info: PRIVATE: INIT_TO_SIM_X NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: INTENDED_DEVICE_FAMILY STRING "Cyclone III"
|
||||
-- Retrieval info: PRIVATE: JTAG_ENABLED NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: JTAG_ID STRING "NONE"
|
||||
-- Retrieval info: PRIVATE: MAXIMUM_DEPTH NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: MIFfilename STRING "./rtl/100Mhz.mif"
|
||||
-- Retrieval info: PRIVATE: NUMWORDS_A NUMERIC "256"
|
||||
-- Retrieval info: PRIVATE: RAM_BLOCK_TYPE NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: RegAddr NUMERIC "1"
|
||||
-- Retrieval info: PRIVATE: RegOutput NUMERIC "1"
|
||||
-- Retrieval info: PRIVATE: SYNTH_WRAPPER_GEN_POSTFIX STRING "0"
|
||||
-- Retrieval info: PRIVATE: SingleClock NUMERIC "1"
|
||||
-- Retrieval info: PRIVATE: UseDQRAM NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: WidthAddr NUMERIC "8"
|
||||
-- Retrieval info: PRIVATE: WidthData NUMERIC "1"
|
||||
-- Retrieval info: PRIVATE: rden NUMERIC "1"
|
||||
-- Retrieval info: LIBRARY: altera_mf altera_mf.altera_mf_components.all
|
||||
-- Retrieval info: CONSTANT: ADDRESS_ACLR_A STRING "NONE"
|
||||
-- Retrieval info: CONSTANT: CLOCK_ENABLE_INPUT_A STRING "BYPASS"
|
||||
-- Retrieval info: CONSTANT: CLOCK_ENABLE_OUTPUT_A STRING "BYPASS"
|
||||
-- Retrieval info: CONSTANT: INIT_FILE STRING "./rtl/100Mhz.mif"
|
||||
-- Retrieval info: CONSTANT: INTENDED_DEVICE_FAMILY STRING "Cyclone III"
|
||||
-- Retrieval info: CONSTANT: LPM_HINT STRING "ENABLE_RUNTIME_MOD=NO"
|
||||
-- Retrieval info: CONSTANT: LPM_TYPE STRING "altsyncram"
|
||||
-- Retrieval info: CONSTANT: NUMWORDS_A NUMERIC "256"
|
||||
-- Retrieval info: CONSTANT: OPERATION_MODE STRING "ROM"
|
||||
-- Retrieval info: CONSTANT: OUTDATA_ACLR_A STRING "NONE"
|
||||
-- Retrieval info: CONSTANT: OUTDATA_REG_A STRING "CLOCK0"
|
||||
-- Retrieval info: CONSTANT: WIDTHAD_A NUMERIC "8"
|
||||
-- Retrieval info: CONSTANT: WIDTH_A NUMERIC "1"
|
||||
-- Retrieval info: CONSTANT: WIDTH_BYTEENA_A NUMERIC "1"
|
||||
-- Retrieval info: USED_PORT: address 0 0 8 0 INPUT NODEFVAL "address[7..0]"
|
||||
-- Retrieval info: USED_PORT: clock 0 0 0 0 INPUT VCC "clock"
|
||||
-- Retrieval info: USED_PORT: q 0 0 1 0 OUTPUT NODEFVAL "q[0..0]"
|
||||
-- Retrieval info: USED_PORT: rden 0 0 0 0 INPUT VCC "rden"
|
||||
-- Retrieval info: CONNECT: @address_a 0 0 8 0 address 0 0 8 0
|
||||
-- Retrieval info: CONNECT: @clock0 0 0 0 0 clock 0 0 0 0
|
||||
-- Retrieval info: CONNECT: @rden_a 0 0 0 0 rden 0 0 0 0
|
||||
-- Retrieval info: CONNECT: q 0 0 1 0 @q_a 0 0 1 0
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL PLLROM1.vhd TRUE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL PLLROM1.inc FALSE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL PLLROM1.cmp TRUE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL PLLROM1.bsf FALSE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL PLLROM1_inst.vhd FALSE
|
||||
-- Retrieval info: LIB_FILE: altera_mf
|
||||
24
cores/minimig/rtl/cycloneiii/PLLROM_7MHz.cmp
Normal file
24
cores/minimig/rtl/cycloneiii/PLLROM_7MHz.cmp
Normal file
@@ -0,0 +1,24 @@
|
||||
--Copyright (C) 1991-2012 Altera Corporation
|
||||
--Your use of Altera Corporation's design tools, logic functions
|
||||
--and other software and tools, and its AMPP partner logic
|
||||
--functions, and any output files from any of the foregoing
|
||||
--(including device programming or simulation files), and any
|
||||
--associated documentation or information are expressly subject
|
||||
--to the terms and conditions of the Altera Program License
|
||||
--Subscription Agreement, Altera MegaCore Function License
|
||||
--Agreement, or other applicable license agreement, including,
|
||||
--without limitation, that your use is for the sole purpose of
|
||||
--programming logic devices manufactured by Altera and sold by
|
||||
--Altera or its authorized distributors. Please refer to the
|
||||
--applicable agreement for further details.
|
||||
|
||||
|
||||
component PLLROM_7MHz
|
||||
PORT
|
||||
(
|
||||
address : IN STD_LOGIC_VECTOR (7 DOWNTO 0);
|
||||
clock : IN STD_LOGIC := '1';
|
||||
rden : IN STD_LOGIC := '1';
|
||||
q : OUT STD_LOGIC_VECTOR (0 DOWNTO 0)
|
||||
);
|
||||
end component;
|
||||
4
cores/minimig/rtl/cycloneiii/PLLROM_7MHz.qip
Normal file
4
cores/minimig/rtl/cycloneiii/PLLROM_7MHz.qip
Normal file
@@ -0,0 +1,4 @@
|
||||
set_global_assignment -name IP_TOOL_NAME "ROM: 1-PORT"
|
||||
set_global_assignment -name IP_TOOL_VERSION "12.0"
|
||||
set_global_assignment -name VHDL_FILE [file join $::quartus(qip_path) "PLLROM_7MHz.vhd"]
|
||||
set_global_assignment -name MISC_FILE [file join $::quartus(qip_path) "PLLROM_7MHz.cmp"]
|
||||
174
cores/minimig/rtl/cycloneiii/PLLROM_7MHz.vhd
Normal file
174
cores/minimig/rtl/cycloneiii/PLLROM_7MHz.vhd
Normal file
@@ -0,0 +1,174 @@
|
||||
-- megafunction wizard: %ROM: 1-PORT%
|
||||
-- GENERATION: STANDARD
|
||||
-- VERSION: WM1.0
|
||||
-- MODULE: altsyncram
|
||||
|
||||
-- ============================================================
|
||||
-- File Name: PLLROM_7MHz.vhd
|
||||
-- Megafunction Name(s):
|
||||
-- altsyncram
|
||||
--
|
||||
-- Simulation Library Files(s):
|
||||
-- altera_mf
|
||||
-- ============================================================
|
||||
-- ************************************************************
|
||||
-- THIS IS A WIZARD-GENERATED FILE. DO NOT EDIT THIS FILE!
|
||||
--
|
||||
-- 12.0 Build 232 07/05/2012 SP 1 SJ Web Edition
|
||||
-- ************************************************************
|
||||
|
||||
|
||||
--Copyright (C) 1991-2012 Altera Corporation
|
||||
--Your use of Altera Corporation's design tools, logic functions
|
||||
--and other software and tools, and its AMPP partner logic
|
||||
--functions, and any output files from any of the foregoing
|
||||
--(including device programming or simulation files), and any
|
||||
--associated documentation or information are expressly subject
|
||||
--to the terms and conditions of the Altera Program License
|
||||
--Subscription Agreement, Altera MegaCore Function License
|
||||
--Agreement, or other applicable license agreement, including,
|
||||
--without limitation, that your use is for the sole purpose of
|
||||
--programming logic devices manufactured by Altera and sold by
|
||||
--Altera or its authorized distributors. Please refer to the
|
||||
--applicable agreement for further details.
|
||||
|
||||
|
||||
LIBRARY ieee;
|
||||
USE ieee.std_logic_1164.all;
|
||||
|
||||
LIBRARY altera_mf;
|
||||
USE altera_mf.all;
|
||||
|
||||
ENTITY PLLROM_7MHz IS
|
||||
PORT
|
||||
(
|
||||
address : IN STD_LOGIC_VECTOR (7 DOWNTO 0);
|
||||
clock : IN STD_LOGIC := '1';
|
||||
rden : IN STD_LOGIC := '1';
|
||||
q : OUT STD_LOGIC_VECTOR (0 DOWNTO 0)
|
||||
);
|
||||
END PLLROM_7MHz;
|
||||
|
||||
|
||||
ARCHITECTURE SYN OF pllrom_7mhz IS
|
||||
|
||||
SIGNAL sub_wire0 : STD_LOGIC_VECTOR (0 DOWNTO 0);
|
||||
|
||||
|
||||
|
||||
COMPONENT altsyncram
|
||||
GENERIC (
|
||||
address_aclr_a : STRING;
|
||||
clock_enable_input_a : STRING;
|
||||
clock_enable_output_a : STRING;
|
||||
init_file : STRING;
|
||||
intended_device_family : STRING;
|
||||
lpm_hint : STRING;
|
||||
lpm_type : STRING;
|
||||
numwords_a : NATURAL;
|
||||
operation_mode : STRING;
|
||||
outdata_aclr_a : STRING;
|
||||
outdata_reg_a : STRING;
|
||||
widthad_a : NATURAL;
|
||||
width_a : NATURAL;
|
||||
width_byteena_a : NATURAL
|
||||
);
|
||||
PORT (
|
||||
address_a : IN STD_LOGIC_VECTOR (7 DOWNTO 0);
|
||||
clock0 : IN STD_LOGIC ;
|
||||
q_a : OUT STD_LOGIC_VECTOR (0 DOWNTO 0);
|
||||
rden_a : IN STD_LOGIC
|
||||
);
|
||||
END COMPONENT;
|
||||
|
||||
BEGIN
|
||||
q <= sub_wire0(0 DOWNTO 0);
|
||||
|
||||
altsyncram_component : altsyncram
|
||||
GENERIC MAP (
|
||||
address_aclr_a => "NONE",
|
||||
clock_enable_input_a => "BYPASS",
|
||||
clock_enable_output_a => "BYPASS",
|
||||
init_file => "7mhzclk.mif",
|
||||
intended_device_family => "Cyclone III",
|
||||
lpm_hint => "ENABLE_RUNTIME_MOD=NO",
|
||||
lpm_type => "altsyncram",
|
||||
numwords_a => 256,
|
||||
operation_mode => "ROM",
|
||||
outdata_aclr_a => "NONE",
|
||||
outdata_reg_a => "CLOCK0",
|
||||
widthad_a => 8,
|
||||
width_a => 1,
|
||||
width_byteena_a => 1
|
||||
)
|
||||
PORT MAP (
|
||||
address_a => address,
|
||||
clock0 => clock,
|
||||
rden_a => rden,
|
||||
q_a => sub_wire0
|
||||
);
|
||||
|
||||
|
||||
|
||||
END SYN;
|
||||
|
||||
-- ============================================================
|
||||
-- CNX file retrieval info
|
||||
-- ============================================================
|
||||
-- Retrieval info: PRIVATE: ADDRESSSTALL_A NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: AclrAddr NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: AclrByte NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: AclrOutput NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: BYTE_ENABLE NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: BYTE_SIZE NUMERIC "8"
|
||||
-- Retrieval info: PRIVATE: BlankMemory NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: CLOCK_ENABLE_INPUT_A NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: CLOCK_ENABLE_OUTPUT_A NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: Clken NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: IMPLEMENT_IN_LES NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: INIT_FILE_LAYOUT STRING "PORT_A"
|
||||
-- Retrieval info: PRIVATE: INIT_TO_SIM_X NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: INTENDED_DEVICE_FAMILY STRING "Cyclone III"
|
||||
-- Retrieval info: PRIVATE: JTAG_ENABLED NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: JTAG_ID STRING "NONE"
|
||||
-- Retrieval info: PRIVATE: MAXIMUM_DEPTH NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: MIFfilename STRING "7mhzclk.mif"
|
||||
-- Retrieval info: PRIVATE: NUMWORDS_A NUMERIC "256"
|
||||
-- Retrieval info: PRIVATE: RAM_BLOCK_TYPE NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: RegAddr NUMERIC "1"
|
||||
-- Retrieval info: PRIVATE: RegOutput NUMERIC "1"
|
||||
-- Retrieval info: PRIVATE: SYNTH_WRAPPER_GEN_POSTFIX STRING "0"
|
||||
-- Retrieval info: PRIVATE: SingleClock NUMERIC "1"
|
||||
-- Retrieval info: PRIVATE: UseDQRAM NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: WidthAddr NUMERIC "8"
|
||||
-- Retrieval info: PRIVATE: WidthData NUMERIC "1"
|
||||
-- Retrieval info: PRIVATE: rden NUMERIC "1"
|
||||
-- Retrieval info: LIBRARY: altera_mf altera_mf.altera_mf_components.all
|
||||
-- Retrieval info: CONSTANT: ADDRESS_ACLR_A STRING "NONE"
|
||||
-- Retrieval info: CONSTANT: CLOCK_ENABLE_INPUT_A STRING "BYPASS"
|
||||
-- Retrieval info: CONSTANT: CLOCK_ENABLE_OUTPUT_A STRING "BYPASS"
|
||||
-- Retrieval info: CONSTANT: INIT_FILE STRING "7mhzclk.mif"
|
||||
-- Retrieval info: CONSTANT: INTENDED_DEVICE_FAMILY STRING "Cyclone III"
|
||||
-- Retrieval info: CONSTANT: LPM_HINT STRING "ENABLE_RUNTIME_MOD=NO"
|
||||
-- Retrieval info: CONSTANT: LPM_TYPE STRING "altsyncram"
|
||||
-- Retrieval info: CONSTANT: NUMWORDS_A NUMERIC "256"
|
||||
-- Retrieval info: CONSTANT: OPERATION_MODE STRING "ROM"
|
||||
-- Retrieval info: CONSTANT: OUTDATA_ACLR_A STRING "NONE"
|
||||
-- Retrieval info: CONSTANT: OUTDATA_REG_A STRING "CLOCK0"
|
||||
-- Retrieval info: CONSTANT: WIDTHAD_A NUMERIC "8"
|
||||
-- Retrieval info: CONSTANT: WIDTH_A NUMERIC "1"
|
||||
-- Retrieval info: CONSTANT: WIDTH_BYTEENA_A NUMERIC "1"
|
||||
-- Retrieval info: USED_PORT: address 0 0 8 0 INPUT NODEFVAL "address[7..0]"
|
||||
-- Retrieval info: USED_PORT: clock 0 0 0 0 INPUT VCC "clock"
|
||||
-- Retrieval info: USED_PORT: q 0 0 1 0 OUTPUT NODEFVAL "q[0..0]"
|
||||
-- Retrieval info: USED_PORT: rden 0 0 0 0 INPUT VCC "rden"
|
||||
-- Retrieval info: CONNECT: @address_a 0 0 8 0 address 0 0 8 0
|
||||
-- Retrieval info: CONNECT: @clock0 0 0 0 0 clock 0 0 0 0
|
||||
-- Retrieval info: CONNECT: @rden_a 0 0 0 0 rden 0 0 0 0
|
||||
-- Retrieval info: CONNECT: q 0 0 1 0 @q_a 0 0 1 0
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL PLLROM_7MHz.vhd TRUE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL PLLROM_7MHz.inc FALSE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL PLLROM_7MHz.cmp TRUE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL PLLROM_7MHz.bsf FALSE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL PLLROM_7MHz_inst.vhd FALSE
|
||||
-- Retrieval info: LIB_FILE: altera_mf
|
||||
24
cores/minimig/rtl/cycloneiii/PLLROM_8MHz.cmp
Normal file
24
cores/minimig/rtl/cycloneiii/PLLROM_8MHz.cmp
Normal file
@@ -0,0 +1,24 @@
|
||||
--Copyright (C) 1991-2012 Altera Corporation
|
||||
--Your use of Altera Corporation's design tools, logic functions
|
||||
--and other software and tools, and its AMPP partner logic
|
||||
--functions, and any output files from any of the foregoing
|
||||
--(including device programming or simulation files), and any
|
||||
--associated documentation or information are expressly subject
|
||||
--to the terms and conditions of the Altera Program License
|
||||
--Subscription Agreement, Altera MegaCore Function License
|
||||
--Agreement, or other applicable license agreement, including,
|
||||
--without limitation, that your use is for the sole purpose of
|
||||
--programming logic devices manufactured by Altera and sold by
|
||||
--Altera or its authorized distributors. Please refer to the
|
||||
--applicable agreement for further details.
|
||||
|
||||
|
||||
component PLLROM_8MHz
|
||||
PORT
|
||||
(
|
||||
address : IN STD_LOGIC_VECTOR (7 DOWNTO 0);
|
||||
clock : IN STD_LOGIC := '1';
|
||||
rden : IN STD_LOGIC := '1';
|
||||
q : OUT STD_LOGIC_VECTOR (0 DOWNTO 0)
|
||||
);
|
||||
end component;
|
||||
4
cores/minimig/rtl/cycloneiii/PLLROM_8MHz.qip
Normal file
4
cores/minimig/rtl/cycloneiii/PLLROM_8MHz.qip
Normal file
@@ -0,0 +1,4 @@
|
||||
set_global_assignment -name IP_TOOL_NAME "ROM: 1-PORT"
|
||||
set_global_assignment -name IP_TOOL_VERSION "12.0"
|
||||
set_global_assignment -name VHDL_FILE [file join $::quartus(qip_path) "PLLROM_8MHz.vhd"]
|
||||
set_global_assignment -name MISC_FILE [file join $::quartus(qip_path) "PLLROM_8MHz.cmp"]
|
||||
174
cores/minimig/rtl/cycloneiii/PLLROM_8MHz.vhd
Normal file
174
cores/minimig/rtl/cycloneiii/PLLROM_8MHz.vhd
Normal file
@@ -0,0 +1,174 @@
|
||||
-- megafunction wizard: %ROM: 1-PORT%
|
||||
-- GENERATION: STANDARD
|
||||
-- VERSION: WM1.0
|
||||
-- MODULE: altsyncram
|
||||
|
||||
-- ============================================================
|
||||
-- File Name: PLLROM_8MHz.vhd
|
||||
-- Megafunction Name(s):
|
||||
-- altsyncram
|
||||
--
|
||||
-- Simulation Library Files(s):
|
||||
-- altera_mf
|
||||
-- ============================================================
|
||||
-- ************************************************************
|
||||
-- THIS IS A WIZARD-GENERATED FILE. DO NOT EDIT THIS FILE!
|
||||
--
|
||||
-- 12.0 Build 232 07/05/2012 SP 1 SJ Web Edition
|
||||
-- ************************************************************
|
||||
|
||||
|
||||
--Copyright (C) 1991-2012 Altera Corporation
|
||||
--Your use of Altera Corporation's design tools, logic functions
|
||||
--and other software and tools, and its AMPP partner logic
|
||||
--functions, and any output files from any of the foregoing
|
||||
--(including device programming or simulation files), and any
|
||||
--associated documentation or information are expressly subject
|
||||
--to the terms and conditions of the Altera Program License
|
||||
--Subscription Agreement, Altera MegaCore Function License
|
||||
--Agreement, or other applicable license agreement, including,
|
||||
--without limitation, that your use is for the sole purpose of
|
||||
--programming logic devices manufactured by Altera and sold by
|
||||
--Altera or its authorized distributors. Please refer to the
|
||||
--applicable agreement for further details.
|
||||
|
||||
|
||||
LIBRARY ieee;
|
||||
USE ieee.std_logic_1164.all;
|
||||
|
||||
LIBRARY altera_mf;
|
||||
USE altera_mf.all;
|
||||
|
||||
ENTITY PLLROM_8MHz IS
|
||||
PORT
|
||||
(
|
||||
address : IN STD_LOGIC_VECTOR (7 DOWNTO 0);
|
||||
clock : IN STD_LOGIC := '1';
|
||||
rden : IN STD_LOGIC := '1';
|
||||
q : OUT STD_LOGIC_VECTOR (0 DOWNTO 0)
|
||||
);
|
||||
END PLLROM_8MHz;
|
||||
|
||||
|
||||
ARCHITECTURE SYN OF pllrom_8mhz IS
|
||||
|
||||
SIGNAL sub_wire0 : STD_LOGIC_VECTOR (0 DOWNTO 0);
|
||||
|
||||
|
||||
|
||||
COMPONENT altsyncram
|
||||
GENERIC (
|
||||
address_aclr_a : STRING;
|
||||
clock_enable_input_a : STRING;
|
||||
clock_enable_output_a : STRING;
|
||||
init_file : STRING;
|
||||
intended_device_family : STRING;
|
||||
lpm_hint : STRING;
|
||||
lpm_type : STRING;
|
||||
numwords_a : NATURAL;
|
||||
operation_mode : STRING;
|
||||
outdata_aclr_a : STRING;
|
||||
outdata_reg_a : STRING;
|
||||
widthad_a : NATURAL;
|
||||
width_a : NATURAL;
|
||||
width_byteena_a : NATURAL
|
||||
);
|
||||
PORT (
|
||||
address_a : IN STD_LOGIC_VECTOR (7 DOWNTO 0);
|
||||
clock0 : IN STD_LOGIC ;
|
||||
q_a : OUT STD_LOGIC_VECTOR (0 DOWNTO 0);
|
||||
rden_a : IN STD_LOGIC
|
||||
);
|
||||
END COMPONENT;
|
||||
|
||||
BEGIN
|
||||
q <= sub_wire0(0 DOWNTO 0);
|
||||
|
||||
altsyncram_component : altsyncram
|
||||
GENERIC MAP (
|
||||
address_aclr_a => "NONE",
|
||||
clock_enable_input_a => "BYPASS",
|
||||
clock_enable_output_a => "BYPASS",
|
||||
init_file => "8mhzclk.mif",
|
||||
intended_device_family => "Cyclone III",
|
||||
lpm_hint => "ENABLE_RUNTIME_MOD=NO",
|
||||
lpm_type => "altsyncram",
|
||||
numwords_a => 256,
|
||||
operation_mode => "ROM",
|
||||
outdata_aclr_a => "NONE",
|
||||
outdata_reg_a => "CLOCK0",
|
||||
widthad_a => 8,
|
||||
width_a => 1,
|
||||
width_byteena_a => 1
|
||||
)
|
||||
PORT MAP (
|
||||
address_a => address,
|
||||
clock0 => clock,
|
||||
rden_a => rden,
|
||||
q_a => sub_wire0
|
||||
);
|
||||
|
||||
|
||||
|
||||
END SYN;
|
||||
|
||||
-- ============================================================
|
||||
-- CNX file retrieval info
|
||||
-- ============================================================
|
||||
-- Retrieval info: PRIVATE: ADDRESSSTALL_A NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: AclrAddr NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: AclrByte NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: AclrOutput NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: BYTE_ENABLE NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: BYTE_SIZE NUMERIC "8"
|
||||
-- Retrieval info: PRIVATE: BlankMemory NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: CLOCK_ENABLE_INPUT_A NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: CLOCK_ENABLE_OUTPUT_A NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: Clken NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: IMPLEMENT_IN_LES NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: INIT_FILE_LAYOUT STRING "PORT_A"
|
||||
-- Retrieval info: PRIVATE: INIT_TO_SIM_X NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: INTENDED_DEVICE_FAMILY STRING "Cyclone III"
|
||||
-- Retrieval info: PRIVATE: JTAG_ENABLED NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: JTAG_ID STRING "NONE"
|
||||
-- Retrieval info: PRIVATE: MAXIMUM_DEPTH NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: MIFfilename STRING "8mhzclk.mif"
|
||||
-- Retrieval info: PRIVATE: NUMWORDS_A NUMERIC "256"
|
||||
-- Retrieval info: PRIVATE: RAM_BLOCK_TYPE NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: RegAddr NUMERIC "1"
|
||||
-- Retrieval info: PRIVATE: RegOutput NUMERIC "1"
|
||||
-- Retrieval info: PRIVATE: SYNTH_WRAPPER_GEN_POSTFIX STRING "0"
|
||||
-- Retrieval info: PRIVATE: SingleClock NUMERIC "1"
|
||||
-- Retrieval info: PRIVATE: UseDQRAM NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: WidthAddr NUMERIC "8"
|
||||
-- Retrieval info: PRIVATE: WidthData NUMERIC "1"
|
||||
-- Retrieval info: PRIVATE: rden NUMERIC "1"
|
||||
-- Retrieval info: LIBRARY: altera_mf altera_mf.altera_mf_components.all
|
||||
-- Retrieval info: CONSTANT: ADDRESS_ACLR_A STRING "NONE"
|
||||
-- Retrieval info: CONSTANT: CLOCK_ENABLE_INPUT_A STRING "BYPASS"
|
||||
-- Retrieval info: CONSTANT: CLOCK_ENABLE_OUTPUT_A STRING "BYPASS"
|
||||
-- Retrieval info: CONSTANT: INIT_FILE STRING "8mhzclk.mif"
|
||||
-- Retrieval info: CONSTANT: INTENDED_DEVICE_FAMILY STRING "Cyclone III"
|
||||
-- Retrieval info: CONSTANT: LPM_HINT STRING "ENABLE_RUNTIME_MOD=NO"
|
||||
-- Retrieval info: CONSTANT: LPM_TYPE STRING "altsyncram"
|
||||
-- Retrieval info: CONSTANT: NUMWORDS_A NUMERIC "256"
|
||||
-- Retrieval info: CONSTANT: OPERATION_MODE STRING "ROM"
|
||||
-- Retrieval info: CONSTANT: OUTDATA_ACLR_A STRING "NONE"
|
||||
-- Retrieval info: CONSTANT: OUTDATA_REG_A STRING "CLOCK0"
|
||||
-- Retrieval info: CONSTANT: WIDTHAD_A NUMERIC "8"
|
||||
-- Retrieval info: CONSTANT: WIDTH_A NUMERIC "1"
|
||||
-- Retrieval info: CONSTANT: WIDTH_BYTEENA_A NUMERIC "1"
|
||||
-- Retrieval info: USED_PORT: address 0 0 8 0 INPUT NODEFVAL "address[7..0]"
|
||||
-- Retrieval info: USED_PORT: clock 0 0 0 0 INPUT VCC "clock"
|
||||
-- Retrieval info: USED_PORT: q 0 0 1 0 OUTPUT NODEFVAL "q[0..0]"
|
||||
-- Retrieval info: USED_PORT: rden 0 0 0 0 INPUT VCC "rden"
|
||||
-- Retrieval info: CONNECT: @address_a 0 0 8 0 address 0 0 8 0
|
||||
-- Retrieval info: CONNECT: @clock0 0 0 0 0 clock 0 0 0 0
|
||||
-- Retrieval info: CONNECT: @rden_a 0 0 0 0 rden 0 0 0 0
|
||||
-- Retrieval info: CONNECT: q 0 0 1 0 @q_a 0 0 1 0
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL PLLROM_8MHz.vhd TRUE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL PLLROM_8MHz.inc FALSE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL PLLROM_8MHz.cmp TRUE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL PLLROM_8MHz.bsf FALSE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL PLLROM_8MHz_inst.vhd FALSE
|
||||
-- Retrieval info: LIB_FILE: altera_mf
|
||||
180
cores/minimig/rtl/cycloneiii/PLLWrapper.vhd
Normal file
180
cores/minimig/rtl/cycloneiii/PLLWrapper.vhd
Normal file
@@ -0,0 +1,180 @@
|
||||
-- A wrapper to encapsulate reconfiguring a PLL from multiple MIF files.
|
||||
|
||||
library IEEE;
|
||||
use IEEE.STD_LOGIC_1164.ALL;
|
||||
use IEEE.numeric_std.ALL;
|
||||
|
||||
entity PLLWrapper is
|
||||
port (
|
||||
areset : in std_logic;
|
||||
inclk0 : in std_logic;
|
||||
eightmhz : in std_logic;
|
||||
c0 : out std_logic;
|
||||
c1 : out std_logic;
|
||||
c2 : out std_logic;
|
||||
locked : out std_logic
|
||||
);
|
||||
end entity;
|
||||
|
||||
architecture rtl of PLLWrapper is
|
||||
|
||||
-- ROM signals
|
||||
signal muxdata : std_logic;
|
||||
signal dat1 : std_logic_vector(0 downto 0);
|
||||
signal dat2 : std_logic_vector(0 downto 0);
|
||||
signal dat3 : std_logic_vector(0 downto 0);
|
||||
signal romdata : std_logic_vector(0 downto 0);
|
||||
signal rom_address : std_logic_vector(7 downto 0);
|
||||
signal rom_write : std_logic;
|
||||
|
||||
-- Mode signals
|
||||
signal oldmode1 : std_logic:='0';
|
||||
signal oldmode2 : std_logic:='0';
|
||||
signal mode_f : std_logic:='0'; -- Filtered version, safe to use from the lower clock domain.
|
||||
signal mode_f_prev : std_logic:='0'; -- Used to detect changes in mode and trigger reconfig.
|
||||
|
||||
-- PLL signals
|
||||
signal pll_reset : std_logic;
|
||||
signal pll_configupdate : std_logic;
|
||||
signal pll_scanclk : std_logic;
|
||||
signal pll_scanclkena : std_logic;
|
||||
signal pll_scandata : std_logic;
|
||||
signal pll_locked : std_logic;
|
||||
signal pll_scandataout : std_logic;
|
||||
signal pll_scandone : std_logic;
|
||||
signal pll_reconfig : std_logic;
|
||||
signal pll_reconfig_d : std_logic :='0';
|
||||
signal pll_reconfig_busy : std_logic;
|
||||
|
||||
-- Output clock signals.
|
||||
--signal c0 : std_logic;
|
||||
|
||||
|
||||
component MyPLLReconfig
|
||||
PORT
|
||||
(
|
||||
clock : IN STD_LOGIC ;
|
||||
counter_param : IN STD_LOGIC_VECTOR (2 DOWNTO 0);
|
||||
counter_type : IN STD_LOGIC_VECTOR (3 DOWNTO 0);
|
||||
data_in : IN STD_LOGIC_VECTOR (8 DOWNTO 0);
|
||||
pll_areset_in : IN STD_LOGIC := '0';
|
||||
pll_scandataout : IN STD_LOGIC ;
|
||||
pll_scandone : IN STD_LOGIC ;
|
||||
read_param : IN STD_LOGIC ;
|
||||
reconfig : IN STD_LOGIC ;
|
||||
reset : IN STD_LOGIC ;
|
||||
reset_rom_address : IN STD_LOGIC := '0';
|
||||
rom_data_in : IN STD_LOGIC := '0';
|
||||
write_from_rom : IN STD_LOGIC := '0';
|
||||
write_param : IN STD_LOGIC ;
|
||||
busy : OUT STD_LOGIC ;
|
||||
data_out : OUT STD_LOGIC_VECTOR (8 DOWNTO 0);
|
||||
pll_areset : OUT STD_LOGIC ;
|
||||
pll_configupdate : OUT STD_LOGIC ;
|
||||
pll_scanclk : OUT STD_LOGIC ;
|
||||
pll_scanclkena : OUT STD_LOGIC ;
|
||||
pll_scandata : OUT STD_LOGIC ;
|
||||
rom_address_out : OUT STD_LOGIC_VECTOR (7 DOWNTO 0);
|
||||
write_rom_ena : OUT STD_LOGIC
|
||||
);
|
||||
end component;
|
||||
|
||||
begin
|
||||
|
||||
locked <= pll_locked;
|
||||
|
||||
-- Filter the incoming mode signal
|
||||
process(inclk0, eightmhz, oldmode1, oldmode2)
|
||||
begin
|
||||
if rising_edge(inclk0) then
|
||||
if oldmode2=eightmhz then -- Signal has been stable for 2 clocks
|
||||
mode_f<=oldmode2;
|
||||
end if;
|
||||
oldmode2<=oldmode1;
|
||||
oldmode1<=eightmhz;
|
||||
|
||||
rom_write<='0';
|
||||
if mode_f/=mode_f_prev then -- Trigger a reconfiguration when the mode signal changes
|
||||
rom_write<=not pll_reconfig_busy;
|
||||
pll_reconfig_d<='1';
|
||||
end if;
|
||||
|
||||
pll_reconfig<='0';
|
||||
if pll_reconfig_busy='0' and rom_write='0' and pll_reconfig_d='1' then
|
||||
pll_reconfig_d<='0';
|
||||
pll_reconfig<='1';
|
||||
end if;
|
||||
|
||||
mode_f_prev<=mode_f;
|
||||
|
||||
end if;
|
||||
end process;
|
||||
|
||||
|
||||
-- Multiplexer for ROMs
|
||||
romdata <= dat1 when mode_f='0' else
|
||||
dat2;
|
||||
|
||||
|
||||
-- The PLL itself
|
||||
mypll : entity work.MyPLL
|
||||
port map(
|
||||
areset => pll_reset,
|
||||
configupdate => pll_configupdate,
|
||||
inclk0 => inclk0,
|
||||
scanclk => pll_scanclk,
|
||||
scanclkena => pll_scanclkena,
|
||||
scandata => pll_scandata,
|
||||
c0 => c0,
|
||||
c1 => c1,
|
||||
c2 => c2,
|
||||
locked => pll_locked,
|
||||
scandataout => pll_scandataout,
|
||||
scandone => pll_scandone
|
||||
);
|
||||
|
||||
-- Reconfiguration component
|
||||
reconfig : component MyPLLReconfig
|
||||
PORT map (
|
||||
clock => inclk0,
|
||||
counter_param => "000",
|
||||
counter_type => "0000",
|
||||
data_in => X"00"&'0',
|
||||
pll_areset_in => areset,
|
||||
pll_scandataout => pll_scandataout,
|
||||
pll_scandone => pll_scandone,
|
||||
read_param => '0',
|
||||
reconfig => pll_reconfig,
|
||||
reset => '0',
|
||||
reset_rom_address => '0',
|
||||
rom_data_in => romdata(0),
|
||||
write_from_rom => rom_write,
|
||||
write_param => '0',
|
||||
busy => pll_reconfig_busy,
|
||||
data_out => open,
|
||||
pll_areset => pll_reset,
|
||||
pll_configupdate => pll_configupdate,
|
||||
pll_scanclk => pll_scanclk,
|
||||
pll_scanclkena => pll_scanclkena,
|
||||
pll_scandata => pll_scandata,
|
||||
rom_address_out => rom_address,
|
||||
write_rom_ena => open
|
||||
);
|
||||
|
||||
rom1 : ENTITY work.PLLROM_7MHz
|
||||
PORT map
|
||||
(
|
||||
address => rom_address,
|
||||
clock => inclk0,
|
||||
q => dat1
|
||||
);
|
||||
|
||||
rom2 : ENTITY work.PLLROM_8MHz
|
||||
PORT map
|
||||
(
|
||||
address => rom_address,
|
||||
clock => inclk0,
|
||||
q => dat2
|
||||
);
|
||||
|
||||
end architecture;
|
||||
183
cores/minimig/rtl/cycloneiii/PLLWrapper.vhd.bak
Normal file
183
cores/minimig/rtl/cycloneiii/PLLWrapper.vhd.bak
Normal file
@@ -0,0 +1,183 @@
|
||||
-- A wrapper to encapsulate reconfiguring a PLL from multiple MIF files.
|
||||
|
||||
library IEEE;
|
||||
use IEEE.STD_LOGIC_1164.ALL;
|
||||
use IEEE.numeric_std.ALL;
|
||||
|
||||
entity PLLWrapper is
|
||||
port (
|
||||
inclk0 : in std_logic;
|
||||
mode : in std_logic_vector(1 downto 0);
|
||||
c0 : out std_logic
|
||||
);
|
||||
end entity;
|
||||
|
||||
architecture rtl of PLLWrapper is
|
||||
|
||||
-- ROM signals
|
||||
signal muxdata : std_logic;
|
||||
signal dat1 : std_logic_vector(0 downto 0);
|
||||
signal dat2 : std_logic_vector(0 downto 0);
|
||||
signal dat3 : std_logic_vector(0 downto 0);
|
||||
signal romdata : std_logic_vector(0 downto 0);
|
||||
signal rom_address : std_logic_vector(7 downto 0);
|
||||
signal rom_write : std_logic;
|
||||
|
||||
-- Mode signals
|
||||
signal oldmode1 : std_logic_vector(1 downto 0):="00";
|
||||
signal oldmode2 : std_logic_vector(1 downto 0):="00";
|
||||
signal mode_f : std_logic_vector(1 downto 0):="00"; -- Filtered version, safe to use from the lower clock domain.
|
||||
signal mode_f_prev : std_logic_vector(1 downto 0):="00"; -- Used to detect changes in mode and trigger reconfig.
|
||||
|
||||
-- PLL signals
|
||||
signal pll_reset : std_logic;
|
||||
signal pll_configupdate : std_logic;
|
||||
signal pll_scanclk : std_logic;
|
||||
signal pll_scanclkena : std_logic;
|
||||
signal pll_scandata : std_logic;
|
||||
signal pll_locked : std_logic;
|
||||
signal pll_scandataout : std_logic;
|
||||
signal pll_scandone : std_logic;
|
||||
signal pll_reconfig : std_logic;
|
||||
signal pll_reconfig_d : std_logic :='0';
|
||||
signal pll_reconfig_busy : std_logic;
|
||||
|
||||
-- Output clock signals.
|
||||
--signal c0 : std_logic;
|
||||
|
||||
|
||||
component MyPLLReconfig
|
||||
PORT
|
||||
(
|
||||
clock : IN STD_LOGIC ;
|
||||
counter_param : IN STD_LOGIC_VECTOR (2 DOWNTO 0);
|
||||
counter_type : IN STD_LOGIC_VECTOR (3 DOWNTO 0);
|
||||
data_in : IN STD_LOGIC_VECTOR (8 DOWNTO 0);
|
||||
pll_areset_in : IN STD_LOGIC := '0';
|
||||
pll_scandataout : IN STD_LOGIC ;
|
||||
pll_scandone : IN STD_LOGIC ;
|
||||
read_param : IN STD_LOGIC ;
|
||||
reconfig : IN STD_LOGIC ;
|
||||
reset : IN STD_LOGIC ;
|
||||
reset_rom_address : IN STD_LOGIC := '0';
|
||||
rom_data_in : IN STD_LOGIC := '0';
|
||||
write_from_rom : IN STD_LOGIC := '0';
|
||||
write_param : IN STD_LOGIC ;
|
||||
busy : OUT STD_LOGIC ;
|
||||
data_out : OUT STD_LOGIC_VECTOR (8 DOWNTO 0);
|
||||
pll_areset : OUT STD_LOGIC ;
|
||||
pll_configupdate : OUT STD_LOGIC ;
|
||||
pll_scanclk : OUT STD_LOGIC ;
|
||||
pll_scanclkena : OUT STD_LOGIC ;
|
||||
pll_scandata : OUT STD_LOGIC ;
|
||||
rom_address_out : OUT STD_LOGIC_VECTOR (7 DOWNTO 0);
|
||||
write_rom_ena : OUT STD_LOGIC
|
||||
);
|
||||
end component;
|
||||
|
||||
begin
|
||||
|
||||
|
||||
-- Filter the incoming mode signal
|
||||
process(inclk0, mode, oldmode1, oldmode2)
|
||||
begin
|
||||
if rising_edge(inclk0) then
|
||||
if oldmode2=mode then -- Signal has been stable for 2 clocks
|
||||
mode_f<=oldmode2;
|
||||
end if;
|
||||
oldmode2<=oldmode1;
|
||||
oldmode1<=mode;
|
||||
|
||||
rom_write<='0';
|
||||
if mode_f/=mode_f_prev then -- Trigger a reconfiguration when the mode signal changes
|
||||
rom_write<=not pll_reconfig_busy;
|
||||
pll_reconfig_d<='1';
|
||||
end if;
|
||||
|
||||
pll_reconfig<='0';
|
||||
if pll_reconfig_busy='0' and rom_write='0' and pll_reconfig_d='1' then
|
||||
pll_reconfig_d<='0';
|
||||
pll_reconfig<='1';
|
||||
end if;
|
||||
|
||||
mode_f_prev<=mode_f;
|
||||
|
||||
end if;
|
||||
end process;
|
||||
|
||||
|
||||
-- Multiplexer for ROMs
|
||||
romdata <= dat1 when mode_f="00" else
|
||||
dat2 when mode_f="01" else
|
||||
dat3;
|
||||
|
||||
|
||||
-- The PLL itself
|
||||
mypll : entity work.MyPLL
|
||||
port map(
|
||||
areset => pll_reset,
|
||||
configupdate => pll_configupdate,
|
||||
inclk0 => inclk0,
|
||||
scanclk => pll_scanclk,
|
||||
scanclkena => pll_scanclkena,
|
||||
scandata => pll_scandata,
|
||||
c0 => c0,
|
||||
locked => pll_locked,
|
||||
scandataout => pll_scandataout,
|
||||
scandone => pll_scandone
|
||||
);
|
||||
|
||||
-- Reconfiguration component
|
||||
reconfig : component MyPLLReconfig
|
||||
PORT map (
|
||||
clock => inclk0,
|
||||
counter_param => "000",
|
||||
counter_type => "0000",
|
||||
data_in => X"00"&'0',
|
||||
pll_areset_in => '0',
|
||||
pll_scandataout => pll_scandataout,
|
||||
pll_scandone => pll_scandone,
|
||||
read_param => '0',
|
||||
reconfig => pll_reconfig,
|
||||
reset => '0',
|
||||
reset_rom_address => '0',
|
||||
rom_data_in => romdata(0),
|
||||
write_from_rom => rom_write,
|
||||
write_param => '0',
|
||||
busy => pll_reconfig_busy,
|
||||
data_out => open,
|
||||
pll_areset => pll_reset,
|
||||
pll_configupdate => pll_configupdate,
|
||||
pll_scanclk => pll_scanclk,
|
||||
pll_scanclkena => pll_scanclkena,
|
||||
pll_scandata => pll_scandata,
|
||||
rom_address_out => rom_address,
|
||||
write_rom_ena => open
|
||||
);
|
||||
|
||||
rom1 : ENTITY work.PLLROM1
|
||||
PORT map
|
||||
(
|
||||
address => rom_address,
|
||||
clock => inclk0,
|
||||
q => dat1
|
||||
);
|
||||
|
||||
rom2 : ENTITY work.PLLROM2
|
||||
PORT map
|
||||
(
|
||||
address => rom_address,
|
||||
clock => inclk0,
|
||||
q => dat2
|
||||
);
|
||||
|
||||
rom3 : ENTITY work.PLLROM3
|
||||
PORT map
|
||||
(
|
||||
address => rom_address,
|
||||
clock => inclk0,
|
||||
q => dat3
|
||||
);
|
||||
|
||||
|
||||
end architecture;
|
||||
625
cores/minimig/rtl/mist/sdram.vhd
Normal file
625
cores/minimig/rtl/mist/sdram.vhd
Normal file
@@ -0,0 +1,625 @@
|
||||
------------------------------------------------------------------------------
|
||||
------------------------------------------------------------------------------
|
||||
-- --
|
||||
-- Copyright (c) 2009-2011 Tobias Gubener --
|
||||
-- Subdesign fAMpIGA by TobiFlex --
|
||||
-- --
|
||||
-- This source file is free software: you can redistribute it and/or modify --
|
||||
-- it under the terms of the GNU General Public License as published --
|
||||
-- by the Free Software Foundation, either version 3 of the License, or --
|
||||
-- (at your option) any later version. --
|
||||
-- --
|
||||
-- This source file is distributed in the hope that it will be useful, --
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of --
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --
|
||||
-- GNU General Public License for more details. --
|
||||
-- --
|
||||
-- You should have received a copy of the GNU General Public License --
|
||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>. --
|
||||
-- --
|
||||
------------------------------------------------------------------------------
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
library ieee;
|
||||
use ieee.std_logic_1164.all;
|
||||
use ieee.std_logic_unsigned.all;
|
||||
|
||||
entity sdram is
|
||||
port
|
||||
(
|
||||
sdata : inout std_logic_vector(15 downto 0);
|
||||
sdaddr : out std_logic_vector(12 downto 0);
|
||||
dqm : out std_logic_vector(1 downto 0);
|
||||
sd_cs : out std_logic_vector(3 downto 0);
|
||||
ba : buffer std_logic_vector(1 downto 0);
|
||||
sd_we : out std_logic;
|
||||
sd_ras : out std_logic;
|
||||
sd_cas : out std_logic;
|
||||
|
||||
sysclk : in std_logic;
|
||||
reset_in : in std_logic;
|
||||
|
||||
hostWR : in std_logic_vector(15 downto 0);
|
||||
hostAddr : in std_logic_vector(23 downto 0);
|
||||
hostState : in std_logic_vector(2 downto 0);
|
||||
hostL : in std_logic;
|
||||
hostU : in std_logic;
|
||||
cpuWR : in std_logic_vector(15 downto 0);
|
||||
cpuAddr : in std_logic_vector(24 downto 1);
|
||||
cpuU : in std_logic;
|
||||
cpuL : in std_logic;
|
||||
cpustate : in std_logic_vector(5 downto 0);
|
||||
cpu_dma : in std_logic;
|
||||
chipWR : in std_logic_vector(15 downto 0);
|
||||
chipAddr : in std_logic_vector(23 downto 1);
|
||||
chipU : in std_logic;
|
||||
chipL : in std_logic;
|
||||
chipRW : in std_logic;
|
||||
chip_dma : in std_logic;
|
||||
c_7m : in std_logic;
|
||||
|
||||
hostRD : out std_logic_vector(15 downto 0);
|
||||
hostena : buffer std_logic;
|
||||
cpuRD : out std_logic_vector(15 downto 0);
|
||||
cpuena : out std_logic;
|
||||
chipRD : out std_logic_vector(15 downto 0);
|
||||
reset_out : out std_logic;
|
||||
enaRDreg : out std_logic;
|
||||
enaWRreg : buffer std_logic;
|
||||
ena7RDreg : out std_logic;
|
||||
ena7WRreg : out std_logic
|
||||
-- c_7m : out std_logic
|
||||
);
|
||||
end;
|
||||
|
||||
architecture rtl of sdram is
|
||||
|
||||
|
||||
signal initstate :std_logic_vector(3 downto 0);
|
||||
signal cas_sd_cs :std_logic_vector(3 downto 0);
|
||||
signal cas_sd_ras :std_logic;
|
||||
signal cas_sd_cas :std_logic;
|
||||
signal cas_sd_we :std_logic;
|
||||
signal cas_dqm :std_logic_vector(1 downto 0);
|
||||
signal init_done :std_logic;
|
||||
signal datain :std_logic_vector(15 downto 0);
|
||||
signal datawr :std_logic_vector(15 downto 0);
|
||||
signal casaddr :std_logic_vector(24 downto 0);
|
||||
signal sdwrite :std_logic;
|
||||
signal sdata_reg :std_logic_vector(15 downto 0);
|
||||
|
||||
signal hostCycle :std_logic;
|
||||
signal zmAddr :std_logic_vector(24 downto 0);
|
||||
signal zena :std_logic;
|
||||
signal zcache :std_logic_vector(63 downto 0);
|
||||
signal zcache_addr :std_logic_vector(23 downto 0);
|
||||
signal zcache_fill :std_logic;
|
||||
signal zcachehit :std_logic;
|
||||
signal zvalid :std_logic_vector(3 downto 0);
|
||||
signal zequal :std_logic;
|
||||
signal hostStated :std_logic_vector(1 downto 0);
|
||||
signal hostRDd :std_logic_vector(15 downto 0);
|
||||
|
||||
signal cena :std_logic;
|
||||
signal ccache :std_logic_vector(63 downto 0);
|
||||
signal ccache_addr :std_logic_vector(24 downto 0);
|
||||
signal ccache_fill :std_logic;
|
||||
signal ccachehit :std_logic;
|
||||
signal cvalid :std_logic_vector(3 downto 0);
|
||||
signal cequal :std_logic;
|
||||
signal cpuStated :std_logic_vector(1 downto 0);
|
||||
signal cpuRDd :std_logic_vector(15 downto 0);
|
||||
|
||||
signal hostSlot_cnt :std_logic_vector(7 downto 0);
|
||||
signal reset_cnt :std_logic_vector(7 downto 0);
|
||||
signal reset :std_logic;
|
||||
signal reset_sdstate :std_logic;
|
||||
|
||||
signal c_7md :std_logic;
|
||||
signal c_7mdd :std_logic;
|
||||
signal c_7mdr :std_logic;
|
||||
signal cpuCycle :std_logic;
|
||||
signal chipCycle :std_logic;
|
||||
signal slow :std_logic_vector(7 downto 0);
|
||||
|
||||
type sdram_states is (ph0,ph1,ph2,ph3,ph4,ph5,ph6,ph7,ph8,ph9,ph10,ph11,ph12,ph13,ph14,ph15);
|
||||
signal sdram_state : sdram_states;
|
||||
type pass_states is (nop,ras,cas);
|
||||
signal pass : pass_states;
|
||||
|
||||
begin
|
||||
|
||||
process (sysclk, reset_in) begin
|
||||
if reset_in = '0' THEN
|
||||
reset_cnt <= "00000000";
|
||||
reset <= '0';
|
||||
reset_sdstate <= '0';
|
||||
elsif (sysclk'event and sysclk='1') THEN
|
||||
IF reset_cnt="00101010"THEN
|
||||
reset_sdstate <= '1';
|
||||
END IF;
|
||||
IF reset_cnt="10101010"THEN
|
||||
if sdram_state=ph15 then
|
||||
reset <= '1';
|
||||
end if;
|
||||
ELSE
|
||||
reset_cnt <= reset_cnt+1;
|
||||
reset <= '0';
|
||||
END IF;
|
||||
end if;
|
||||
end process;
|
||||
-------------------------------------------------------------------------
|
||||
-- SPIHOST cache
|
||||
-------------------------------------------------------------------------
|
||||
hostena <= '1' when zena='1' or hostState(1 downto 0)="01" OR zcachehit='1' else '0';
|
||||
zmAddr <= '0'& NOT hostAddr(23) & hostAddr(22) & NOT hostAddr(21) & hostAddr(20 downto 0);
|
||||
|
||||
process (sysclk, zmAddr, hostAddr, zcache_addr, zcache, zequal, zvalid, hostRDd)
|
||||
begin
|
||||
if zmAddr(23 downto 3)=zcache_addr(23 downto 3) THEN
|
||||
zequal <='1';
|
||||
else
|
||||
zequal <='0';
|
||||
end if;
|
||||
zcachehit <= '0';
|
||||
if zequal='1' and zvalid(0)='1' and hostStated(1)='0' THEN
|
||||
-- case (hostAddr(2 downto 1)-zcache_addr(2 downto 1)) is
|
||||
-- when "00"=>
|
||||
-- zcachehit <= zvalid(0);
|
||||
-- hostRD <= zcache(63 downto 48);
|
||||
-- when "01"=>
|
||||
-- zcachehit <= zvalid(1);
|
||||
-- hostRD <= zcache(47 downto 32);
|
||||
-- when "10"=>
|
||||
-- zcachehit <= zvalid(2);
|
||||
-- hostRD <= zcache(31 downto 16);
|
||||
-- when "11"=>
|
||||
-- zcachehit <= zvalid(3);
|
||||
-- hostRD <= zcache(15 downto 0);
|
||||
-- when others=> null;
|
||||
-- end case;
|
||||
case (hostAddr(2 downto 1)&zcache_addr(2 downto 1)) is
|
||||
when "0000"|"0101"|"1010"|"1111"=>
|
||||
zcachehit <= zvalid(0);
|
||||
hostRD <= zcache(63 downto 48);
|
||||
when "0100"|"1001"|"1110"|"0011"=>
|
||||
zcachehit <= zvalid(1);
|
||||
hostRD <= zcache(47 downto 32);
|
||||
when "1000"|"1101"|"0010"|"0111"=>
|
||||
zcachehit <= zvalid(2);
|
||||
hostRD <= zcache(31 downto 16);
|
||||
when "1100"|"0001"|"0110"|"1011"=>
|
||||
zcachehit <= zvalid(3);
|
||||
hostRD <= zcache(15 downto 0);
|
||||
when others=> null;
|
||||
end case;
|
||||
else
|
||||
hostRD <= hostRDd;
|
||||
end if;
|
||||
end process;
|
||||
|
||||
|
||||
--Datenübernahme
|
||||
process (sysclk, reset) begin
|
||||
if reset = '0' THEN
|
||||
zcache_fill <= '0';
|
||||
zena <= '0';
|
||||
zvalid <= "0000";
|
||||
elsif (sysclk'event and sysclk='1') THEN
|
||||
if enaWRreg='1' THEN
|
||||
zena <= '0';
|
||||
end if;
|
||||
if sdram_state=ph9 AND hostCycle='1' THEN
|
||||
hostRDd <= sdata_reg;
|
||||
-- if zmAddr=casaddr and cas_sd_cas='0' then
|
||||
-- zena <= '1';
|
||||
-- end if;
|
||||
end if;
|
||||
if sdram_state=ph11 AND hostCycle='1' THEN
|
||||
-- hostRDd <= sdata_reg;
|
||||
if zmAddr=casaddr and cas_sd_cas='0' then
|
||||
zena <= '1';
|
||||
end if;
|
||||
end if;
|
||||
hostStated <= hostState(1 downto 0);
|
||||
if zequal='1' and hostState(1 downto 0)="11" THEN
|
||||
zvalid <= "0000";
|
||||
end if;
|
||||
case sdram_state is
|
||||
when ph7 =>
|
||||
if hostStated(1)='0' AND hostCycle='1' THEN --only instruction cache
|
||||
-- if cas_sd_we='1' AND hostStated(1)='0' AND hostCycle='1' THEN --only instruction cache
|
||||
-- if cas_sd_we='1' AND hostCycle='1' THEN
|
||||
zcache_addr <= casaddr(23 downto 0);
|
||||
zcache_fill <= '1';
|
||||
zvalid <= "0000";
|
||||
end if;
|
||||
when ph9 =>
|
||||
if zcache_fill='1' THEN
|
||||
zcache(63 downto 48) <= sdata_reg;
|
||||
-- zvalid(0) <= '1';
|
||||
end if;
|
||||
when ph10 =>
|
||||
if zcache_fill='1' THEN
|
||||
zcache(47 downto 32) <= sdata_reg;
|
||||
-- zvalid(1) <= '1';
|
||||
end if;
|
||||
when ph11 =>
|
||||
if zcache_fill='1' THEN
|
||||
zcache(31 downto 16) <= sdata_reg;
|
||||
-- zvalid(2) <= '1';
|
||||
end if;
|
||||
-- zena <= '0';
|
||||
when ph12 =>
|
||||
if zcache_fill='1' THEN
|
||||
zcache(15 downto 0) <= sdata_reg;
|
||||
-- zvalid(3) <= '1';
|
||||
zvalid <= "1111";
|
||||
end if;
|
||||
zcache_fill <= '0';
|
||||
when others => null;
|
||||
end case;
|
||||
end if;
|
||||
end process;
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
-- cpu cache
|
||||
-------------------------------------------------------------------------
|
||||
cpuena <= '1' when cena='1' or ccachehit='1' else '0';
|
||||
|
||||
process (sysclk, cpuAddr, ccache_addr, ccache, cequal, cvalid, cpuRDd)
|
||||
begin
|
||||
if cpuAddr(24 downto 3)=ccache_addr(24 downto 3) THEN
|
||||
cequal <='1';
|
||||
else
|
||||
cequal <='0';
|
||||
end if;
|
||||
ccachehit <= '0';
|
||||
if cequal='1' and cvalid(0)='1' and cpuStated(1)='0' THEN
|
||||
-- case (cpuAddr(2 downto 1)-ccache_addr(2 downto 1)) is
|
||||
-- when "00"=>
|
||||
-- ccachehit <= cvalid(0);
|
||||
-- cpuRD <= ccache(63 downto 48);
|
||||
-- when "01"=>
|
||||
-- ccachehit <= cvalid(1);
|
||||
-- cpuRD <= ccache(47 downto 32);
|
||||
-- when "10"=>
|
||||
-- ccachehit <= cvalid(2);
|
||||
-- cpuRD <= ccache(31 downto 16);
|
||||
-- when "11"=>
|
||||
-- ccachehit <= cvalid(3);
|
||||
-- cpuRD <= ccache(15 downto 0);
|
||||
-- when others=> null;
|
||||
-- end case;
|
||||
case (cpuAddr(2 downto 1)&ccache_addr(2 downto 1)) is
|
||||
when "0000"|"0101"|"1010"|"1111"=>
|
||||
ccachehit <= cvalid(0);
|
||||
cpuRD <= ccache(63 downto 48);
|
||||
when "0100"|"1001"|"1110"|"0011"=>
|
||||
ccachehit <= cvalid(1);
|
||||
cpuRD <= ccache(47 downto 32);
|
||||
when "1000"|"1101"|"0010"|"0111"=>
|
||||
ccachehit <= cvalid(2);
|
||||
cpuRD <= ccache(31 downto 16);
|
||||
when "1100"|"0001"|"0110"|"1011"=>
|
||||
ccachehit <= cvalid(3);
|
||||
cpuRD <= ccache(15 downto 0);
|
||||
when others=> null;
|
||||
end case;
|
||||
else
|
||||
cpuRD <= cpuRDd;
|
||||
end if;
|
||||
end process;
|
||||
|
||||
|
||||
--Datenübernahme
|
||||
process (sysclk, reset) begin
|
||||
if reset = '0' THEN
|
||||
ccache_fill <= '0';
|
||||
cena <= '0';
|
||||
cvalid <= "0000";
|
||||
elsif (sysclk'event and sysclk='1') THEN
|
||||
if cpuState(5)='1' THEN
|
||||
cena <= '0';
|
||||
end if;
|
||||
if sdram_state=ph9 AND cpuCycle='1' THEN
|
||||
cpuRDd <= sdata_reg;
|
||||
-- if cpuAddr=casaddr(24 downto 1) and cas_sd_cas='0' then
|
||||
-- cena <= '1';
|
||||
-- end if;
|
||||
end if;
|
||||
if sdram_state=ph11 AND cpuCycle='1' THEN
|
||||
-- cpuRDd <= sdata_reg;
|
||||
if cpuAddr=casaddr(24 downto 1) and cas_sd_cas='0' then
|
||||
cena <= '1';
|
||||
end if;
|
||||
end if;
|
||||
cpuStated <= cpuState(1 downto 0);
|
||||
if cequal='1' and cpuState(1 downto 0)="11" THEN
|
||||
cvalid <= "0000";
|
||||
end if;
|
||||
case sdram_state is
|
||||
when ph7 =>
|
||||
if cpuStated(1)='0' AND cpuCycle='1' THEN --only instruction cache
|
||||
-- if cas_sd_we='1' AND hostStated(1)='0' AND hostCycle='1' THEN --only instruction cache
|
||||
-- if cas_sd_we='1' AND hostCycle='1' THEN
|
||||
ccache_addr <= casaddr;
|
||||
ccache_fill <= '1';
|
||||
cvalid <= "0000";
|
||||
end if;
|
||||
when ph9 =>
|
||||
if ccache_fill='1' THEN
|
||||
ccache(63 downto 48) <= sdata_reg;
|
||||
-- cvalid(0) <= '1';
|
||||
end if;
|
||||
when ph10 =>
|
||||
if ccache_fill='1' THEN
|
||||
ccache(47 downto 32) <= sdata_reg;
|
||||
-- cvalid(1) <= '1';
|
||||
end if;
|
||||
when ph11 =>
|
||||
if ccache_fill='1' THEN
|
||||
ccache(31 downto 16) <= sdata_reg;
|
||||
-- cvalid(2) <= '1';
|
||||
end if;
|
||||
when ph12 =>
|
||||
if ccache_fill='1' THEN
|
||||
ccache(15 downto 0) <= sdata_reg;
|
||||
-- cvalid(3) <= '1';
|
||||
cvalid <= "1111";
|
||||
end if;
|
||||
ccache_fill <= '0';
|
||||
when others => null;
|
||||
end case;
|
||||
end if;
|
||||
end process;
|
||||
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
-- chip cache
|
||||
-------------------------------------------------------------------------
|
||||
process (sysclk, sdata_reg)
|
||||
begin
|
||||
if (sysclk'event and sysclk='1') THEN
|
||||
if sdram_state=ph9 AND chipCycle='1' THEN
|
||||
chipRD <= sdata_reg;
|
||||
end if;
|
||||
end if;
|
||||
end process;
|
||||
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
-- SDRAM Basic
|
||||
-------------------------------------------------------------------------
|
||||
reset_out <= init_done;
|
||||
|
||||
process (sysclk, reset, sdwrite, datain) begin
|
||||
IF sdwrite='1' THEN
|
||||
sdata <= datawr;
|
||||
ELSE
|
||||
sdata <= "ZZZZZZZZZZZZZZZZ";
|
||||
END IF;
|
||||
if (sysclk'event and sysclk='0') THEN
|
||||
c_7md <= c_7m;
|
||||
END IF;
|
||||
|
||||
if (sysclk'event and sysclk='1') THEN
|
||||
if sdram_state=ph2 THEN
|
||||
IF chipCycle='1' THEN
|
||||
datawr <= chipWR;
|
||||
ELSIF cpuCycle='1' THEN
|
||||
datawr <= cpuWR;
|
||||
ELSE
|
||||
datawr <= hostWR;
|
||||
END IF;
|
||||
END IF;
|
||||
sdata_reg <= sdata;
|
||||
c_7mdd <= c_7md;
|
||||
c_7mdr <= c_7md AND NOT c_7mdd;
|
||||
if reset_sdstate = '0' then
|
||||
sdwrite <= '0';
|
||||
enaRDreg <= '0';
|
||||
enaWRreg <= '0';
|
||||
ena7RDreg <= '0';
|
||||
ena7WRreg <= '0';
|
||||
ELSE
|
||||
sdwrite <= '0';
|
||||
enaRDreg <= '0';
|
||||
enaWRreg <= '0';
|
||||
ena7RDreg <= '0';
|
||||
ena7WRreg <= '0';
|
||||
case sdram_state is --LATENCY=3
|
||||
when ph2 => sdwrite <= '1';
|
||||
enaWRreg <= '1';
|
||||
when ph3 => sdwrite <= '1';
|
||||
when ph4 => sdwrite <= '1';
|
||||
when ph5 => sdwrite <= '1';
|
||||
when ph6 => enaWRreg <= '1';
|
||||
ena7RDreg <= '1';
|
||||
-- when ph7 => c_7m <= '0';
|
||||
when ph10 => enaWRreg <= '1';
|
||||
when ph14 => enaWRreg <= '1';
|
||||
ena7WRreg <= '1';
|
||||
-- when ph15 => c_7m <= '1';
|
||||
when others => null;
|
||||
end case;
|
||||
END IF;
|
||||
if reset = '0' then
|
||||
initstate <= (others => '0');
|
||||
init_done <= '0';
|
||||
ELSE
|
||||
case sdram_state is --LATENCY=3
|
||||
when ph15 => if initstate /= "1111" THEN
|
||||
initstate <= initstate+1;
|
||||
else
|
||||
init_done <='1';
|
||||
end if;
|
||||
when others => null;
|
||||
end case;
|
||||
END IF;
|
||||
IF c_7mdr='1' THEN
|
||||
sdram_state <= ph2;
|
||||
-- if reset_sdstate = '0' then
|
||||
-- sdram_state <= ph0;
|
||||
ELSE
|
||||
case sdram_state is --LATENCY=3
|
||||
when ph0 => sdram_state <= ph1;
|
||||
when ph1 => sdram_state <= ph2;
|
||||
-- when ph1 =>
|
||||
-- IF c_28md='1' THEN
|
||||
-- sdram_state <= ph2;
|
||||
-- ELSE
|
||||
-- sdram_state <= ph1;
|
||||
-- END IF;
|
||||
when ph2 => sdram_state <= ph3;
|
||||
-- when ph2 => --sdram_state <= ph3;
|
||||
-- IF c_28md='0' THEN
|
||||
-- sdram_state <= ph3;
|
||||
-- ELSE
|
||||
-- sdram_state <= ph2;
|
||||
-- END IF;
|
||||
when ph3 => sdram_state <= ph4;
|
||||
when ph4 => sdram_state <= ph5;
|
||||
when ph5 => sdram_state <= ph6;
|
||||
when ph6 => sdram_state <= ph7;
|
||||
when ph7 => sdram_state <= ph8;
|
||||
when ph8 => sdram_state <= ph9;
|
||||
when ph9 => sdram_state <= ph10;
|
||||
when ph10 => sdram_state <= ph11;
|
||||
when ph11 => sdram_state <= ph12;
|
||||
when ph12 => sdram_state <= ph13;
|
||||
when ph13 => sdram_state <= ph14;
|
||||
when ph14 => sdram_state <= ph15;
|
||||
-- when ph15 => sdram_state <= ph0;
|
||||
when others => sdram_state <= ph0;
|
||||
end case;
|
||||
END IF;
|
||||
END IF;
|
||||
end process;
|
||||
|
||||
|
||||
|
||||
process (sysclk, initstate, pass, hostAddr, datain, init_done, casaddr, cpuU, cpuL, hostCycle) begin
|
||||
|
||||
|
||||
|
||||
if (sysclk'event and sysclk='1') THEN
|
||||
sd_cs <="1111";
|
||||
sd_ras <= '1';
|
||||
sd_cas <= '1';
|
||||
sd_we <= '1';
|
||||
sdaddr <= "XXXXXXXXXXXXX";
|
||||
ba <= "00";
|
||||
dqm <= "00";
|
||||
if init_done='0' then
|
||||
if sdram_state =ph1 then
|
||||
case initstate is
|
||||
when "0010" => --PRECHARGE
|
||||
sdaddr(10) <= '1'; --all banks
|
||||
sd_cs <="0000";
|
||||
sd_ras <= '0';
|
||||
sd_cas <= '1';
|
||||
sd_we <= '0';
|
||||
when "0011"|"0100"|"0101"|"0110"|"0111"|"1000"|"1001"|"1010"|"1011"|"1100" => --AUTOREFRESH
|
||||
sd_cs <="0000";
|
||||
sd_ras <= '0';
|
||||
sd_cas <= '0';
|
||||
sd_we <= '1';
|
||||
when "1101" => --LOAD MODE REGISTER
|
||||
sd_cs <="0000";
|
||||
sd_ras <= '0';
|
||||
sd_cas <= '0';
|
||||
sd_we <= '0';
|
||||
-- ba <= "00";
|
||||
-- sdaddr <= "0001000100010"; --BURST=4 LATENCY=2
|
||||
sdaddr <= "0001000110010"; --BURST=4 LATENCY=3
|
||||
when others => null; --NOP
|
||||
end case;
|
||||
END IF;
|
||||
else
|
||||
|
||||
-- Time slot control
|
||||
if sdram_state=ph1 THEN
|
||||
cpuCycle <= '0';
|
||||
chipCycle <= '0';
|
||||
hostCycle <= '0';
|
||||
cas_sd_cs <= "1110";
|
||||
cas_sd_ras <= '1';
|
||||
cas_sd_cas <= '1';
|
||||
cas_sd_we <= '1';
|
||||
IF slow(2 downto 0)=5 THEN
|
||||
slow <= slow+3;
|
||||
ELSE
|
||||
slow <= slow+1;
|
||||
END IF;
|
||||
-- IF dma='0' OR cpu_dma='0' THEN
|
||||
IF hostSlot_cnt /= "00000000" THEN
|
||||
hostSlot_cnt <= hostSlot_cnt-1;
|
||||
END IF;
|
||||
-- IF chip_dma='1' THEN
|
||||
IF chip_dma='0' OR chipRW='0' THEN
|
||||
chipCycle <= '1';
|
||||
sdaddr <= '0'&chipAddr(20 downto 9);
|
||||
-- ba <= "00";
|
||||
ba <= chipAddr(22 downto 21);
|
||||
-- cas_dqm <= "00"; --only word access
|
||||
cas_dqm <= chipU& chipL;
|
||||
sd_cs <= "1110"; --ACTIVE
|
||||
sd_ras <= '0';
|
||||
casaddr <= '0'&chipAddr&'0';
|
||||
datain <= chipWR;
|
||||
cas_sd_cas <= '0';
|
||||
cas_sd_we <= chipRW;
|
||||
-- ELSIF cpu_dma='1' AND hostSlot_cnt /= "00000000" THEN
|
||||
-- ELSIF cpu_dma='0' OR cpuRW='0' THEN
|
||||
ELSIF cpuState(2)='0' AND cpuState(5)='0' THEN
|
||||
cpuCycle <= '1';
|
||||
sdaddr <= cpuAddr(24)&cpuAddr(20 downto 9);
|
||||
ba <= cpuAddr(22 downto 21);
|
||||
cas_dqm <= cpuU& cpuL;
|
||||
sd_cs <= "1110"; --ACTIVE
|
||||
sd_ras <= '0';
|
||||
casaddr <= cpuAddr(24 downto 1)&'0';
|
||||
datain <= cpuWR;
|
||||
cas_sd_cas <= '0';
|
||||
cas_sd_we <= NOT cpuState(1) OR NOT cpuState(0);
|
||||
ELSE
|
||||
hostSlot_cnt <= "00001111";
|
||||
-- ELSIF hostState(2)='1' OR hostena='1' OR slow(3 downto 0)="0001" THEN --refresh cycle
|
||||
IF hostState(2)='1' OR hostena='1' THEN --refresh cycle
|
||||
-- ELSIF slow(3 downto 0)="0001" THEN --refresh cycle
|
||||
sd_cs <="0000"; --AUTOREFRESH
|
||||
sd_ras <= '0';
|
||||
sd_cas <= '0';
|
||||
ELSE
|
||||
hostCycle <= '1';
|
||||
sdaddr <= '0'&zmAddr(20 downto 9);
|
||||
ba <= zmAddr(22 downto 21);
|
||||
cas_dqm <= hostU& hostL;
|
||||
sd_cs <= "1110"; --ACTIVE
|
||||
sd_ras <= '0';
|
||||
casaddr <= zmAddr;
|
||||
datain <= hostWR;
|
||||
cas_sd_cas <= '0';
|
||||
IF hostState="011" THEN
|
||||
cas_sd_we <= '0';
|
||||
-- dqm <= hostU& hostL;
|
||||
END IF;
|
||||
END IF;
|
||||
END IF;
|
||||
END IF;
|
||||
if sdram_state=ph4 then
|
||||
sdaddr <= '0'&'0' & '1' & '0' & casaddr(23)&casaddr(8 downto 1);--auto precharge
|
||||
ba <= casaddr(22 downto 21);
|
||||
sd_cs <= cas_sd_cs;
|
||||
IF cas_sd_we='0' THEN
|
||||
dqm <= cas_dqm;
|
||||
END IF;
|
||||
sd_ras <= cas_sd_ras;
|
||||
sd_cas <= cas_sd_cas;
|
||||
sd_we <= cas_sd_we;
|
||||
END IF;
|
||||
END IF;
|
||||
END IF;
|
||||
END process;
|
||||
END;
|
||||
Reference in New Issue
Block a user