|
1 | NO CONTENT: new file 100644 |
@@ -0,0 +1,9 | |||
|
1 | ||
|
2 | ||
|
3 | /*=============================================================================== | |
|
4 | ||
|
5 | THIS FILE IS GENERATED BY A SCRIPT, DON'T TRY TO EDIT | |
|
6 | ||
|
7 | TAKE A LOOK AT VHD_LIB/APB_DEVICES FOLDER TO ADD A DEVICE ID OR VENDOR ID | |
|
8 | ||
|
9 | ===============================================================================*/ |
@@ -0,0 +1,18 | |||
|
1 | ||
|
2 | --================================================================================= | |
|
3 | --THIS FILE IS GENERATED BY A SCRIPT, DON'T TRY TO EDIT | |
|
4 | -- | |
|
5 | --TAKE A LOOK AT VHD_LIB/APB_DEVICES FOLDER TO ADD A DEVICE ID OR VENDOR ID | |
|
6 | --================================================================================= | |
|
7 | ||
|
8 | ||
|
9 | library ieee; | |
|
10 | use ieee.std_logic_1164.all; | |
|
11 | library grlib; | |
|
12 | use grlib.amba.all; | |
|
13 | use std.textio.all; | |
|
14 | ||
|
15 | ||
|
16 | package lpp_apb_devices is | |
|
17 | ||
|
18 |
@@ -0,0 +1,12 | |||
|
1 | vendor VENDOR_LPP 19 | |
|
2 | ||
|
3 | device ROCKET_TM 1 | |
|
4 | device otherCore 2 | |
|
5 | device LPP_SIMPLE_DIODE 3 | |
|
6 | device LPP_MULTI_DIODE 4 | |
|
7 | device LPP_LCD_CTRLR 5 | |
|
8 | device LPP_UART 6 | |
|
9 | device LPP_CNA 7 | |
|
10 | device LPP_APB_ADC 8 | |
|
11 | device LPP_CHENILLARD 9 | |
|
12 | device LPP_IIR_CEL_FILTER 10 |
@@ -0,0 +1,77 | |||
|
1 | echo "=======================================================================================" | |
|
2 | echo "---------------------------------------------------------------------------------------" | |
|
3 | echo " LPP VHDL APB Devices List Updater " | |
|
4 | echo " Copyright (C) 2010 Laboratory of Plasmas Physic. " | |
|
5 | echo "=======================================================================================" | |
|
6 | echo '---------------------------------------------------------------------------------------- | |
|
7 | This file is a part of the LPP VHDL IP LIBRARY | |
|
8 | Copyright (C) 2010, Laboratory of Plasmas Physic - CNRS | |
|
9 | ||
|
10 | This program is free software; you can redistribute it and/or modify | |
|
11 | it under the terms of the GNU General Public License as published by | |
|
12 | the Free Software Foundation; either version 3 of the License, or | |
|
13 | (at your option) any later version. | |
|
14 | ||
|
15 | This program is distributed in the hope that it will be useful, | |
|
16 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
|
17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
|
18 | GNU General Public License for more details. | |
|
19 | ||
|
20 | You should have received a copy of the GNU General Public License | |
|
21 | along with this program; if not, write to the Free Software | |
|
22 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
|
23 | ----------------------------------------------------------------------------------------' | |
|
24 | echo | |
|
25 | echo | |
|
26 | echo | |
|
27 | ||
|
28 | LPP_PATCHPATH=`pwd -L` | |
|
29 | ||
|
30 | cd $LPP_PATCHPATH/lib/lpp | |
|
31 | ||
|
32 | ||
|
33 | VHDFileStart=$LPP_PATCHPATH/APB_DEVICES/VHDListSTART | |
|
34 | VHDFileEnd=$LPP_PATCHPATH/APB_DEVICES/VHDListEND | |
|
35 | ||
|
36 | CFileStart=$LPP_PATCHPATH/APB_DEVICES/CListSTART | |
|
37 | CFileEnd=$LPP_PATCHPATH/APB_DEVICES/CListEND | |
|
38 | ||
|
39 | ListFILE=$LPP_PATCHPATH/APB_DEVICES/apb_devices_list.txt | |
|
40 | ||
|
41 | VHDListFILE=$LPP_PATCHPATH/lib/lpp/lpp_amba/apb_devices_list.vhd | |
|
42 | CListFILE=$LPP_PATCHPATH/LPP_drivers/libsrc/AMBA/apb_devices_list.h | |
|
43 | ||
|
44 | ||
|
45 | cat $VHDFileStart>$VHDListFILE | |
|
46 | cat $CFileStart>$CListFILE | |
|
47 | ||
|
48 | grep vendor $ListFILE | sed "s/vendor /constant /" | sed "s/.* /& : amba_vendor_type := 16#/" | sed "s/.*#*/&;/" >> $VHDListFILE | |
|
49 | grep vendor $ListFILE | sed "s/vendor /#define /" | sed "s/.* /& 0x/" >> $CListFILE | |
|
50 | ||
|
51 | echo " ">>$VHDListFILE | |
|
52 | echo " ">>$CListFILE | |
|
53 | ||
|
54 | grep device $ListFILE | sed "s/device /constant /" | sed "s/.* /& : amba_device_type := 16#/" | sed "s/.*#*/&;/" >> $VHDListFILE | |
|
55 | grep device $ListFILE | sed "s/device /#define /" | sed "s/.* /& 0x/" >> $CListFILE | |
|
56 | ||
|
57 | cat $VHDFileEnd>>$VHDListFILE | |
|
58 | cat $CFileEnd>>$CListFILE | |
|
59 | ||
|
60 | sh $(SCRIPTSDIR)/GPL_Patcher.sh vhd lib/lpp/lpp_amba/ | |
|
61 | sh $(SCRIPTSDIR)/GPL_Patcher.sh h LPP_drivers/libsrc/AMBA/ | |
|
62 | ||
|
63 | cd $LPP_PATCHPATH | |
|
64 | ||
|
65 | ||
|
66 | ||
|
67 | ||
|
68 | ||
|
69 | ||
|
70 | ||
|
71 | ||
|
72 | ||
|
73 | ||
|
74 | ||
|
75 | ||
|
76 | ||
|
77 |
@@ -1,67 +1,59 | |||
|
1 | 1 | /*------------------------------------------------------------------------------ |
|
2 | 2 | -- This file is a part of the LPP VHDL IP LIBRARY |
|
3 | 3 | -- Copyright (C) 2009 - 2010, Laboratory of Plasmas Physic - CNRS |
|
4 | 4 | -- |
|
5 | 5 | -- This program is free software; you can redistribute it and/or modify |
|
6 | 6 | -- it under the terms of the GNU General Public License as published by |
|
7 | 7 | -- the Free Software Foundation; either version 3 of the License, or |
|
8 | 8 | -- (at your option) any later version. |
|
9 | 9 | -- |
|
10 | 10 | -- This program is distributed in the hope that it will be useful, |
|
11 | 11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 | 12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 | 13 | -- GNU General Public License for more details. |
|
14 | 14 | -- |
|
15 | 15 | -- You should have received a copy of the GNU General Public License |
|
16 | 16 | -- along with this program; if not, write to the Free Software |
|
17 | 17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
18 | 18 | -------------------------------------------------------------------------------*/ |
|
19 | 19 | #ifndef LPP_APB_FUNCTIONS_H |
|
20 | 20 | #define LPP_APB_FUNCTIONS_H |
|
21 | 21 | |
|
22 | 22 | #define APB_TBL_HEAD 0x800FF000 |
|
23 | 23 | #define APB_BASE_ADDRS 0x80000000 |
|
24 | 24 | #define APB_MAX_DEVICES 256 |
|
25 | 25 | |
|
26 | #define VENDOR_LPP 0x19 | |
|
27 | ||
|
28 | #define ROCKET_TM 0x001 | |
|
29 | #define otherCore 0x002 | |
|
30 | #define LPP_SIMPLE_DIODE 0x003 | |
|
31 | #define LPP_MULTI_DIODE 0x004 | |
|
32 | #define LPP_LCD_CTRLR 0x005 | |
|
33 | #define LPP_UART_CTRLR 0x006 | |
|
34 | #define LPP_DAC_CTRLR 0x007 | |
|
26 | #include "apb_devices_list.h" | |
|
35 | 27 | |
|
36 | 28 | /** @todo implemente a descriptor structure for any APB device */ |
|
37 | 29 | |
|
38 | 30 | |
|
39 | 31 | /** Structure representing a device descriptor register on Grlib's AHB2APB brige with plug and play feature */ |
|
40 | 32 | struct apbPnPreg |
|
41 | 33 | { |
|
42 | 34 | int idReg; /**< id register composed of Vendor ID [31:24], Device ID [23:12], CT [11:10], Version [9:5], IRQ [4:0] */ |
|
43 | 35 | int bar; /**< Bank Address Register composed of Device's ADDRESS [31:20], MASK [14:4], TYPE [3:0] */ |
|
44 | 36 | }; |
|
45 | 37 | |
|
46 | 38 | struct apbdevinfo |
|
47 | 39 | { |
|
48 | 40 | int vendorID; |
|
49 | 41 | int productID; |
|
50 | 42 | int version; |
|
51 | 43 | int irq; |
|
52 | 44 | int address; |
|
53 | 45 | int mask; |
|
54 | 46 | }; |
|
55 | 47 | |
|
56 | 48 | /** This Function scans APB devices table and returns counth device according to VID and PID */ |
|
57 | 49 | int* apbgetdevice(int PID,int VID,int count); |
|
58 | 50 | /** This Function scans APB devices table and returns counth device informations according VID and PID */ |
|
59 | 51 | void apbgetdeviceinfofromid(int PID,int VID,int count,struct apbdevinfo* devinfo); |
|
60 | 52 | |
|
61 | 53 | void apbgetdeviceinfofromdevptr(const struct apbPnPreg* dev,struct apbdevinfo* devinfo); |
|
62 | 54 | |
|
63 | 55 | |
|
64 | 56 | void apbprintdeviceinfo(struct apbdevinfo devinfo); |
|
65 | 57 | |
|
66 | 58 | void apbprintdeviceslist(); |
|
67 | 59 | #endif // LPP_APB_FUNCTIONS_H |
@@ -1,68 +1,68 | |||
|
1 | 1 | #include "apb_dac_Driver.h" |
|
2 | 2 | #include "lpp_apb_functions.h" |
|
3 | 3 | #include <stdio.h> |
|
4 | 4 | |
|
5 | 5 | |
|
6 | 6 | DAC_Device* DacOpen(int count) |
|
7 | 7 | { |
|
8 | 8 | DAC_Device* dac0; |
|
9 |
dac0 = (DAC_Device*) apbgetdevice(LPP_ |
|
|
9 | dac0 = (DAC_Device*) apbgetdevice(LPP_CNA,VENDOR_LPP,count); | |
|
10 | 10 | dac0->configReg = DAC_enable; |
|
11 | 11 | return dac0; |
|
12 | 12 | } |
|
13 | 13 | |
|
14 | 14 | /* |
|
15 | 15 | DAC_Device* DacClose(int count) |
|
16 | 16 | { |
|
17 | 17 | DAC_Device* dac1; |
|
18 |
dac1 = (DAC_Device*) apbgetdevice(LPP_ |
|
|
18 | dac1 = (DAC_Device*) apbgetdevice(LPP_CNA,VENDOR_LPP,count); | |
|
19 | 19 | dac1->configReg = DAC_disable; |
|
20 | 20 | return dac1; |
|
21 | 21 | } |
|
22 | 22 | */ |
|
23 | 23 | |
|
24 | 24 | |
|
25 | 25 | int DacTable() |
|
26 | 26 | { |
|
27 | 27 | int i; |
|
28 | 28 | DAC_Device* dac2; |
|
29 | 29 | int tablo[251] = {0x9555,0x1800,0x19AA,0x1B15,0x1C0A,0x1C66,0x1C1F,0x1B44,0x19FC,0x187F,0x170F,0x15EA,0x1542,0x1537,0x15CE,0x16F2,0x187A,0x1A2B,0x1BC2,0x1D04,0x1DBF,0x1DDB,0x1D56,0x1C49,0x1AE3,0x195F,0x1800,0x1700,0x168D,0x16BA,0x1785,0x18D0,0x1A69,0x1C12,0x1D8A,0x1E98,0x1F13, |
|
30 | 30 | 0x1EEB,0x1E28,0x1CEC,0x1FFF,0x19E8,0x189F,0x17C8,0x1788,0x17EA,0x18E2,0x1A48,0x1BE7,0x1D7C,0x1ECA,0x1F9C,0x1FD2,0x1F64,0x1E66,0x1D00,0x1B6E,0x19EF,0x18C1,0x1817,0x180A,0x189D,0x19BA,0x1B33,0x1CCC,0x1E44,0x1F5F,0x1FEE,0x1FDC,0x1F2B,0x1DF6,0x1C6E,0x1AD1,0x1960,0x1855,0x17D9,0x1800, |
|
31 | 31 | 0x18C1,0x19FD,0x1B80,0x1D0A,0x1E5C,0x1F3D,0x1F87,0x1F2E,0x1E3E,0x1CDA,0x1B39,0x199C,0x1842,0x1760,0x1717,0x1771,0x185D,0x19B1,0x1B36,0x1CAA,0x1DCF,0x1E73,0x1E79,0x1DDD,0x1CB4,0x1B2B,0x197C,0x17EA,0x16B1,0x15FF,0x15EE,0x167C,0x178F,0x18F7,0x1A78,0x1BCF,0x1CC4,0x1D2A,0x1CED,0x1C14, |
|
32 | 32 | 0x1ABC,0x191A,0x176B,0x15F0,0x14E2,0x1467,0x1490,0x1552,0x1689,0x1800,0x1977,0x1AAE,0x1B70,0x1B99,0x1B1E,0x1A10,0x1895,0x16E6,0x1544,0x13EC,0x1313,0x12D6,0x133C,0x1431,0x1588,0x1709,0x1871,0x1984,0x1A12,0x1A01,0x194F,0x1816,0x1684,0x14D5,0x134C,0x1223,0x1187,0x118D,0x1231,0x1356, |
|
33 | 33 | 0x14CA,0x164F,0x17A3,0x188F,0x18E9,0x18A0,0x17BE,0x1664,0x14C7,0x1326,0x11C2,0x10D2,0x1079,0x10C3,0x11A4,0x12F6,0x1480,0x1603,0x173F,0x1800,0x1827,0x17AB,0x16A0,0x152F,0x1392,0x120A,0x10D5,0x1024,0x1012,0x10A1,0x11BC,0x1334,0x14CD,0x1646,0x1763,0x17F6,0x17E9,0x173F,0x1611,0x1492, |
|
34 | 34 | 0x1300,0x119A,0x109C,0x102E,0x1064,0x1136,0x1284,0x1419,0x15B8,0x171E,0x1816,0x1878,0x1838,0x1761,0x1618,0x1494,0x1314,0x11D8,0x1115,0x10ED,0x1168,0x1276,0x13EE,0x1597,0x1730,0x187B,0x1946,0x1973,0x1900,0x1800,0x16A1,0x151D,0x13B7,0x12AA,0x1225,0x1241,0x12FC,0x143E,0x15D5,0x1786, |
|
35 | 35 | 0x190E,0x1A32,0x1AC9,0x1ABE,0x1A16,0x18F1,0x1781,0x1604,0x14BC,0x13E1,0x139A,0x13F6,0x14EB,0x1656}; |
|
36 | 36 | dac2 = (DAC_Device*)0x80000800; |
|
37 | 37 | dac2->configReg = DAC_enable; |
|
38 | 38 | dac2->dataReg = tablo[0]; |
|
39 | 39 | |
|
40 | 40 | while(1) |
|
41 | 41 | { |
|
42 | 42 | for (i = 0 ; i < 251 ; i++) |
|
43 | 43 | { |
|
44 | 44 | while(!((dac2->configReg & DAC_ready) == DAC_ready)); |
|
45 | 45 | dac2->dataReg = tablo[i]; |
|
46 | 46 | while((dac2->configReg & DAC_ready) == DAC_ready); |
|
47 | 47 | } |
|
48 | 48 | } |
|
49 | 49 | return 0; |
|
50 | 50 | } |
|
51 | 51 | |
|
52 | 52 | |
|
53 | 53 | |
|
54 | 54 | int DacConst() |
|
55 | 55 | { |
|
56 | 56 | DAC_Device* dac3; |
|
57 | 57 | int Value = 0x1FFF; |
|
58 | 58 | dac3 = (DAC_Device*)0x80000800; |
|
59 | 59 | dac3->configReg = DAC_enable; |
|
60 | 60 | while(1) |
|
61 | 61 | { |
|
62 | 62 | printf("\nEntrer une valeur entre 4096 et 8191 : "); |
|
63 | 63 | scanf("%d",&Value); |
|
64 | 64 | dac3->dataReg = Value; |
|
65 | 65 | } |
|
66 | 66 | return 0; |
|
67 | 67 | } |
|
68 | 68 |
@@ -1,63 +1,68 | |||
|
1 | 1 | SCRIPTSDIR=scripts/ |
|
2 | 2 | LIBDIR=lib/ |
|
3 | 3 | BOARDSDIR=boards/ |
|
4 | 4 | DESIGNSDIR=designs/ |
|
5 | 5 | |
|
6 | 6 | |
|
7 | 7 | |
|
8 | 8 | |
|
9 | 9 | |
|
10 | 10 | |
|
11 | 11 | all: help |
|
12 | 12 | |
|
13 | 13 | help: |
|
14 | 14 | @echo |
|
15 | 15 | @echo " batch targets:" |
|
16 | 16 | @echo |
|
17 | 17 | @echo " make Patch-GRLIB : install library into GRLIB at : $(GRLIB)" |
|
18 | 18 | @echo " make dist : create a tar file for using into an other computer" |
|
19 | 19 | @echo " make Patched-dist : create a tar file for with a patched grlib for using into an other computer" |
|
20 | 20 | @echo " make allGPL : add a GPL HEADER in all vhdl Files" |
|
21 | 21 | @echo " make init : add a GPL HEADER in all vhdl Files, init all files" |
|
22 | 22 | @echo " make doc : make documentation for VHDL IPs" |
|
23 | 23 | @echo " make pdf : make pdf documentation for VHDL IPs" |
|
24 | 24 | @echo |
|
25 | 25 | |
|
26 | 26 | allGPL: |
|
27 | 27 | @echo "Scanning VHDL files ..." |
|
28 | 28 | sh $(SCRIPTSDIR)/GPL_Patcher.sh -R vhd lib |
|
29 | 29 | @echo "Scanning C files ..." |
|
30 | 30 | sh $(SCRIPTSDIR)/GPL_Patcher.sh -R c LPP_drivers |
|
31 | 31 | @echo "Scanning H files ..." |
|
32 | 32 | sh $(SCRIPTSDIR)/GPL_Patcher.sh -R h LPP_drivers |
|
33 | 33 | |
|
34 | 34 | init: C-libs |
|
35 | 35 | sh $(SCRIPTSDIR)/vhdlsynPatcher.sh |
|
36 | 36 | sh $(SCRIPTSDIR)/makeDirs.sh lib/lpp |
|
37 | 37 | |
|
38 | C-libs: | |
|
38 | C-libs:APB_devs | |
|
39 | 39 | make -C LPP_drivers |
|
40 | 40 | |
|
41 | ||
|
42 | APB_devs: | |
|
43 | sh $(SCRIPTSDIR)/APB_DEV_UPDATER.sh | |
|
44 | ||
|
45 | ||
|
41 | 46 | Patch-GRLIB: init doc |
|
42 | 47 | sh $(SCRIPTSDIR)/patch.sh $(GRLIB) |
|
43 | 48 | |
|
44 | 49 | |
|
45 | 50 | dist: init |
|
46 | 51 | tar -cvzf ./../lpp-lib.tgz ./../VHD_Lib/* |
|
47 | 52 | |
|
48 | 53 | |
|
49 | 54 | Patched-dist: Patch-GRLIB |
|
50 | 55 | tar -cvzf ./../lpp-patched-GRLIB.tgz $(GRLIB)/* |
|
51 | 56 | |
|
52 | 57 | |
|
53 | 58 | doc: |
|
54 | 59 | doxygen lib/lpp/Doxyfile |
|
55 | 60 | |
|
56 | 61 | |
|
57 | 62 | pdf: doc |
|
58 | 63 | sh $(SCRIPTSDIR)/doc.sh |
|
59 | 64 | |
|
60 | 65 | |
|
61 | 66 | |
|
62 | 67 | |
|
63 | 68 |
@@ -1,208 +1,208 | |||
|
1 | 1 | ------------------------------------------------------------------------------ |
|
2 | 2 | -- This file is a part of the LPP VHDL IP LIBRARY |
|
3 | 3 | -- Copyright (C) 2009 - 2010, Laboratory of Plasmas Physic - CNRS |
|
4 | 4 | -- |
|
5 | 5 | -- This program is free software; you can redistribute it and/or modify |
|
6 | 6 | -- it under the terms of the GNU General Public License as published by |
|
7 | 7 | -- the Free Software Foundation; either version 3 of the License, or |
|
8 | 8 | -- (at your option) any later version. |
|
9 | 9 | -- |
|
10 | 10 | -- This program is distributed in the hope that it will be useful, |
|
11 | 11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 | 12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 | 13 | -- GNU General Public License for more details. |
|
14 | 14 | -- |
|
15 | 15 | -- You should have received a copy of the GNU General Public License |
|
16 | 16 | -- along with this program; if not, write to the Free Software |
|
17 | 17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
18 | 18 | ------------------------------------------------------------------------------- |
|
19 | 19 | library ieee; |
|
20 | 20 | use ieee.std_logic_1164.all; |
|
21 | 21 | use ieee.numeric_std.all; |
|
22 | 22 | library grlib; |
|
23 | 23 | use grlib.amba.all; |
|
24 | 24 | use grlib.stdlib.all; |
|
25 | 25 | use grlib.devices.all; |
|
26 | 26 | library lpp; |
|
27 | 27 | use lpp.iir_filter.all; |
|
28 | 28 | use lpp.general_purpose.all; |
|
29 | 29 | use lpp.lpp_amba.all; |
|
30 | 30 | |
|
31 | 31 | entity APB_IIR_CEL is |
|
32 | 32 | generic ( |
|
33 | 33 | pindex : integer := 0; |
|
34 | 34 | paddr : integer := 0; |
|
35 | 35 | pmask : integer := 16#fff#; |
|
36 | 36 | pirq : integer := 0; |
|
37 | 37 | abits : integer := 8; |
|
38 | 38 | Sample_SZ : integer := 16; |
|
39 | 39 | ChanelsCount : integer := 1; |
|
40 | 40 | Coef_SZ : integer := 9; |
|
41 | 41 | CoefCntPerCel: integer := 3; |
|
42 | 42 | Cels_count : integer := 5; |
|
43 | 43 | virgPos : integer := 3; |
|
44 | 44 | Mem_use : integer := use_RAM |
|
45 | 45 | ); |
|
46 | 46 | port ( |
|
47 | 47 | rst : in std_logic; |
|
48 | 48 | clk : in std_logic; |
|
49 | 49 | apbi : in apb_slv_in_type; |
|
50 | 50 | apbo : out apb_slv_out_type; |
|
51 | 51 | sample_clk : in std_logic; |
|
52 | 52 | sample_clk_out : out std_logic; |
|
53 | 53 | sample_in : in samplT(ChanelsCount-1 downto 0,Sample_SZ-1 downto 0); |
|
54 | 54 | sample_out : out samplT(ChanelsCount-1 downto 0,Sample_SZ-1 downto 0) |
|
55 | 55 | ); |
|
56 | 56 | end; |
|
57 | 57 | |
|
58 | 58 | |
|
59 | 59 | architecture AR_APB_IIR_CEL of APB_IIR_CEL is |
|
60 | 60 | |
|
61 | 61 | constant REVISION : integer := 1; |
|
62 | 62 | |
|
63 | 63 | constant pconfig : apb_config_type := ( |
|
64 |
0 => ahb_device_reg (VENDOR_LPP, |
|
|
64 | 0 => ahb_device_reg (VENDOR_LPP, LPP_IIR_CEL_FILTER, 0, REVISION, 0), | |
|
65 | 65 | 1 => apb_iobar(paddr, pmask)); |
|
66 | 66 | |
|
67 | 67 | |
|
68 | 68 | |
|
69 | 69 | type FILTERreg is record |
|
70 | 70 | regin : in_IIR_CEL_reg; |
|
71 | 71 | regout : out_IIR_CEL_reg; |
|
72 | 72 | end record; |
|
73 | 73 | |
|
74 | 74 | signal Rdata : std_logic_vector(31 downto 0); |
|
75 | 75 | signal r : FILTERreg; |
|
76 | 76 | signal filter_reset : std_logic:='0'; |
|
77 | 77 | signal smp_cnt : integer :=0; |
|
78 | 78 | signal sample_clk_out_R : std_logic; |
|
79 | 79 | |
|
80 | 80 | |
|
81 | 81 | type CoefCelT is array(CoefCntPerCel-1 downto 0) of std_logic_vector(Coef_SZ-1 downto 0); |
|
82 | 82 | type CoefTblT is array(Cels_count-1 downto 0) of CoefCelT; |
|
83 | 83 | |
|
84 | 84 | type CoefsRegT is record |
|
85 | 85 | numCoefs : CoefTblT; |
|
86 | 86 | denCoefs : CoefTblT; |
|
87 | 87 | end record; |
|
88 | 88 | |
|
89 | 89 | signal CoefsReg : CoefsRegT; |
|
90 | 90 | |
|
91 | 91 | begin |
|
92 | 92 | |
|
93 | 93 | filter_reset <= rst and r.regin.config(0); |
|
94 | 94 | sample_clk_out <= sample_clk_out_R; |
|
95 | 95 | |
|
96 | 96 | filter : IIR_CEL_FILTER |
|
97 | 97 | generic map(Sample_SZ,ChanelsCount,Coef_SZ,CoefCntPerCel,Cels_count,Mem_use) |
|
98 | 98 | port map( |
|
99 | 99 | reset => filter_reset, |
|
100 | 100 | clk => clk, |
|
101 | 101 | sample_clk => sample_clk, |
|
102 | 102 | regs_in => r.regin, |
|
103 | 103 | regs_out => r.regout, |
|
104 | 104 | sample_in => sample_in, |
|
105 | 105 | sample_out => sample_out |
|
106 | 106 | ); |
|
107 | 107 | |
|
108 | 108 | process(rst,sample_clk) |
|
109 | 109 | begin |
|
110 | 110 | if rst = '0' then |
|
111 | 111 | smp_cnt <= 0; |
|
112 | 112 | sample_clk_out_R <= '0'; |
|
113 | 113 | elsif sample_clk'event and sample_clk = '1' then |
|
114 | 114 | if smp_cnt = 1 then |
|
115 | 115 | smp_cnt <= 0; |
|
116 | 116 | sample_clk_out_R <= not sample_clk_out_R; |
|
117 | 117 | else |
|
118 | 118 | smp_cnt <= smp_cnt +1; |
|
119 | 119 | end if; |
|
120 | 120 | end if; |
|
121 | 121 | end process; |
|
122 | 122 | |
|
123 | 123 | |
|
124 | 124 | process(rst,clk) |
|
125 | 125 | begin |
|
126 | 126 | if rst = '0' then |
|
127 | 127 | r.regin.virgPos <= std_logic_vector(to_unsigned(virgPos,5)); |
|
128 | 128 | |
|
129 | 129 | elsif clk'event and clk = '1' then |
|
130 | 130 | |
|
131 | 131 | |
|
132 | 132 | --APB Write OP |
|
133 | 133 | if (apbi.psel(pindex) and apbi.penable and apbi.pwrite) = '1' then |
|
134 | 134 | case apbi.paddr(7 downto 2) is |
|
135 | 135 | when "000000" => |
|
136 | 136 | r.regin.config(0) <= apbi.pwdata(0); |
|
137 | 137 | when "000001" => |
|
138 | 138 | r.regin.virgPos <= apbi.pwdata(4 downto 0); |
|
139 | 139 | when others => |
|
140 | 140 | for i in 0 to Cels_count-1 loop |
|
141 | 141 | if conv_integer(apbi.paddr(7 downto 5)) = i+1 then |
|
142 | 142 | case apbi.paddr(4 downto 2) is |
|
143 | 143 | when "000" => |
|
144 | 144 | CoefsReg.numCoefs(i)(0) <= (apbi.pwdata(Coef_SZ-1 downto 0)); |
|
145 | 145 | when "001" => |
|
146 | 146 | CoefsReg.numCoefs(i)(1) <= (apbi.pwdata(Coef_SZ-1 downto 0)); |
|
147 | 147 | when "010" => |
|
148 | 148 | CoefsReg.numCoefs(i)(2) <= (apbi.pwdata(Coef_SZ-1 downto 0)); |
|
149 | 149 | when "011" => |
|
150 | 150 | CoefsReg.denCoefs(i)(0) <= (apbi.pwdata(Coef_SZ-1 downto 0)); |
|
151 | 151 | when "100" => |
|
152 | 152 | CoefsReg.denCoefs(i)(1) <= (apbi.pwdata(Coef_SZ-1 downto 0)); |
|
153 | 153 | when "101" => |
|
154 | 154 | CoefsReg.denCoefs(i)(2) <= (apbi.pwdata(Coef_SZ-1 downto 0)); |
|
155 | 155 | when others => |
|
156 | 156 | end case; |
|
157 | 157 | end if; |
|
158 | 158 | end loop; |
|
159 | 159 | end case; |
|
160 | 160 | end if; |
|
161 | 161 | |
|
162 | 162 | --APB READ OP |
|
163 | 163 | if (apbi.psel(pindex) and (not apbi.pwrite)) = '1' then |
|
164 | 164 | case apbi.paddr(7 downto 2) is |
|
165 | 165 | when "000000" => |
|
166 | 166 | |
|
167 | 167 | when "000001" => |
|
168 | 168 | Rdata(4 downto 0) <= r.regin.virgPos; |
|
169 | 169 | when others => |
|
170 | 170 | for i in 0 to Cels_count-1 loop |
|
171 | 171 | if conv_integer(apbi.paddr(7 downto 5)) = i+1 then |
|
172 | 172 | case apbi.paddr(4 downto 2) is |
|
173 | 173 | when "000" => |
|
174 | 174 | Rdata(Coef_SZ-1 downto 0) <= std_logic_vector(CoefsReg.numCoefs(i)(0)); |
|
175 | 175 | when "001" => |
|
176 | 176 | Rdata(Coef_SZ-1 downto 0) <= std_logic_vector(CoefsReg.numCoefs(i)(1)); |
|
177 | 177 | when "010" => |
|
178 | 178 | Rdata(Coef_SZ-1 downto 0) <= std_logic_vector(CoefsReg.numCoefs(i)(2)); |
|
179 | 179 | when "011" => |
|
180 | 180 | Rdata(Coef_SZ-1 downto 0) <= std_logic_vector(CoefsReg.denCoefs(i)(0)); |
|
181 | 181 | when "100" => |
|
182 | 182 | Rdata(Coef_SZ-1 downto 0) <= std_logic_vector(CoefsReg.denCoefs(i)(1)); |
|
183 | 183 | when "101" => |
|
184 | 184 | Rdata(Coef_SZ-1 downto 0) <= std_logic_vector(CoefsReg.denCoefs(i)(2)); |
|
185 | 185 | when others => |
|
186 | 186 | end case; |
|
187 | 187 | end if; |
|
188 | 188 | end loop; |
|
189 | 189 | end case; |
|
190 | 190 | end if; |
|
191 | 191 | |
|
192 | 192 | end if; |
|
193 | 193 | apbo.pconfig <= pconfig; |
|
194 | 194 | end process; |
|
195 | 195 | |
|
196 | 196 | apbo.prdata <= Rdata when apbi.penable = '1' ; |
|
197 | 197 | |
|
198 | 198 | -- pragma translate_off |
|
199 | 199 | bootmsg : report_version |
|
200 | 200 | generic map ("apbuart" & tost(pindex) & |
|
201 | 201 | ": Generic UART rev " & tost(REVISION) & ", fifo " & tost(fifosize) & |
|
202 | 202 | ", irq " & tost(pirq)); |
|
203 | 203 | -- pragma translate_on |
|
204 | 204 | |
|
205 | 205 | |
|
206 | 206 | |
|
207 | 207 | end ar_APB_IIR_CEL; |
|
208 | 208 |
@@ -1,142 +1,142 | |||
|
1 | 1 | ------------------------------------------------------------------------------ |
|
2 | 2 | -- This file is a part of the LPP VHDL IP LIBRARY |
|
3 | 3 | -- Copyright (C) 2009 - 2010, Laboratory of Plasmas Physic - CNRS |
|
4 | 4 | -- |
|
5 | 5 | -- This program is free software; you can redistribute it and/or modify |
|
6 | 6 | -- it under the terms of the GNU General Public License as published by |
|
7 | 7 | -- the Free Software Foundation; either version 3 of the License, or |
|
8 | 8 | -- (at your option) any later version. |
|
9 | 9 | -- |
|
10 | 10 | -- This program is distributed in the hope that it will be useful, |
|
11 | 11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 | 12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 | 13 | -- GNU General Public License for more details. |
|
14 | 14 | -- |
|
15 | 15 | -- You should have received a copy of the GNU General Public License |
|
16 | 16 | -- along with this program; if not, write to the Free Software |
|
17 | 17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
18 | 18 | ------------------------------------------------------------------------------- |
|
19 | 19 | library IEEE; |
|
20 | 20 | use IEEE.STD_LOGIC_1164.ALL; |
|
21 | 21 | use ieee.numeric_std.all; |
|
22 | 22 | library grlib; |
|
23 | 23 | use grlib.amba.all; |
|
24 | 24 | use grlib.stdlib.all; |
|
25 | 25 | use grlib.devices.all; |
|
26 | 26 | library lpp; |
|
27 | 27 | use lpp.lpp_ad_conv.all; |
|
28 | 28 | use lpp.lpp_amba.all; |
|
29 | 29 | use lpp.general_purpose.Clk_divider; |
|
30 | 30 | |
|
31 | 31 | entity lpp_apb_ad_conv is |
|
32 | 32 | generic( |
|
33 | 33 | pindex : integer := 0; |
|
34 | 34 | paddr : integer := 0; |
|
35 | 35 | pmask : integer := 16#fff#; |
|
36 | 36 | pirq : integer := 0; |
|
37 | 37 | abits : integer := 8; |
|
38 | 38 | ChanelCount : integer := 1; |
|
39 | 39 | clkkHz : integer := 50000; |
|
40 | 40 | smpClkHz : integer := 100; |
|
41 | 41 | ADCref : integer := AD7688); |
|
42 | 42 | Port ( |
|
43 | 43 | clk : in STD_LOGIC; |
|
44 | 44 | reset : in STD_LOGIC; |
|
45 | 45 | apbi : in apb_slv_in_type; |
|
46 | 46 | apbo : out apb_slv_out_type; |
|
47 | 47 | AD_in : in AD7688_in(ChanelCount-1 downto 0); |
|
48 | 48 | AD_out : out AD7688_out); |
|
49 | 49 | end lpp_apb_ad_conv; |
|
50 | 50 | |
|
51 | 51 | |
|
52 | 52 | architecture ar_lpp_apb_ad_conv of lpp_apb_ad_conv is |
|
53 | 53 | constant REVISION : integer := 1; |
|
54 | 54 | |
|
55 | 55 | constant pconfig : apb_config_type := ( |
|
56 |
0 => ahb_device_reg (VENDOR_LPP, LPP_ADC |
|
|
56 | 0 => ahb_device_reg (VENDOR_LPP, LPP_APB_ADC, 0, REVISION, 0), | |
|
57 | 57 | 1 => apb_iobar(paddr, pmask)); |
|
58 | 58 | |
|
59 | 59 | signal Rdata : std_logic_vector(31 downto 0); |
|
60 | 60 | signal smpout : Samples_out(ChanelCount-1 downto 0); |
|
61 | 61 | signal smplClk : STD_LOGIC; |
|
62 | 62 | signal DataReady : STD_LOGIC; |
|
63 | 63 | |
|
64 | 64 | type lpp_apb_ad_conv_Reg is record |
|
65 | 65 | CTRL_Reg : std_logic_vector(31 downto 0); |
|
66 | 66 | sample : Samples_out(ChanelCount-1 downto 0); |
|
67 | 67 | end record; |
|
68 | 68 | |
|
69 | 69 | signal r : lpp_apb_ad_conv_Reg; |
|
70 | 70 | |
|
71 | 71 | begin |
|
72 | 72 | |
|
73 | 73 | |
|
74 | 74 | caseAD7688: if ADCref = AD7688 generate |
|
75 | 75 | AD7688: AD7688_drvr |
|
76 | 76 | generic map(ChanelCount,clkkHz) |
|
77 | 77 | Port map(clk,reset,smplClk,DataReady,smpout,AD_in,AD_out); |
|
78 | 78 | end generate; |
|
79 | 79 | |
|
80 | 80 | caseADS786: if ADCref = ADS7886 generate |
|
81 | 81 | ADS7886: ADS7886_drvr |
|
82 | 82 | generic map(ChanelCount,clkkHz) |
|
83 | 83 | Port map(clk,reset,smplClk,DataReady,smpout,AD_in,AD_out); |
|
84 | 84 | end generate; |
|
85 | 85 | |
|
86 | 86 | |
|
87 | 87 | clkdivider: Clk_divider |
|
88 | 88 | generic map(clkkHz*1000,smpClkHz) |
|
89 | 89 | Port map( clk ,reset,smplClk); |
|
90 | 90 | |
|
91 | 91 | |
|
92 | 92 | |
|
93 | 93 | r.CTRL_Reg(0) <= DataReady; |
|
94 | 94 | |
|
95 | 95 | r.sample <= smpout; |
|
96 | 96 | |
|
97 | 97 | |
|
98 | 98 | process(reset,clk) |
|
99 | 99 | begin |
|
100 | 100 | if reset = '0' then |
|
101 | 101 | --r.CTRL_Reg(9 downto 0) <= (others => '0'); |
|
102 | 102 | elsif clk'event and clk = '1' then |
|
103 | 103 | |
|
104 | 104 | --APB Write OP |
|
105 | 105 | if (apbi.psel(pindex) and apbi.penable and apbi.pwrite) = '1' then |
|
106 | 106 | case apbi.paddr(7 downto 2) is |
|
107 | 107 | when "000000" => |
|
108 | 108 | --r.CTRL_Reg(9 downto 0) <= apbi.pwdata(9 downto 0); |
|
109 | 109 | when others => |
|
110 | 110 | end case; |
|
111 | 111 | end if; |
|
112 | 112 | |
|
113 | 113 | --APB READ OP |
|
114 | 114 | if (apbi.psel(pindex) and (not apbi.pwrite)) = '1' then |
|
115 | 115 | case apbi.paddr(7 downto 2) is |
|
116 | 116 | when "000000" => |
|
117 | 117 | Rdata <= r.CTRL_Reg; |
|
118 | 118 | when others => |
|
119 | 119 | readC: for i in 1 to ChanelCount loop |
|
120 | 120 | if TO_INTEGER(unsigned(apbi.paddr(abits-1 downto 2))) =i then |
|
121 | 121 | Rdata(15 downto 0) <= r.sample(i-1)(15 downto 0); |
|
122 | 122 | end if; |
|
123 | 123 | end loop; |
|
124 | 124 | end case; |
|
125 | 125 | end if; |
|
126 | 126 | end if; |
|
127 | 127 | apbo.pconfig <= pconfig; |
|
128 | 128 | end process; |
|
129 | 129 | |
|
130 | 130 | apbo.prdata <= Rdata when apbi.penable = '1' ; |
|
131 | 131 | |
|
132 | 132 | |
|
133 | 133 | end ar_lpp_apb_ad_conv; |
|
134 | 134 | |
|
135 | 135 | |
|
136 | 136 | |
|
137 | 137 | |
|
138 | 138 | |
|
139 | 139 | |
|
140 | 140 | |
|
141 | 141 | |
|
142 | 142 |
@@ -1,95 +1,79 | |||
|
1 | 1 | ------------------------------------------------------------------------------ |
|
2 | 2 | -- This file is a part of the LPP VHDL IP LIBRARY |
|
3 | 3 | -- Copyright (C) 2009 - 2010, Laboratory of Plasmas Physic - CNRS |
|
4 | 4 | -- |
|
5 | 5 | -- This program is free software; you can redistribute it and/or modify |
|
6 | 6 | -- it under the terms of the GNU General Public License as published by |
|
7 | 7 | -- the Free Software Foundation; either version 3 of the License, or |
|
8 | 8 | -- (at your option) any later version. |
|
9 | 9 | -- |
|
10 | 10 | -- This program is distributed in the hope that it will be useful, |
|
11 | 11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 | 12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 | 13 | -- GNU General Public License for more details. |
|
14 | 14 | -- |
|
15 | 15 | -- You should have received a copy of the GNU General Public License |
|
16 | 16 | -- along with this program; if not, write to the Free Software |
|
17 | 17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
18 | 18 | ------------------------------------------------------------------------------- |
|
19 | 19 | library ieee; |
|
20 | 20 | use ieee.std_logic_1164.all; |
|
21 | 21 | library grlib; |
|
22 | 22 | use grlib.amba.all; |
|
23 | -- pragma translate_off | |
|
24 | 23 | use std.textio.all; |
|
25 | -- pragma translate_on | |
|
26 | 24 | |
|
27 | 25 | |
|
28 | 26 | |
|
29 | 27 | package lpp_amba is |
|
30 | 28 | |
|
31 | constant VENDOR_LPP : amba_vendor_type := 16#19#; | |
|
32 | ||
|
33 | -- LPP device ids | |
|
34 | ||
|
35 | constant ROCKET_TM : amba_device_type := 16#001#; | |
|
36 | constant otherCore : amba_device_type := 16#002#; | |
|
37 | constant LPP_SIMPLE_DIODE : amba_device_type := 16#003#; | |
|
38 | constant LPP_MULTI_DIODE : amba_device_type := 16#004#; | |
|
39 | constant LPP_LCD_CTRLR : amba_device_type := 16#005#; | |
|
40 | constant LPP_UART : amba_device_type := 16#006#; | |
|
41 | constant LPP_CNA : amba_device_type := 16#007#; | |
|
42 | constant LPP_ADC_7688 : amba_device_type := 16#008#; | |
|
43 | constant LPP_CHENILLARD : amba_device_type := 16#009#; | |
|
44 | ||
|
45 | 29 | component APB_CHENILLARD is |
|
46 | 30 | generic ( |
|
47 | 31 | pindex : integer := 0; |
|
48 | 32 | paddr : integer := 0; |
|
49 | 33 | pmask : integer := 16#fff#; |
|
50 | 34 | pirq : integer := 0; |
|
51 | 35 | abits : integer := 8); |
|
52 | 36 | port ( |
|
53 | 37 | rst : in std_ulogic; |
|
54 | 38 | clk : in std_ulogic; |
|
55 | 39 | RegLed : in std_logic_vector (7 downto 0); |
|
56 | 40 | apbi : in apb_slv_in_type; |
|
57 | 41 | apbo : out apb_slv_out_type; |
|
58 | 42 | Leds : out std_logic_vector (7 downto 0) |
|
59 | 43 | ); |
|
60 | 44 | end component; |
|
61 | 45 | |
|
62 | 46 | component APB_SIMPLE_DIODE is |
|
63 | 47 | generic ( |
|
64 | 48 | pindex : integer := 0; |
|
65 | 49 | paddr : integer := 0; |
|
66 | 50 | pmask : integer := 16#fff#; |
|
67 | 51 | pirq : integer := 0; |
|
68 | 52 | abits : integer := 8); |
|
69 | 53 | port ( |
|
70 | 54 | rst : in std_ulogic; |
|
71 | 55 | clk : in std_ulogic; |
|
72 | 56 | apbi : in apb_slv_in_type; |
|
73 | 57 | apbo : out apb_slv_out_type; |
|
74 | 58 | LED : out std_ulogic |
|
75 | 59 | ); |
|
76 | 60 | end component; |
|
77 | 61 | |
|
78 | 62 | |
|
79 | 63 | component APB_MULTI_DIODE is |
|
80 | 64 | generic ( |
|
81 | 65 | pindex : integer := 0; |
|
82 | 66 | paddr : integer := 0; |
|
83 | 67 | pmask : integer := 16#fff#; |
|
84 | 68 | pirq : integer := 0; |
|
85 | 69 | abits : integer := 8); |
|
86 | 70 | port ( |
|
87 | 71 | rst : in std_ulogic; |
|
88 | 72 | clk : in std_ulogic; |
|
89 | 73 | apbi : in apb_slv_in_type; |
|
90 | 74 | apbo : out apb_slv_out_type; |
|
91 | 75 | LED : out std_logic_vector(2 downto 0) |
|
92 | 76 | ); |
|
93 | 77 | end component; |
|
94 | 78 | |
|
95 | 79 | end; |
@@ -1,99 +1,103 | |||
|
1 | 1 | ------------------------------------------------------------------------------ |
|
2 | 2 | -- This file is a part of the LPP VHDL IP LIBRARY |
|
3 | 3 | -- Copyright (C) 2009 - 2010, Laboratory of Plasmas Physic - CNRS |
|
4 | 4 | -- |
|
5 | 5 | -- This program is free software; you can redistribute it and/or modify |
|
6 | 6 | -- it under the terms of the GNU General Public License as published by |
|
7 | 7 | -- the Free Software Foundation; either version 3 of the License, or |
|
8 | 8 | -- (at your option) any later version. |
|
9 | 9 | -- |
|
10 | 10 | -- This program is distributed in the hope that it will be useful, |
|
11 | 11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 | 12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 | 13 | -- GNU General Public License for more details. |
|
14 | 14 | -- |
|
15 | 15 | -- You should have received a copy of the GNU General Public License |
|
16 | 16 | -- along with this program; if not, write to the Free Software |
|
17 | 17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
18 | 18 | ------------------------------------------------------------------------------- |
|
19 | 19 | library IEEE; |
|
20 | 20 | use IEEE.numeric_std.all; |
|
21 | 21 | use IEEE.std_logic_1164.all; |
|
22 | 22 | library lpp; |
|
23 | 23 | use lpp.lpp_uart.all; |
|
24 | 24 | |
|
25 | 25 | --! Programme qui va gerer toute la communication entre le PC et le FPGA |
|
26 | 26 | |
|
27 | 27 | entity UART is |
|
28 | 28 | generic(Data_sz : integer := 8); --! Constante de taille pour un mot de donnee |
|
29 | 29 | port( |
|
30 | 30 | clk : in std_logic; --! Horloge a 25Mhz du systeme |
|
31 | 31 | reset : in std_logic; --! Reset du systeme |
|
32 | 32 | TXD : out std_logic; --! Transmission, cote PC |
|
33 | 33 | RXD : in std_logic; --! Reception, cote PC |
|
34 | 34 | Capture : in std_logic; --! "Reset" cible pour le generateur de bauds, ici indissocie du reset global |
|
35 | 35 | NwDat : out std_logic; --! Flag, Nouvelle donnee presente |
|
36 | 36 | ACK : in std_logic; --! Flag, Reponse au flag precedent |
|
37 | 37 | Send : in std_logic; --! Flag, Demande d'envoi sur le bus |
|
38 | 38 | Sended : out std_logic; --! Flag, Envoi termine |
|
39 | 39 | BTrigger : out std_logic_vector(11 downto 0); --! Registre contenant la valeur du diviseur de frequence pour la transmission |
|
40 | 40 | RDATA : out std_logic_vector(Data_sz-1 downto 0); --! Mot de donnee en provenance de l'utilisateur |
|
41 | 41 | WDATA : in std_logic_vector(Data_sz-1 downto 0) --! Mot de donnee a transmettre a l'utilisateur |
|
42 | 42 | ); |
|
43 | 43 | end entity; |
|
44 | 44 | |
|
45 | 45 | |
|
46 | 46 | --! @details Gestion de la Reception/Transmission donc de la Vectorisation/Serialisation |
|
47 | 47 | --! ainsi que la detection et le reglage de le frequence de transmission optimale sur le bus (Generateur de Bauds) |
|
48 | 48 | architecture ar_UART of UART is |
|
49 | 49 | signal Bclk : std_logic; |
|
50 | 50 | |
|
51 | 51 | signal RDATA_int : std_logic_vector(Data_sz+1 downto 0); |
|
52 | 52 | signal WDATA_int : std_logic_vector(Data_sz+1 downto 0); |
|
53 | 53 | |
|
54 | 54 | signal TXD_Dummy : std_logic; |
|
55 | 55 | signal NwDat_int : std_logic; |
|
56 | 56 | signal NwDat_int_reg : std_logic; |
|
57 | 57 | signal receive : std_logic; |
|
58 | 58 | constant zeroVect : std_logic_vector(Data_sz+1 downto 0) := (others => '0'); |
|
59 | 59 | |
|
60 | 60 | begin |
|
61 | 61 | |
|
62 | 62 | |
|
63 | RDATA <= RDATA_int(8 downto 1); | |
|
63 | ||
|
64 | 64 | WDATA_int <= '1' & WDATA & '0'; |
|
65 | 65 | |
|
66 | 66 | BaudGenerator : BaudGen |
|
67 | 67 | port map(clk,reset,Capture,Bclk,RXD,BTrigger); |
|
68 | 68 | |
|
69 | 69 | |
|
70 | 70 | RX_REG : Shift_REG |
|
71 | 71 | generic map(Data_sz+2) |
|
72 | 72 | port map(clk,Bclk,reset,RXD,TXD_Dummy,receive,NwDat_int,zeroVect,RDATA_int); |
|
73 | 73 | |
|
74 | 74 | TX_REG : Shift_REG |
|
75 | 75 | generic map(Data_sz+2) |
|
76 | 76 | port map(clk,Bclk,reset,'1',TXD,Send,Sended,WDATA_int); |
|
77 | 77 | |
|
78 | 78 | |
|
79 | 79 | |
|
80 | 80 | process(clk,reset) |
|
81 | 81 | begin |
|
82 | 82 | if reset = '0' then |
|
83 | 83 | NwDat <= '0'; |
|
84 | 84 | elsif clk'event and clk = '1' then |
|
85 | 85 | NwDat_int_reg <= NwDat_int; |
|
86 | 86 | if RXD = '1' and NwDat_int = '1' then |
|
87 | 87 | receive <= '0'; |
|
88 | 88 | elsif RXD = '0' then |
|
89 | 89 | receive <= '1'; |
|
90 | 90 | end if; |
|
91 | 91 | if NwDat_int_reg = '0' and NwDat_int = '1' then |
|
92 | 92 | NwDat <= '1'; |
|
93 | RDATA <= RDATA_int(8 downto 1); | |
|
93 | 94 | elsif ack = '1' then |
|
94 | 95 | NwDat <= '0'; |
|
95 | 96 | end if; |
|
96 | 97 | end if; |
|
97 | 98 | end process; |
|
98 | 99 | |
|
99 | 100 | end ar_UART; |
|
101 | ||
|
102 | ||
|
103 |
@@ -1,33 +1,30 | |||
|
1 | 1 | echo "=======================================================================================" |
|
2 | 2 | echo "---------------------------------------------------------------------------------------" |
|
3 | 3 | echo " PDF Doc generator " |
|
4 | 4 | echo " Copyright (C) 2010 Laboratory of Plasmas Physic. " |
|
5 | 5 | echo "=======================================================================================" |
|
6 | 6 | echo '---------------------------------------------------------------------------------------- |
|
7 | 7 | This file is a part of the LPP VHDL IP LIBRARY |
|
8 | 8 | Copyright (C) 2010, Laboratory of Plasmas Physic - CNRS |
|
9 | 9 | |
|
10 | 10 | This program is free software; you can redistribute it and/or modify |
|
11 | 11 | it under the terms of the GNU General Public License as published by |
|
12 | 12 | the Free Software Foundation; either version 3 of the License, or |
|
13 | 13 | (at your option) any later version. |
|
14 | 14 | |
|
15 | 15 | This program is distributed in the hope that it will be useful, |
|
16 | 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
17 | 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
18 | 18 | GNU General Public License for more details. |
|
19 | 19 | |
|
20 | 20 | You should have received a copy of the GNU General Public License |
|
21 | 21 | along with this program; if not, write to the Free Software |
|
22 | 22 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
23 | 23 | ----------------------------------------------------------------------------------------' |
|
24 | 24 | echo |
|
25 | 25 | echo |
|
26 | 26 | echo |
|
27 | 27 | |
|
28 | 28 | |
|
29 | ||
|
30 | ||
|
31 | cd doc/latex | |
|
32 | make | |
|
33 | cp refman.pdf ../../VHD_lib.pdf | |
|
29 | make -C doc/latex | |
|
30 | cp doc/latex/refman.pdf ../../VHD_lib.pdf |
@@ -1,50 +1,50 | |||
|
1 | 1 | echo "=======================================================================================" |
|
2 | 2 | echo "---------------------------------------------------------------------------------------" |
|
3 | 3 | echo " LPP VHDL lib makeDirs " |
|
4 | 4 | echo " Copyright (C) 2010 Laboratory of Plasmas Physic. " |
|
5 | 5 | echo "=======================================================================================" |
|
6 | 6 | echo '---------------------------------------------------------------------------------------- |
|
7 | 7 | This file is a part of the LPP VHDL IP LIBRARY |
|
8 | 8 | Copyright (C) 2010, Laboratory of Plasmas Physic - CNRS |
|
9 | 9 | |
|
10 | 10 | This program is free software; you can redistribute it and/or modify |
|
11 | 11 | it under the terms of the GNU General Public License as published by |
|
12 | 12 | the Free Software Foundation; either version 3 of the License, or |
|
13 | 13 | (at your option) any later version. |
|
14 | 14 | |
|
15 | 15 | This program is distributed in the hope that it will be useful, |
|
16 | 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
17 | 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
18 | 18 | GNU General Public License for more details. |
|
19 | 19 | |
|
20 | 20 | You should have received a copy of the GNU General Public License |
|
21 | 21 | along with this program; if not, write to the Free Software |
|
22 | 22 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
23 | 23 | ----------------------------------------------------------------------------------------' |
|
24 | 24 | echo |
|
25 | 25 | echo |
|
26 | 26 | echo |
|
27 | 27 | |
|
28 | 28 | |
|
29 | 29 | |
|
30 | 30 | LPP_PATCHPATH=`pwd -L` |
|
31 | 31 | |
|
32 | 32 | cd $LPP_PATCHPATH/lib/lpp |
|
33 | 33 | |
|
34 | 34 | |
|
35 | 35 | #find . -type d|grep ./>$LPP_PATCHPATH/lib/lpp/dirs.txt |
|
36 | 36 | |
|
37 | rm $LPP_PATCHPATH/lib/lpp/dirs.txt | |
|
37 | rm -f $LPP_PATCHPATH/lib/lpp/dirs.txt | |
|
38 | 38 | |
|
39 | 39 | for folders in $(find . -type d|grep ./) |
|
40 | 40 | do |
|
41 | 41 | echo "enter folder : $folders" |
|
42 | 42 | files=$(ls $folders|grep .vhd) |
|
43 | 43 | if(ls $folders|grep .vhd|grep -i -v .html|grep -i -v .tex); then |
|
44 | 44 | echo "found $files" |
|
45 | 45 | echo $folders>>$LPP_PATCHPATH/lib/lpp/dirs.txt |
|
46 | 46 | fi |
|
47 | 47 | done |
|
48 | 48 | |
|
49 | 49 | |
|
50 | 50 | cd $LPP_PATCHPATH |
@@ -1,89 +1,89 | |||
|
1 | 1 | echo "=======================================================================================" |
|
2 | 2 | echo "---------------------------------------------------------------------------------------" |
|
3 | 3 | echo " LPP's GRLIB GLOBAL PATCHER " |
|
4 | 4 | echo " Copyright (C) 2010 Laboratory of Plasmas Physic. " |
|
5 | 5 | echo "=======================================================================================" |
|
6 | 6 | echo '------------------------------------------------------------------------------ |
|
7 | 7 | -- This file is a part of the LPP VHDL IP LIBRARY |
|
8 | 8 | -- Copyright (C) 2009 - 2010, Laboratory of Plasmas Physic - CNRS |
|
9 | 9 | -- |
|
10 | 10 | -- This program is free software; you can redistribute it and/or modify |
|
11 | 11 | -- it under the terms of the GNU General Public License as published by |
|
12 | 12 | -- the Free Software Foundation; either version 3 of the License, or |
|
13 | 13 | -- (at your option) any later version. |
|
14 | 14 | -- |
|
15 | 15 | -- This program is distributed in the hope that it will be useful, |
|
16 | 16 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
17 | 17 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
18 | 18 | -- GNU General Public License for more details. |
|
19 | 19 | -- |
|
20 | 20 | -- You should have received a copy of the GNU General Public License |
|
21 | 21 | -- along with this program; if not, write to the Free Software |
|
22 | 22 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
23 | 23 | -------------------------------------------------------------------------------' |
|
24 | 24 | echo |
|
25 | 25 | echo |
|
26 | 26 | echo |
|
27 | 27 | |
|
28 | 28 | # Absolute path to this script. /home/user/bin/foo.sh |
|
29 | 29 | #SCRIPT=$(readlink -f $0) |
|
30 | 30 | # Absolute path this script is in. /home/user/bin |
|
31 | 31 | |
|
32 | 32 | #LPP_PATCHPATH=`dirname $SCRIPT` |
|
33 | 33 | LPP_PATCHPATH=`pwd -L` |
|
34 | 34 | |
|
35 | 35 | GRLIBPATH=$1 |
|
36 | 36 | |
|
37 | 37 | |
|
38 | 38 | if [ -d "$GRLIBPATH" ]; then |
|
39 | 39 | if [ -d "$GRLIBPATH/lib" ]; then |
|
40 | 40 | if [ -d "$GRLIBPATH/designs" ]; then |
|
41 | 41 | if [ -d "$GRLIBPATH/boards" ]; then |
|
42 | 42 | #PATCH /lib |
|
43 | 43 | echo "patch /lib" |
|
44 | 44 | echo |
|
45 | 45 | |
|
46 | 46 | sh scripts/patchlibs.sh $GRLIBPATH |
|
47 | 47 | |
|
48 | 48 | #PATCH /boards |
|
49 | 49 | echo "patch /boards" |
|
50 | 50 | echo |
|
51 | 51 | sh scripts/patchboards.sh $GRLIBPATH |
|
52 | 52 | |
|
53 | 53 | #PATCH /designs |
|
54 | 54 | echo "patch /designs" |
|
55 | 55 | echo |
|
56 | 56 | sh scripts/patchdesigns.sh $GRLIBPATH |
|
57 | 57 | |
|
58 | 58 | echo |
|
59 | 59 | echo |
|
60 | 60 | |
|
61 | 61 | #CLEAN |
|
62 | 62 | echo "CLEANING .." |
|
63 | rm -v $1/lib/*.sh | |
|
64 | rm -v $1/lib/TODO | |
|
65 | rm -v $1/lib/Makefile | |
|
66 | rm -v $1/lib/log.txt | |
|
63 | rm -f -v $1/lib/*.sh | |
|
64 | rm -f -v $1/lib/TODO | |
|
65 | rm -f -v $1/lib/Makefile | |
|
66 | rm -f -v $1/lib/log.txt | |
|
67 | 67 | echo |
|
68 | 68 | echo |
|
69 | 69 | echo |
|
70 | 70 | else |
|
71 | 71 | echo "I can't find GRLIB in $1" |
|
72 | 72 | fi |
|
73 | 73 | |
|
74 | 74 | else |
|
75 | 75 | echo "I can't find GRLIB in $1" |
|
76 | 76 | fi |
|
77 | 77 | else |
|
78 | 78 | echo "I can't find GRLIB in $1" |
|
79 | 79 | fi |
|
80 | 80 | |
|
81 | 81 | else |
|
82 | 82 | echo "I can't find GRLIB in $1" |
|
83 | 83 | fi |
|
84 | 84 | |
|
85 | 85 | |
|
86 | 86 | |
|
87 | 87 | |
|
88 | 88 | |
|
89 | 89 |
@@ -1,48 +1,48 | |||
|
1 | 1 | echo "=======================================================================================" |
|
2 | 2 | echo "---------------------------------------------------------------------------------------" |
|
3 | 3 | echo " LPP's GRLIB Boards PATCHER " |
|
4 | 4 | echo " Copyright (C) 2010 Laboratory of Plasmas Physic. " |
|
5 | 5 | echo "=======================================================================================" |
|
6 | 6 | echo '---------------------------------------------------------------------------------------- |
|
7 | 7 | This file is a part of the LPP VHDL IP LIBRARY |
|
8 | 8 | Copyright (C) 2010, Laboratory of Plasmas Physic - CNRS |
|
9 | 9 | |
|
10 | 10 | This program is free software; you can redistribute it and/or modify |
|
11 | 11 | it under the terms of the GNU General Public License as published by |
|
12 | 12 | the Free Software Foundation; either version 3 of the License, or |
|
13 | 13 | (at your option) any later version. |
|
14 | 14 | |
|
15 | 15 | This program is distributed in the hope that it will be useful, |
|
16 | 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
17 | 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
18 | 18 | GNU General Public License for more details. |
|
19 | 19 | |
|
20 | 20 | You should have received a copy of the GNU General Public License |
|
21 | 21 | along with this program; if not, write to the Free Software |
|
22 | 22 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
23 | 23 | ----------------------------------------------------------------------------------------' |
|
24 | 24 | echo |
|
25 | 25 | echo |
|
26 | 26 | echo |
|
27 | 27 | |
|
28 | 28 | |
|
29 | 29 | LPP_LIBPATH=`pwd -L` |
|
30 | 30 | |
|
31 | 31 | echo "Patching boards..." |
|
32 | 32 | echo |
|
33 | 33 | echo |
|
34 | 34 | |
|
35 | 35 | #COPY |
|
36 | 36 | echo "Copy boards Files..." |
|
37 | 37 | cp -R -v $LPP_LIBPATH/boards $1 |
|
38 | 38 | echo |
|
39 | 39 | echo |
|
40 | 40 | echo |
|
41 | 41 | |
|
42 | 42 | |
|
43 | 43 | #CLEAN |
|
44 | 44 | echo "CLEANING .." |
|
45 | rm -v $1/boards/*.sh | |
|
45 | rm -f -v $1/boards/*.sh | |
|
46 | 46 | echo |
|
47 | 47 | echo |
|
48 | 48 | echo |
@@ -1,49 +1,49 | |||
|
1 | 1 | echo "=======================================================================================" |
|
2 | 2 | echo "---------------------------------------------------------------------------------------" |
|
3 | 3 | echo " LPP's GRLIB Designs PATCHER " |
|
4 | 4 | echo " Copyright (C) 2010 Laboratory of Plasmas Physic. " |
|
5 | 5 | echo "=======================================================================================" |
|
6 | 6 | echo '---------------------------------------------------------------------------------------- |
|
7 | 7 | This file is a part of the LPP VHDL IP LIBRARY |
|
8 | 8 | Copyright (C) 2010, Laboratory of Plasmas Physic - CNRS |
|
9 | 9 | |
|
10 | 10 | This program is free software; you can redistribute it and/or modify |
|
11 | 11 | it under the terms of the GNU General Public License as published by |
|
12 | 12 | the Free Software Foundation; either version 3 of the License, or |
|
13 | 13 | (at your option) any later version. |
|
14 | 14 | |
|
15 | 15 | This program is distributed in the hope that it will be useful, |
|
16 | 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
17 | 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
18 | 18 | GNU General Public License for more details. |
|
19 | 19 | |
|
20 | 20 | You should have received a copy of the GNU General Public License |
|
21 | 21 | along with this program; if not, write to the Free Software |
|
22 | 22 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
23 | 23 | ----------------------------------------------------------------------------------------' |
|
24 | 24 | echo |
|
25 | 25 | echo |
|
26 | 26 | echo |
|
27 | 27 | |
|
28 | 28 | |
|
29 | 29 | LPP_LIBPATH=`pwd -L` |
|
30 | 30 | |
|
31 | 31 | echo "Patching designs..." |
|
32 | 32 | echo |
|
33 | 33 | echo |
|
34 | 34 | |
|
35 | 35 | #COPY |
|
36 | 36 | echo "Copy designs Files..." |
|
37 | 37 | cp -R -v $LPP_LIBPATH/designs $1 |
|
38 | 38 | echo |
|
39 | 39 | echo |
|
40 | 40 | echo |
|
41 | 41 | |
|
42 | 42 | |
|
43 | 43 | #CLEAN |
|
44 | 44 | echo "CLEANING .." |
|
45 | rm -v $1/designs/*.sh | |
|
45 | rm -f -v $1/designs/*.sh | |
|
46 | 46 | echo |
|
47 | 47 | echo |
|
48 | 48 | echo |
|
49 | 49 |
@@ -1,64 +1,64 | |||
|
1 | 1 | echo "=======================================================================================" |
|
2 | 2 | echo "---------------------------------------------------------------------------------------" |
|
3 | 3 | echo " LPP's GRLIB IPs PATCHER " |
|
4 | 4 | echo " Copyright (C) 2010 Laboratory of Plasmas Physic. " |
|
5 | 5 | echo "=======================================================================================" |
|
6 | 6 | echo '---------------------------------------------------------------------------------------- |
|
7 | 7 | This file is a part of the LPP VHDL IP LIBRARY |
|
8 | 8 | Copyright (C) 2010, Laboratory of Plasmas Physic - CNRS |
|
9 | 9 | |
|
10 | 10 | This program is free software; you can redistribute it and/or modify |
|
11 | 11 | it under the terms of the GNU General Public License as published by |
|
12 | 12 | the Free Software Foundation; either version 3 of the License, or |
|
13 | 13 | (at your option) any later version. |
|
14 | 14 | |
|
15 | 15 | This program is distributed in the hope that it will be useful, |
|
16 | 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
17 | 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
18 | 18 | GNU General Public License for more details. |
|
19 | 19 | |
|
20 | 20 | You should have received a copy of the GNU General Public License |
|
21 | 21 | along with this program; if not, write to the Free Software |
|
22 | 22 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
23 | 23 | ----------------------------------------------------------------------------------------' |
|
24 | 24 | echo |
|
25 | 25 | echo |
|
26 | 26 | echo |
|
27 | 27 | |
|
28 | 28 | |
|
29 | 29 | LPP_LIBPATH=`pwd -L` |
|
30 | 30 | |
|
31 | 31 | echo "Patching Grlib..." |
|
32 | 32 | echo |
|
33 | 33 | echo |
|
34 | 34 | |
|
35 | 35 | #COPY |
|
36 | 36 | echo "Remove old lib Files..." |
|
37 | rm -R -v $1/lib/lpp | |
|
37 | rm -f -R -v $1/lib/lpp | |
|
38 | 38 | echo "Copy lib Files..." |
|
39 | 39 | cp -R -v $LPP_LIBPATH/lib $1 |
|
40 | 40 | echo |
|
41 | 41 | echo |
|
42 | 42 | echo |
|
43 | 43 | |
|
44 | 44 | |
|
45 | 45 | #PATCH libs.txt |
|
46 | 46 | echo "Patch $1/lib/libs.txt..." |
|
47 | 47 | if(grep -q lpp $1/lib/libs.txt); then |
|
48 | 48 | echo "No need to Patch $1/lib/libs.txt..." |
|
49 | 49 | else |
|
50 | 50 | echo lpp>>$1/lib/libs.txt |
|
51 | 51 | fi |
|
52 | 52 | |
|
53 | 53 | echo |
|
54 | 54 | echo |
|
55 | 55 | echo |
|
56 | 56 | |
|
57 | 57 | #CLEAN |
|
58 | 58 | echo "CLEANING .." |
|
59 | rm -v $1/lib/*.sh | |
|
60 | rm -v $1/lib/GPL_HEADER | |
|
59 | rm -f -v $1/lib/*.sh | |
|
60 | rm -f -v $1/lib/GPL_HEADER | |
|
61 | 61 | echo |
|
62 | 62 | echo |
|
63 | 63 | echo |
|
64 | 64 |
@@ -1,61 +1,61 | |||
|
1 | 1 | echo "=======================================================================================" |
|
2 | 2 | echo "---------------------------------------------------------------------------------------" |
|
3 | 3 | echo " LPP vhdlsyn PATCHER " |
|
4 | 4 | echo " Copyright (C) 2010 Laboratory of Plasmas Physic. " |
|
5 | 5 | echo "=======================================================================================" |
|
6 | 6 | echo '---------------------------------------------------------------------------------------- |
|
7 | 7 | This file is a part of the LPP VHDL IP LIBRARY |
|
8 | 8 | Copyright (C) 2010, Laboratory of Plasmas Physic - CNRS |
|
9 | 9 | |
|
10 | 10 | This program is free software; you can redistribute it and/or modify |
|
11 | 11 | it under the terms of the GNU General Public License as published by |
|
12 | 12 | the Free Software Foundation; either version 3 of the License, or |
|
13 | 13 | (at your option) any later version. |
|
14 | 14 | |
|
15 | 15 | This program is distributed in the hope that it will be useful, |
|
16 | 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
17 | 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
18 | 18 | GNU General Public License for more details. |
|
19 | 19 | |
|
20 | 20 | You should have received a copy of the GNU General Public License |
|
21 | 21 | along with this program; if not, write to the Free Software |
|
22 | 22 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
23 | 23 | ----------------------------------------------------------------------------------------' |
|
24 | 24 | echo |
|
25 | 25 | echo |
|
26 | 26 | echo |
|
27 | 27 | |
|
28 | 28 | # Absolute path to this script. /home/user/bin/foo.sh |
|
29 | 29 | #SCRIPT=$(readlink -f $0) |
|
30 | 30 | # Absolute path this script is in. /home/user/bin |
|
31 | 31 | |
|
32 | 32 | #LPP_PATCHPATH=`dirname $SCRIPT` |
|
33 | 33 | LPP_PATCHPATH=`pwd -L` |
|
34 | 34 | |
|
35 | 35 | cd $LPP_PATCHPATH/lib/lpp |
|
36 | 36 | |
|
37 | 37 | echo `pwd -L` |
|
38 | 38 | |
|
39 | 39 | case $1 in |
|
40 | 40 | -h | --help | --h | -help) |
|
41 | 41 | echo 'Help: |
|
42 | 42 | This script add all non testbensh VHDL files in vhdlsyn.txt file of each folder.' |
|
43 | 43 | ;; |
|
44 | 44 | * ) |
|
45 | 45 | for folders in $(find . -type d|grep ./) |
|
46 | 46 | do |
|
47 | 47 | echo "enter folder : $folders" |
|
48 | 48 | files=$(ls $folders | grep .vhd | grep -i -v "test") |
|
49 | 49 | echo "found $files" |
|
50 | rm $folders/vhdlsyn.txt | |
|
50 | rm -f $folders/vhdlsyn.txt | |
|
51 | 51 | for file in $files |
|
52 | 52 | do |
|
53 | 53 | echo "$file">>$folders/vhdlsyn.txt |
|
54 | 54 | done |
|
55 | 55 | done |
|
56 | 56 | ;; |
|
57 | 57 | |
|
58 | 58 | esac |
|
59 | 59 | |
|
60 | 60 | cd $LPP_PATCHPATH |
|
61 | 61 |
General Comments 0
You need to be logged in to leave comments.
Login now