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