OpenCores
URL https://opencores.org/ocsvn/gecko4/gecko4/trunk

Subversion Repositories gecko4

[/] [gecko4/] [trunk/] [GECKO4com/] [utils/] [c/] [generate_gecko_vga_rom.c] - Blame information for rev 6

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 6 ktt1
/******************************************************************************/
2
/*            _   _            __   ____                                      */
3
/*           / / | |          / _| |  __|                                     */
4
/*           | |_| |  _   _  / /   | |_                                       */
5
/*           |  _  | | | | | | |   |  _|                                      */
6
/*           | | | | | |_| | \ \_  | |__                                      */
7
/*           |_| |_| \_____|  \__| |____| microLab                            */
8
/*                                                                            */
9
/*           Bern University of Applied Sciences (BFH)                        */
10
/*           Quellgasse 21                                                    */
11
/*           Room HG 4.33                                                     */
12
/*           2501 Biel/Bienne                                                 */
13
/*           Switzerland                                                      */
14
/*                                                                            */
15
/*           http://www.microlab.ch                                           */
16
/******************************************************************************/
17
/*   GECKO4com
18
 
19
     2010/2011 Dr. Theo Kluter
20
 
21
     This program is free software: you can redistribute it and/or modify
22
     it under the terms of the GNU General Public License as published by
23
     the Free Software Foundation, either version 3 of the License, or
24
     (at your option) any later version.
25
 
26
     This program is distributed in the hope that it will be useful,
27
     but WITHOUT ANY WARRANTY; without even the implied warranty of
28
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
29
     GNU General Public License for more details.
30
     You should have received a copy of the GNU General Public License
31
     along with these sources.  If not, see <http://www.gnu.org/licenses/>.
32
*/
33
 
34
#include <stdio.h>
35
#include <stdlib.h>
36
#include <string.h>
37
 
38
const char *left_screen_strs[16] = {
39
"            _   _            __   ____  ",
40
"           / / | |          / _| |  __| ",
41
"           | |_| |  _   _  / /   | |_   ",
42
"           |  _  | | | | | | |   |  _|  ",
43
"           | | | | | |_| | \\ \\_  | |__  ",
44
"           |_| |_| \\_____|  \\__| |____| microLab",
45
" ",
46
"           Bern University of Applied Sciences (BFH)",
47
"           Quellgasse 21",
48
"           Room HG 4.33",
49
"           2501 Biel/Bienne",
50
"           Switzerland",
51
" ",
52
"           http://www.microlab.ch",
53
"                        ________________",
54
"                       /USBTMC messages:\\"};
55
 
56
const char *right_screen_strs[16] = {
57
" ",
58
"                    GECKO4main and GECKO4com",
59
"                    ------------------------",
60
" The GECKO system is a general purpose hardware/software co-",
61
" design environment for real-time information processing or",
62
" for system-on-chip (SoC) solutions. The GECKO project supports",
63
" a new design methodology for system-on-chips, which",
64
" necessitates co-design of software, fast hardware and",
65
" dedicated real-time signal processing hardware. Within the",
66
" GECKO project, the GECKO4main module represents an experimental",
67
" platform, which offers the necessary computing power for speed",
68
" intensive real-time algorithms as well as the necessary",
69
" flexibility for control intensive software tasks.",
70
" For more information see: http://gecko.microlab.ch",
71
"                         ______________",
72
"                        /FPGA messages:\\"};
73
 
74
 
75
int main() {
76
   unsigned char rom[2048];
77
   int loop,index,chars,sort;
78
 
79
   index = 0;
80
   for (loop = 0 ; loop < 16 ; loop++) {
81
      if (strlen(left_screen_strs[loop]) > 64) {
82
         printf("Too long string found!\n" );
83
         return -1;
84
      }
85
      for (chars = 0 ; chars < strlen(left_screen_strs[loop]) ; chars++)
86
         rom[index++] = left_screen_strs[loop][chars];
87
      while(chars < 64) {
88
         chars++;
89
         rom[index++] = 32;
90
      }
91
      if (strlen(right_screen_strs[loop]) > 64) {
92
         printf("Too long string found!\n" );
93
         return -1;
94
      }
95
      for (chars = 0 ; chars < strlen(right_screen_strs[loop]) ; chars++)
96
         rom[index++] = right_screen_strs[loop][chars];
97
      while(chars < 64) {
98
         chars++;
99
         rom[index++] = 32;
100
      }
101
   }
102
   if (index != 2048) {
103
      printf( "ERROR!\n" );
104
      return -1;
105
   }
106
   for (loop = 0 ; loop < 64 ; loop++) {
107
       if (loop == 0) {
108
         printf( "      GENERIC MAP ( INIT_00 => X\"" );
109
      } else {
110
         printf( "                    INIT_%02X => X\"" , loop );
111
      }
112
      for (sort = 31 ; sort > -1 ; sort--) {
113
         printf("%02X",rom[loop*32+sort] );
114
      }
115
      if (loop != 63) {
116
         printf( "\",\n" );
117
      } else {
118
         printf( "\")\n" );
119
      }
120
   }
121
   return 0;
122
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.