##// END OF EJS Templates
Partially Working BeagleSynth base design, SDRAM still f****** buggy.
Jeandet Alexis -
r265:9504f3e37fb4 alexis
parent child
Show More
@@ -1,28 +1,109
1 1
2 2 NET "CLK" CLOCK_DEDICATED_ROUTE = FALSE;
3 NET "CLK" LOC = "K20";
3 NET "CLK" LOC = "K20"| slew=FAST | IOSTANDARD=LVTTL;
4 #NET "CLKM" TNM_NET = "clkm_net";
5 #TIMESPEC "TS_clkm_net" = PERIOD "clkm_net" 10 ns HIGH 50%;
4 6
5 7 NET "RESET" CLOCK_DEDICATED_ROUTE = FALSE;
6 NET "RESET" LOC = "AB11";
8 NET "RESET" LOC = "AB11" | slew=FAST | IOSTANDARD=LVTTL;
7 9
8 NET "DAC_nCLR" LOC = "R11";
9 NET "DAC_nCS" LOC = "T12";
10 NET "CAL_IN_SCK" LOC = "R13";
11 NET "DAC_SDI(0)" LOC = "P5";
12 NET "DAC_SDI(1)" LOC = "M5";
13 NET "DAC_SDI(2)" LOC = "C8";
14 NET "DAC_SDI(3)" LOC = "M6";
15 NET "DAC_SDI(4)" LOC = "K22";
16 NET "DAC_SDI(5)" LOC = "L22";
17 NET "DAC_SDI(6)" LOC = "G19";
18 NET "DAC_SDI(7)" LOC = "F20";
10 NET "DAC_nCLR" LOC = "R11" | IOSTANDARD=LVTTL;
11 NET "DAC_nCS" LOC = "T12" | IOSTANDARD=LVTTL;
12 NET "CAL_IN_SCK" LOC = "R13" | IOSTANDARD=LVTTL;
13 NET "DAC_SDI(0)" LOC = "P5" | IOSTANDARD=LVTTL;
14 NET "DAC_SDI(1)" LOC = "M5" | IOSTANDARD=LVTTL;
15 NET "DAC_SDI(2)" LOC = "C8" | IOSTANDARD=LVTTL;
16 NET "DAC_SDI(3)" LOC = "M6" | IOSTANDARD=LVTTL;
17 NET "DAC_SDI(4)" LOC = "K22" | IOSTANDARD=LVTTL;
18 NET "DAC_SDI(5)" LOC = "L22" | IOSTANDARD=LVTTL;
19 NET "DAC_SDI(6)" LOC = "G19" | IOSTANDARD=LVTTL;
20 NET "DAC_SDI(7)" LOC = "F20" | IOSTANDARD=LVTTL;
19 21
20 22
21 NET "TDX" LOC = "V22";
22 NET "RXD" LOC = "U22";
23 NET "LED(0)" LOC = "AB9";
24 NET "LED(1)" LOC = "AB8";
25 NET "LED(2)" LOC = "AA8";
23 NET "TXD" LOC = "V22"| slew=FAST | IOSTANDARD=LVTTL;
24 NET "RXD" LOC = "U22"| slew=FAST | IOSTANDARD=LVTTL;
25 NET "LED(0)" LOC = "AB9"| slew=FAST | IOSTANDARD=LVTTL;
26 NET "LED(1)" LOC = "AB8"| slew=FAST | IOSTANDARD=LVTTL;
27 NET "LED(2)" LOC = "AA8"| slew=FAST | IOSTANDARD=LVTTL;
26 28
27 NET "urxd1" LOC = "D3"; # Unused PIN
28 NET "utxd1" LOC = "C4"; # Unused PIN No newline at end of file
29 NET "urxd1" LOC = "D3" | IOSTANDARD=LVTTL; # Unused PIN
30 NET "utxd1" LOC = "C4" | IOSTANDARD=LVTTL; # Unused PIN
31
32 NET "sdcke" LOC = "B6" | slew=FAST | IOSTANDARD=LVTTL; # clk en
33 NET "sdcsn" LOC = "G20"| slew=FAST | IOSTANDARD=LVTTL; # chip sel
34 NET "sdwen" LOC = "D14"| slew=FAST | IOSTANDARD=LVTTL; # write en
35 NET "sdrasn" LOC = "H19"| slew=FAST | IOSTANDARD=LVTTL; # row addr stb
36 NET "sdcasn" LOC = "C14"| slew=FAST | IOSTANDARD=LVTTL; # col addr stb
37
38 NET "sddqm(3)" LOC = "A5" | slew=FAST | IOSTANDARD=LVTTL; # data i/o mask
39 NET "sddqm(2)" LOC = "D21"| slew=FAST | IOSTANDARD=LVTTL; # data i/o mask
40 NET "sddqm(1)" LOC = "C7" | slew=FAST | IOSTANDARD=LVTTL; # data i/o mask
41 NET "sddqm(0)" LOC = "D15"| slew=FAST | IOSTANDARD=LVTTL; # data i/o mask
42
43 NET "sdclk" CLOCK_DEDICATED_ROUTE = FALSE;
44 NET "sdclk" LOC = "A6" | slew=FAST | IOSTANDARD=LVTTL; # sdram clk output
45 NET "sdba(1)" LOC = "J20"| slew=FAST | IOSTANDARD=LVTTL; # bank select address
46 NET "sdba(0)" LOC = "G16"| slew=FAST | IOSTANDARD=LVTTL; # bank select address
47
48 NET "Address(11)" LOC = "H8"| slew=FAST | IOSTANDARD=LVTTL; # sdram address
49 NET "Address(10)" LOC = "G7"| slew=FAST | IOSTANDARD=LVTTL; # sdram address
50 NET "Address(9)" LOC = "K7"| slew=FAST | IOSTANDARD=LVTTL; # sdram address
51 NET "Address(8)" LOC = "H6"| slew=FAST | IOSTANDARD=LVTTL; # sdram address
52 NET "Address(7)" LOC = "H5"| slew=FAST | IOSTANDARD=LVTTL; # sdram address
53 NET "Address(6)" LOC = "K8"| slew=FAST | IOSTANDARD=LVTTL; # sdram address
54 NET "Address(5)" LOC = "G4"| slew=FAST | IOSTANDARD=LVTTL; # sdram address
55 NET "Address(4)" LOC = "H3"| slew=FAST | IOSTANDARD=LVTTL; # sdram address
56 NET "Address(3)" LOC = "D2"| slew=FAST | IOSTANDARD=LVTTL; # sdram address
57 NET "Address(2)" LOC = "B3"| slew=FAST | IOSTANDARD=LVTTL; # sdram address
58 NET "Address(1)" LOC = "A2"| slew=FAST | IOSTANDARD=LVTTL; # sdram address
59 NET "Address(0)" LOC = "C22"| slew=FAST | IOSTANDARD=LVTTL; # sdram address
60
61 NET "Data(31)" LOC = "C5" | slew=FAST | IOSTANDARD=LVTTL; # sdram data
62 NET "Data(30)" LOC = "A4" | slew=FAST | IOSTANDARD=LVTTL; # sdram data
63 NET "Data(29)" LOC = "A3" | slew=FAST | IOSTANDARD=LVTTL; # sdram data
64 NET "Data(28)" LOC = "B2" | slew=FAST | IOSTANDARD=LVTTL; # sdram data
65 NET "Data(27)" LOC = "B1" | slew=FAST | IOSTANDARD=LVTTL; # sdram data
66 NET "Data(26)" LOC = "C1" | slew=FAST | IOSTANDARD=LVTTL; # sdram data
67 NET "Data(25)" LOC = "D1" | slew=FAST | IOSTANDARD=LVTTL; # sdram data
68 NET "Data(24)" LOC = "E1" | slew=FAST | IOSTANDARD=LVTTL; # sdram data
69 NET "Data(23)" LOC = "J22"| slew=FAST | IOSTANDARD=LVTTL; # sdram data
70 NET "Data(22)" LOC = "H22"| slew=FAST | IOSTANDARD=LVTTL; # sdram data
71 NET "Data(21)" LOC = "H21"| slew=FAST | IOSTANDARD=LVTTL; # sdram data
72 NET "Data(20)" LOC = "G22"| slew=FAST | IOSTANDARD=LVTTL; # sdram data
73 NET "Data(19)" LOC = "F22"| slew=FAST | IOSTANDARD=LVTTL; # sdram data
74 NET "Data(18)" LOC = "F21"| slew=FAST | IOSTANDARD=LVTTL; # sdram data
75 NET "Data(17)" LOC = "E22"| slew=FAST | IOSTANDARD=LVTTL; # sdram data
76 NET "Data(16)" LOC = "D22"| slew=FAST | IOSTANDARD=LVTTL; # sdram data
77 NET "Data(15)" LOC = "A7" | slew=FAST | IOSTANDARD=LVTTL; # sdram data
78 NET "Data(14)" LOC = "B8" | slew=FAST | IOSTANDARD=LVTTL; # sdram data
79 NET "Data(13)" LOC = "A8" | slew=FAST | IOSTANDARD=LVTTL; # sdram data
80 NET "Data(12)" LOC = "C9" | slew=FAST | IOSTANDARD=LVTTL; # sdram data
81 NET "Data(11)" LOC = "A9" | slew=FAST | IOSTANDARD=LVTTL; # sdram data
82 NET "Data(10)" LOC = "B10"| slew=FAST | IOSTANDARD=LVTTL; # sdram data
83 NET "Data(9)" LOC = "A10"| slew=FAST | IOSTANDARD=LVTTL; # sdram data
84 NET "Data(8)" LOC = "C11"| slew=FAST | IOSTANDARD=LVTTL; # sdram data
85 NET "Data(7)" LOC = "A13"| slew=FAST | IOSTANDARD=LVTTL; # sdram data
86 NET "Data(6)" LOC = "C13"| slew=FAST | IOSTANDARD=LVTTL; # sdram data
87 NET "Data(5)" LOC = "B22"| slew=FAST | IOSTANDARD=LVTTL; # sdram data
88 NET "Data(4)" LOC = "B21"| slew=FAST | IOSTANDARD=LVTTL; # sdram data
89 NET "Data(3)" LOC = "B20"| slew=FAST | IOSTANDARD=LVTTL; # sdram data
90 NET "Data(2)" LOC = "A20"| slew=FAST | IOSTANDARD=LVTTL; # sdram data
91 NET "Data(1)" LOC = "B18"| slew=FAST | IOSTANDARD=LVTTL; # sdram data
92 NET "Data(0)" LOC = "A18"| slew=FAST | IOSTANDARD=LVTTL; # sdram data
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
@@ -1,229 +1,251
1 1 library ieee;
2 2 use ieee.std_logic_1164.all;
3 3 use IEEE.numeric_std.all;
4 4 library grlib, techmap;
5 5 use grlib.amba.all;
6 6 use grlib.amba.all;
7 7 use grlib.stdlib.all;
8 8 use techmap.gencomp.all;
9 9 use techmap.allclkgen.all;
10 10 library gaisler;
11 11 use gaisler.memctrl.all;
12 12 use gaisler.leon3.all;
13 13 use gaisler.uart.all;
14 14 use gaisler.misc.all;
15 library esa;
16 use esa.memoryctrl.all;
15 17 --use gaisler.sim.all;
16 18 library lpp;
17 19 use lpp.lpp_ad_conv.all;
18 20 use lpp.lpp_amba.all;
19 21 use lpp.apb_devices_list.all;
20 22 use lpp.general_purpose.all;
21 23
24 Library UNISIM;
25 use UNISIM.vcomponents.all;
26
22 27
23 28 use work.config.all;
24 29 --==================================================================
25 30 --
26 31 --
27 32 -- FPGA FREQ = 100MHz
28 33 --
29 34 --
30 35 --==================================================================
31 36
32 37 entity BeagleSynth is
33 38 generic (
34 39 fabtech : integer := CFG_FABTECH;
35 40 memtech : integer := CFG_MEMTECH;
36 41 padtech : integer := CFG_PADTECH;
37 42 clktech : integer := CFG_CLKTECH
38 43 );
39 44 port (
40 45 reset : in std_ulogic;
41 46 clk : in std_ulogic;
42 47 DAC_nCLR : out std_ulogic;
43 48 DAC_nCS : out std_ulogic;
44 49 CAL_IN_SCK : out std_ulogic;
45 50 DAC_SDI : out std_ulogic_vector(7 downto 0);
46 51 TXD : out std_ulogic;
47 52 RXD : in std_ulogic;
48 53 urxd1 : in std_ulogic;
49 54 utxd1 : out std_ulogic;
50 55 LED : out std_ulogic_vector(2 downto 0);
51 56 --------------------------------------------------------
52 57 ---- SDRAM
53 58 ---- For SDRAM config have a look on leon3-altera-ep1c20
54 59 ---- design from GRLIB, the IS42S32400E is similar to
55 60 ---- MT48LC4M32B2.
56 61 --------------------------------------------------------
57 sdcke : out std_logic_vector ( 1 downto 0); -- clk en
58 sdcsn : out std_logic_vector ( 1 downto 0); -- chip sel
62 sdcke : out std_logic; -- clk en
63 sdcsn : out std_logic; -- chip sel
59 64 sdwen : out std_logic; -- write en
60 65 sdrasn : out std_logic; -- row addr stb
61 66 sdcasn : out std_logic; -- col addr stb
62 67 sddqm : out std_logic_vector (3 downto 0); -- data i/o mask
63 68 sdclk : out std_logic; -- sdram clk output
64 sdba : out std_logic_vector (3 downto 0); -- bank select address
69 sdba : out std_logic_vector (1 downto 0); -- bank select address
65 70 Address : out std_logic_vector(11 downto 0); -- sdram address
66 71 Data : inout std_logic_vector(31 downto 0) -- optional sdram data
67 72 );
68 73 end;
69 74
70 75 architecture rtl of BeagleSynth is
71 76 constant maxahbmsp : integer := CFG_NCPU+CFG_AHB_UART+
72 77 CFG_GRETH+CFG_AHB_JTAG;
73 78 constant maxahbm : integer := maxahbmsp;
74 79 constant IOAEN : integer := CFG_CAN;
75 80 constant boardfreq : integer := 100000;
76 81
77 82 signal clk2x : std_ulogic;
78 83 signal lclk : std_ulogic;
79 84 signal clkm : std_ulogic;
80 85 signal rstn : std_ulogic;
86 signal rst : std_ulogic;
81 87 signal rstraw : std_ulogic;
82 88 signal pciclk : std_ulogic;
83 89 signal sdclkl : std_ulogic;
90 signal sdclkl_DDR2 : std_ulogic;
84 91 signal cgi : clkgen_in_type;
85 92 signal cgo : clkgen_out_type;
86 93
87 94 --- AHB / APB
88 95 signal apbi : apb_slv_in_type;
89 96 signal apbo : apb_slv_out_vector := (others => apb_none);
90 97 signal ahbsi : ahb_slv_in_type;
91 98 signal ahbso : ahb_slv_out_vector := (others => ahbs_none);
92 99 signal ahbmi : ahb_mst_in_type;
93 100 signal ahbmo : ahb_mst_out_vector := (others => ahbm_none);
94 101
95 102 --- MEM CTRLR
96 signal memi : memory_in_type;
97 signal memo : memory_out_type;
98 signal sdo : sdram_out_type;
103 signal sdi : sdctrl_in_type;
104 signal sdo : sdctrl_out_type;
99 105
100 106 --UART
101 107 signal ahbuarti : uart_in_type;
102 108 signal ahbuarto : uart_out_type;
103 109 signal apbuarti : uart_in_type;
104 110 signal apbuarto : uart_out_type;
105 111
106 112 signal led2int : std_logic;
107 113
108 114 begin
109 115
110 116 DAC_nCLR <= '1';
111 117 DAC_nCS <= '1';
112 118 CAL_IN_SCK <= '1';
113 119 DAC_SDI <= (others =>'1');
114 120
115 rst0 : rstgen port map (reset, clkm, cgo.clklock, rstn, rstraw);
121 resetn_pad : inpad generic map (tech => padtech) port map (reset, rst);
122 rst0 : rstgen port map (rst, lclk, '1', rstn, rstraw);
123 --rstn <= reset;
124 --lclk <= clk;
125 clk_pad : clkpad GENERIC MAP (tech => padtech) PORT MAP (clk, lclk);
116 126
117 lclk <= clk;
127 cgi.pllctrl <= "00"; cgi.pllrst <= rstraw;
128 clkgen0 : clkgen -- clock generator
129 generic map (clktech, CFG_CLKMUL, CFG_CLKDIV, CFG_MCTRL_SDEN, CFG_CLK_NOFB, 0, 0, 0, boardfreq)
130 port map (lclk, lclk, clkm, open, open, sdclkl, open, cgi, cgo,open,open);
131
132 -- sdclk_pad : outpad generic map (tech => padtech) port map (sdclk, sdclkl_DDR2);
133 --sdclk <= sdclkl;
134 sdclk <= sdclkl_DDR2;
118 135
119 clkgen0 : clkgen -- clock generatorsa
120 generic map (clktech, CFG_CLKMUL, CFG_CLKDIV, CFG_MCTRL_SDEN,
121 CFG_CLK_NOFB, 0, 0, 0, boardfreq, 0, 0, CFG_OCLKDIV)
122 port map (lclk, lclk, clkm, open, clk2x, sdclkl, pciclk, cgi, cgo);
123
136 ODDR2_inst : ODDR2
137 generic map(
138 DDR_ALIGNMENT => "C0", -- Sets output alignment to "NONE", "C0", "C1"
139 INIT => '0', -- Sets initial state of the Q output to '0' or '1'
140 SRTYPE => "ASYNC") -- Specifies "SYNC" or "ASYNC" set/reset
141 port map (
142 Q => sdclkl_DDR2, -- 1-bit output data
143 C0 => sdclkl, -- 1-bit clock input
144 C1 => not sdclkl, -- 1-bit clock input
145 CE => '1', -- 1-bit clock enable input
146 D0 => '1', -- 1-bit data input (associated with C0)
147 D1 => '0', -- 1-bit data input (associated with C1)
148 R => '0', -- 1-bit reset input
149 S => '0' -- 1-bit set input
150 );
124 151
125 152 ----------------------------------------------------------------------
126 153 --- AHB CONTROLLER -------------------------------------------------
127 154 ----------------------------------------------------------------------
128 155
129 156 ahb0 : ahbctrl -- AHB arbiter/multiplexer
130 157 generic map (defmast => CFG_DEFMST, split => CFG_SPLIT,
131 158 rrobin => CFG_RROBIN, ioaddr => CFG_AHBIO,
132 159 ioen => IOAEN, nahbm => maxahbm, nahbs => 8)
133 160 port map (rstn, clkm, ahbmi, ahbmo, ahbsi, ahbso);
134 161
135 162 ----------------------------------------------------------------------
136 163 --- AHB UART -------------------------------------------------------
137 164 ----------------------------------------------------------------------
138 165
139 166 dcomgen : if CFG_AHB_UART = 1 generate
140 167 dcom0: ahbuart -- Debug UART
141 168 generic map (hindex => CFG_NCPU, pindex => 7, paddr => 7)
142 169 port map (rstn, clkm, ahbuarti, ahbuarto, apbi, apbo(7), ahbmi, ahbmo(CFG_NCPU));
143 170 ahbuarti.rxd <= RXD;
144 171 TXD <= ahbuarto.txd;
145 led(0) <= not ahbuarti.rxd; led(1) <= not ahbuarto.txd;
172 led(0) <= ahbuarti.rxd; led(1) <= ahbuarto.txd;
146 173 end generate;
147 174 nouah : if CFG_AHB_UART = 0 generate apbo(7) <= apb_none; end generate;
148 175
149 176 ----------------------------------------------------------------------
150 177 --- APB Bridge -----------------------------------------------------
151 178 ----------------------------------------------------------------------
152 179
153 180 apb0 : apbctrl -- AHB/APB bridge
154 181 generic map (hindex => 1, haddr => CFG_APBADDR)
155 182 port map (rstn, clkm, ahbsi, ahbso(1), apbi, apbo );
156 183
157 184 ----------------------------------------------------------------------
158 185 --- APB UART -------------------------------------------------------
159 186 ----------------------------------------------------------------------
160 187
161 188 ua1 : if CFG_UART1_ENABLE /= 0 generate
162 189 uart1 : apbuart -- UART 1
163 190 generic map (pindex => 1, paddr => 1, pirq => 2, console => CFG_DUART,
164 191 fifosize => CFG_UART1_FIFO)
165 port map (rstn, clkm, apbi, apbo(1), ahbuarti, apbuarto);
192 port map (rstn, clkm, apbi, apbo(1), apbuarti, apbuarto);
166 193 apbuarti.rxd <= urxd1; apbuarti.extclk <= '0'; utxd1 <= apbuarto.txd;
167 194 apbuarti.ctsn <= '0';
168 195 end generate;
169 196 noua0 : if CFG_UART1_ENABLE = 0 generate apbo(1) <= apb_none; end generate;
170 197
171 198
172 199
173 200
174 201 --div0: Clk_divider
175 202 -- generic map( 100000000,1)
176 203 -- Port map( clkm,rstn,LED(2));
177 204
178 205 LED(2) <= led2int;
179 206
180 207 process(clkm,rstn)
181 208 begin
182 209 if rstn = '0' then
183 210 led2int <= '0';
184 211 elsif clkm'event and clkm='1' then
185 212 led2int <= not led2int;
186 213 end if;
187 214 end process;
188 215
189 216
190 217
191 218
192 mctrl0 : mctrl generic map (srbanks => 4, sden => 1)
193 port map (rstn, clkm, memi, memo, ahbsi, ahbso(0), apbi, apbo(0), wprot, sdo);
219 sdc : sdctrl
220 generic map (hindex => 0, haddr => 16#600#, hmask => 16#F00#,ioaddr => 1, pwron => 0,
221 invclk => 0,sdbits =>32)
222 port map (rstn, clkm, ahbsi, ahbso(0), sdi, sdo);
194 223
195 -- memory controller inputs not used in this configuration
196 memi.brdyn <= '1'; memi.bexcn <= '1'; memi.wrn <= "1111";
224
225
226 --Alternative data pad instantiation with vectored bdrive
227 sd_pad : iopadvv generic map (tech=> padtech,width => 32)
228 port map (
229 data(31 downto 0),
230 sdo.data(31 downto 0),
231 sdo.vbdrive(31 downto 0),
232 sdi.data(31 downto 0));
197 233
198 memi.sd <= Data;
199 -- prom width at reset
200 memi.bwidth <= "10";
201 -- I/O pads driving data memory bus data signals
202 datapads : for i in 0 to 3 generate
203 data_pad : iopadv generic map (width => 8)
204 port map (
205 pad => data(31-i*8 downto 24-i*8),
206 o => memi.data(31-i*8 downto 24-i*8),
207 en => memo.bdrive(i),
208 i => memo.data(31-i*8 downto 24-i*8)
209 );
210 end generate;
234
211 235 -- connect memory controller outputs to entity output signals
212 Address <= memo.sa(11 downto 0);
213 sdba <= memo.sa(13 downto 12);
214 writen <= memo.writen; read <= memo.read; iosn <= memo.iosn;
215 sdcke <= sdo.sdcke;
236 Address <= sdo.address(13 downto 2);
237 sdba <= sdo.address(16 downto 15);
238 sdcke <= sdo.sdcke(0);
216 239 sdwen <= sdo.sdwen;
217 sdcsn <= sdo.sdcsn;
240 sdcsn <= sdo.sdcsn(0);
218 241 sdrasn <= sdo.rasn;
219 242 sdcasn <= sdo.casn;
220 243 sddqm <= sdo.dqm(3 downto 0);
221
222 end;
244 --sdi.data(31 downto 0) <= data(31 downto 0);
223 245
224 246
225 247
226 248 end rtl;
227 249
228 250
229 251
@@ -1,46 +1,49
1 1 include .config
2 2
3 3 #GRLIB=$(GRLIB)
4 4 TOP=BeagleSynth
5 5 BOARD=BeagleSynth
6 6 #BOARD=SP601
7 7 include ../../boards/$(BOARD)/Makefile.inc
8 8 DEVICE=$(PART)-$(PACKAGE)$(SPEED)
9 9 #UCF=$(GRLIB)/boards/$(BOARD)/ICI3.ucf
10 10 UCF=../../boards/$(BOARD)/default.ucf
11 11 QSF=../../boards/$(BOARD)/$(TOP).qsf
12 12 EFFORT=high
13 13 ISEMAPOPT="-timing"
14 14 XSTOPT=""
15 15 SYNPOPT="set_option -maxfan 100; set_option -pipe 1; set_option -retiming 1; set_option -write_apr_constraint 0"
16 16 VHDLOPTSYNFILES=
17 17
18 18
19 19 VHDLSYNFILES= \
20 20 config.vhd BeagleSynth.vhd
21 21 #VHDLSIMFILES=testbench.vhd
22 22 #SIMTOP=testbench
23 23 #SDCFILE=$(GRLIB)/boards/$(BOARD)/default.sdc
24 24 SDCFILE=default.sdc
25 25 BITGEN=../../boards/$(BOARD)/default.ut
26 26 CLEAN=soft-clean
27 27 VCOMOPT=-explicit
28 28 TECHLIBS = secureip unisim
29 29
30 30 LIBSKIP = core1553bbc core1553brm core1553brt gr1553 corePCIF \
31 31 tmtc openchip cypress ihp gleichmann gsi fmf spansion
32 32 DIRSKIP = b1553 pcif leon2 leon2ft crypto satcan pci leon3ft ambatest \
33 33 leon4 leon4b64 l2cache gr1553b iommu haps ascs slink coremp7 pwm \
34 34 ac97 hcan usb
35 35 DIRADD =
36 36 FILEADD =
37 37 FILESKIP = grcan.vhd ddr2.v mobile_ddr.v
38 38
39 39 include $(GRLIB)/bin/Makefile
40 40 include $(GRLIB)/software/leon3/Makefile
41 41
42 42
43 43 ################## project specific targets ##########################
44 44
45 45 flash:
46 46 xc3sprog -c ftdi -p 1 BeagleSynth.bit
47
48 ram:
49 xc3sprog -c ftdi -p 0 BeagleSynth.bit
@@ -1,77 +1,77
1 1
2 2
3 3
4 4 -----------------------------------------------------------------------------
5 5 -- LEON3 Demonstration design test bench configuration
6 6 -- Copyright (C) 2009 Aeroflex Gaisler
7 7 ------------------------------------------------------------------------------
8 8
9 9
10 10 library techmap;
11 11 use techmap.gencomp.all;
12 12 LIBRARY IEEE;
13 13 USE IEEE.numeric_std.ALL;
14 14 USE IEEE.std_logic_1164.ALL;
15 15
16 16
17 17 package config is
18 18 -- Technology and synthesis options
19 19 constant CFG_FABTECH : integer := spartan6;
20 20 constant CFG_MEMTECH : integer := spartan6;
21 21 constant CFG_PADTECH : integer := spartan6;
22 22
23 23 -- Clock generator
24 24 constant CFG_CLKTECH : integer := spartan6;
25 25 constant CFG_CLKMUL : integer := (2);
26 26 constant CFG_CLKDIV : integer := (8);
27 27 constant CFG_OCLKDIV : integer := (1);
28 28 constant CFG_PCIDLL : integer := 0;
29 29 constant CFG_PCISYSCLK: integer := 0;
30 30 constant CFG_CLK_NOFB : integer := 0;
31 31
32 32 -- AMBA settings
33 33 constant CFG_DEFMST : integer := (0);
34 34 constant CFG_RROBIN : integer := 1;
35 35 constant CFG_SPLIT : integer := 0;
36 36 constant CFG_AHBIO : integer := 16#FFF#;
37 37 constant CFG_APBADDR : integer := 16#800#;
38 38 constant CFG_AHB_MON : integer := 0;
39 39 constant CFG_AHB_MONERR : integer := 0;
40 40 constant CFG_AHB_MONWAR : integer := 0;
41 41
42 42 -- LEON3 processor core
43 43 constant CFG_LEON3 : integer := 0;
44 44 constant CFG_NCPU : integer := (0);
45 45
46 46 -- DSU UART
47 47 constant CFG_AHB_UART : integer := 1;
48 48
49 49 -- JTAG based DSU interface
50 50 constant CFG_AHB_JTAG : integer := 0;
51 51
52 52 -- UART 1
53 53 constant CFG_UART1_ENABLE : integer := 1;
54 54 constant CFG_UART1_FIFO : integer := 1;
55 55
56 56 -- GRLIB debugging
57 57 constant CFG_DUART : integer := 0;
58 58
59 59 -- LEON2 memory controller
60 60 constant CFG_MCTRL_LEON2 : integer := 1;
61 constant CFG_MCTRL_RAM8BIT : integer := 0;
61 constant CFG_MCTRL_RAM8BIT : integer := 1;
62 62 constant CFG_MCTRL_RAM16BIT : integer := 0;
63 63 constant CFG_MCTRL_5CS : integer := 0;
64 constant CFG_MCTRL_SDEN : integer := 0;
64 constant CFG_MCTRL_SDEN : integer := 1;
65 65 constant CFG_MCTRL_SEPBUS : integer := 0;
66 66 constant CFG_MCTRL_INVCLK : integer := 0;
67 67 constant CFG_MCTRL_SD64 : integer := 0;
68 constant CFG_MCTRL_PAGE : integer := 0 + 0;
68 constant CFG_MCTRL_PAGE : integer := 1 + 0;
69 69
70 70 -- Gaisler Ethernet core
71 71 constant CFG_GRETH : integer := 0;
72 72
73 73 -- CAN 2.0 interface
74 74 constant CFG_CAN : integer := 0;
75 75
76 76
77 77 end;
General Comments 0
You need to be logged in to leave comments. Login now