@@ -0,0 +1,44 | |||
|
1 | #------------------------------------------------------------------------------ | |
|
2 | #-- This file is a part of the LPP VHDL IP LIBRARY | |
|
3 | #-- Copyright (C) 2010, Laboratory of Plasmas Physic - CNRS | |
|
4 | #-- | |
|
5 | #-- This program is free software; you can redistribute it and/or modify | |
|
6 | #-- it under the terms of the GNU General Public License as published by | |
|
7 | #-- the Free Software Foundation; either version 3 of the License, or | |
|
8 | #-- (at your option) any later version. | |
|
9 | #-- | |
|
10 | #-- This program is distributed in the hope that it will be useful, | |
|
11 | #-- but WITHOUT ANY WARRANTY; without even the implied warranty of | |
|
12 | #-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
|
13 | #-- GNU General Public License for more details. | |
|
14 | #-- | |
|
15 | #-- You should have received a copy of the GNU General Public License | |
|
16 | #-- along with this program; if not, write to the Free Software | |
|
17 | #-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
|
18 | #------------------------------------------------------------------------------ | |
|
19 | ||
|
20 | include ../../rules.mk | |
|
21 | LIBDIR = ../../lib | |
|
22 | INCPATH = ../../includes | |
|
23 | SCRIPTDIR=../../scripts/ | |
|
24 | LIBS=-lapb_Matrix_Driver -llpp_apb_functions -lapb_delay_Driver -lapb_fifo_Driver -lapb_uart_Driver -lapb_gpio_Driver | |
|
25 | INPUTFILE=main.c | |
|
26 | EXEC=BenchMatrix.bin | |
|
27 | OUTBINDIR=bin/ | |
|
28 | ||
|
29 | ||
|
30 | .PHONY:bin | |
|
31 | ||
|
32 | all:bin | |
|
33 | @echo $(EXEC)" file created" | |
|
34 | ||
|
35 | clean: | |
|
36 | rm -f *.{o,a} | |
|
37 | ||
|
38 | ||
|
39 | ||
|
40 | help:ruleshelp | |
|
41 | @echo " all : makes an executable file called "$(EXEC) | |
|
42 | @echo " in "$(OUTBINDIR) | |
|
43 | @echo " clean : removes temporary files" | |
|
44 |
@@ -0,0 +1,205 | |||
|
1 | #include <stdio.h> | |
|
2 | #include "lpp_apb_functions.h" | |
|
3 | #include "apb_fifo_Driver.h" | |
|
4 | #include "apb_Matrix_Driver.h" | |
|
5 | #include "apb_uart_Driver.h" | |
|
6 | #include "apb_delay_Driver.h" | |
|
7 | #include "apb_gpio_Driver.h" | |
|
8 | ||
|
9 | int main() | |
|
10 | { | |
|
11 | int i=0; | |
|
12 | char temp[256]; | |
|
13 | int TblB1[256] = {0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F,0x00A0,0x00A1,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7,0x00A8,0x00A9,0x00AA,0x00AB,0x00AC,0x00AD,0x00AE,0x00AF,0x00B0,0x00B1,0x00B2,0x00B3,0x00B4,0x00B5,0x00B6,0x00B7,0x00B8,0x00B9,0x00BA,0x00BB,0x00BC,0x00BD,0x00BE,0x00BF,0x00C0,0x00C1,0x00C2,0x00C3,0x00C4,0x00C5,0x00C6,0x00C7,0x00C8,0x00C9,0x00CA,0x00CB,0x00CC,0x00CD,0x00CE,0x00CF,0x00D0,0x00D1,0x00D2,0x00D3,0x00D4,0x00D5,0x00D6,0x00D7,0x00D8,0x00D9,0x00DA,0x00DB,0x00DC,0x00DD,0x00DE,0x00DF,0x00E0,0x00E1,0x00E2,0x00E3,0x00E4,0x00E5,0x00E6,0x00E7,0x00E8,0x00E9,0x00EA,0x00EB,0x00EC,0x00ED,0x00EE,0x00EF,0x00F0,0x00F1,0x00F2,0x00F3,0x00F4,0x00F5,0x00F6,0x00F7,0x00F8,0x00F9,0x00FA,0x00FB,0x00FC,0x00FD,0x00FE,0x00FF,0x0100}; | |
|
14 | int TblB2[256] = {0x0006,0x0007,0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F,0x00A0,0x00A1,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7,0x00A8,0x00A9,0x00AA,0x00AB,0x00AC,0x00AD,0x00AE,0x00AF,0x00B0,0x00B1,0x00B2,0x00B3,0x00B4,0x00B5,0x00B6,0x00B7,0x00B8,0x00B9,0x00BA,0x00BB,0x00BC,0x00BD,0x00BE,0x00BF,0x00C0,0x00C1,0x00C2,0x00C3,0x00C4,0x00C5,0x00C6,0x00C7,0x00C8,0x00C9,0x00CA,0x00CB,0x00CC,0x00CD,0x00CE,0x00CF,0x00D0,0x00D1,0x00D2,0x00D3,0x00D4,0x00D5,0x00D6,0x00D7,0x00D8,0x00D9,0x00DA,0x00DB,0x00DC,0x00DD,0x00DE,0x00DF,0x00E0,0x00E1,0x00E2,0x00E3,0x00E4,0x00E5,0x00E6,0x00E7,0x00E8,0x00E9,0x00EA,0x00EB,0x00EC,0x00ED,0x00EE,0x00EF,0x00F0,0x00F1,0x00F2,0x00F3,0x00F4,0x00F5,0x00F6,0x00F7,0x00F8,0x00F9,0x00FA,0x00FB,0x00FC,0x00FD,0x00FE,0x00FF,0x0100,0x0101,0x0102,0x0103,0x0104,0x0105}; | |
|
15 | int TblB3[256] = {0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F,0x00A0,0x00A1,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7,0x00A8,0x00A9,0x00AA,0x00AB,0x00AC,0x00AD,0x00AE,0x00AF,0x00B0,0x00B1,0x00B2,0x00B3,0x00B4,0x00B5,0x00B6,0x00B7,0x00B8,0x00B9,0x00BA,0x00BB,0x00BC,0x00BD,0x00BE,0x00BF,0x00C0,0x00C1,0x00C2,0x00C3,0x00C4,0x00C5,0x00C6,0x00C7,0x00C8,0x00C9,0x00CA,0x00CB,0x00CC,0x00CD,0x00CE,0x00CF,0x00D0,0x00D1,0x00D2,0x00D3,0x00D4,0x00D5,0x00D6,0x00D7,0x00D8,0x00D9,0x00DA,0x00DB,0x00DC,0x00DD,0x00DE,0x00DF,0x00E0,0x00E1,0x00E2,0x00E3,0x00E4,0x00E5,0x00E6,0x00E7,0x00E8,0x00E9,0x00EA,0x00EB,0x00EC,0x00ED,0x00EE,0x00EF,0x00F0,0x00F1,0x00F2,0x00F3,0x00F4,0x00F5,0x00F6,0x00F7,0x00F8,0x00F9,0x00FA,0x00FB,0x00FC,0x00FD,0x00FE,0x00FF,0x0100,0x0101,0x0102,0x0103,0x0104,0x0105,0x0106,0x0107,0x0108,0x0109,0x010A}; | |
|
16 | int TblE1[256] = {0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F,0x00A0,0x00A1,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7,0x00A8,0x00A9,0x00AA,0x00AB,0x00AC,0x00AD,0x00AE,0x00AF,0x00B0,0x00B1,0x00B2,0x00B3,0x00B4,0x00B5,0x00B6,0x00B7,0x00B8,0x00B9,0x00BA,0x00BB,0x00BC,0x00BD,0x00BE,0x00BF,0x00C0,0x00C1,0x00C2,0x00C3,0x00C4,0x00C5,0x00C6,0x00C7,0x00C8,0x00C9,0x00CA,0x00CB,0x00CC,0x00CD,0x00CE,0x00CF,0x00D0,0x00D1,0x00D2,0x00D3,0x00D4,0x00D5,0x00D6,0x00D7,0x00D8,0x00D9,0x00DA,0x00DB,0x00DC,0x00DD,0x00DE,0x00DF,0x00E0,0x00E1,0x00E2,0x00E3,0x00E4,0x00E5,0x00E6,0x00E7,0x00E8,0x00E9,0x00EA,0x00EB,0x00EC,0x00ED,0x00EE,0x00EF,0x00F0,0x00F1,0x00F2,0x00F3,0x00F4,0x00F5,0x00F6,0x00F7,0x00F8,0x00F9,0x00FA,0x00FB,0x00FC,0x00FD,0x00FE,0x00FF,0x0100,0x0101,0x0102,0x0103,0x0104,0x0105,0x0106,0x0107,0x0108,0x0109,0x010A,0x010B,0x010C,0x010D,0x010E,0x010F}; | |
|
17 | int TblE2[256] = {0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F,0x00A0,0x00A1,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7,0x00A8,0x00A9,0x00AA,0x00AB,0x00AC,0x00AD,0x00AE,0x00AF,0x00B0,0x00B1,0x00B2,0x00B3,0x00B4,0x00B5,0x00B6,0x00B7,0x00B8,0x00B9,0x00BA,0x00BB,0x00BC,0x00BD,0x00BE,0x00BF,0x00C0,0x00C1,0x00C2,0x00C3,0x00C4,0x00C5,0x00C6,0x00C7,0x00C8,0x00C9,0x00CA,0x00CB,0x00CC,0x00CD,0x00CE,0x00CF,0x00D0,0x00D1,0x00D2,0x00D3,0x00D4,0x00D5,0x00D6,0x00D7,0x00D8,0x00D9,0x00DA,0x00DB,0x00DC,0x00DD,0x00DE,0x00DF,0x00E0,0x00E1,0x00E2,0x00E3,0x00E4,0x00E5,0x00E6,0x00E7,0x00E8,0x00E9,0x00EA,0x00EB,0x00EC,0x00ED,0x00EE,0x00EF,0x00F0,0x00F1,0x00F2,0x00F3,0x00F4,0x00F5,0x00F6,0x00F7,0x00F8,0x00F9,0x00FA,0x00FB,0x00FC,0x00FD,0x00FE,0x00FF,0x0100,0x0101,0x0102,0x0103,0x0104,0x0105,0x0106,0x0107,0x0108,0x0109,0x010A,0x010B,0x010C,0x010D,0x010E,0x010F,0x0110,0x0111,0x0112,0x0113,0x0114}; | |
|
18 | int Table[256]; | |
|
19 | ||
|
20 | DELAY_Device* delay0 = openDELAY(0); | |
|
21 | UART_Device* uart0 = openUART(0); | |
|
22 | FIFO_Device* fifo0 = openFIFO(0); | |
|
23 | FIFO_Device* fifo1 = openFIFO(1); | |
|
24 | static MATRIX_Device* mspec; | |
|
25 | mspec = openMatrix(0); | |
|
26 | FIFO_Device* fifoOut = openFIFO(2); | |
|
27 | GPIO_Device* gpio0 = openGPIO(0); | |
|
28 | ||
|
29 | ||
|
30 | printf("\nDebut Main\n\n"); | |
|
31 | ||
|
32 | Setup(delay0,30000000); | |
|
33 | gpio0->oen = 0x3; | |
|
34 | gpio0->Dout = 0x0; | |
|
35 | ||
|
36 | mspec->Statu = 2; | |
|
37 | FillFifo(fifo0,TblB1,256); | |
|
38 | FillFifo(fifo1,TblB2,256); | |
|
39 | ||
|
40 | Delay_ms(delay0,10); | |
|
41 | gpio0->Dout = 0x1; | |
|
42 | for (i = 0 ; i < 256 ; i++) | |
|
43 | { | |
|
44 | Table[i] = fifoOut->rwdata; | |
|
45 | } | |
|
46 | ||
|
47 | gpio0->Dout = 0x2; | |
|
48 | sprintf(temp,"Reels\tImaginaires\n\r"); | |
|
49 | uartputs(uart0,temp); | |
|
50 | for (i = 0 ; i < 256 ; i+=2) | |
|
51 | { | |
|
52 | sprintf(temp,"%d\t%d\n\r",Table[i],Table[i+1]); | |
|
53 | uartputs(uart0,temp); | |
|
54 | } | |
|
55 | ||
|
56 | gpio0->Dout = 0x3; | |
|
57 | ||
|
58 | printf("\nFin Main\n\n"); | |
|
59 | return 0; | |
|
60 | } | |
|
61 | ||
|
62 | ||
|
63 | ||
|
64 | ||
|
65 | ||
|
66 | ||
|
67 | ||
|
68 | ||
|
69 | ||
|
70 | ||
|
71 | ||
|
72 | ||
|
73 | ||
|
74 | ||
|
75 | ||
|
76 | ||
|
77 | ||
|
78 | ||
|
79 | ||
|
80 | ||
|
81 | ||
|
82 | ||
|
83 | ||
|
84 | ||
|
85 | ||
|
86 | ||
|
87 | ||
|
88 | ||
|
89 | ||
|
90 | ||
|
91 | ||
|
92 | ||
|
93 | ||
|
94 | ||
|
95 | ||
|
96 | ||
|
97 | ||
|
98 | ||
|
99 | ||
|
100 | ||
|
101 | ||
|
102 | ||
|
103 | ||
|
104 | ||
|
105 | ||
|
106 | ||
|
107 | /*int main() | |
|
108 | { | |
|
109 | int i=0; | |
|
110 | int TblB1[256] = {0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F,0x00A0,0x00A1,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7,0x00A8,0x00A9,0x00AA,0x00AB,0x00AC,0x00AD,0x00AE,0x00AF,0x00B0,0x00B1,0x00B2,0x00B3,0x00B4,0x00B5,0x00B6,0x00B7,0x00B8,0x00B9,0x00BA,0x00BB,0x00BC,0x00BD,0x00BE,0x00BF,0x00C0,0x00C1,0x00C2,0x00C3,0x00C4,0x00C5,0x00C6,0x00C7,0x00C8,0x00C9,0x00CA,0x00CB,0x00CC,0x00CD,0x00CE,0x00CF,0x00D0,0x00D1,0x00D2,0x00D3,0x00D4,0x00D5,0x00D6,0x00D7,0x00D8,0x00D9,0x00DA,0x00DB,0x00DC,0x00DD,0x00DE,0x00DF,0x00E0,0x00E1,0x00E2,0x00E3,0x00E4,0x00E5,0x00E6,0x00E7,0x00E8,0x00E9,0x00EA,0x00EB,0x00EC,0x00ED,0x00EE,0x00EF,0x00F0,0x00F1,0x00F2,0x00F3,0x00F4,0x00F5,0x00F6,0x00F7,0x00F8,0x00F9,0x00FA,0x00FB,0x00FC,0x00FD,0x00FE,0x00FF,0x0100}; | |
|
111 | int TblB2[256] = {0x0006,0x0007,0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F,0x00A0,0x00A1,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7,0x00A8,0x00A9,0x00AA,0x00AB,0x00AC,0x00AD,0x00AE,0x00AF,0x00B0,0x00B1,0x00B2,0x00B3,0x00B4,0x00B5,0x00B6,0x00B7,0x00B8,0x00B9,0x00BA,0x00BB,0x00BC,0x00BD,0x00BE,0x00BF,0x00C0,0x00C1,0x00C2,0x00C3,0x00C4,0x00C5,0x00C6,0x00C7,0x00C8,0x00C9,0x00CA,0x00CB,0x00CC,0x00CD,0x00CE,0x00CF,0x00D0,0x00D1,0x00D2,0x00D3,0x00D4,0x00D5,0x00D6,0x00D7,0x00D8,0x00D9,0x00DA,0x00DB,0x00DC,0x00DD,0x00DE,0x00DF,0x00E0,0x00E1,0x00E2,0x00E3,0x00E4,0x00E5,0x00E6,0x00E7,0x00E8,0x00E9,0x00EA,0x00EB,0x00EC,0x00ED,0x00EE,0x00EF,0x00F0,0x00F1,0x00F2,0x00F3,0x00F4,0x00F5,0x00F6,0x00F7,0x00F8,0x00F9,0x00FA,0x00FB,0x00FC,0x00FD,0x00FE,0x00FF,0x0100,0x0101,0x0102,0x0103,0x0104,0x0105}; | |
|
112 | int TblB3[256] = {0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F,0x00A0,0x00A1,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7,0x00A8,0x00A9,0x00AA,0x00AB,0x00AC,0x00AD,0x00AE,0x00AF,0x00B0,0x00B1,0x00B2,0x00B3,0x00B4,0x00B5,0x00B6,0x00B7,0x00B8,0x00B9,0x00BA,0x00BB,0x00BC,0x00BD,0x00BE,0x00BF,0x00C0,0x00C1,0x00C2,0x00C3,0x00C4,0x00C5,0x00C6,0x00C7,0x00C8,0x00C9,0x00CA,0x00CB,0x00CC,0x00CD,0x00CE,0x00CF,0x00D0,0x00D1,0x00D2,0x00D3,0x00D4,0x00D5,0x00D6,0x00D7,0x00D8,0x00D9,0x00DA,0x00DB,0x00DC,0x00DD,0x00DE,0x00DF,0x00E0,0x00E1,0x00E2,0x00E3,0x00E4,0x00E5,0x00E6,0x00E7,0x00E8,0x00E9,0x00EA,0x00EB,0x00EC,0x00ED,0x00EE,0x00EF,0x00F0,0x00F1,0x00F2,0x00F3,0x00F4,0x00F5,0x00F6,0x00F7,0x00F8,0x00F9,0x00FA,0x00FB,0x00FC,0x00FD,0x00FE,0x00FF,0x0100,0x0101,0x0102,0x0103,0x0104,0x0105,0x0106,0x0107,0x0108,0x0109,0x010A}; | |
|
113 | int TblE1[256] = {0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F,0x00A0,0x00A1,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7,0x00A8,0x00A9,0x00AA,0x00AB,0x00AC,0x00AD,0x00AE,0x00AF,0x00B0,0x00B1,0x00B2,0x00B3,0x00B4,0x00B5,0x00B6,0x00B7,0x00B8,0x00B9,0x00BA,0x00BB,0x00BC,0x00BD,0x00BE,0x00BF,0x00C0,0x00C1,0x00C2,0x00C3,0x00C4,0x00C5,0x00C6,0x00C7,0x00C8,0x00C9,0x00CA,0x00CB,0x00CC,0x00CD,0x00CE,0x00CF,0x00D0,0x00D1,0x00D2,0x00D3,0x00D4,0x00D5,0x00D6,0x00D7,0x00D8,0x00D9,0x00DA,0x00DB,0x00DC,0x00DD,0x00DE,0x00DF,0x00E0,0x00E1,0x00E2,0x00E3,0x00E4,0x00E5,0x00E6,0x00E7,0x00E8,0x00E9,0x00EA,0x00EB,0x00EC,0x00ED,0x00EE,0x00EF,0x00F0,0x00F1,0x00F2,0x00F3,0x00F4,0x00F5,0x00F6,0x00F7,0x00F8,0x00F9,0x00FA,0x00FB,0x00FC,0x00FD,0x00FE,0x00FF,0x0100,0x0101,0x0102,0x0103,0x0104,0x0105,0x0106,0x0107,0x0108,0x0109,0x010A,0x010B,0x010C,0x010D,0x010E,0x010F}; | |
|
114 | int TblE2[256] = {0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F,0x00A0,0x00A1,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7,0x00A8,0x00A9,0x00AA,0x00AB,0x00AC,0x00AD,0x00AE,0x00AF,0x00B0,0x00B1,0x00B2,0x00B3,0x00B4,0x00B5,0x00B6,0x00B7,0x00B8,0x00B9,0x00BA,0x00BB,0x00BC,0x00BD,0x00BE,0x00BF,0x00C0,0x00C1,0x00C2,0x00C3,0x00C4,0x00C5,0x00C6,0x00C7,0x00C8,0x00C9,0x00CA,0x00CB,0x00CC,0x00CD,0x00CE,0x00CF,0x00D0,0x00D1,0x00D2,0x00D3,0x00D4,0x00D5,0x00D6,0x00D7,0x00D8,0x00D9,0x00DA,0x00DB,0x00DC,0x00DD,0x00DE,0x00DF,0x00E0,0x00E1,0x00E2,0x00E3,0x00E4,0x00E5,0x00E6,0x00E7,0x00E8,0x00E9,0x00EA,0x00EB,0x00EC,0x00ED,0x00EE,0x00EF,0x00F0,0x00F1,0x00F2,0x00F3,0x00F4,0x00F5,0x00F6,0x00F7,0x00F8,0x00F9,0x00FA,0x00FB,0x00FC,0x00FD,0x00FE,0x00FF,0x0100,0x0101,0x0102,0x0103,0x0104,0x0105,0x0106,0x0107,0x0108,0x0109,0x010A,0x010B,0x010C,0x010D,0x010E,0x010F,0x0110,0x0111,0x0112,0x0113,0x0114}; | |
|
115 | ||
|
116 | ||
|
117 | printf("\nDebut Main\n\n"); | |
|
118 | ||
|
119 | FIFO_Device* fifoB1 = openFIFO(0); | |
|
120 | FIFO_Device* fifoB2 = openFIFO(1); | |
|
121 | FIFO_Device* fifoB3 = openFIFO(2); | |
|
122 | FIFO_Device* fifoE1 = openFIFO(3); | |
|
123 | FIFO_Device* fifoE2 = openFIFO(4); | |
|
124 | ||
|
125 | for (i = 0 ; i < 256 ; i++) | |
|
126 | { | |
|
127 | fifoB1->rwdata = TblB1[i]; | |
|
128 | fifoB2->rwdata = TblB2[i]; | |
|
129 | fifoB3->rwdata = TblB3[i]; | |
|
130 | fifoE1->rwdata = TblE1[i]; | |
|
131 | fifoE2->rwdata = TblE2[i]; | |
|
132 | } | |
|
133 | ||
|
134 | fifoB1->cfgreg = fifoB1->cfgreg | Boucle; | |
|
135 | fifoB2->cfgreg = fifoB2->cfgreg | Boucle; | |
|
136 | fifoB3->cfgreg = fifoB3->cfgreg | Boucle; | |
|
137 | fifoE1->cfgreg = fifoE1->cfgreg | Boucle; | |
|
138 | fifoE2->cfgreg = fifoE2->cfgreg | Boucle; | |
|
139 | ||
|
140 | printf("\t*** Boucl� ***\n\n"); | |
|
141 | ||
|
142 | return 0; | |
|
143 | }*/ | |
|
144 | ||
|
145 | ||
|
146 | ||
|
147 | ||
|
148 | ||
|
149 | ||
|
150 | ||
|
151 | ||
|
152 | ||
|
153 | ||
|
154 | ||
|
155 | ||
|
156 | ||
|
157 | ||
|
158 | ||
|
159 | ||
|
160 | ||
|
161 | ||
|
162 | ||
|
163 | ||
|
164 | ||
|
165 | ||
|
166 | ||
|
167 | ||
|
168 | ||
|
169 | ||
|
170 | ||
|
171 | ||
|
172 | /* | |
|
173 | while((fifoB1->cfgreg & FIFO_Empty) != FIFO_Empty) // TANT QUE empty a 0 ALORS | |
|
174 | { | |
|
175 | while((Mspec0->Cfg & Read) != Read); // TANT QUE read a 0 RIEN | |
|
176 | ||
|
177 | Mspec0->IN1 = fifoB1->rwdata; | |
|
178 | Mspec0->IN2 = fifoB1->rwdata; | |
|
179 | Mspec0->Cfg = 0x1; | |
|
180 | printf("Input: %x / %x\n",Mspec0->IN1,Mspec0->IN2); | |
|
181 | ||
|
182 | while((Mspec0->Cfg & Read) != Read); // TANT QUE read a 0 RIEN | |
|
183 | ||
|
184 | Mspec0->IN1 = fifoB1->rwdata; | |
|
185 | Mspec0->IN2 = fifoB1->rwdata; | |
|
186 | Mspec0->Cfg = 0x0; | |
|
187 | printf("Input: %x / %x\n",Mspec0->IN1,Mspec0->IN2); | |
|
188 | ||
|
189 | while((Mspec0->Cfg & Valid) != Valid); // TANT QUE valid a 0 RIEN | |
|
190 | ||
|
191 | //printf("Result: %d\n",Mspec0->RES); | |
|
192 | Mspec0->Cfg = 0x100; | |
|
193 | TabResB1B1[i] = Mspec0->RES; | |
|
194 | i++; | |
|
195 | printf("Result: %d\n",Mspec0->RES); | |
|
196 | ||
|
197 | while((Mspec0->Cfg & Valid) != Valid); // TANT QUE valid a 0 RIEN | |
|
198 | ||
|
199 | //printf("Result: %d\n",Mspec0->RES); | |
|
200 | Mspec0->Cfg = 0x000; | |
|
201 | TabResB1B1[i] = Mspec0->RES; | |
|
202 | i++; | |
|
203 | printf("Result: %d\n",Mspec0->RES); | |
|
204 | } | |
|
205 | */ |
@@ -0,0 +1,64 | |||
|
1 | /*------------------------------------------------------------------------------ | |
|
2 | -- This file is a part of the LPP VHDL IP LIBRARY | |
|
3 | -- Copyright (C) 2009 - 2010, Laboratory of Plasmas Physic - CNRS | |
|
4 | -- | |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
|
6 | -- it under the terms of the GNU General Public License as published by | |
|
7 | -- the Free Software Foundation; either version 3 of the License, or | |
|
8 | -- (at your option) any later version. | |
|
9 | -- | |
|
10 | -- This program is distributed in the hope that it will be useful, | |
|
11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |
|
12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
|
13 | -- GNU General Public License for more details. | |
|
14 | -- | |
|
15 | -- You should have received a copy of the GNU General Public License | |
|
16 | -- along with this program; if not, write to the Free Software | |
|
17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
|
18 | ------------------------------------------------------------------------------- | |
|
19 | -- Author : Martin Morlot | |
|
20 | -- Mail : martin.morlot@lpp.polytechnique.fr | |
|
21 | -----------------------------------------------------------------------------*/ | |
|
22 | #ifndef APB_MATRIX_DRIVER_H | |
|
23 | #define APB_MATRIX_DRIVER_H | |
|
24 | ||
|
25 | /*! \file apb_Matrix_Driver.h | |
|
26 | \brief LPP MATRIX driver. | |
|
27 | ||
|
28 | This library is written to work with LPP_APB_MATRIX VHDL module from LPP's FreeVHDLIB. | |
|
29 | ||
|
30 | \author Martin Morlot martin.morlot@lpp.polytechnique.fr | |
|
31 | */ | |
|
32 | ||
|
33 | ||
|
34 | /*=================================================== | |
|
35 | T Y P E S D E F | |
|
36 | ====================================================*/ | |
|
37 | /*! \struct APB_MATRIX_REG | |
|
38 | \brief Sturcture representing the Matrix registers | |
|
39 | */ | |
|
40 | struct APB_MATRIX_REG | |
|
41 | { | |
|
42 | int Statu; /**< \brief Statu register, To know wich matrix calcul is doing */ | |
|
43 | }; | |
|
44 | ||
|
45 | typedef volatile struct APB_MATRIX_REG MATRIX_Device; | |
|
46 | ||
|
47 | /*=================================================== | |
|
48 | F U N C T I O N S | |
|
49 | ====================================================*/ | |
|
50 | /*! \fn MATRIX_Device* openMatrix(int count); | |
|
51 | \brief Return count Matrix. | |
|
52 | ||
|
53 | This Function scans APB devices table and returns count Matrix. | |
|
54 | ||
|
55 | \param count The number of the Matrix you whant to get. For example if you have 3 Matrixs on your SOC you want | |
|
56 | to use Matrix0 so count = 0. | |
|
57 | \return The pointer to the device. | |
|
58 | */ | |
|
59 | MATRIX_Device* openMatrix(int count); | |
|
60 | ||
|
61 | ||
|
62 | ||
|
63 | ||
|
64 | #endif |
@@ -0,0 +1,25 | |||
|
1 | #------------------------------------------------------------------------------ | |
|
2 | #-- This file is a part of the LPP VHDL IP LIBRARY | |
|
3 | #-- Copyright (C) 2009 - 2010, Laboratory of Plasmas Physic - CNRS | |
|
4 | #-- | |
|
5 | #-- This program is free software; you can redistribute it and/or modify | |
|
6 | #-- it under the terms of the GNU General Public License as published by | |
|
7 | #-- the Free Software Foundation; either version 3 of the License, or | |
|
8 | #-- (at your option) any later version. | |
|
9 | #-- | |
|
10 | #-- This program is distributed in the hope that it will be useful, | |
|
11 | #-- but WITHOUT ANY WARRANTY; without even the implied warranty of | |
|
12 | #-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
|
13 | #-- GNU General Public License for more details. | |
|
14 | #-- | |
|
15 | #-- You should have received a copy of the GNU General Public License | |
|
16 | #-- along with this program; if not, write to the Free Software | |
|
17 | #-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
|
18 | #------------------------------------------------------------------------------ | |
|
19 | FILE = apb_Matrix_Driver | |
|
20 | LIB = liblpp_Matrix_Driver.a | |
|
21 | ||
|
22 | include ../../rules.mk | |
|
23 | ||
|
24 | all: $(FILE).a | |
|
25 | @echo $(FILE)".a created" |
@@ -0,0 +1,35 | |||
|
1 | /*------------------------------------------------------------------------------ | |
|
2 | -- This file is a part of the LPP VHDL IP LIBRARY | |
|
3 | -- Copyright (C) 2009 - 2010, Laboratory of Plasmas Physic - CNRS | |
|
4 | -- | |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
|
6 | -- it under the terms of the GNU General Public License as published by | |
|
7 | -- the Free Software Foundation; either version 3 of the License, or | |
|
8 | -- (at your option) any later version. | |
|
9 | -- | |
|
10 | -- This program is distributed in the hope that it will be useful, | |
|
11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |
|
12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
|
13 | -- GNU General Public License for more details. | |
|
14 | -- | |
|
15 | -- You should have received a copy of the GNU General Public License | |
|
16 | -- along with this program; if not, write to the Free Software | |
|
17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
|
18 | ------------------------------------------------------------------------------- | |
|
19 | -- Author : Martin Morlot | |
|
20 | -- Mail : martin.morlot@lpp.polytechnique.fr | |
|
21 | -----------------------------------------------------------------------------*/ | |
|
22 | #include "lpp_apb_functions.h" | |
|
23 | #include "apb_Matrix_Driver.h" | |
|
24 | #include <stdio.h> | |
|
25 | ||
|
26 | ||
|
27 | MATRIX_Device* openMatrix(int count) | |
|
28 | { | |
|
29 | MATRIX_Device* Mspec0; | |
|
30 | Mspec0 = (MATRIX_Device*) apbgetdevice(LPP_MATRIX,VENDOR_LPP,count); | |
|
31 | return Mspec0; | |
|
32 | } | |
|
33 | ||
|
34 | ||
|
35 |
@@ -0,0 +1,64 | |||
|
1 | /*------------------------------------------------------------------------------ | |
|
2 | -- This file is a part of the LPP VHDL IP LIBRARY | |
|
3 | -- Copyright (C) 2009 - 2010, Laboratory of Plasmas Physic - CNRS | |
|
4 | -- | |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
|
6 | -- it under the terms of the GNU General Public License as published by | |
|
7 | -- the Free Software Foundation; either version 3 of the License, or | |
|
8 | -- (at your option) any later version. | |
|
9 | -- | |
|
10 | -- This program is distributed in the hope that it will be useful, | |
|
11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |
|
12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
|
13 | -- GNU General Public License for more details. | |
|
14 | -- | |
|
15 | -- You should have received a copy of the GNU General Public License | |
|
16 | -- along with this program; if not, write to the Free Software | |
|
17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
|
18 | ------------------------------------------------------------------------------- | |
|
19 | -- Author : Martin Morlot | |
|
20 | -- Mail : martin.morlot@lpp.polytechnique.fr | |
|
21 | -----------------------------------------------------------------------------*/ | |
|
22 | #ifndef APB_MATRIX_DRIVER_H | |
|
23 | #define APB_MATRIX_DRIVER_H | |
|
24 | ||
|
25 | /*! \file apb_Matrix_Driver.h | |
|
26 | \brief LPP MATRIX driver. | |
|
27 | ||
|
28 | This library is written to work with LPP_APB_MATRIX VHDL module from LPP's FreeVHDLIB. | |
|
29 | ||
|
30 | \author Martin Morlot martin.morlot@lpp.polytechnique.fr | |
|
31 | */ | |
|
32 | ||
|
33 | ||
|
34 | /*=================================================== | |
|
35 | T Y P E S D E F | |
|
36 | ====================================================*/ | |
|
37 | /*! \struct APB_MATRIX_REG | |
|
38 | \brief Sturcture representing the Matrix registers | |
|
39 | */ | |
|
40 | struct APB_MATRIX_REG | |
|
41 | { | |
|
42 | int Statu; /**< \brief Statu register, To know wich matrix calcul is doing */ | |
|
43 | }; | |
|
44 | ||
|
45 | typedef volatile struct APB_MATRIX_REG MATRIX_Device; | |
|
46 | ||
|
47 | /*=================================================== | |
|
48 | F U N C T I O N S | |
|
49 | ====================================================*/ | |
|
50 | /*! \fn MATRIX_Device* openMatrix(int count); | |
|
51 | \brief Return count Matrix. | |
|
52 | ||
|
53 | This Function scans APB devices table and returns count Matrix. | |
|
54 | ||
|
55 | \param count The number of the Matrix you whant to get. For example if you have 3 Matrixs on your SOC you want | |
|
56 | to use Matrix0 so count = 0. | |
|
57 | \return The pointer to the device. | |
|
58 | */ | |
|
59 | MATRIX_Device* openMatrix(int count); | |
|
60 | ||
|
61 | ||
|
62 | ||
|
63 | ||
|
64 | #endif |
@@ -1,44 +1,44 | |||
|
1 | /*------------------------------------------------------------------------------ | |
|
2 | -- This file is a part of the LPP VHDL IP LIBRARY | |
|
3 | -- Copyright (C) 2009 - 2010, Laboratory of Plasmas Physic - CNRS | |
|
4 | -- | |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
|
6 | -- it under the terms of the GNU General Public License as published by | |
|
7 | -- the Free Software Foundation; either version 3 of the License, or | |
|
8 | -- (at your option) any later version. | |
|
9 | -- | |
|
10 | -- This program is distributed in the hope that it will be useful, | |
|
11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |
|
12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
|
13 | -- GNU General Public License for more details. | |
|
14 | -- | |
|
15 | -- You should have received a copy of the GNU General Public License | |
|
16 | -- along with this program; if not, write to the Free Software | |
|
17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
|
18 | -------------------------------------------------------------------------------*/ | |
|
19 | #include "stdio.h" | |
|
1 | /*------------------------------------------------------------------------------ | |
|
2 | -- This file is a part of the LPP VHDL IP LIBRARY | |
|
3 | -- Copyright (C) 2009 - 2010, Laboratory of Plasmas Physic - CNRS | |
|
4 | -- | |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
|
6 | -- it under the terms of the GNU General Public License as published by | |
|
7 | -- the Free Software Foundation; either version 3 of the License, or | |
|
8 | -- (at your option) any later version. | |
|
9 | -- | |
|
10 | -- This program is distributed in the hope that it will be useful, | |
|
11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |
|
12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
|
13 | -- GNU General Public License for more details. | |
|
14 | -- | |
|
15 | -- You should have received a copy of the GNU General Public License | |
|
16 | -- along with this program; if not, write to the Free Software | |
|
17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
|
18 | -------------------------------------------------------------------------------*/ | |
|
19 | #include "stdio.h" | |
|
20 | 20 | #include "lpp_apb_functions.h" |
|
21 | #include "apb_fifo_Driver.h" | |
|
22 | ||
|
23 | ||
|
24 | ||
|
25 | int main() | |
|
26 | { | |
|
21 | #include "apb_fifo_Driver.h" | |
|
22 | ||
|
23 | ||
|
24 | ||
|
25 | int main() | |
|
26 | { | |
|
27 | 27 | int d=0; |
|
28 | 28 | int i=0; |
|
29 |
|
|
|
30 |
FIFO0 = |
|
|
29 | FIFO_Device* FIFO0; | |
|
30 | FIFO0 = openFIFO(0); | |
|
31 | 31 | |
|
32 | 32 | for(i=0;i<1024;i++) |
|
33 | 33 | { |
|
34 | 34 | FIFO0->rwdata = i; |
|
35 | 35 | } |
|
36 | 36 | |
|
37 | 37 | for(i=0;i<1024;i++) |
|
38 | 38 | { |
|
39 | 39 | printf("%x",FIFO0->rwdata); |
|
40 | } | |
|
40 | } | |
|
41 | ||
|
41 | 42 | |
|
42 | ||
|
43 | return 0; | |
|
44 | } | |
|
43 | return 0; | |
|
44 | } |
@@ -1,29 +1,30 | |||
|
1 | 1 | #------------------------------------------------------------------------------ |
|
2 | 2 | #-- This file is a part of the LPP VHDL IP LIBRARY |
|
3 | 3 | #-- Copyright (C) 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 | |
|
20 | 20 | |
|
21 | 21 | |
|
22 | 22 | all: |
|
23 | 23 | make all -C ScanAPB |
|
24 | 24 | make all -C APB_lcd_ctrlr |
|
25 | 25 | make all -C BenchFIFO |
|
26 | 26 | make all -C BenchUART |
|
27 | 27 | make all -C BenchFFT |
|
28 | 28 | make all -C BenchGPIO |
|
29 | make all -C BenchMatrix | |
|
29 | 30 |
@@ -1,60 +1,60 | |||
|
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 | -- Author : Martin Morlot |
|
20 | 20 | -- Mail : martin.morlot@lpp.polytechnique.fr |
|
21 | 21 | -----------------------------------------------------------------------------*/ |
|
22 | 22 | #ifndef APB_CNA_DRIVER_H |
|
23 | 23 | #define APB_CNA_DRIVER_H |
|
24 | 24 | |
|
25 | 25 | #define DAC_ready 3 |
|
26 | 26 | #define DAC_enable 1 |
|
27 | 27 | #define DAC_disable 0 |
|
28 | 28 | |
|
29 | 29 | |
|
30 | 30 | /*=================================================== |
|
31 | 31 | T Y P E S D E F |
|
32 | 32 | ====================================================*/ |
|
33 | 33 | |
|
34 | 34 | /** Structure repr�sentant le registre du CNA */ |
|
35 | 35 | struct DAC_Driver |
|
36 | 36 | { |
|
37 | 37 | int configReg; /**< Registre de configuration: Flag Ready [1] ; Flag Enable [0] */ |
|
38 | 38 | int dataReg; /**< Registre de donn�e sur 16 bits */ |
|
39 | 39 | }; |
|
40 | 40 | |
|
41 | typedef struct DAC_Driver DAC_Device; | |
|
41 | typedef volatile struct DAC_Driver DAC_Device; | |
|
42 | 42 | |
|
43 | 43 | /*=================================================== |
|
44 | 44 | F U N C T I O N S |
|
45 | 45 | ====================================================*/ |
|
46 | 46 | |
|
47 | 47 | /** Ouvre l'acc� au CNA */ |
|
48 | 48 | DAC_Device* DacOpen(int count); |
|
49 | 49 | |
|
50 | 50 | //DAC_Device* DacClose(int count); |
|
51 | 51 | |
|
52 | 52 | /** Les donn�es sont lus a partir d'un tableau pour obtenir le signal de CAL (10Khz + 625hz) */ |
|
53 | 53 | int DacTable(); |
|
54 | 54 | |
|
55 | 55 | /** Les donn�es sont entr�e par l'utilisateur, la conversion se fait a chaque nouvelle donn�e */ |
|
56 | 56 | int DacConst(); |
|
57 | 57 | |
|
58 | 58 | |
|
59 | 59 | |
|
60 | 60 | #endif |
@@ -1,52 +1,113 | |||
|
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 | -- Author : Martin Morlot |
|
20 | 20 | -- Mail : martin.morlot@lpp.polytechnique.fr |
|
21 | 21 | -----------------------------------------------------------------------------*/ |
|
22 |
#ifndef APB_ |
|
|
23 |
#define APB_ |
|
|
22 | #ifndef APB_DELAY_DRIVER_H | |
|
23 | #define APB_DELAY_DRIVER_H | |
|
24 | 24 | |
|
25 | /*! \file apb_delay_Driver.h | |
|
26 | \brief LPP Interupt driver. | |
|
27 | ||
|
28 | This library is written to work with LPP_APB_DELAY VHDL module from LPP's FreeVHDLIB. | |
|
25 | 29 |
|
|
26 | #define Delay_End 0x111 | |
|
30 | \author Martin Morlot martin.morlot@lpp.polytechnique.fr | |
|
31 | */ | |
|
32 | ||
|
33 | #define Delay_End 0x00001000 /**< Used to know when the VHDL delay counter stoped counting */ | |
|
27 | 34 | |
|
28 | 35 | /*=================================================== |
|
29 | 36 | T Y P E S D E F |
|
30 | 37 | ====================================================*/ |
|
31 | ||
|
38 | /*! \struct DELAY_REG | |
|
39 | \brief Sturcture representing the Delay registers | |
|
40 | */ | |
|
32 | 41 | struct DELAY_REG |
|
33 | 42 | { |
|
34 | int Cfg; | |
|
35 | int Fboard; | |
|
36 | int Timer; | |
|
43 | int Cfg; /**< \brief Configuration register composed of Reset function [HEX 0] | |
|
44 | Start Flag [HEX 1] | |
|
45 | End Flag Received [HEX 2] | |
|
46 | End Flag [HEX 3] */ | |
|
47 | int Fboard; /**< \brief Board Frequency register */ | |
|
48 | int Timer; /**< \brief Delay duration register */ | |
|
37 | 49 | }; |
|
38 | 50 | |
|
39 | 51 | typedef volatile struct DELAY_REG DELAY_Device; |
|
40 | 52 | |
|
41 | 53 | /*=================================================== |
|
42 | 54 | F U N C T I O N S |
|
43 | 55 | ====================================================*/ |
|
56 | /*! \fn DELAY_Device* openDELAY(int count); | |
|
57 | \brief Return count Delay. | |
|
58 | ||
|
59 | This Function scans APB devices table and returns count Delay. | |
|
60 | ||
|
61 | \param count The number of the Delay you whant to get. For example if you have 3 Delays on your SOC you want | |
|
62 | to use Delay1 so count = 1. | |
|
63 | \return The pointer to the device. | |
|
64 | */ | |
|
65 | DELAY_Device* openDELAY(int count); | |
|
44 | 66 | |
|
45 | DELAY_Device* openDELAY(int count); | |
|
67 | /*! \fn int Setup(DELAY_Device* dev,int X); | |
|
68 | \brief Setup the device | |
|
69 | ||
|
70 | This function setup the device, reset and Board frequency. | |
|
71 | ||
|
72 | \param dev The Delay pointer. | |
|
73 | \param X the Board frequency. | |
|
74 | */ | |
|
75 | int Setup(DELAY_Device* dev,int X); | |
|
76 | ||
|
77 | /*! \fn int Delay_us(DELAY_Device* dev,int T); | |
|
78 | \brief Generate delay | |
|
79 | ||
|
80 | This function genrate a delay in microsecond. | |
|
81 | ||
|
82 | \param dev The Delay pointer. | |
|
83 | \param T the Delay duration in us. | |
|
84 | */ | |
|
46 | 85 | int Delay_us(DELAY_Device* dev,int T); |
|
86 | ||
|
87 | /*! \fn int Delay_ms(DELAY_Device* dev,int T); | |
|
88 | \brief Generate delay | |
|
89 | ||
|
90 | This function genrate a delay in milisecond. | |
|
91 | ||
|
92 | \param dev The Delay pointer. | |
|
93 | \param T the Delay duration in ms. | |
|
94 | */ | |
|
47 | 95 | int Delay_ms(DELAY_Device* dev,int T); |
|
96 | ||
|
97 | /*! \fn int Delay_s(DELAY_Device* dev,int T); | |
|
98 | \brief Generate delay | |
|
99 | ||
|
100 | This function genrate a delay in second. | |
|
101 | ||
|
102 | \param dev The Delay pointer. | |
|
103 | \param T the Delay duration in s. | |
|
104 | */ | |
|
48 | 105 | int Delay_s(DELAY_Device* dev,int T); |
|
49 | int Setup(DELAY_Device* dev,int X); | |
|
106 | ||
|
107 | ||
|
108 | ||
|
109 | ||
|
110 | ||
|
50 | 111 | |
|
51 | 112 | |
|
52 | 113 | #endif |
@@ -1,98 +1,97 | |||
|
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 | -- Author : Martin Morlot |
|
20 | 20 | -- Mail : martin.morlot@lpp.polytechnique.fr |
|
21 | 21 | -----------------------------------------------------------------------------*/ |
|
22 | 22 | #ifndef APB_FFT_DRIVER_H |
|
23 | 23 | #define APB_FFT_DRIVER_H |
|
24 | 24 | |
|
25 | 25 | /*! \file apb_fft_Driver.h |
|
26 | 26 | \brief LPP FFT driver. |
|
27 | 27 | |
|
28 | 28 | This library is written to work with LPP_APB_FFT VHDL module from LPP's FreeVHDLIB. It calculate a fast fourier transforms, |
|
29 | 29 | from an input data table. |
|
30 | 30 | |
|
31 | \todo Check "DEVICE1 => count = 2" function Open | |
|
32 | 31 | \author Martin Morlot martin.morlot@lpp.polytechnique.fr |
|
33 | 32 | */ |
|
34 | 33 | |
|
35 | 34 | #define FFT_Empty 0x00100 /**< Used to know when the data can be send to the FFT module */ |
|
36 | 35 | #define FFT_Full 0x01000 /**< Used to know when the data can be send to the FFT module */ |
|
37 | 36 | |
|
38 | 37 | |
|
39 | 38 | /*=================================================== |
|
40 | 39 | T Y P E S D E F |
|
41 | 40 | ====================================================*/ |
|
42 | 41 | /*! \struct FFT_Driver |
|
43 | 42 | \brief Sturcture representing the fft registers |
|
44 | 43 | */ |
|
45 | 44 | struct FFT_Driver |
|
46 | 45 | { |
|
47 | 46 | int RWDataReg; /**< \brief Data register Write/Read */ |
|
48 | 47 | int ReadAddrReg; /**< \brief Address register for the reading operation */ |
|
49 | 48 | int ConfigReg; /**< \brief Configuration register composed of Read enable Flag [HEX 0] |
|
50 | 49 | Write enable Flag [HEX 1] |
|
51 | 50 | Empty Flag [HEX 2] |
|
52 | 51 | Full Flag [HEX 3] |
|
53 | 52 | Dummy "C" [HEX 4/5/6/7] */ |
|
54 | 53 | int Dummy1; /**< \brief Unused register, aesthetic interest */ |
|
55 | 54 | int Dummy0; /**< \brief Unused register, aesthetic interest */ |
|
56 | 55 | int WriteAddrReg; /**< \brief Address register for the writing operation */ |
|
57 | 56 | }; |
|
58 | 57 | |
|
59 | typedef struct FFT_Driver FFT_Device; | |
|
58 | typedef volatile struct FFT_Driver FFT_Device; | |
|
60 | 59 | |
|
61 | 60 | |
|
62 | 61 | /*=================================================== |
|
63 | 62 | F U N C T I O N S |
|
64 | 63 | ====================================================*/ |
|
65 | 64 | /*! \fn FFT_Device* openFFT(int count); |
|
66 | 65 | \brief Return count FFT. |
|
67 | 66 | |
|
68 | 67 | This Function scans APB devices table and returns count FFT. |
|
69 | 68 | |
|
70 | 69 | \param count The number of the FFT you whant to get. For example if you have 3 FFTS on your SOC you want |
|
71 |
to use FFT1 so count = |
|
|
70 | to use FFT1 so count = 1. | |
|
72 | 71 | \return The pointer to the device. |
|
73 | 72 | */ |
|
74 | 73 | FFT_Device* openFFT(int count); |
|
75 | 74 | |
|
76 | 75 | /*! \fn int FftInput(int Tbl[],FFT_Device*); |
|
77 | 76 | \brief Fill in the Input for the FFT |
|
78 | 77 | |
|
79 | 78 | This function provides the data used by the FFT |
|
80 | 79 | |
|
81 | 80 | \param Tbl[] The Table which contains the Data. |
|
82 | 81 | \param dev The FFT pointer. |
|
83 | 82 | */ |
|
84 | 83 | int FftInput(int Tbl[],FFT_Device* dev); |
|
85 | 84 | |
|
86 | 85 | /*! \fn int FftOutput(int Tbl[],FFT_Device*); |
|
87 | 86 | \brief Save data from the FFT |
|
88 | 87 | |
|
89 | 88 | This function save the data generated by the FFT |
|
90 | 89 | |
|
91 | 90 | \param Tbl[] The Table which will contains the Data. |
|
92 | 91 | \param dev The FFT pointer. |
|
93 | 92 | */ |
|
94 | 93 | int FftOutput(int Tbl[],FFT_Device* dev); |
|
95 | 94 | |
|
96 | 95 | |
|
97 | 96 | |
|
98 | 97 | #endif |
@@ -1,76 +1,90 | |||
|
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 | -- Author : Martin Morlot |
|
20 | 20 | -- Mail : martin.morlot@lpp.polytechnique.fr |
|
21 | 21 | -----------------------------------------------------------------------------*/ |
|
22 | 22 | #ifndef APB_FIFO_DRIVER_H |
|
23 | 23 | #define APB_FIFO_DRIVER_H |
|
24 | 24 | |
|
25 | 25 | /*! \file apb_fifo_Driver.h |
|
26 | 26 | \brief LPP FIFO driver. |
|
27 | 27 | |
|
28 | 28 | This library is written to work with LPP_APB_FIFO VHDL module from LPP's FreeVHDLIB. It represents a standard FIFO working, |
|
29 | 29 | used in many type of application. |
|
30 | 30 | |
|
31 | \todo Check "DEVICE1 => count = 2" function Open | |
|
32 | 31 | \author Martin Morlot martin.morlot@lpp.polytechnique.fr |
|
33 | 32 | */ |
|
33 | #define FIFO_Empty 0x00000100 /**< Show that the FIFO is Empty */ | |
|
34 | #define FIFO_Full 0x00001000 /**< Show that the FIFO is Full */ | |
|
35 | #define Boucle 0x00110000 /**< Configuration for reused the same value of the FIFO */ | |
|
36 | #define NoBoucle 0xFFEEFFFF /**< Unlock the previous configuration */ | |
|
34 | 37 | |
|
35 | 38 | |
|
36 | 39 | /*=================================================== |
|
37 | 40 | T Y P E S D E F |
|
38 | 41 | ====================================================*/ |
|
39 | 42 | |
|
40 | 43 | /*! \struct APB_FIFO_REG |
|
41 | 44 | \brief Sturcture representing the fifo registers |
|
42 | 45 | */ |
|
43 | 46 | struct APB_FIFO_REG |
|
44 | 47 | { |
|
45 | 48 | int rwdata; /**< \brief Data register Write/Read */ |
|
46 | 49 | int raddr; /**< \brief Address register for the reading operation */ |
|
47 | 50 | int cfgreg; /**< \brief Configuration register composed of Read enable Flag [HEX 0] |
|
48 | 51 | Write enable Flag [HEX 1] |
|
49 | 52 | Empty Flag [HEX 2] |
|
50 | 53 | Full Flag [HEX 3] |
|
51 |
|
|
|
54 | ReUse Flag [HEX 4] | |
|
55 | Lock Flag [HEX 5] | |
|
56 | Dummy "C" [HEX 6/7] */ | |
|
52 | 57 | int dummy0; /**< \brief Unused register, aesthetic interest */ |
|
53 | 58 | int dummy1; /**< \brief Unused register, aesthetic interest */ |
|
54 | 59 | int waddr; /**< \brief Address register for the writing operation */ |
|
55 | 60 | }; |
|
56 | 61 | |
|
57 |
typedef struct APB_FIFO_REG |
|
|
62 | typedef volatile struct APB_FIFO_REG FIFO_Device; | |
|
58 | 63 | |
|
59 | 64 | /*=================================================== |
|
60 | 65 | F U N C T I O N S |
|
61 | 66 | ====================================================*/ |
|
62 | 67 | |
|
63 | 68 | /*! \fn APB_FIFO_Device* apbfifoOpen(int count); |
|
64 | 69 | \brief Return count FIFO. |
|
65 | 70 | |
|
66 | 71 | This Function scans APB devices table and returns count FIFO. |
|
67 | 72 | |
|
68 | 73 | \param count The number of the FIFO you whant to get. For example if you have 3 FIFOS on your SOC you want |
|
69 |
to use FIFO1 so count = |
|
|
74 | to use FIFO1 so count = 1. | |
|
70 | 75 | \return The pointer to the device. |
|
71 | 76 | */ |
|
72 |
|
|
|
77 | FIFO_Device* openFIFO(int count); | |
|
73 | 78 | |
|
74 | ||
|
79 | /*! \fn int FillFifo(FIFO_Device* dev,int Tbl[],int A); | |
|
80 | \brief a Fill in FIFO function. | |
|
81 | ||
|
82 | This Function fill in the FIFO with a table data. | |
|
83 | ||
|
84 | \param dev The FFT pointer. | |
|
85 | \param Tbl[] The data table. | |
|
86 | \param A The data table size. | |
|
87 | */ | |
|
88 | int FillFifo(FIFO_Device* dev,int Tbl[],int A); | |
|
75 | 89 | |
|
76 | 90 | #endif |
@@ -1,46 +1,63 | |||
|
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 | -- Author : Martin Morlot |
|
20 | 20 | -- Mail : martin.morlot@lpp.polytechnique.fr |
|
21 | 21 | -----------------------------------------------------------------------------*/ |
|
22 | 22 | #ifndef APB_GPIO_DRIVER_H |
|
23 | 23 | #define APB_GPIO_DRIVER_H |
|
24 | 24 | |
|
25 | /*! \file apb_gpio_Driver.h | |
|
26 | \brief Gaisler GPIO driver. | |
|
27 | ||
|
28 | This library is written to work with Gaisler GPIO VHDL module. | |
|
29 | ||
|
30 | \author Martin Morlot martin.morlot@lpp.polytechnique.fr | |
|
31 | */ | |
|
25 | 32 | |
|
26 | 33 | /*=================================================== |
|
27 | 34 | T Y P E S D E F |
|
28 | 35 | ====================================================*/ |
|
29 | ||
|
36 | /*! \struct GPIO_REG | |
|
37 | \brief Sturcture representing the gpio registers | |
|
38 | */ | |
|
30 | 39 | struct GPIO_REG |
|
31 | 40 | { |
|
32 | int Din; | |
|
33 | int Dout; | |
|
34 | int oen; | |
|
41 | int Din; /**< \brief Input GPIO register */ | |
|
42 | int Dout; /**< \brief Output GPIO register */ | |
|
43 | int oen; /**< \brief Enable GPIO register */ | |
|
35 | 44 | }; |
|
36 | 45 | |
|
37 | typedef struct GPIO_REG GPIO_Device; | |
|
46 | typedef volatile struct GPIO_REG GPIO_Device; | |
|
38 | 47 | |
|
39 | 48 | /*=================================================== |
|
40 | 49 | F U N C T I O N S |
|
41 | 50 | ====================================================*/ |
|
42 | ||
|
51 | /*! \fn GPIO_Device* openGPIO(int count); | |
|
52 | \brief Return count GPIO. | |
|
53 | ||
|
54 | This Function scans APB devices table and returns count GPIO. | |
|
55 | ||
|
56 | \param count The number of the GPIO you whant to get. For example if you have 3 GPIOs on your SOC you want | |
|
57 | to use GPIO1 so count = 1. | |
|
58 | \return The pointer to the device. | |
|
59 | */ | |
|
43 | 60 | GPIO_Device* openGPIO(int count); |
|
44 | 61 | |
|
45 | 62 | |
|
46 | 63 | #endif |
@@ -1,118 +1,117 | |||
|
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 | -- Author : Martin Morlot |
|
20 | 20 | -- Mail : martin.morlot@lpp.polytechnique.fr |
|
21 | 21 | -----------------------------------------------------------------------------*/ |
|
22 | 22 | #ifndef APB_UART_DRIVER_H |
|
23 | 23 | #define APB_UART_DRIVER_H |
|
24 | 24 | |
|
25 | 25 | /*! \file apb_uart_Driver.h |
|
26 | 26 | \brief LPP Uart driver. |
|
27 | 27 | |
|
28 | 28 | This library is written to work with LPP_APB_UART VHDL module from LPP's FreeVHDLIB. It help you to print and get, |
|
29 | char or strings over uart. | |
|
30 | ||
|
31 | \todo Check "DEVICE1 => count = 2" function Open | |
|
29 | char or strings over uart. | |
|
30 | ||
|
32 | 31 | \author Martin Morlot martin.morlot@lpp.polytechnique.fr |
|
33 | 32 | */ |
|
34 | 33 | |
|
35 | 34 | |
|
36 | 35 | |
|
37 | 36 | #define BaudGenOnDuty 0 /**< Used to reset the Baud Generator (Capture Flag) */ |
|
38 | 37 | #define DataSended 0x10 /**< Used to know when the data was send */ |
|
39 | 38 | #define NewData 0x100 /**< Used to know if a New data is ready to be send */ |
|
40 | 39 | |
|
41 | 40 | /*=================================================== |
|
42 | 41 | T Y P E S D E F |
|
43 | 42 | ====================================================*/ |
|
44 | 43 | |
|
45 | 44 | /*! \struct UART_Driver |
|
46 | 45 | \brief Sturcture representing the uart registers |
|
47 | 46 | */ |
|
48 | 47 | struct UART_Driver |
|
49 | 48 | { |
|
50 | 49 | int ConfigReg; /**< \brief Configuration register composed of Capture Flag [HEX 0] |
|
51 | 50 | Sended Flag [HEX 1] |
|
52 | 51 | NewData Flag [HEX 2] |
|
53 | 52 | Dummy "E" [HEX 3/4] |
|
54 | 53 | BTrig Freq [HEX 5/6/7] */ |
|
55 | 54 | int DataWReg; /**< \brief Data Write register */ |
|
56 | 55 | int DataRReg; /**< \brief Data Read register */ |
|
57 | 56 | }; |
|
58 | 57 | |
|
59 | typedef struct UART_Driver UART_Device; | |
|
58 | typedef volatile struct UART_Driver UART_Device; | |
|
60 | 59 | |
|
61 | 60 | |
|
62 | 61 | /*=================================================== |
|
63 | 62 | F U N C T I O N S |
|
64 | 63 | ====================================================*/ |
|
65 | 64 | |
|
66 | 65 | /*! \fn UART_Device* openUART(int count); |
|
67 | 66 | \brief Return count UART. |
|
68 | 67 | |
|
69 | 68 | This Function scans APB devices table and returns count UART. |
|
70 | 69 | |
|
71 | 70 | \param count The number of the UART you whant to get. For example if you have 3 UARTS on your SOC you want |
|
72 |
to use UART1 so count = |
|
|
71 | to use UART1 so count = 1. | |
|
73 | 72 | \return The pointer to the device. |
|
74 | 73 | */ |
|
75 | 74 | UART_Device* openUART(int count); |
|
76 | 75 | |
|
77 | 76 | /*! \fn void uartputc(UART_Device* dev,char c); |
|
78 | 77 | \brief Print char over given UART. |
|
79 | 78 | |
|
80 | 79 | This Function puts the given char over the given UART. |
|
81 | 80 | |
|
82 | 81 | \param dev The UART pointer. |
|
83 | 82 | \param c The char you whant to print. |
|
84 | 83 | */ |
|
85 | 84 | void uartputc(UART_Device* dev,char c); |
|
86 | 85 | |
|
87 | 86 | /*! \fn void uartputs(UART_Device* dev,char* s); |
|
88 | 87 | \brief Print string over given UART. |
|
89 | 88 | |
|
90 | 89 | This Function puts the given string over the given UART. |
|
91 | 90 | |
|
92 | 91 | \param dev The UART pointer. |
|
93 | 92 | \param s The string you whant to print. |
|
94 | 93 | */ |
|
95 | 94 | void uartputs(UART_Device* dev,char* s); |
|
96 | 95 | |
|
97 | 96 | /*! \fn char uartgetc(UART_Device* dev); |
|
98 | 97 | \brief Get char from given UART. |
|
99 | 98 | |
|
100 | 99 | This Function get char from the given UART. |
|
101 | 100 | |
|
102 | 101 | \param dev The UART pointer. |
|
103 | 102 | \return The read char. |
|
104 | 103 | */ |
|
105 | 104 | char uartgetc(UART_Device* dev); |
|
106 | 105 | |
|
107 | 106 | /*! \fn void uartgets(UART_Device* dev,char* s); |
|
108 | 107 | \brief Get string from given UART. |
|
109 | 108 | |
|
110 | 109 | This Function get string from the given UART. |
|
111 | 110 | |
|
112 | 111 | \param dev The UART pointer. |
|
113 | 112 | \param s The read string. |
|
114 | 113 | */ |
|
115 | 114 | void uartgets(UART_Device* dev,char* s); |
|
116 | 115 | |
|
117 | 116 | |
|
118 | 117 | #endif |
@@ -1,60 +1,60 | |||
|
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 | -- Author : Martin Morlot |
|
20 | 20 | -- Mail : martin.morlot@lpp.polytechnique.fr |
|
21 | 21 | -----------------------------------------------------------------------------*/ |
|
22 | 22 | #ifndef APB_CNA_DRIVER_H |
|
23 | 23 | #define APB_CNA_DRIVER_H |
|
24 | 24 | |
|
25 | 25 | #define DAC_ready 3 |
|
26 | 26 | #define DAC_enable 1 |
|
27 | 27 | #define DAC_disable 0 |
|
28 | 28 | |
|
29 | 29 | |
|
30 | 30 | /*=================================================== |
|
31 | 31 | T Y P E S D E F |
|
32 | 32 | ====================================================*/ |
|
33 | 33 | |
|
34 | 34 | /** Structure repr�sentant le registre du CNA */ |
|
35 | 35 | struct DAC_Driver |
|
36 | 36 | { |
|
37 | 37 | int configReg; /**< Registre de configuration: Flag Ready [1] ; Flag Enable [0] */ |
|
38 | 38 | int dataReg; /**< Registre de donn�e sur 16 bits */ |
|
39 | 39 | }; |
|
40 | 40 | |
|
41 | typedef struct DAC_Driver DAC_Device; | |
|
41 | typedef volatile struct DAC_Driver DAC_Device; | |
|
42 | 42 | |
|
43 | 43 | /*=================================================== |
|
44 | 44 | F U N C T I O N S |
|
45 | 45 | ====================================================*/ |
|
46 | 46 | |
|
47 | 47 | /** Ouvre l'acc� au CNA */ |
|
48 | 48 | DAC_Device* DacOpen(int count); |
|
49 | 49 | |
|
50 | 50 | //DAC_Device* DacClose(int count); |
|
51 | 51 | |
|
52 | 52 | /** Les donn�es sont lus a partir d'un tableau pour obtenir le signal de CAL (10Khz + 625hz) */ |
|
53 | 53 | int DacTable(); |
|
54 | 54 | |
|
55 | 55 | /** Les donn�es sont entr�e par l'utilisateur, la conversion se fait a chaque nouvelle donn�e */ |
|
56 | 56 | int DacConst(); |
|
57 | 57 | |
|
58 | 58 | |
|
59 | 59 | |
|
60 | 60 | #endif |
@@ -1,78 +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 | -- Author : Martin Morlot |
|
20 | 20 | -- Mail : martin.morlot@lpp.polytechnique.fr |
|
21 | 21 | -----------------------------------------------------------------------------*/ |
|
22 | 22 | #include "lpp_apb_functions.h" |
|
23 | 23 | #include "apb_delay_Driver.h" |
|
24 | 24 | #include <stdio.h> |
|
25 | 25 | |
|
26 | 26 | |
|
27 | 27 | DELAY_Device* openDELAY(int count) |
|
28 | 28 | { |
|
29 | 29 | DELAY_Device* delay0; |
|
30 | 30 | delay0 = (DELAY_Device*) apbgetdevice(LPP_DELAY,VENDOR_LPP,count); |
|
31 | 31 | return delay0; |
|
32 | 32 | } |
|
33 | 33 | |
|
34 | 34 | int Setup(DELAY_Device* dev,int X) |
|
35 | 35 | { |
|
36 | 36 | dev->Fboard = X; |
|
37 | dev->Cfg = 0x001; | |
|
37 | 38 | return dev->Fboard; |
|
38 | 39 | } |
|
39 | 40 | |
|
40 | 41 | |
|
41 | 42 | int Delay_s(DELAY_Device* dev,int T) |
|
42 | 43 | { |
|
43 | 44 | dev->Timer = dev->Fboard * T; |
|
44 | dev->Cfg = 0x11; | |
|
45 | while(dev->Cfg != Delay_End); | |
|
46 | dev->Cfg = 0x01; | |
|
45 | dev->Cfg = 0x011; | |
|
46 | while((dev->Cfg & Delay_End)!= Delay_End); // TANT QUE end a 0 RIEN | |
|
47 | dev->Cfg = 0x101; | |
|
47 | 48 | return dev->Cfg; |
|
48 | 49 | } |
|
49 | 50 | |
|
50 | 51 | |
|
51 | 52 | int Delay_ms(DELAY_Device* dev,int T) |
|
52 | 53 | { |
|
53 | 54 | dev->Timer = (dev->Fboard / 1000) * T; |
|
54 | dev->Cfg = 0x11; | |
|
55 | while(dev->Cfg != Delay_End); | |
|
56 | dev->Cfg = 0x01; | |
|
55 | dev->Cfg = 0x011; | |
|
56 | while((dev->Cfg & Delay_End)!= Delay_End); // TANT QUE end a 0 RIEN | |
|
57 | dev->Cfg = 0x101; | |
|
57 | 58 | return dev->Cfg; |
|
58 | 59 | } |
|
59 | 60 | |
|
60 | 61 | |
|
61 | 62 | int Delay_us(DELAY_Device* dev,int T) |
|
62 | 63 | { |
|
63 | 64 | dev->Timer = (dev->Fboard / 1000000) * T; |
|
64 | dev->Cfg = 0x11; | |
|
65 | while(dev->Cfg != Delay_End); | |
|
66 | dev->Cfg = 0x01; | |
|
65 | dev->Cfg = 0x011; | |
|
66 | while((dev->Cfg & Delay_End)!= Delay_End); // TANT QUE end a 0 RIEN | |
|
67 | dev->Cfg = 0x101; | |
|
67 | 68 | return dev->Cfg; |
|
68 | 69 | } |
|
69 | 70 | |
|
70 | 71 | |
|
71 | 72 | |
|
72 | 73 | |
|
73 | 74 | |
|
74 | 75 | |
|
75 | 76 | |
|
76 | 77 | |
|
77 | 78 | |
|
78 | 79 |
@@ -1,52 +1,113 | |||
|
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 | -- Author : Martin Morlot |
|
20 | 20 | -- Mail : martin.morlot@lpp.polytechnique.fr |
|
21 | 21 | -----------------------------------------------------------------------------*/ |
|
22 |
#ifndef APB_ |
|
|
23 |
#define APB_ |
|
|
22 | #ifndef APB_DELAY_DRIVER_H | |
|
23 | #define APB_DELAY_DRIVER_H | |
|
24 | 24 | |
|
25 | /*! \file apb_delay_Driver.h | |
|
26 | \brief LPP Interupt driver. | |
|
27 | ||
|
28 | This library is written to work with LPP_APB_DELAY VHDL module from LPP's FreeVHDLIB. | |
|
25 | 29 |
|
|
26 | #define Delay_End 0x111 | |
|
30 | \author Martin Morlot martin.morlot@lpp.polytechnique.fr | |
|
31 | */ | |
|
32 | ||
|
33 | #define Delay_End 0x00001000 /**< Used to know when the VHDL delay counter stoped counting */ | |
|
27 | 34 | |
|
28 | 35 | /*=================================================== |
|
29 | 36 | T Y P E S D E F |
|
30 | 37 | ====================================================*/ |
|
31 | ||
|
38 | /*! \struct DELAY_REG | |
|
39 | \brief Sturcture representing the Delay registers | |
|
40 | */ | |
|
32 | 41 | struct DELAY_REG |
|
33 | 42 | { |
|
34 | int Cfg; | |
|
35 | int Fboard; | |
|
36 | int Timer; | |
|
43 | int Cfg; /**< \brief Configuration register composed of Reset function [HEX 0] | |
|
44 | Start Flag [HEX 1] | |
|
45 | End Flag Received [HEX 2] | |
|
46 | End Flag [HEX 3] */ | |
|
47 | int Fboard; /**< \brief Board Frequency register */ | |
|
48 | int Timer; /**< \brief Delay duration register */ | |
|
37 | 49 | }; |
|
38 | 50 | |
|
39 | 51 | typedef volatile struct DELAY_REG DELAY_Device; |
|
40 | 52 | |
|
41 | 53 | /*=================================================== |
|
42 | 54 | F U N C T I O N S |
|
43 | 55 | ====================================================*/ |
|
56 | /*! \fn DELAY_Device* openDELAY(int count); | |
|
57 | \brief Return count Delay. | |
|
58 | ||
|
59 | This Function scans APB devices table and returns count Delay. | |
|
60 | ||
|
61 | \param count The number of the Delay you whant to get. For example if you have 3 Delays on your SOC you want | |
|
62 | to use Delay1 so count = 1. | |
|
63 | \return The pointer to the device. | |
|
64 | */ | |
|
65 | DELAY_Device* openDELAY(int count); | |
|
44 | 66 | |
|
45 | DELAY_Device* openDELAY(int count); | |
|
67 | /*! \fn int Setup(DELAY_Device* dev,int X); | |
|
68 | \brief Setup the device | |
|
69 | ||
|
70 | This function setup the device, reset and Board frequency. | |
|
71 | ||
|
72 | \param dev The Delay pointer. | |
|
73 | \param X the Board frequency. | |
|
74 | */ | |
|
75 | int Setup(DELAY_Device* dev,int X); | |
|
76 | ||
|
77 | /*! \fn int Delay_us(DELAY_Device* dev,int T); | |
|
78 | \brief Generate delay | |
|
79 | ||
|
80 | This function genrate a delay in microsecond. | |
|
81 | ||
|
82 | \param dev The Delay pointer. | |
|
83 | \param T the Delay duration in us. | |
|
84 | */ | |
|
46 | 85 | int Delay_us(DELAY_Device* dev,int T); |
|
86 | ||
|
87 | /*! \fn int Delay_ms(DELAY_Device* dev,int T); | |
|
88 | \brief Generate delay | |
|
89 | ||
|
90 | This function genrate a delay in milisecond. | |
|
91 | ||
|
92 | \param dev The Delay pointer. | |
|
93 | \param T the Delay duration in ms. | |
|
94 | */ | |
|
47 | 95 | int Delay_ms(DELAY_Device* dev,int T); |
|
96 | ||
|
97 | /*! \fn int Delay_s(DELAY_Device* dev,int T); | |
|
98 | \brief Generate delay | |
|
99 | ||
|
100 | This function genrate a delay in second. | |
|
101 | ||
|
102 | \param dev The Delay pointer. | |
|
103 | \param T the Delay duration in s. | |
|
104 | */ | |
|
48 | 105 | int Delay_s(DELAY_Device* dev,int T); |
|
49 | int Setup(DELAY_Device* dev,int X); | |
|
106 | ||
|
107 | ||
|
108 | ||
|
109 | ||
|
110 | ||
|
50 | 111 | |
|
51 | 112 | |
|
52 | 113 | #endif |
@@ -1,98 +1,97 | |||
|
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 | -- Author : Martin Morlot |
|
20 | 20 | -- Mail : martin.morlot@lpp.polytechnique.fr |
|
21 | 21 | -----------------------------------------------------------------------------*/ |
|
22 | 22 | #ifndef APB_FFT_DRIVER_H |
|
23 | 23 | #define APB_FFT_DRIVER_H |
|
24 | 24 | |
|
25 | 25 | /*! \file apb_fft_Driver.h |
|
26 | 26 | \brief LPP FFT driver. |
|
27 | 27 | |
|
28 | 28 | This library is written to work with LPP_APB_FFT VHDL module from LPP's FreeVHDLIB. It calculate a fast fourier transforms, |
|
29 | 29 | from an input data table. |
|
30 | 30 | |
|
31 | \todo Check "DEVICE1 => count = 2" function Open | |
|
32 | 31 | \author Martin Morlot martin.morlot@lpp.polytechnique.fr |
|
33 | 32 | */ |
|
34 | 33 | |
|
35 | 34 | #define FFT_Empty 0x00100 /**< Used to know when the data can be send to the FFT module */ |
|
36 | 35 | #define FFT_Full 0x01000 /**< Used to know when the data can be send to the FFT module */ |
|
37 | 36 | |
|
38 | 37 | |
|
39 | 38 | /*=================================================== |
|
40 | 39 | T Y P E S D E F |
|
41 | 40 | ====================================================*/ |
|
42 | 41 | /*! \struct FFT_Driver |
|
43 | 42 | \brief Sturcture representing the fft registers |
|
44 | 43 | */ |
|
45 | 44 | struct FFT_Driver |
|
46 | 45 | { |
|
47 | 46 | int RWDataReg; /**< \brief Data register Write/Read */ |
|
48 | 47 | int ReadAddrReg; /**< \brief Address register for the reading operation */ |
|
49 | 48 | int ConfigReg; /**< \brief Configuration register composed of Read enable Flag [HEX 0] |
|
50 | 49 | Write enable Flag [HEX 1] |
|
51 | 50 | Empty Flag [HEX 2] |
|
52 | 51 | Full Flag [HEX 3] |
|
53 | 52 | Dummy "C" [HEX 4/5/6/7] */ |
|
54 | 53 | int Dummy1; /**< \brief Unused register, aesthetic interest */ |
|
55 | 54 | int Dummy0; /**< \brief Unused register, aesthetic interest */ |
|
56 | 55 | int WriteAddrReg; /**< \brief Address register for the writing operation */ |
|
57 | 56 | }; |
|
58 | 57 | |
|
59 | typedef struct FFT_Driver FFT_Device; | |
|
58 | typedef volatile struct FFT_Driver FFT_Device; | |
|
60 | 59 | |
|
61 | 60 | |
|
62 | 61 | /*=================================================== |
|
63 | 62 | F U N C T I O N S |
|
64 | 63 | ====================================================*/ |
|
65 | 64 | /*! \fn FFT_Device* openFFT(int count); |
|
66 | 65 | \brief Return count FFT. |
|
67 | 66 | |
|
68 | 67 | This Function scans APB devices table and returns count FFT. |
|
69 | 68 | |
|
70 | 69 | \param count The number of the FFT you whant to get. For example if you have 3 FFTS on your SOC you want |
|
71 |
to use FFT1 so count = |
|
|
70 | to use FFT1 so count = 1. | |
|
72 | 71 | \return The pointer to the device. |
|
73 | 72 | */ |
|
74 | 73 | FFT_Device* openFFT(int count); |
|
75 | 74 | |
|
76 | 75 | /*! \fn int FftInput(int Tbl[],FFT_Device*); |
|
77 | 76 | \brief Fill in the Input for the FFT |
|
78 | 77 | |
|
79 | 78 | This function provides the data used by the FFT |
|
80 | 79 | |
|
81 | 80 | \param Tbl[] The Table which contains the Data. |
|
82 | 81 | \param dev The FFT pointer. |
|
83 | 82 | */ |
|
84 | 83 | int FftInput(int Tbl[],FFT_Device* dev); |
|
85 | 84 | |
|
86 | 85 | /*! \fn int FftOutput(int Tbl[],FFT_Device*); |
|
87 | 86 | \brief Save data from the FFT |
|
88 | 87 | |
|
89 | 88 | This function save the data generated by the FFT |
|
90 | 89 | |
|
91 | 90 | \param Tbl[] The Table which will contains the Data. |
|
92 | 91 | \param dev The FFT pointer. |
|
93 | 92 | */ |
|
94 | 93 | int FftOutput(int Tbl[],FFT_Device* dev); |
|
95 | 94 | |
|
96 | 95 | |
|
97 | 96 | |
|
98 | 97 | #endif |
@@ -1,35 +1,45 | |||
|
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 | -- Author : Martin Morlot |
|
20 | 20 | -- Mail : martin.morlot@lpp.polytechnique.fr |
|
21 | 21 | -----------------------------------------------------------------------------*/ |
|
22 | 22 | #include "lpp_apb_functions.h" |
|
23 | 23 | #include "apb_fifo_Driver.h" |
|
24 | 24 | #include <stdio.h> |
|
25 | 25 | |
|
26 | 26 | |
|
27 |
|
|
|
27 | FIFO_Device* openFIFO(int count) | |
|
28 | 28 | { |
|
29 |
|
|
|
30 |
fifo0 = ( |
|
|
29 | FIFO_Device* fifo0; | |
|
30 | fifo0 = (FIFO_Device*) apbgetdevice(LPP_FIFO,VENDOR_LPP,count); | |
|
31 | 31 | return fifo0; |
|
32 | 32 | } |
|
33 | 33 | |
|
34 | ||
|
35 | ||
|
34 | ||
|
35 | int FillFifo(FIFO_Device* dev,int Tbl[],int A) | |
|
36 | { | |
|
37 | int i=0; | |
|
38 | while(i <= A) | |
|
39 | { | |
|
40 | dev->rwdata = Tbl[i]; | |
|
41 | i++; | |
|
42 | } | |
|
43 | ||
|
44 | return 0; | |
|
45 | } |
@@ -1,76 +1,90 | |||
|
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 | -- Author : Martin Morlot |
|
20 | 20 | -- Mail : martin.morlot@lpp.polytechnique.fr |
|
21 | 21 | -----------------------------------------------------------------------------*/ |
|
22 | 22 | #ifndef APB_FIFO_DRIVER_H |
|
23 | 23 | #define APB_FIFO_DRIVER_H |
|
24 | 24 | |
|
25 | 25 | /*! \file apb_fifo_Driver.h |
|
26 | 26 | \brief LPP FIFO driver. |
|
27 | 27 | |
|
28 | 28 | This library is written to work with LPP_APB_FIFO VHDL module from LPP's FreeVHDLIB. It represents a standard FIFO working, |
|
29 | 29 | used in many type of application. |
|
30 | 30 | |
|
31 | \todo Check "DEVICE1 => count = 2" function Open | |
|
32 | 31 | \author Martin Morlot martin.morlot@lpp.polytechnique.fr |
|
33 | 32 | */ |
|
33 | #define FIFO_Empty 0x00000100 /**< Show that the FIFO is Empty */ | |
|
34 | #define FIFO_Full 0x00001000 /**< Show that the FIFO is Full */ | |
|
35 | #define Boucle 0x00110000 /**< Configuration for reused the same value of the FIFO */ | |
|
36 | #define NoBoucle 0xFFEEFFFF /**< Unlock the previous configuration */ | |
|
34 | 37 | |
|
35 | 38 | |
|
36 | 39 | /*=================================================== |
|
37 | 40 | T Y P E S D E F |
|
38 | 41 | ====================================================*/ |
|
39 | 42 | |
|
40 | 43 | /*! \struct APB_FIFO_REG |
|
41 | 44 | \brief Sturcture representing the fifo registers |
|
42 | 45 | */ |
|
43 | 46 | struct APB_FIFO_REG |
|
44 | 47 | { |
|
45 | 48 | int rwdata; /**< \brief Data register Write/Read */ |
|
46 | 49 | int raddr; /**< \brief Address register for the reading operation */ |
|
47 | 50 | int cfgreg; /**< \brief Configuration register composed of Read enable Flag [HEX 0] |
|
48 | 51 | Write enable Flag [HEX 1] |
|
49 | 52 | Empty Flag [HEX 2] |
|
50 | 53 | Full Flag [HEX 3] |
|
51 |
|
|
|
54 | ReUse Flag [HEX 4] | |
|
55 | Lock Flag [HEX 5] | |
|
56 | Dummy "C" [HEX 6/7] */ | |
|
52 | 57 | int dummy0; /**< \brief Unused register, aesthetic interest */ |
|
53 | 58 | int dummy1; /**< \brief Unused register, aesthetic interest */ |
|
54 | 59 | int waddr; /**< \brief Address register for the writing operation */ |
|
55 | 60 | }; |
|
56 | 61 | |
|
57 |
typedef struct APB_FIFO_REG |
|
|
62 | typedef volatile struct APB_FIFO_REG FIFO_Device; | |
|
58 | 63 | |
|
59 | 64 | /*=================================================== |
|
60 | 65 | F U N C T I O N S |
|
61 | 66 | ====================================================*/ |
|
62 | 67 | |
|
63 | 68 | /*! \fn APB_FIFO_Device* apbfifoOpen(int count); |
|
64 | 69 | \brief Return count FIFO. |
|
65 | 70 | |
|
66 | 71 | This Function scans APB devices table and returns count FIFO. |
|
67 | 72 | |
|
68 | 73 | \param count The number of the FIFO you whant to get. For example if you have 3 FIFOS on your SOC you want |
|
69 |
to use FIFO1 so count = |
|
|
74 | to use FIFO1 so count = 1. | |
|
70 | 75 | \return The pointer to the device. |
|
71 | 76 | */ |
|
72 |
|
|
|
77 | FIFO_Device* openFIFO(int count); | |
|
73 | 78 | |
|
74 | ||
|
79 | /*! \fn int FillFifo(FIFO_Device* dev,int Tbl[],int A); | |
|
80 | \brief a Fill in FIFO function. | |
|
81 | ||
|
82 | This Function fill in the FIFO with a table data. | |
|
83 | ||
|
84 | \param dev The FFT pointer. | |
|
85 | \param Tbl[] The data table. | |
|
86 | \param A The data table size. | |
|
87 | */ | |
|
88 | int FillFifo(FIFO_Device* dev,int Tbl[],int A); | |
|
75 | 89 | |
|
76 | 90 | #endif |
@@ -1,46 +1,63 | |||
|
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 | -- Author : Martin Morlot |
|
20 | 20 | -- Mail : martin.morlot@lpp.polytechnique.fr |
|
21 | 21 | -----------------------------------------------------------------------------*/ |
|
22 | 22 | #ifndef APB_GPIO_DRIVER_H |
|
23 | 23 | #define APB_GPIO_DRIVER_H |
|
24 | 24 | |
|
25 | /*! \file apb_gpio_Driver.h | |
|
26 | \brief Gaisler GPIO driver. | |
|
27 | ||
|
28 | This library is written to work with Gaisler GPIO VHDL module. | |
|
29 | ||
|
30 | \author Martin Morlot martin.morlot@lpp.polytechnique.fr | |
|
31 | */ | |
|
25 | 32 | |
|
26 | 33 | /*=================================================== |
|
27 | 34 | T Y P E S D E F |
|
28 | 35 | ====================================================*/ |
|
29 | ||
|
36 | /*! \struct GPIO_REG | |
|
37 | \brief Sturcture representing the gpio registers | |
|
38 | */ | |
|
30 | 39 | struct GPIO_REG |
|
31 | 40 | { |
|
32 | int Din; | |
|
33 | int Dout; | |
|
34 | int oen; | |
|
41 | int Din; /**< \brief Input GPIO register */ | |
|
42 | int Dout; /**< \brief Output GPIO register */ | |
|
43 | int oen; /**< \brief Enable GPIO register */ | |
|
35 | 44 | }; |
|
36 | 45 | |
|
37 | typedef struct GPIO_REG GPIO_Device; | |
|
46 | typedef volatile struct GPIO_REG GPIO_Device; | |
|
38 | 47 | |
|
39 | 48 | /*=================================================== |
|
40 | 49 | F U N C T I O N S |
|
41 | 50 | ====================================================*/ |
|
42 | ||
|
51 | /*! \fn GPIO_Device* openGPIO(int count); | |
|
52 | \brief Return count GPIO. | |
|
53 | ||
|
54 | This Function scans APB devices table and returns count GPIO. | |
|
55 | ||
|
56 | \param count The number of the GPIO you whant to get. For example if you have 3 GPIOs on your SOC you want | |
|
57 | to use GPIO1 so count = 1. | |
|
58 | \return The pointer to the device. | |
|
59 | */ | |
|
43 | 60 | GPIO_Device* openGPIO(int count); |
|
44 | 61 | |
|
45 | 62 | |
|
46 | 63 | #endif |
@@ -1,44 +1,46 | |||
|
1 | 1 | #------------------------------------------------------------------------------ |
|
2 | 2 | #-- This file is a part of the LPP VHDL IP LIBRARY |
|
3 | 3 | #-- Copyright (C) 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 | |
|
20 | 20 | include ../rules.mk |
|
21 | 21 | |
|
22 | 22 | |
|
23 | 23 | |
|
24 | 24 | all: |
|
25 | 25 | make all -C AMBA |
|
26 | 26 | make all -C LCD |
|
27 | 27 | make all -C DAC |
|
28 | 28 | make all -C FIFO |
|
29 | 29 | make all -C UART |
|
30 | 30 | make all -C FFT |
|
31 | 31 | make all -C DELAY |
|
32 | 32 | make all -C GPIO |
|
33 | make all -C MATRIX | |
|
33 | 34 | |
|
34 | 35 | |
|
35 | 36 | cleanall: |
|
36 | 37 | make clean -C AMBA |
|
37 | 38 | make clean -C LCD |
|
38 | 39 | make clean -C DAC |
|
39 | 40 | make clean -C FIFO |
|
40 | 41 | make clean -C UART |
|
41 | 42 | make clean -C FFT |
|
42 | 43 | make clean -C DELAY |
|
43 | 44 | make clean -C GPIO |
|
45 | make clean -C MATRIX | |
|
44 | 46 |
@@ -1,118 +1,117 | |||
|
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 | -- Author : Martin Morlot |
|
20 | 20 | -- Mail : martin.morlot@lpp.polytechnique.fr |
|
21 | 21 | -----------------------------------------------------------------------------*/ |
|
22 | 22 | #ifndef APB_UART_DRIVER_H |
|
23 | 23 | #define APB_UART_DRIVER_H |
|
24 | 24 | |
|
25 | 25 | /*! \file apb_uart_Driver.h |
|
26 | 26 | \brief LPP Uart driver. |
|
27 | 27 | |
|
28 | 28 | This library is written to work with LPP_APB_UART VHDL module from LPP's FreeVHDLIB. It help you to print and get, |
|
29 | char or strings over uart. | |
|
30 | ||
|
31 | \todo Check "DEVICE1 => count = 2" function Open | |
|
29 | char or strings over uart. | |
|
30 | ||
|
32 | 31 | \author Martin Morlot martin.morlot@lpp.polytechnique.fr |
|
33 | 32 | */ |
|
34 | 33 | |
|
35 | 34 | |
|
36 | 35 | |
|
37 | 36 | #define BaudGenOnDuty 0 /**< Used to reset the Baud Generator (Capture Flag) */ |
|
38 | 37 | #define DataSended 0x10 /**< Used to know when the data was send */ |
|
39 | 38 | #define NewData 0x100 /**< Used to know if a New data is ready to be send */ |
|
40 | 39 | |
|
41 | 40 | /*=================================================== |
|
42 | 41 | T Y P E S D E F |
|
43 | 42 | ====================================================*/ |
|
44 | 43 | |
|
45 | 44 | /*! \struct UART_Driver |
|
46 | 45 | \brief Sturcture representing the uart registers |
|
47 | 46 | */ |
|
48 | 47 | struct UART_Driver |
|
49 | 48 | { |
|
50 | 49 | int ConfigReg; /**< \brief Configuration register composed of Capture Flag [HEX 0] |
|
51 | 50 | Sended Flag [HEX 1] |
|
52 | 51 | NewData Flag [HEX 2] |
|
53 | 52 | Dummy "E" [HEX 3/4] |
|
54 | 53 | BTrig Freq [HEX 5/6/7] */ |
|
55 | 54 | int DataWReg; /**< \brief Data Write register */ |
|
56 | 55 | int DataRReg; /**< \brief Data Read register */ |
|
57 | 56 | }; |
|
58 | 57 | |
|
59 | typedef struct UART_Driver UART_Device; | |
|
58 | typedef volatile struct UART_Driver UART_Device; | |
|
60 | 59 | |
|
61 | 60 | |
|
62 | 61 | /*=================================================== |
|
63 | 62 | F U N C T I O N S |
|
64 | 63 | ====================================================*/ |
|
65 | 64 | |
|
66 | 65 | /*! \fn UART_Device* openUART(int count); |
|
67 | 66 | \brief Return count UART. |
|
68 | 67 | |
|
69 | 68 | This Function scans APB devices table and returns count UART. |
|
70 | 69 | |
|
71 | 70 | \param count The number of the UART you whant to get. For example if you have 3 UARTS on your SOC you want |
|
72 |
to use UART1 so count = |
|
|
71 | to use UART1 so count = 1. | |
|
73 | 72 | \return The pointer to the device. |
|
74 | 73 | */ |
|
75 | 74 | UART_Device* openUART(int count); |
|
76 | 75 | |
|
77 | 76 | /*! \fn void uartputc(UART_Device* dev,char c); |
|
78 | 77 | \brief Print char over given UART. |
|
79 | 78 | |
|
80 | 79 | This Function puts the given char over the given UART. |
|
81 | 80 | |
|
82 | 81 | \param dev The UART pointer. |
|
83 | 82 | \param c The char you whant to print. |
|
84 | 83 | */ |
|
85 | 84 | void uartputc(UART_Device* dev,char c); |
|
86 | 85 | |
|
87 | 86 | /*! \fn void uartputs(UART_Device* dev,char* s); |
|
88 | 87 | \brief Print string over given UART. |
|
89 | 88 | |
|
90 | 89 | This Function puts the given string over the given UART. |
|
91 | 90 | |
|
92 | 91 | \param dev The UART pointer. |
|
93 | 92 | \param s The string you whant to print. |
|
94 | 93 | */ |
|
95 | 94 | void uartputs(UART_Device* dev,char* s); |
|
96 | 95 | |
|
97 | 96 | /*! \fn char uartgetc(UART_Device* dev); |
|
98 | 97 | \brief Get char from given UART. |
|
99 | 98 | |
|
100 | 99 | This Function get char from the given UART. |
|
101 | 100 | |
|
102 | 101 | \param dev The UART pointer. |
|
103 | 102 | \return The read char. |
|
104 | 103 | */ |
|
105 | 104 | char uartgetc(UART_Device* dev); |
|
106 | 105 | |
|
107 | 106 | /*! \fn void uartgets(UART_Device* dev,char* s); |
|
108 | 107 | \brief Get string from given UART. |
|
109 | 108 | |
|
110 | 109 | This Function get string from the given UART. |
|
111 | 110 | |
|
112 | 111 | \param dev The UART pointer. |
|
113 | 112 | \param s The read string. |
|
114 | 113 | */ |
|
115 | 114 | void uartgets(UART_Device* dev,char* s); |
|
116 | 115 | |
|
117 | 116 | |
|
118 | 117 | #endif |
@@ -1,132 +1,137 | |||
|
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 | -- Author : Martin Morlot |
|
20 | 20 | -- Mail : martin.morlot@lpp.polytechnique.fr |
|
21 | 21 | ------------------------------------------------------------------------------ |
|
22 | 22 | library ieee; |
|
23 | 23 | use ieee.std_logic_1164.all; |
|
24 | 24 | library grlib; |
|
25 | 25 | use grlib.amba.all; |
|
26 | 26 | use grlib.stdlib.all; |
|
27 | 27 | use grlib.devices.all; |
|
28 | 28 | library lpp; |
|
29 | 29 | use lpp.lpp_amba.all; |
|
30 | 30 | use lpp.apb_devices_list.all; |
|
31 | 31 | use lpp.lpp_delay.all; |
|
32 | 32 | |
|
33 | 33 | --! Driver APB, va faire le lien entre l'IP VHDL du convertisseur et le bus Amba |
|
34 | 34 | |
|
35 | 35 | entity APB_Delay is |
|
36 | 36 | generic ( |
|
37 | 37 | pindex : integer := 0; |
|
38 | 38 | paddr : integer := 0; |
|
39 | 39 | pmask : integer := 16#fff#; |
|
40 | 40 | pirq : integer := 0; |
|
41 | 41 | abits : integer := 8); |
|
42 | 42 | port ( |
|
43 | 43 | clk : in std_logic; --! Horloge du composant |
|
44 | 44 | rst : in std_logic; --! Reset general du composant |
|
45 | 45 | apbi : in apb_slv_in_type; --! Registre de gestion des entr�es du bus |
|
46 | 46 | apbo : out apb_slv_out_type --! Registre de gestion des sorties du bus |
|
47 | 47 | ); |
|
48 | 48 | end APB_Delay; |
|
49 | 49 | |
|
50 | 50 | |
|
51 | 51 | architecture ar_APB_Delay of APB_Delay is |
|
52 | 52 | |
|
53 | 53 | constant REVISION : integer := 1; |
|
54 | 54 | |
|
55 | 55 | constant pconfig : apb_config_type := ( |
|
56 | 56 | 0 => ahb_device_reg (VENDOR_LPP, LPP_DELAY, 0, REVISION, 0), |
|
57 | 57 | 1 => apb_iobar(paddr, pmask)); |
|
58 | 58 | |
|
59 | 59 | type DELAY_ctrlr_Reg is record |
|
60 |
Delay_CFG : std_logic_vector( |
|
|
60 | Delay_CFG : std_logic_vector(3 downto 0); | |
|
61 | 61 | Delay_FreqBoard : std_logic_vector(25 downto 0); |
|
62 | 62 | Delay_Timer : std_logic_vector(25 downto 0); |
|
63 | 63 | end record; |
|
64 | 64 | |
|
65 | 65 | signal Rec : DELAY_ctrlr_Reg; |
|
66 | 66 | signal Rdata : std_logic_vector(31 downto 0); |
|
67 | 67 | |
|
68 | 68 | signal Flag_st : std_logic; |
|
69 | 69 | signal Flag_end : std_logic; |
|
70 | signal Flag_OKend : std_logic; | |
|
70 | 71 | signal Rz : std_logic; |
|
71 | 72 | signal Raz : std_logic; |
|
72 | 73 | |
|
73 | 74 | begin |
|
74 | 75 | |
|
75 | 76 | Flag_st <= Rec.Delay_CFG(1); |
|
76 |
Rec.Delay_CFG( |
|
|
77 | Rec.Delay_CFG(3) <= Flag_end; | |
|
77 | 78 | Rz <= Rec.Delay_CFG(0); |
|
79 | Flag_OKend <= Rec.Delay_CFG(2); | |
|
78 | 80 | |
|
79 | 81 | Raz <= rst and Rz; |
|
80 | 82 | |
|
81 | 83 | Delay0 : TimerDelay |
|
82 | port map(clk,Raz,Flag_st,Flag_end,Rec.Delay_Timer); | |
|
84 | port map(clk,Raz,Flag_st,Flag_OKend,Flag_end,Rec.Delay_Timer); | |
|
83 | 85 | |
|
84 | 86 | process(rst,clk) |
|
85 | 87 | begin |
|
86 | 88 | if(rst='0')then |
|
87 | 89 | Rec.Delay_FreqBoard <= (others => '0'); |
|
88 | 90 | Rec.Delay_Timer <= (others => '0'); |
|
91 | Rec.Delay_CFG(2 downto 0) <= (others => '0'); | |
|
89 | 92 | |
|
90 | 93 | elsif(clk'event and clk='1')then |
|
91 | 94 | |
|
92 | 95 | --APB Write OP |
|
93 | 96 | if (apbi.psel(pindex) and apbi.penable and apbi.pwrite) = '1' then |
|
94 | 97 | case apbi.paddr(abits-1 downto 2) is |
|
95 | 98 | when "000000" => |
|
96 | 99 | Rec.Delay_CFG(0) <= apbi.pwdata(0); |
|
97 | 100 | Rec.Delay_CFG(1) <= apbi.pwdata(4); |
|
101 | Rec.Delay_CFG(2) <= apbi.pwdata(8); | |
|
98 | 102 | when "000001" => |
|
99 |
Rec.Delay_FreqBoard <= apbi.pwdata(25 downto 0); |
|
|
103 | Rec.Delay_FreqBoard <= apbi.pwdata(25 downto 0); | |
|
100 | 104 | when "000010" => |
|
101 | 105 | Rec.Delay_Timer <= apbi.pwdata(25 downto 0); |
|
102 | 106 | when others => |
|
103 | 107 | null; |
|
104 | 108 | end case; |
|
105 | 109 | end if; |
|
106 | 110 | |
|
107 |
--APB R |
|
|
111 | --APB Read OP | |
|
108 | 112 | if (apbi.psel(pindex) and (not apbi.pwrite)) = '1' then |
|
109 | 113 | case apbi.paddr(abits-1 downto 2) is |
|
110 | 114 | when "000000" => |
|
111 |
Rdata(31 downto 1 |
|
|
115 | Rdata(31 downto 16) <= (others => '0'); | |
|
116 | Rdata(15 downto 12) <= "000" & Rec.Delay_CFG(3); | |
|
112 | 117 | Rdata(11 downto 8) <= "000" & Rec.Delay_CFG(2); |
|
113 | 118 | Rdata(7 downto 4) <= "000" & Rec.Delay_CFG(1); |
|
114 | 119 | Rdata(3 downto 0) <= "000" & Rec.Delay_CFG(0); |
|
115 | 120 | when "000001" => |
|
116 | 121 | Rdata(31 downto 26) <= X"0" & "00"; |
|
117 | 122 | Rdata(25 downto 0) <= Rec.Delay_FreqBoard; |
|
118 | 123 | when "000010" => |
|
119 | 124 | Rdata(31 downto 26) <= X"0" & "00"; |
|
120 | 125 | Rdata(25 downto 0) <= Rec.Delay_Timer; |
|
121 | 126 | when others => |
|
122 | 127 | Rdata <= (others => '0'); |
|
123 | 128 | end case; |
|
124 | 129 | end if; |
|
125 | 130 | |
|
126 | 131 | end if; |
|
127 | 132 | apbo.pconfig <= pconfig; |
|
128 | 133 | end process; |
|
129 | 134 | |
|
130 | 135 | apbo.prdata <= Rdata when apbi.penable = '1'; |
|
131 | 136 | |
|
132 | 137 | end ar_APB_Delay; No newline at end of file |
@@ -1,67 +1,74 | |||
|
1 | 1 | -- TimerDelay.vhd |
|
2 | 2 | library IEEE; |
|
3 | 3 | use IEEE.numeric_std.all; |
|
4 | 4 | use IEEE.std_logic_1164.all; |
|
5 | 5 | |
|
6 | 6 | entity TimerDelay is |
|
7 | 7 | port( |
|
8 | 8 | clk : in std_logic; |
|
9 | 9 | raz : in std_logic; |
|
10 | 10 | Start : in std_logic; |
|
11 | OKfin : in std_logic; | |
|
11 | 12 | Fin : out std_logic; |
|
12 | 13 | Cpt : in std_logic_vector(25 downto 0) |
|
13 | 14 | ); |
|
14 | 15 | end TimerDelay; |
|
15 | 16 | |
|
16 | 17 | |
|
17 | 18 | architecture ar_TimerDelay of TimerDelay is |
|
18 | 19 | |
|
19 | type state is (stX,st1); | |
|
20 | type state is (stX,st1,st2); | |
|
20 | 21 | signal ect : state; |
|
21 | 22 | |
|
22 | 23 | constant MAX : integer := 67_108_863; |
|
23 | 24 | |
|
24 | 25 | signal delay : integer range 0 to MAX; |
|
25 | 26 | signal compt : integer range 0 to MAX; |
|
26 | signal Start_reg : std_logic; | |
|
27 | --signal Start_reg : std_logic; | |
|
27 | 28 | |
|
28 | 29 | |
|
29 | 30 | begin |
|
30 | 31 | |
|
31 | 32 | delay <= to_integer(unsigned(Cpt)); |
|
32 | 33 | |
|
33 | 34 | process(clk,raz) |
|
34 | 35 | begin |
|
35 | 36 | |
|
36 | 37 | if(raz='0')then |
|
37 | 38 | Fin <= '1'; |
|
38 | Start_reg <= '0'; | |
|
39 | --Start_reg <= '0'; | |
|
39 | 40 | ect <= stX; |
|
40 | 41 | |
|
41 | 42 | elsif(clk'event and clk='1')then |
|
42 |
Start_reg <= Start; |
|
|
43 | --Start_reg <= Start; | |
|
43 | 44 | |
|
44 | 45 | case ect is |
|
45 | 46 | |
|
46 |
when stX => |
|
|
47 |
if( |
|
|
48 |
|
|
|
47 | when stX => | |
|
48 | if(Start = '1')then | |
|
49 | --OKst <= '1'; | |
|
49 | 50 | ect <= st1; |
|
50 | 51 | end if; |
|
51 | ||
|
52 | 52 | |
|
53 | 53 | when st1 => |
|
54 | 54 | if(compt = delay)then |
|
55 | 55 | compt <= 0; |
|
56 | --OKst <= '0'; | |
|
56 | 57 | Fin <= '1'; |
|
57 |
ect <= st |
|
|
58 | ect <= st2; | |
|
58 | 59 | else |
|
59 | 60 | compt <= compt + 1; |
|
60 | 61 | ect <= st1; |
|
61 |
end if; |
|
|
62 | end if; | |
|
62 | 63 | |
|
64 | when st2 => | |
|
65 | if(OKfin = '1')then | |
|
66 | Fin <= '0'; | |
|
67 | ect <= stX; | |
|
68 | end if; | |
|
69 | ||
|
63 | 70 | end case; |
|
64 | 71 | end if; |
|
65 | 72 | end process; |
|
66 | 73 | |
|
67 | 74 | end ar_TimerDelay; No newline at end of file |
@@ -1,59 +1,60 | |||
|
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 | -- Author : Martin Morlot |
|
20 | 20 | -- Mail : martin.morlot@lpp.polytechnique.fr |
|
21 | 21 | ------------------------------------------------------------------------------ |
|
22 | 22 | library ieee; |
|
23 | 23 | use ieee.std_logic_1164.all; |
|
24 | 24 | library grlib; |
|
25 | 25 | use grlib.amba.all; |
|
26 | 26 | use std.textio.all; |
|
27 | 27 | library lpp; |
|
28 | 28 | use lpp.lpp_amba.all; |
|
29 | 29 | |
|
30 | 30 | --! Package contenant tous les programmes qui forment le composant int�gr� dans le l�on |
|
31 | 31 | |
|
32 | 32 | package lpp_delay is |
|
33 | 33 | |
|
34 | 34 | component APB_Delay is |
|
35 | 35 | generic ( |
|
36 | 36 | pindex : integer := 0; |
|
37 | 37 | paddr : integer := 0; |
|
38 | 38 | pmask : integer := 16#fff#; |
|
39 | 39 | pirq : integer := 0; |
|
40 | 40 | abits : integer := 8); |
|
41 | 41 | port ( |
|
42 | 42 | clk : in std_logic; --! Horloge du composant |
|
43 | 43 | rst : in std_logic; --! Reset general du composant |
|
44 | 44 | apbi : in apb_slv_in_type; --! Registre de gestion des entr�es du bus |
|
45 | 45 | apbo : out apb_slv_out_type --! Registre de gestion des sorties du bus |
|
46 | 46 | ); |
|
47 | 47 | end component; |
|
48 | 48 | |
|
49 | 49 | component TimerDelay is |
|
50 | 50 | port( |
|
51 | 51 | clk : in std_logic; |
|
52 | 52 | raz : in std_logic; |
|
53 | Start : in std_logic; | |
|
54 |
|
|
|
55 | Cpt : in std_logic_vector(25 downto 0) | |
|
53 | Start : in std_logic; | |
|
54 | OKfin : in std_logic; | |
|
55 | Fin : out std_logic; | |
|
56 | Cpt : in std_logic_vector(25 downto 0) | |
|
56 | 57 | ); |
|
57 | 58 | end component; |
|
58 | 59 | |
|
59 | 60 | end; No newline at end of file |
General Comments 0
You need to be logged in to leave comments.
Login now