Professional Documents
Culture Documents
CENTRO TECNOLGICO
DEPARTAMENTO DE ENGENHARIA ELTRICA
PROJETO DE GRADUAO
VITRIA ES
AGOSTO/2011
VITRIA ES
AGOSTO/2011
COMISSO EXAMINADORA:
______________________________________
Prof . Dr . Eliete Maria de Oliveira Caldeira
Orientadora
______________________________________
Prof. Dr. Andr Ferreira
Examinador
______________________________________
Engenheiro Tobias Colombo
Examinador
AGRADECIMENTOS
Agradeo Deus por ter me sustentado at aqui.
Aos meus pais, por todo o apoio e incentivo.
minha namorada, por estar comigo em todos os momentos.
professora Eliete, pelo acompanhamento, orientao e pacincia.
ii
LISTA DE FIGURAS
Figura 1 Sintetizador analgico Minimoog .............................................................................9
Figura 2 - Sintetizador digital Korg ............................................................................................. 10
Figura 3 Layout do sintetizador virtual Poizone V2 ........................................................ 12
Figura 4 - Comprimento de uma onda ....................................................................................... 16
Figura 5 - Amplitude de uma onda .............................................................................................. 16
Figura 6 - Exemplos de timbres .................................................................................................... 17
Figura 7 - Composio dos timbres............................................................................................. 18
Figura 8 - Escala musical temperada.......................................................................................... 20
Figura 9 - Vista superior da plataforma Nexys2 ................................................................... 21
Figura 10 Estrutura conceitual da FPGA ............................................................................... 23
Figura 11 - Clula lgica baseada em LUT ............................................................................... 24
Figura 12 - Distribuio dos componentes na Spartan-3E............................................... 26
Figura 13 - Conector PS2 ................................................................................................................. 27
Figura 14 - Scan codes para teclado PS2 ................................................................................... 28
Figura 15 Diagrama de tempo dos sinais no barramento PS2 .................................... 28
Figura 16 - Circuito dos conectores perifricos .................................................................... 29
Figura 17 - Pinagem do conector VGA e circuito usado pela Nexys 2 ......................... 30
Figura 18 Relao entre sinais no scan horizontal ........................................................... 31
Figura 19 - Esquemtico do display de 7 segmentos .......................................................... 33
Figura 20 - Diagrama de tempo de um circuito multiplexador para o display de
LED's ......................................................................................................................................................... 33
Figura 21 - Diagrama de blocos de um data path ................................................................. 36
Figura 22 - Diagrama de blocos conceitual de uma FSMD ............................................... 37
Figura 23 Entradas e sadas do mdulo de entrada PS2 ............................................... 38
Figura 24 - Diagrama de estados do mdulo de entrada PS2 ......................................... 39
Figura 25 - Entradas e sadas do mdulo do modo de operao ................................... 41
Figura 26 - Digrama de estados do mdulo do modo de operao .............................. 43
Figura 27 - Entradas e sadas do mdulo de memria ....................................................... 54
Figura 28 Entradas e sadas do mdulo de processamento das notas .................... 55
iii
iv
LISTA DE TABELAS
Tabela 1 - Caractersticas da famlia Spartan-3E .................................................................. 25
Tabela 2 - Legenda do diagrama de estados do mdulo do modo de operao ..... 45
Tabela 3 - Prximos estados selecionados por teclas, a partir do estado escolha"
..................................................................................................................................................................... 45
Tabela 4 - Prximos estados selecionados por teclas, a partir do estado livre" ... 45
Tabela 5 - Prximos estados selecionados por teclas, a partir do estado
posicao_gravando" ............................................................................................................................ 46
Tabela 6 - Prximos estados selecionados por teclas, a partir do estado
vai_escolha" .......................................................................................................................................... 48
Tabela 7 - Prximos estados selecionados por teclas, a partir do estado
memoria_cheia".................................................................................................................................. 48
Tabela 8 - Prximos estados selecionados por teclas, a partir do estado
posicao_lendo" .................................................................................................................................... 48
Tabela 9 - Escolha de modulaes ............................................................................................... 49
Tabela 10 Escolha de mudanas do tempo original ......................................................... 50
Tabela 11 - Padro de acendimento do display de 7 segmentos ................................... 53
Tabela 12 Legenda do diagrama de estados do mdulo de processamento das
notas .......................................................................................................................................................... 59
Tabela 13 - Frequncias geradas pelo sintetizador ............................................................. 64
Tabela 14 - Relatrio de utilizao da FPGA ........................................................................... 87
LISTA DE SIGLAS
CLB Configurable Logic Block
CRT Cathode Ray Tube
DCM Digital Clock Manager
FPGA Field Programmmable Gate Array
FSM Finite State Machine
FSMD Finite State Machine with Data path
I/O Input / Output
JTAG Joint Test Action Group
LED Light-Emitting Diode
LSB Least Significant Bit
LUT Look-Up Table
MIDI Musical Instrument Digital Interface
MSB Most Significant Bit
PSDRAM Pseudo-Static Dynamic Random Access Memory
RAM Random Access Memory
ROM Read Only Memory
RTL Register Tranfer Logic
USB Universal Serial Bus
VGA Video Graphics Array
VHDL VHSIC Hardware Languge Description
VHSIC Very High Speed Integrated Circuit
vi
SUMRIO
AGRADECIMENTOS ................................................................................................................................ i
LISTA DE FIGURAS ................................................................................................................................ii
LISTA DE TABELAS ............................................................................................................................. iv
LISTA DE SIGLAS .................................................................................................................................... v
SUMRIO .................................................................................................................................................. vi
RESUMO.................................................................................................................................................. viii
1
INTRODUO ..................................................................................................................................9
1.1 Objetivo ........................................................................................................................................ 12
1.2 Estrutura da Monografia ...................................................................................................... 13
1.3 Motivao .................................................................................................................................... 14
IMPLEMENTACO ...................................................................................................................... 35
4.1 Metodologia de programao ............................................................................................ 35
4.2 Mdulos do Sintetizador de Sons ..................................................................................... 38
4.2.1 Mdulo de entrada PS2 ................................................................................................. 38
4.2.2 Mdulo do modo de operao ................................................................................... 40
vii
CONCLUSO .................................................................................................................................. 88
REFERNCIAS ....................................................................................................................................... 89
ANEXOS.................................................................................................................................................... 90
viii
RESUMO
Neste trabalho de graduao ser apresentado o processo de criao e
funcionamento de um sintetizador de sons polifnico bsico, com entrada
advinda de um teclado de computador com conector PS2, criado via programao
de hardware. O processamento do sintetizador ser feito por uma FPGA (Field
Programmable Gate Array), e o mesmo ter algumas funes adicionais como
gravao na memria e leitura da memria com modulao e mudana de tempo.
INTRODUO
Sintetizadores de sons so instrumentos musicais eletrnicos capazes de
10
todos
os
primeiros
sintetizadores
analgicos
eram
monofnicos, j que s podiam gerar uma frequncia sonora de cada vez. Como
cada nota tinha que ser gerada por um circuito eletrnico relativamente
complexo, ficava muito caro e complicado construir um instrumento com
capacidade polifnica e ao mesmo tempo com controle total sobre a sntese do
som. Essa limitao s foi superada com o uso de microprocessadores, no final da
dcada de 1970 [1].
Com a reduo dos preos da tecnologia digital e o aumento da capacidade
dos microprocessadores, a sntese dos sons passou a ser realizada digitalmente, e
no mais por circuitos analgicos. O sintetizador digital evoluiu rapidamente, e
em menos de uma dcada j se dispunha de instrumentos com boa capacidade
polifnica e inmeros recursos de controle e expressividade. A qualidade sonora
melhorou bastante, e tambm passaram a serem usadas amostras digitais
(samples) de sons acsticos, o que permitiu ao sintetizador simular com razovel
realismo muitos instrumentos convencionais [1]. Na Figura 2 pode-se ver um
sintetizador digital da marca Korg.
11
O MIDI (Musical Instrument Digital Interface) um sistema de comunicao digital para uso com
instrumentos e equipamentos musicais. Ele foi criado em 1983 por um grupo de fabricantes, e por isso
no existe um proprietrio exclusivo dessa tecnologia, que de domnio pblico e est disponvel para
qualquer um que queira implement-la em seus equipamentos ou softwares
1
12
1.1 Objetivo
O objetivo deste trabalho a implementao, em uma placa Digilent
contendo uma FPGA, de um sintetizador de sons polifnico, com algumas
especificaes dadas abaixo:
1. Os dados de entrada sero advindos de um teclado de computador com
conector PS2, pois a placa Digilent possui uma entrada PS2 exclusiva.
2. Deve haver a possibilidade de se tocar at cinco notas ao mesmo tempo.
3. O sintetizador ter trs oitavas musicais para serem tocadas, incluindo
bemis e sustenidos, e ainda ser capaz de gerar uma oitava acima da nota mais
aguda possvel de ser tocada e uma oitava abaixo da nota mais grave possvel de
ser tocada, para poder gerar todas as modulaes possveis na etapa de leitura da
memria.
4. O sistema apresentar a opo de gravao e leitura em trs slots de
memria, constituda pelos block RAM da FPGA.
13
14
1.3 Motivao
Este projeto foi motivado pela afinidade do autor com: a eletrnica digital,
tendo como relevncia a linguagem de programao em hardware; o estudo da
msica por meio da prtica do violino; e como pontap inicial, a apresentao do
projeto de graduao da aluna Lvia Gerde Muniz [3] ao autor deste projeto.
O projeto proposto em [3] a criao de um sintetizador de sons
monofnico em FPGA. Algumas das especificaes para o projeto do sintetizador
de sons polifnico proposto aqui foram retiradas das sugestes para trabalhos
futuros indicadas em [3].
15
CONHECIMENTOS MUSICAIS
O assunto abordado neste captulo far com que o leitor tenha um melhor
capaz
de
distinguir
frequncias
entre
20Hz
20000Hz,
aproximadamente. Uma nota musical nada mais que um som cuja frequncia de
vibrao encontra-se dentro do intervalo perceptvel pelo ouvido humano.
Os sons podem ser descritos em termos da sua altura, intensidade e timbre.
A altura est ligada percepo de mais grave e mais agudo. Quanto mais alto
um som, mais agudo ele . Esta diferenciao baseada nas variaes da
frequncia de vibrao das ondas sonoras. Aos sons graves relacionam-se as
baixas frequncias e aos agudos as altas frequncias. A unidade de frequncia
chamada de Hertz e 1 Hertz equivale a um ciclo completo da onda por segundo
[4]. Na Figura 4 pode-se ver uma demonstrao do ciclo completo de uma onda
senoidal, que equivale a um comprimento de onda.
A intensidade de um som est ligada percepo de mais forte ou mais
fraco. A intensidade est relacionada diretamente com a amplitude de uma onda
sonora, que o deslocamento mximo a partir da posio de equilbrio da onda.
Quanto mais intenso um som, maior a sua amplitude [4]. Na Figura 5 pode-se
ver uma demonstrao da amplitude de uma onda.
16
17
mesma frequncia e amplitude de onda, uma vez que eles possuem diferentes
"assinaturas". O timbre est associado srie harmnica do som, onde cada nota
musical composta de uma nota fundamental e uma combinao de harmnicos
superiores com diferentes frequncias (mltiplas da frequncia fundamental),
diferentes intensidades e diferentes duraes [4]. Na Figura 6 observa-se a soma
de duas ondas com timbres e frequncias diferentes e na Figura 7 pode-se ver
alguns exemplos de timbres musicais e a relao entre a nota fundamental e seus
harmnicos.
Neste trabalho, as ondas sonoras tero:
- variao de sua altura, no prprio processamento da FPGA;
- variao da sua intensidade, proporcionada pelo amplificador analgico;
- timbre fixo, definido pelo circuito analgico externo FPGA.
18
19
20
21
PLATAFORMA NEXYS2
A Nexys2 uma plataforma de desenvolvimento de circuitos digitais
completa e pronta para usar, baseada na FPGA Spartan XC3S1200E da Xilinx. Essa
plataforma foi desenvolvida pela Digilent Inc. e compatvel com o software ISE
Design Sute da Xilinx, o qual ser usado para programar tal plataforma. Esse
software foi obtido no site da Xilinx e uma verso grtis chamada de Web Pack.
Na Figura 9 pode-se ver a vista superior da plataforma Nexys2.
22
23
24
25
26
27
Teclados com conector PS2 usam scan codes para comunicar uma tecla
pressionada. A cada tecla designado um cdigo que mandado sempre que a
tecla pressionada. Se a tecla for mantida pressionada, o scan code ser mandado
repetidamente a cada 100ms, aproximadamente. Quando uma tecla liberada, o
cdigo F0 mandado, seguido pelo scan code da tecla pressionada. Algumas
teclas, chamadas de teclas estendidas, mandam o cdigo E0 antes de seu scan
code. Quando tais teclas so liberadas, enviam o cdigo F0E0 antes do scan code.
O scan code de uma tecla pressionada chamado de make enquanto o scan code
de uma tecla solta chamado de break [9]. A Figura 14 mostra os scan codes para
um teclado comum PS2.
O teclado s poder mandar dados para o host se as linhas de clock e dados
estiverem em nvel lgico alto (linhas de clock e dados em nvel lgico alto
indicam que o barramento est desocupado, ou idle). Como o host o mestre do
barramento, o teclado deve verificar se o host est mandando dados antes de
usar o barramento. Para facilitar isto, a linha de clock usada como um sinal
pronto para enviar e o teclado tem de checar se a mesma est em nvel lgico
alto antes de comear a transferncia do scan code. O teclado manda dados para o
host em pacotes de 11 bits, sendo um start bit igual a 0, oito bits de dados
transportando o scan code da tecla (LSB primeiro), seguidos de um bit de
28
29
30
31
Neste trabalho ser usada uma interface para CRT (Cathode Ray Tube) com
resoluo de 640 por 480 pixels, com capacidade para 256 cores.
Um monitor CRT funciona da seguinte maneira: um gerador de eltrons gera
um fino feixe de eltrons que viaja em um tubo no vcuo e acerta uma tela
fosforescente. Assim que o feixe de eltrons toca a tela, um ponto luminoso
emitido. Uma bobina de deflexo horizontal e uma bobina de deflexo vertical,
posicionadas fora do tubo, produzem campos magnticos que controlam a
direo do feixe de eltrons. Esse feixe de eltrons se move sempre da esquerda
para a direita e de cima para baixo. O circuito interno do monitor gera ondas
dente de serra, controladas pelas entradas HS e VS, que controlam as bobinas de
deflexo [7]. Na Figura 18 pode-se ver a relao entre o sinal HS, a onda dente de
serra que controla a bobina de deflexo horizontal e o scan horizontal.
32
33
34
35
IMPLEMENTACO
Para a implementao do sintetizador, foi usado o programa ISE Design
Suite verso 12.2 da XILINX, parte do Web Pack fornecido pela empresa
gratuitamente em seu site. Para a criao do programa do sintetizador de sons, foi
usada a linguagem de programao de hardware VHDL (VHSIC Hardware
Description Language).
Para o projeto do sintetizador, mdulos com funes especficas foram
criados. Essa forma de implementao foi escolhida em razo das seguintes
vantagens:
- facilita a deteco dos erros, pois as funes dos mdulos so bem definidas
e distintas;
- facilita a fase de testes, visto que os mdulos podem ser verificados
individualmente;
- proporciona mais flexibilidade para melhorias ou modificaes, j que a
manuteno por mdulos e no no programa completo;
- permite desenvolvimento independente dos mdulos, podendo implementar
e testar funes diferentes ao mesmo tempo;
- facilita a reutilizao do programa desenvolvido, visto que um mdulo
implementado pode ser utilizado em outros projetos;
- permite uma maior legibilidade da implementao.
36
f(
,...,
) onde
o registro de destino,
37
38
39
idle
fall_edge=1
data
fall_edge=1
e n_reg=0
load
e n_reg=0
Figura 24 - Diagrama de estados do mdulo de entrada PS2
40
41
mdulos
de
memria,
as
sadas
processamento_enable,
42
de:
write_memoria,
tempo_lendo,
escolha,
livre,
memoria_cheia,
lendo,
posicao_gravando,
posicao_lendo,
read_memoria,
gravando,
modulacao_lendo,
novo_tempo1,
novo_tempo2,
43
reseta_memoria
livre
15
5
16
9
escolha
3
1
posicao_lendo
posicao_gravando
10
4
modulacao_lendo
gravando
11
memoria_cheia
tempo_lendo
write_memoria
7
1
12
14
13
lendo
conta_nota
8
vai_escolha
8
read_memoria
novo_tempo3
novo_tempo1
novo_tempo2
44
10
45
Prximo estado
escolha
livre
F1
05
escolha
posicao_gravando
F2
06
escolha
posicao_lendo
F3
04
escolha
reseta_memoria
F4
0C
escolha
esc
76
46
posicao_gravando
escolha
esc
76
posicao_gravando
gravando
16
00
posicao_gravando
gravando
2E
01
posicao_gravando
gravando
26
10
sadas
tecla_out
data_done_tick,
respectivamente,
sada
47
estado
vai_escolha
os
registradores
conta_nota_reg
48
escolha
esc
76
memoria_cheia
escolha
esc
76
Prximo estado
esc
76
posicao_lendo modulacao_lendo
16
00
posicao_lendo modulacao_lendo
2E
01
posicao_lendo modulacao_lendo
26
10
posicao_lendo
escolha
49
Prximo
estado
Tecla
Scan code
(hexa)
Modulao
modulacao_lendo
escolha
esc
76
modulacao_lendo
tempo_lendo
enter
5A
Tom original
modulacao_lendo
tempo_lendo
15
modulacao_lendo
tempo_lendo
1D
Um tom acima
modulacao_lendo
tempo_lendo
24
modulacao_lendo
tempo_lendo
2D
modulacao_lendo
tempo_lendo
2C
modulacao_lendo
tempo_lendo
35
modulacao_lendo
tempo_lendo
3C
modulacao_lendo
tempo_lendo
43
modulacao_lendo
tempo_lendo
44
modulacao_lendo
tempo_lendo
4D
modulacao_lendo
tempo_lendo
54
modulacao_lendo
tempo_lendo
5B
modulacao_lendo
tempo_lendo
1C
modulacao_lendo
tempo_lendo
1B
Um tom abaixo
modulacao_lendo
tempo_lendo
23
modulacao_lendo
tempo_lendo
2B
modulacao_lendo
tempo_lendo
34
modulacao_lendo
tempo_lendo
33
modulacao_lendo
tempo_lendo
3B
modulacao_lendo
tempo_lendo
42
modulacao_lendo
tempo_lendo
4B
modulacao_lendo
tempo_lendo
4C
modulacao_lendo
tempo_lendo
52
modulacao_lendo
tempo_lendo
5D
50
Novo tempo
tempo_lendo
escolha
esc
76
tempo_lendo
lendo
enter
5A
Tempo original
tempo_lendo
lendo
15
tempo_lendo
lendo
1D
tempo_lendo
lendo
24
tempo_lendo
lendo
2D
tempo_lendo
lendo
2C
tempo_lendo
lendo
35
tempo_lendo
lendo
3C
tempo_lendo
lendo
43
tempo_lendo
lendo
1C
tempo_lendo
lendo
1B
tempo_lendo
lendo
23
tempo_lendo
lendo
2B
Tempo original *2
tempo_lendo
lendo
34
tempo_lendo
lendo
33
tempo_lendo
lendo
3B
tempo_lendo
lendo
42
Tempo original *3
as
sadas
tecla_out
data_done_tick.
As
sadas
51
No estado lendo, a sada addr recebe o endereo que ser| usado para ler
as informaes da memria, dado pela diferena entre os registradores:
addr1_reg
laddr1_reg,
addr2_reg
laddr2_reg,
addr3_reg
estados
novo_tempo1,
novo_tempo2
novo_tempo3
so
52
53
, ou 800Hz.
Os sinais in0, in1, in2 e in3 so roteados { sada sseg, dependendo
escolha
livre
posicao_gravando
gravando
posicao_lendo
modulacao_lendo
tempo_lendo
conta_nota
memoria_cheia
reseta_memoria
54
55
dada por
sncronos.
O cdigo em VHDL deste mdulo pode ser visto no Anexo C.
56
break_saida3,
saida4,
break_saida4,
saida5,
reset_data,
de
todos
os
estados
da
mquina,
sempre
que
sinal
57
idle
23
1
reset_data
saida1
break_idle
22
change_data
21
reset_data
22
20
4
saida2
break_saida1
19
change_data
18
reset_data
19
17
6
saida3
break_saida2
16
change_data
15
reset_data
16
14
8
saida4
break_saida3
13
change_data
12
reset_data
13
11
saida5
break_saida4
10
Figura 29 - Mquina de estados do mdulo de processamento de notas
58
10
11
12
13
14
15
59
estado)
16
17
18
19
20
21
22
23
60
61
62
Tecla
Scan code
Cdigo de 6
Nome da nota
Frequncia da nota
(hexa)
bits
gerada
gerada
000000
D1
65,406Hz
000001
D#1
69,296Hz
000010
R1
73,416Hz
000011
R#1
77,782Hz
000100
Mi1
82,407Hz
000101
F1
87,307Hz
000110
F#1
92,499Hz
000111
Sol1
97,999Hz
001000
Sol#1
103,83Hz
001001
L1
110,00Hz
001010
L#1
116,54Hz
001011
Si1
123,47Hz
15
001100
D2
130,81Hz
1D
001101
D#2
138,59Hz
24
001110
R2
146,83Hz
2D
001111
R#2
155,56Hz
2C
010000
Mi2
164,81Hz
35
010001
F2
174,61Hz
3C
010010
F#2
185,00Hz
43
010011
Sol2
196,00Hz
44
010100
Sol#2
207,65Hz
4D
010101
L2
220,00Hz
63
54
010110
L#2
233,08Hz
5B
010111
Si2
246,94Hz
1C
011000
D3
261,63Hz
1B
011001
D#3
277,18Hz
23
011010
R3
293,66Hz
2B
011011
R#3
311,13Hz
34
011100
Mi3
329,63Hz
33
011101
F3
349,23Hz
3B
011110
F#3
369,99Hz
42
011111
Sol3
392,00Hz
4B
100000
Sol#3
415,30Hz
4C
100001
L3
440,00Hz
52
100010
L#3
466,16Hz
5D
100011
Si3
493,88Hz
61
100100
D4
523,25Hz
1A
100101
D#4
554,37Hz
22
100110
R4
587,33Hz
21
100111
R#4
622,25Hz
2A
101000
Mi4
659,26Hz
32
101001
F4
698,46Hz
31
101010
F#4
739,99Hz
3A
101011
Sol4
783,99Hz
41
101100
Sol#4
830,61Hz
49
101101
L4
880,00Hz
4A
101110
L#4
932,33Hz
51
101111
Si4
987,77Hz
110000
D5
1046,5Hz
110001
D#5
1108,7Hz
110010
R5
1174,7Hz
110011
R#5
1244,5Hz
110100
Mi5
1318,5Hz
110101
F5
1396,9Hz
110110
F#5
1480,0Hz
110111
Sol5
1568,0Hz
111000
Sol#5
1661,2Hz
111001
L5
1760,0Hz
111010
L#5
1864,7Hz
64
111011
Si5
1975,5Hz
65
66
67
68
69
70
- Retrao: regio onde o feixe de eltrons retorna para o canto esquerdo da tela. O
sinal video_on desabilitado nessa |rea e o seu tamanho de 96 pixels.
- Fronteira direita: regio que forma a fronteira direita da tela. O sinal video_on
desabilitado nessa rea e o seu tamanho de 16 pixels.
- Fronteira esquerda: regio que forma a fronteira esquerda da tela. O sinal
video_on desabilitado nessa |rea e o seu tamanho de 48 pixels.
Um perodo do sinal v_sync o tempo que o feixe de eltrons leva para
varrer a tela inteira. A unidade de movimento de v_sync representada em
termos de linhas horizontais, e um perodo contm 525 linhas que podem ser
divididas em 4 regies:
- Display: regio onde as linhas so realmente mostradas na tela. O tamanho
dessa regio de 480 linhas.
- Retrao: regio onde o feixe de eltrons retorna para o canto superior esquerdo
da tela. O sinal video_on desabilitado nessa |rea e o seu tamanho de 2 linhas.
- Fronteira inferior: regio que forma a fronteira inferior da tela. O sinal
video_on desabilitado nessa |rea e o seu tamanho de 10 linhas.
- Fronteira superior: regio que forma a fronteira superior da tela. O sinal
video_on desabilitado nessa |rea e o seu tamanho de 33 linhas.
Todos os valores das regies mencionadas acima so definidos como
constantes no programa. O diagrama de tempo do scan horizontal pode ser visto
na Figura 18.
A frequncia de pixels do circuito determinada pela multiplicao de trs
fatores: o nmero de pixels em uma linha horizontal, o nmero de linhas em uma
tela e o nmero de telas por segundo. Adotando 60 como o nmero de telas por
segundo, a frequncia de pixels de aproximadamente 25MHz (800
60
525
71
Seu prximo valor atualizado a cada clock de 50MHz com o oposto do seu valor
atual, gerando assim um sinal com frequncia de 25MHz.
O sinal h_sync obtido atravs de um contador que conte at 800, dado
pelo registrador h_count, e um circuito decodificador. O registrador h_count
tem sua contagem incrementada pelo registrador pixel_tick e sua contagem
iniciada no incio da regio de display, fazendo com que a sada do contador, o
sinal pixel_x, seja usada como coordenada do eixo x da regio de display. O sinal
h_sync recebe o valor 0 apenas na regio de retrao, quando o registrador
h_count possui seu valor entre 656 e 751.
O sinal h_end tem como finalidade marcar o fim da contagem do
registrador h_count. Esse sinal usado para iniciar uma nova contagem no
contador horizontal e incrementar o contador vertical.
O sinal v_sync obtido atravs de um contador que conte at 525, dado
pelo registrador v_count, e um circuito decodificador. O registrador v_count
tem sua contagem incrementada pelo sinal h_end e sua contagem tambm
iniciada no incio da regio de display, fazendo com que a sada do contador, o
sinal pixel_y, seja usada como coordenada y da regio de display. O sinal
v_sync recebe o valor 0 apenas na regio de retrao, quando o registrador
v_count possui seu valor igual a 490 ou 491.
O sinal v_end tem como finalidade marcar o fim da contagem do
registrador v_count e iniciar uma nova contagem no mesmo.
O sinal video_on recebe valor lgico 1 apenas na intercesso das regies
de display do eixo x e do eixo y, para que nada seja desenhado nas fronteiras da
tela. Para evitar glitches, as sadas h_sync e v_sync passam por buffers,
gerando atraso de um ciclo de clock [7]. Por isso se faz necessrio que o sinal
rgb, no mdulo de controle VGA, tambm passe por um buffer antes de ser
disponibilizado no conector VGA.
O cdigo em VHDL desse mdulo pode ser visto no Anexo H.
72
73
Esse mdulo foi baseado no esquema de mapeamento de objetos (objectmapped scheme). O diagrama conceitual de um circuito de gerao de pixels
baseado no esquema de mapeamento de objetos pode ser visto na Figura 36.
O diagrama consiste em 3 circuitos de gerao de objetos e um circuito de
seleo e roteamento, nomeado de rgb mux. Um circuito de gerao de objetos
realiza as seguintes operaes:
- Ele contm as coordenadas do objeto (definidas como constantes no
programa) e compara essas coordenadas com a atual localizao do scan, dado
pelos sinais pixel_x e pixel_y.
- Se a atual localizao do scan estiver dentro da regio do objeto, o circuito
sobe o nvel do sinal objn_on para 1, indicando que o objeto deve ser
desenhado na tela.
- Especifica a cor do objeto atravs do sinal objn_rgb.
74
24
8 bits, ou 211
8 bits.
75
Usando letras com o tamanho de 8 por 16 pixels numa tela com resoluo de
640x480, 80 (
640
480
16
letras podem ser encaixadas em uma linha vertical. Logo, pode-se tratar a tela
como uma tela de 80 por 30 blocos, onde cada bloco contm uma letra. As letras
podem ser postas na tela usando-se essas coordenadas escaladas.
O funcionamento do circuito de gerao de textos envolve dois estgios,
como pode ser visto na Figura 38. No primeiro est|gio, os sinais pixel_x (9
downto 3) e pixel_y (8 downto 4) fornecem as coordenadas x e y de um
determinado bloco. O circuito de gerao de caracteres usa essas coordenadas
76
para gerar o valor desse bloco, dado pelo sinal chamado char_addr, que
corresponde a um padro na ROM. No segundo estgio, o sinal char_addr se
transforma nos 7 bits mais significativos de endereamento da ROM e especifica a
localizao do padro desejado. Esses 7 bits so concatenados com os 4 bits
menos significativos da coordenada y da tela, dados pelo sinal pixel_y (3 downto
0) e chamado de row_addr, formando assim o endereo completo da ROM,
chamado rom_addr. A sada da ROM, chamada font_word, corresponde a uma
linha de 8 bits do padro escolhido. Os 3 bits menos significativos da coordenada
x da tela, dados pelo sinal pixel_x (2 downto 0) e chamado de bit_addr,
especificam a localizao do pixel desejado, dado pelo sinal font_bit, e um
multiplexador escolhe o bit correspondente ao pixel na sada da ROM.
77
78
79
CIRCUITO ANALGICO
80
Antes de cada entrada do circuito acima um filtro passa baixa foi adicionado.
Esse filtro tem como funo transformar o sinal de onda quadrada em triangular
(funcionando como um circuito integrador para frequncias acima da frequncia
de corte) e reduzir a amplitude proporcionalmente frequncia, deixando a
sensao sonora mais agradvel (sons com frequncias baixas so percebidas
pelo ouvido humano como tendo menos intensidade do que sons de frequncias
mdias, para a mesma amplitude de onda). O filtro passa baixa pode ser visto na
Figura 43.
81
1
2
1
2
82
83
TESTES E RESULTADOS
O circuito analgico foi testado gerando-se as notas D1, D2 e D3 e
84
85
Figura 47 - Formas de onda das notas D1, D2 e D3 na sada do circuito somador, vistas
separadamente
86
87
88
CONCLUSO
A proposta para a realizao de um sintetizador de sons polifnico foi cumprida
em 5 oitavas diferentes,
sonoridade,
fcil utilizao do sintetizador, com a criao de uma interface visual com todos
89
REFERNCIAS
[1] RATTON, Miguel. Novas tecnologias aplicadas msica, Paran, outubro de
2006. Disponvel em: <http://www.musiccenter.com.br/index.php?option=com_content&view=article&id=85:novastecnologias-aplicadas-a-musica-&catid=13:instrumentos&Itemid=5>. Acesso em:
Oito de fevereiro de 2011.
[2] MOOG MUSIC INC. Moog music [internet]. Disponvel em:
<www.moogmusic.com>. Acesso em: 29 de fevereiro de 2011.
[3] MUNIZ, Lvia Gerde. Implementao de um sintetizador de sons digital
monofnico em FPGA. Projeto de graduao em engenharia da computao,
universidade federal do Esprito Santo, Vitria, 2009.
[4] SOUZA, Carlos. A fsica da msica [internet]. Disponvel em:
<http://www.das.inpe.br/~alex/FisicadaMusica/fismus_introducao.htm>.
Acesso em: 28 de fevereiro de 2011.
[5] NETTO, Luiz. Matemtica na msica [internet]. Atualizada em 05 de maro
de 2006. Disponvel em: < http://caraipora2.tripod.com/assuntos.htm>. Acesso
em: 07 de fevereiro de 2011.
[6] DIGILENTINC. Digilent [internet]. Disponvel em <www.digilentinc.com>.
Acesso em: 15 de fevereiro de 2011.
[7] CHU, Pong P. FPGA prototyping by VHDL examples. Nova Jersey: John Wiley
& Sons, Inc. 2008.
[8] XILINX. Spartan-3E FPGA Family: Data Sheet. Verso 3.8. Agosto de 2009.
[9] DIGILENTINC. Digilent Nexys2 Board Reference Manual. Junho de 2008.
[10] RATTON, Miguel. Tecnologia dos instrumentos eletrnicos. udio Msica
e Tecnologia, Rio de Janeiro, edio 119, agosto de 2001.
90
ANEXOS
Anexo A - Cdigo em VHDL do mdulo de entrada PS2
Anexo B - Cdigo em VHDL do mdulo do modo de operao
Anexo C Cdigo em VHDL do mdulo de memria
Anexo D Cdigo em VHDL do mdulo de processamento das notas
Anexo E Cdigo em VHDL do mdulo de modulao
Anexo F Cdigo em VHDL do mdulo de gerao de frequncias
Anexo G Cdigo em VHDL do mdulo de controle VGA
Anexo H Cdigo em VHDL do mdulo de sincronizao VGA
Anexo I Cdigo em VHDL do mdulo de gerao de pixels
Anexo J Cdigo em VHDL da ROM das fontes
Anexo K Cdigo em VHDL da interligao dos mdulos do sintetizador
Anexo L Arquivo ucf do sintetizador de sons
91
92
93
94
--==================================================================
--Gerao do clock de 1k para contagem do tempo de durao das notas
--==================================================================
--Atualizao do registrador de contagem
process(clk,rst)
begin
if rst='1' then
cont50k_reg <= 0;
elsif (clk'event and clk='1') then
cont50k_reg <= cont50k_next;
end if;
end process;
--Lgica do prximo valor do registrador de contagem e do sinal tick_10k
process(cont50k_reg)
begin
cont50k_next <= cont50k_reg;
tick_10k <= '0';
if cont50k_reg<4999 then
cont50k_next <= cont50k_reg + 1;
else
cont50k_next <= 0;
tick_10k <= '1';
end if;
end process;
--==================================================
--Mquina de estados que controla o modo de operao
--==================================================
--Atualizao dos registradores de dados e registrador de estado
process(clk,rst)
begin
if rst='1' then
tecla_reg <= (others=>'1');
mem_tecla_reg <= (others=>'1');
state_reg <= escolha;
slot_gravacao_reg <= "11";
slot_leitura_reg <= "11";
modulacao_reg <= "00000";
tempo_reg <= "00000";
addr1_reg <= (others=>'0');
addr2_reg <= (others=>'0');
addr3_reg <= (others=>'0');
laddr1_reg <= (others=>'0');
laddr2_reg <= (others=>'0');
laddr3_reg <= (others=>'0');
conta_nota_reg <= (others=>'0');
conta_notam_reg <= 0;
tempo_nota_reg <= (others=>'0');
tempo_notam_reg <= 0;
done_tick_reg <= "00";
contrst_reg <= 0;
elsif (clk'event and clk='1') then
tecla_reg <= tecla_next;
mem_tecla_reg <= mem_tecla_next;
state_reg <= state_next;
slot_gravacao_reg <= slot_gravacao_next;
slot_leitura_reg <= slot_leitura_next;
95
96
97
98
99
end case;
end if;
when tempo_lendo =>
estado <= "0111";
if (tecla_next="01110110" or tecla_next="01011010" or tecla_next="00010101" or
tecla_next="00011101" or tecla_next="00100100" or tecla_next="00101101" or tecla_next="00101100" or
tecla_next="00110101" or tecla_next="00111100" or tecla_next="01000011" or tecla_next="00011100" or
tecla_next="00011011" or tecla_next="00100011" or tecla_next="00101011" or tecla_next="00110100" or
tecla_next="00110011" or tecla_next="00111011" or tecla_next="01000010") and tecla_reg="11110000" then
state_next <= lendo;
case tecla_next is
when "01110110" =>
state_next <= escolha;
when "01011010" =>
tempo_next <= "00000";
when "00010101" =>
tempo_next <= "00001";
when "00011101" =>
tempo_next <= "00010";
when "00100100" =>
tempo_next <= "00011";
when "00101101" =>
tempo_next <= "00100";
when "00101100" =>
tempo_next <= "00101";
when "00110101" =>
tempo_next <= "00110";
when "00111100" =>
tempo_next <= "00111";
when "01000011" =>
tempo_next <= "01000";
when "00011100" =>
tempo_next <= "01001";
when "00011011" =>
tempo_next <= "01010";
when "00100011" =>
tempo_next <= "01011";
when "00101011" =>
tempo_next <= "01100";
when "00110100" =>
tempo_next <= "01101";
when "00110011" =>
tempo_next <= "01110";
when "00111011" =>
tempo_next <= "01111";
when "01000010" =>
tempo_next <= "10000";
when others =>
end case;
end if;
when lendo =>
estado <= "1000";
state_next <= read_memoria;
case slot_leitura_reg is
when "00" =>
addr <= std_logic_vector(addr1_reg-laddr1_reg);
enable_mem1 <= '1';
when "01" =>
addr <= std_logic_vector(addr2_reg-laddr2_reg);
enable_mem2 <= '1';
100
101
102
103
104
105
106
107
108
109
else
state_next <= saida2;
flag_next(1) <= '1';
data2_next <= data_next;
end if;
end if;
when break_idle =>
freq1 <= nota1;
state_next <= reset_data;
flag_next(0) <= '0';
data1_next <= (others=>'1');
when saida2 =>
freq1 <= nota1;
freq2 <= nota2;
if data_next/=data_reg and data_next/="11110000" then
if (data_next=data1_reg or data_next=data2_reg) and data_reg="11110000"
then
state_next <= break_saida1;
else
state_next <= saida3;
flag_next(2) <= '1';
data3_next <= data_next;
end if;
end if;
when break_saida1 =>
freq1 <= nota1;
freq2 <= nota2;
flag_next(1) <= '0';
if data_reg=data1_reg then
state_next <= change_data;
dataprox_next <= data2_reg;
data2_next <= (others=>'1');
data1_next <= data2_reg;
elsif data_reg=data2_reg then
state_next <= reset_data;
data2_next <= (others=>'1');
end if;
when saida3 =>
freq1 <= nota1;
freq2 <= nota2;
freq3 <= nota3;
if data_next/=data_reg and data_next/="11110000" then
if (data_next=data1_reg or data_next=data2_reg or data_next=data3_reg) and
data_reg="11110000" then
state_next <= break_saida2;
else
state_next <= saida4;
flag_next(3) <= '1';
data4_next <= data_next;
end if;
end if;
when break_saida2 =>
freq1 <= nota1;
freq2 <= nota2;
freq3 <= nota3;
flag_next(2) <= '0';
if data_reg=data1_reg then
state_next <= change_data;
dataprox_next <= data3_reg;
data3_next <= (others=>'1');
110
111
112
if ps2_done_tick='1' then
state_next <= saida2;
end if;
elsif flag_reg="00001" then
freq1 <= nota1;
if ps2_done_tick='1' then
state_next <= saida1;
end if;
elsif flag_reg="00000" then
if ps2_done_tick='1' then
state_next <= idle;
end if;
end if;
when change_data =>
if flag_reg="01111" then
freq1 <= nota1;
freq2 <= nota2;
freq3 <= nota3;
freq4 <= nota4;
if ps2_done_tick='1' then
state_next <= saida4;
end if;
elsif flag_reg="00111" then
freq1 <= nota1;
freq2 <= nota2;
freq3 <= nota3;
if ps2_done_tick='1' then
state_next <= saida3;
end if;
elsif flag_reg="00011" then
freq1 <= nota1;
freq2 <= nota2;
if ps2_done_tick='1' then
state_next <= saida2;
end if;
elsif flag_reg="00001" then
freq1 <= nota1;
if ps2_done_tick='1' then
state_next <= saida1;
end if;
elsif flag_reg="00000" then
if ps2_done_tick='1' then
state_next <= idle;
end if;
end if;
end case;
if reseta_processamento='1' then
state_next <= reset;
end if;
end process;
--Lgica do valor dos sinais nota(1-5)
with data1_reg select
nota1 <= "001100" when "00010101",
"001101" when "00011101",
"001110" when "00100100",
"001111" when "00101101",
"010000" when "00101100",
"010001" when "00110101",
"010010" when "00111100",
113
114
115
116
117
118
119
120
121
122
123
124
if nota_in="000001" then
if count_reg<360771 then
freq_next <= '0';
count_next <= count_reg+1;
elsif count_reg<721541 then
freq_next <= '1';
count_next <= count_reg+1;
else
freq_next <= '1';
count_next <= 0;
end if;
else
freq_next <= '0';
count_next <= 0;
end if;
when re1 =>
if nota_in="000010" then
if count_reg<340525 then
freq_next <= '0';
count_next <= count_reg+1;
elsif count_reg<681049 then
freq_next <= '1';
count_next <= count_reg+1;
else
freq_next <= '1';
count_next <= 0;
end if;
else
freq_next <= '0';
count_next <= 0;
end if;
when res1 =>
if nota_in="000011" then
if count_reg<321411 then
freq_next <= '0';
count_next <= count_reg+1;
elsif count_reg<642821 then
freq_next <= '1';
count_next <= count_reg+1;
else
freq_next <= '1';
count_next <= 0;
end if;
else
freq_next <= '0';
count_next <= 0;
end if;
when mi1 =>
if nota_in="000100" then
if count_reg<303372 then
freq_next <= '0';
count_next <= count_reg+1;
elsif count_reg<606743 then
freq_next <= '1';
count_next <= count_reg+1;
else
freq_next <= '1';
count_next <= 0;
end if;
else
125
126
127
elsif
count_reg<382233 then
freq_next <= '1';
count_next <= count_reg+1;
else
freq_next <= '1';
count_next <= 0;
end if;
else
freq_next <= '0';
count_next <= 0;
end if;
when dos2 =>
if nota_in="001101" then
if count_reg<180388 then
freq_next <= '0';
count_next <= count_reg+1;
elsif count_reg<360775 then
freq_next <= '1';
count_next <= count_reg+1;
else
freq_next <= '1';
count_next <= 0;
end if;
else
freq_next <= '0';
count_next <= 0;
end if;
when re2 =>
if nota_in="001110" then
if count_reg<170265 then
freq_next <= '0';
count_next <= count_reg+1;
elsif count_reg<340529 then
freq_next <= '1';
count_next <= count_reg+1;
else
freq_next <= '1';
count_next <= 0;
end if;
else
freq_next <= '0';
count_next <= 0;
end if;
when res2 =>
if nota_in="001111" then
if count_reg<160709 then
freq_next <= '0';
count_next <= count_reg+1;
elsif count_reg<321418 then
freq_next <= '1';
count_next <= count_reg+1;
else
freq_next <= '1';
count_next <= 0;
end if;
else
freq_next <= '0';
count_next <= 0;
end if;
when mi2 =>
128
if nota_in="010000" then
if count_reg<151690 then
freq_next <= '0';
count_next <= count_reg+1;
elsif count_reg<303379 then
freq_next <= '1';
count_next <= count_reg+1;
else
freq_next <= '1';
count_next <= 0;
end if;
else
freq_next <= '0';
count_next <= 0;
end if;
when fa2 =>
if nota_in="010001" then
if count_reg<143176 then
freq_next <= '0';
count_next <= count_reg+1;
elsif count_reg<286351 then
freq_next <= '1';
count_next <= count_reg+1;
else
freq_next <= '1';
count_next <= 0;
end if;
else
freq_next <= '0';
count_next <= 0;
end if;
when fas2 =>
if nota_in="010010" then
if count_reg<135135 then
freq_next <= '0';
count_next <= count_reg+1;
elsif count_reg<270269 then
freq_next <= '1';
count_next <= count_reg+1;
else
freq_next <= '1';
count_next <= 0;
end if;
else
freq_next <= '0';
count_next <= 0;
end if;
when sol2 =>
if nota_in="010011" then
if count_reg<127551 then
freq_next <= '0';
count_next <= count_reg+1;
elsif count_reg<255102 then
freq_next <= '1';
count_next <= count_reg+1;
else
freq_next <= '1';
count_next <= 0;
end if;
else
129
130
131
elsif
count_reg<160703 then
freq_next <= '1';
count_next <= count_reg+1;
else
freq_next <= '1';
count_next <= 0;
end if;
else
freq_next <= '0';
count_next <= 0;
end if;
when mi3 =>
if nota_in="011100" then
if count_reg<75842 then
freq_next <= '0';
count_next <= count_reg+1;
elsif count_reg<151684 then
freq_next <= '1';
count_next <= count_reg+1;
else
freq_next <= '1';
count_next <= 0;
end if;
else
freq_next <= '0';
count_next <= 0;
end if;
when fa3 =>
if nota_in="011101" then
if count_reg<71586 then
freq_next <= '0';
count_next <= count_reg+1;
elsif count_reg<143171 then
freq_next <= '1';
count_next <= count_reg+1;
else
freq_next <= '1';
count_next <= 0;
end if;
else
freq_next <= '0';
count_next <= 0;
end if;
when fas3 =>
if nota_in="011110" then
if count_reg<67569 then
freq_next <= '0';
count_next <= count_reg+1;
elsif count_reg<135137 then
freq_next <= '1';
count_next <= count_reg+1;
else
freq_next <= '1';
count_next <= 0;
end if;
else
freq_next <= '0';
count_next <= 0;
end if;
when sol3 =>
132
if nota_in="011111" then
if count_reg<63775 then
freq_next <= '0';
count_next <= count_reg+1;
elsif count_reg<127550 then
freq_next <= '1';
count_next <= count_reg+1;
else
freq_next <= '1';
count_next <= 0;
end if;
else
freq_next <= '0';
count_next <= 0;
end if;
when sols3 =>
if nota_in="100000" then
if count_reg<60197 then
freq_next <= '0';
count_next <= count_reg+1;
elsif count_reg<120393 then
freq_next <= '1';
count_next <= count_reg+1;
else
freq_next <= '1';
count_next <= 0;
end if;
else
freq_next <= '0';
count_next <= 0;
end if;
when la3 =>
if nota_in="100001" then
if count_reg<56818 then
freq_next <= '0';
count_next <= count_reg+1;
elsif count_reg<113635 then
freq_next <= '1';
count_next <= count_reg+1;
else
freq_next <= '1';
count_next <= 0;
end if;
else
freq_next <= '0';
count_next <= 0;
end if;
when las3 =>
if nota_in="100010" then
if count_reg<53629 then
freq_next <= '0';
count_next <= count_reg+1;
elsif count_reg<107258 then
freq_next <= '1';
count_next <= count_reg+1;
else
freq_next <= '1';
count_next <= 0;
end if;
else
133
134
135
elsif
count_reg<67568 then
freq_next <= '1';
count_next <= count_reg+1;
else
freq_next <= '1';
count_next <= 0;
end if;
else
freq_next <= '0';
count_next <= 0;
end if;
when sol4 =>
if nota_in="101011" then
if count_reg<31888 then
freq_next <= '0';
count_next <= count_reg+1;
elsif count_reg<63775 then
freq_next <= '1';
count_next <= count_reg+1;
else
freq_next <= '1';
count_next <= 0;
end if;
else
freq_next <= '0';
count_next <= 0;
end if;
when sols4 =>
if nota_in="101100" then
if count_reg<30098 then
freq_next <= '0';
count_next <= count_reg+1;
elsif count_reg<60196 then
freq_next <= '1';
count_next <= count_reg+1;
else
freq_next <= '1';
count_next <= 0;
end if;
else
freq_next <= '0';
count_next <= 0;
end if;
when la4 =>
if nota_in="101101" then
if count_reg<28409 then
freq_next <= '0';
count_next <= count_reg+1;
elsif count_reg<56817 then
freq_next <= '1';
count_next <= count_reg+1;
else
freq_next <= '1';
count_next <= 0;
end if;
else
freq_next <= '0';
count_next <= 0;
end if;
when las4 =>
136
if nota_in="101110" then
if count_reg<26814 then
freq_next <= '0';
count_next <= count_reg+1;
elsif count_reg<53628 then
freq_next <= '1';
count_next <= count_reg+1;
else
freq_next <= '1';
count_next <= 0;
end if;
else
freq_next <= '0';
count_next <= 0;
end if;
when si4 =>
if nota_in="101111" then
if count_reg<25309 then
freq_next <= '0';
count_next <= count_reg+1;
elsif count_reg<50618 then
freq_next <= '1';
count_next <= count_reg+1;
else
freq_next <= '1';
count_next <= 0;
end if;
else
freq_next <= '0';
count_next <= 0;
end if;
when do5 =>
if nota_in="110000" then
if count_reg<23889 then
freq_next <= '0';
count_next <= count_reg+1;
elsif count_reg<47777 then
freq_next <= '1';
count_next <= count_reg+1;
else
freq_next <= '1';
count_next <= 0;
end if;
else
freq_next <= '0';
count_next <= 0;
end if;
when dos5 =>
if nota_in="110001" then
if count_reg<22549 then
freq_next <= '0';
count_next <= count_reg+1;
elsif count_reg<45097 then
freq_next <= '1';
count_next <= count_reg+1;
else
freq_next <= '1';
count_next <= 0;
end if;
else
137
138
139
elsif
count_reg<28409 then
freq_next <= '1';
count_next <= count_reg+1;
else
freq_next <= '1';
count_next <= 0;
end if;
else
freq_next <= '0';
count_next <= 0;
end if;
when las5 =>
if nota_in="111010" then
if count_reg<13407 then
freq_next <= '0';
count_next <= count_reg+1;
elsif count_reg<26814 then
freq_next <= '1';
count_next <= count_reg+1;
else
freq_next <= '1';
count_next <= 0;
end if;
else
freq_next <= '0';
count_next <= 0;
end if;
when si5 =>
if nota_in="111011" then
if count_reg<12655 then
freq_next <= '0';
count_next <= count_reg+1;
elsif count_reg<25309 then
freq_next <= '1';
count_next <= count_reg+1;
else
freq_next <= '1';
count_next <= 0;
end if;
else
freq_next <= '0';
count_next <= 0;
end if;
end case;
end process;
--Lgica do prximo valor do registrador de estados
process(nota_in,state_reg)
begin
state_next <= state_reg;
case nota_in is
when "000000" =>
state_next <= do1;
when "000001" =>
state_next <= dos1;
when "000010" =>
state_next <= re1;
when "000011" =>
state_next <= res1;
when "000100" =>
140
141
142
143
144
if h_end='1' then
h_count_next <= (others=>'0');
else
h_count_next <= h_count_reg + 1;
end if;
else
h_count_next <= h_count_reg;
end if;
end process;
process (v_count_reg,h_end,v_end,pixel_tick_reg)
begin
if pixel_tick_reg='1' and h_end='1' then
if v_end='1' then
v_count_next <= (others=>'0');
else
v_count_next <= v_count_reg + 1;
end if;
else
v_count_next <= v_count_reg;
end if;
end process;
h_sync_next <=
'0' when (h_count_reg>=(HD+HF)) and (h_count_reg<=(HD+HF+HR-1)) else
'1';
v_sync_next <=
'0' when (v_count_reg>=(VD+VF)) and (v_count_reg<=(VD+VF+VR-1)) else
'1';
video_on <=
'1' when (h_count_reg<HD) and (v_count_reg<VD) else
'0';
h_sync <= h_sync_reg;
v_sync <= v_sync_reg;
pixel_x <= std_logic_vector(h_count_reg);
pixel_y <= std_logic_vector(v_count_reg);
p_tick <= pixel_tick_reg;
end sync_VGA;
145
146
147
148
tecladob4_on <=
'1' when (TECLADOB4_X_L<=pix_x) and (pix_x<=TECLADOB4_X_R) and
(TECLADOB_Y_T<=pix_y) and (pix_y<=TECLADOB_Y_B) else
'0';
tecladob5_on <=
'1' when (TECLADOB5_X_L<=pix_x) and (pix_x<=TECLADOB5_X_R) and
(TECLADOB_Y_T<=pix_y) and (pix_y<=TECLADOB_Y_B) else
'0';
tecladob6_on <=
'1' when (TECLADOB6_X_L<=pix_x) and (pix_x<=TECLADOB6_X_R) and
(TECLADOB_Y_T<=pix_y) and (pix_y<=TECLADOB_Y_B) else
'0';
tecladob7_on <=
'1' when (TECLADOB7_X_L<=pix_x) and (pix_x<=TECLADOB7_X_R) and
(TECLADOB_Y_T<=pix_y) and (pix_y<=TECLADOB_Y_B) else
'0';
tecladob_rgb <= "11111111";
--Teclas pretas do teclado
tecladop1_on <=
'1' when (TECLADOP1_X_L<=pix_x) and (pix_x<=TECLADOP1_X_R) and
(TECLADOP_Y_T<=pix_y) and (pix_y<=TECLADOP_Y_B) else
'0';
tecladop2_on <=
'1' when (TECLADOP2_X_L<=pix_x) and (pix_x<=TECLADOP2_X_R) and
(TECLADOP_Y_T<=pix_y) and (pix_y<=TECLADOP_Y_B) else
'0';
tecladop3_on <=
'1' when (TECLADOP3_X_L<=pix_x) and (pix_x<=TECLADOP3_X_R) and
(TECLADOP_Y_T<=pix_y) and (pix_y<=TECLADOP_Y_B) else
'0';
tecladop4_on <=
'1' when (TECLADOP4_X_L<=pix_x) and (pix_x<=TECLADOP4_X_R) and
(TECLADOP_Y_T<=pix_y) and (pix_y<=TECLADOP_Y_B) else
'0';
tecladop5_on <=
'1' when (TECLADOP5_X_L<=pix_x) and (pix_x<=TECLADOP5_X_R) and
(TECLADOP_Y_T<=pix_y) and (pix_y<=TECLADOP_Y_B) else
'0';
tecladop_rgb <= "00000000";
--Divises do teclado
divisao1_on <=
'1' when (DIVISAO1_X_L<=pix_x) and (pix_x<=DIVISAO1_X_R) and
(DIVISAO_Y_T<=pix_y) and (pix_y<=DIVISAO_Y_B) else
'0';
divisao2_on <=
'1' when (DIVISAO2_X_L<=pix_x) and (pix_x<=DIVISAO2_X_R) and
(DIVISAO_Y_T<=pix_y) and (pix_y<=DIVISAO_Y_B) else
'0';
divisao3_on <=
'1' when (DIVISAO3_X_L<=pix_x) and (pix_x<=DIVISAO3_X_R) and
(DIVISAO_Y_T<=pix_y) and (pix_y<=DIVISAO_Y_B) else
'0';
divisao4_on <=
'1' when (DIVISAO4_X_L<=pix_x) and (pix_x<=DIVISAO4_X_R) and
(DIVISAO_Y_T<=pix_y) and (pix_y<=DIVISAO_Y_B) else
'0';
divisao5_on <=
'1' when (DIVISAO5_X_L<=pix_x) and (pix_x<=DIVISAO5_X_R) and
(DIVISAO_Y_T<=pix_y) and (pix_y<=DIVISAO_Y_B) else
'0';
149
divisao6_on <=
'1' when (DIVISAO6_X_L<=pix_x) and (pix_x<=DIVISAO6_X_R) and
(DIVISAO_Y_T<=pix_y) and (pix_y<=DIVISAO_Y_B) else
'0';
divisao_rgb <= "00000000";
--Marcadores de oitavas nas teclas brancas
marcab11_on <=
'1' when (MARCAB1_X_L<=pix_x) and (pix_x<=MARCAB1_X_R) and
(MARCAB1_Y_T<=pix_y) and (pix_y<=MARCAB1_Y_B) else
'0';
marcab12_on <=
'1' when (MARCAB1_X_L<=pix_x) and (pix_x<=MARCAB1_X_R) and
(MARCAB2_Y_T<=pix_y) and (pix_y<=MARCAB2_Y_B) else
'0';
marcab13_on <=
'1' when (MARCAB1_X_L<=pix_x) and (pix_x<=MARCAB1_X_R) and
(MARCAB3_Y_T<=pix_y) and (pix_y<=MARCAB3_Y_B) else
'0';
marcab14_on <=
'1' when (MARCAB1_X_L<=pix_x) and (pix_x<=MARCAB1_X_R) and
(MARCAB4_Y_T<=pix_y) and (pix_y<=MARCAB4_Y_B) else
'0';
marcab15_on <=
'1' when (MARCAB1_X_L<=pix_x) and (pix_x<=MARCAB1_X_R) and
(MARCAB5_Y_T<=pix_y) and (pix_y<=MARCAB5_Y_B) else
'0';
marcab21_on <=
'1' when (MARCAB2_X_L<=pix_x) and (pix_x<=MARCAB2_X_R) and
(MARCAB1_Y_T<=pix_y) and (pix_y<=MARCAB1_Y_B) else
'0';
marcab22_on <=
'1' when (MARCAB2_X_L<=pix_x) and (pix_x<=MARCAB2_X_R) and
(MARCAB2_Y_T<=pix_y) and (pix_y<=MARCAB2_Y_B) else
'0';
marcab23_on <=
'1' when (MARCAB2_X_L<=pix_x) and (pix_x<=MARCAB2_X_R) and
(MARCAB3_Y_T<=pix_y) and (pix_y<=MARCAB3_Y_B) else
'0';
marcab24_on <=
'1' when (MARCAB2_X_L<=pix_x) and (pix_x<=MARCAB2_X_R) and
(MARCAB4_Y_T<=pix_y) and (pix_y<=MARCAB4_Y_B) else
'0';
marcab25_on <=
'1' when (MARCAB2_X_L<=pix_x) and (pix_x<=MARCAB2_X_R) and
(MARCAB5_Y_T<=pix_y) and (pix_y<=MARCAB5_Y_B) else
'0';
marcab31_on <=
'1' when (MARCAB3_X_L<=pix_x) and (pix_x<=MARCAB3_X_R) and
(MARCAB1_Y_T<=pix_y) and (pix_y<=MARCAB1_Y_B) else
'0';
marcab32_on <=
'1' when (MARCAB3_X_L<=pix_x) and (pix_x<=MARCAB3_X_R) and
(MARCAB2_Y_T<=pix_y) and (pix_y<=MARCAB2_Y_B) else
'0';
marcab33_on <=
'1' when (MARCAB3_X_L<=pix_x) and (pix_x<=MARCAB3_X_R) and
(MARCAB3_Y_T<=pix_y) and (pix_y<=MARCAB3_Y_B) else
'0';
marcab34_on <=
150
151
152
153
154
155
156
'0';
with pix_x(8 downto 4) select
char_addr_gravacao <=
"1001101" when "01100", --M
"1101111" when "01101", --o
"1100100" when "01110", --d
"1101111" when "01111", --o
"0000000" when "10000", -"1100100" when "10001", --d
"1100101" when "10010", --e
"0000000" when "10011", -"1000111" when "10100", --G
"1110010" when "10101", --r
"1100001" when "10110", --a
"1110110" when "10111", --v
"1100001" when "11000", --a
"0000010" when "11001", --
"0000001" when "11010", --
"1101111" when others; --o
--Texto "Modo de Leitura"
t_leitura_on <=
'1' when (pix_y(9 downto 5)=2) and (12<=pix_x(9 downto 4) and pix_x(9 downto 4)<=26) else
'0';
with pix_x(8 downto 4) select
char_addr_leitura <=
"1001101" when "01100", --M
"1101111" when "01101", --o
"1100100" when "01110", --d
"1101111" when "01111", --o
"0000000" when "10000", -"1100100" when "10001", --d
"1100101" when "10010", --e
"0000000" when "10011", -"1001100" when "10100", --L
"1100101" when "10101", --e
"1101001" when "10110", --i
"1110100" when "10111", --t
"1110101" when "11000", --u
"1110010" when "11001", --r
"1100001" when others; --a
--Texto "Esc -> Menu"
t_esc_on <=
'1' when (pix_y(9 downto 4)=28) and (67<=pix_x(9 downto 3) and pix_x(9 downto 3)<=76) else
'0';
with pix_x(9 downto 3) select
char_addr_esc <=
"1000101" when "1000011", --E
"1110011" when "1000100", --s
"1100011" when "1000101", --c
"0000000" when "1000110", -"0011010" when "1000111", -->
"0000000" when "1001000", -"1001101" when "1001001", --M
"1100101" when "1001010", --e
"1101110" when "1001011", --n
"1110101" when others; --u
--Texto "Escolha da Memria para Gravao"
t_memg_on <=
'1' when (pix_y(9 downto 5)=3) and (4<=pix_x(9 downto 4) and pix_x(9 downto 4)<=35) else
'0';
157
158
159
160
161
162
163
164
165
166
167
168
'0';
with pix_x(9 downto 3) select
char_addr_fm <=
"1000110" when "0101101", --F
"0000000" when "0101110", -"0011010" when "0101111", -->
"0000000" when "0110000", -"1000100" when "0110001", --D
"1101111" when "0110010", --o
"1101001" when "0110011", --i
"1110011" when "0110100", --s
"0000000" when "0110101", -"1110100" when "0110110", --t
"1101111" when "0110111", --o
"1101110" when "0111000", --n
"1110011" when "0111001", --s
"0000000" when "0111010", -"1100001" when "0111011", --a
"1100010" when "0111100", --b
"1100001" when "0111101", --a
"1101001" when "0111110", --i
"1111000" when "0111111", --x
"1101111" when others; --o
--Texto "G -> Dois tons e meio abaixo";
t_gm_on <=
'1' when (pix_y(9 downto 4)=13) and (45<=pix_x(9 downto 3) and pix_x(9 downto 3)<=71) else
'0';
with pix_x(9 downto 3) select
char_addr_gm <=
"1000111" when "0101101", --G
"0000000" when "0101110", -"0011010" when "0101111", -->
"0000000" when "0110000", -"1000100" when "0110001", --D
"1101111" when "0110010", --o
"1101001" when "0110011", --i
"1110011" when "0110100", --s
"0000000" when "0110101", -"1110100" when "0110110", --t
"1101111" when "0110111", --o
"1101110" when "0111000", --n
"1110011" when "0111001", --s
"0000000" when "0111010", -"1100101" when "0111011", --e
"0000000" when "0111100", -"1101101" when "0111101", --m
"1100101" when "0111110", --e
"1101001" when "0111111", --i
"1101111" when "1000000", --o
"0000000" when "1000001", -"1100001" when "1000010", --a
"1100010" when "1000011", --b
"1100001" when "1000100", --a
"1101001" when "1000101", --i
"1111000" when "1000110", --x
"1101111" when others; --o
--Texto "H -> Trs tons abaixo";
t_hm_on <=
'1' when (pix_y(9 downto 4)=15) and (45<=pix_x(9 downto 3) and pix_x(9 downto 3)<=64) else
'0';
169
170
char_addr_km <=
"1001011" when "0101101", --K
"0000000" when "0101110", -"0011010" when "0101111", -->
"0000000" when "0110000", -"1010001" when "0110001", --Q
"1110101" when "0110010", --u
"1100001" when "0110011", --a
"1110100" when "0110100", --t
"1110010" when "0110101", --r
"1101111" when "0110110", --o
"0000000" when "0110111", -"1110100" when "0111000", --t
"1101111" when "0111001", --o
"1101110" when "0111010", --n
"1110011" when "0111011", --s
"0000000" when "0111100", -"1100001" when "0111101", --a
"1100010" when "0111110", --b
"1100001" when "0111111", --a
"1101001" when "1000000", --i
"1111000" when "1000001", --x
"1101111" when others; --o
--Texto "L -> Quatro tons e meio abaixo";
t_lm_on <=
'1' when (pix_y(9 downto 4)=21) and (45<=pix_x(9 downto 3) and pix_x(9 downto 3)<=73) else
'0';
with pix_x(9 downto 3) select
char_addr_lm <=
"1001100" when "0101101", --L
"0000000" when "0101110", -"0011010" when "0101111", -->
"0000000" when "0110000", -"1010001" when "0110001", --Q
"1110101" when "0110010", --u
"1100001" when "0110011", --a
"1110100" when "0110100", --t
"1110010" when "0110101", --r
"1101111" when "0110110", --o
"0000000" when "0110111", -"1110100" when "0111000", --t
"1101111" when "0111001", --o
"1101110" when "0111010", --n
"1110011" when "0111011", --s
"0000000" when "0111100", -"1100101" when "0111101", --e
"0000000" when "0111110", -"1101101" when "0111111", --m
"1100101" when "1000000", --e
"1101001" when "1000001", --i
"1101111" when "1000010", --o
"0000000" when "1000011", -"1100001" when "1000100", --a
"1100010" when "1000101", --b
"1100001" when "1000110", --a
"1101001" when "1000111", --i
"1111000" when "1001000", --x
"1101111" when others; --o
--Texto " -> Cinco tons abaixo";
t_3m_on <=
171
'1' when (pix_y(9 downto 4)=23) and (45<=pix_x(9 downto 3) and pix_x(9 downto 3)<=65) else
'0';
with pix_x(9 downto 3) select
char_addr_3m <=
"0000010" when "0101101", --
"0000000" when "0101110", -"0011010" when "0101111", -->
"0000000" when "0110000", -"1000011" when "0110001", --C
"1101001" when "0110010", --i
"1101110" when "0110011", --n
"1100011" when "0110100", --c
"1101111" when "0110101", --o
"0000000" when "0110110", -"1110100" when "0110111", --t
"1101111" when "0111000", --o
"1101110" when "0111001", --n
"1110011" when "0111010", --s
"0000000" when "0111011", -"1100001" when "0111100", --a
"1100010" when "0111101", --b
"1100001" when "0111110", --a
"1101001" when "0111111", --i
"1111000" when "1000000", --x
"1101111" when others; --o
--Texto "~ -> Cinco tons e meio abaixo";
t_4m_on <=
'1' when (pix_y(9 downto 4)=25) and (45<=pix_x(9 downto 3) and pix_x(9 downto 3)<=72) else
'0';
with pix_x(9 downto 3) select
char_addr_4m <=
"1111110" when "0101101", --~
"0000000" when "0101110", -"0011010" when "0101111", -->
"0000000" when "0110000", -"1000011" when "0110001", --C
"1101001" when "0110010", --i
"1101110" when "0110011", --n
"1100011" when "0110100", --c
"1101111" when "0110101", --o
"0000000" when "0110110", -"1110100" when "0110111", --t
"1101111" when "0111000", --o
"1101110" when "0111001", --n
"1110011" when "0111010", --s
"0000000" when "0111011", -"1100101" when "0111100", --e
"0000000" when "0111101", -"1101101" when "0111110", --m
"1100101" when "0111111", --e
"1101001" when "1000000", --i
"1101111" when "1000001", --o
"0000000" when "1000010", -"1100001" when "1000011", --a
"1100010" when "1000100", --b
"1100001" when "1000101", --a
"1101001" when "1000110", --i
"1111000" when "1000111", --x
"1101111" when others; --o
--Texto "] -> Uma oitava abaixo";
172
t_5m_on <=
'1' when (pix_y(9 downto 4)=27) and (45<=pix_x(9 downto 3) and pix_x(9 downto 3)<=65) else
'0';
with pix_x(9 downto 3) select
char_addr_5m <=
"1011101" when "0101101", --[
"0000000" when "0101110", -"0011010" when "0101111", -->
"0000000" when "0110000", -"1010101" when "0110001", --U
"1101101" when "0110010", --m
"1100001" when "0110011", --a
"0000000" when "0110100", -"1101111" when "0110101", --o
"1101001" when "0110110", --i
"1110100" when "0110111", --t
"1100001" when "0111000", --a
"1110110" when "0111001", --v
"1100001" when "0111010", --a
"0000000" when "0111011", -"1100001" when "0111100", --a
"1100010" when "0111101", --b
"1100001" when "0111110", --a
"1101001" when "0111111", --i
"1111000" when "1000000", --x
"1101111" when others; --o
--Texto "Enter -> Tom original";
t_enterm_on <=
'1' when (pix_y(9 downto 4)=29) and (10<=pix_x(9 downto 3) and pix_x(9 downto 3)<=29) else
'0';
with pix_x(7 downto 3) select
char_addr_enterm <=
"1000101" when "01010", --E
"1101110" when "01011", --n
"1110100" when "01100", --t
"1100101" when "01101", --e
"1110010" when "01110", --r
"0000000" when "01111", -"0011010" when "10000", -->
"0000000" when "10001", -"1010100" when "10010", --T
"1101111" when "10011", --o
"1101101" when "10100", --m
"0000000" when "10101", -"1101111" when "10110", --o
"1110010" when "10111", --r
"1101001" when "11000", --i
"1100111" when "11001", --g
"1101001" when "11010", --i
"1101110" when "11011", --n
"1100001" when "11100", --a
"1101100" when others; --l
--Texto "Esc -> Menu"
t_escm_on <=
'1' when (pix_y(9 downto 4)=29) and (45<=pix_x(9 downto 3) and pix_x(9 downto 3)<=54) else
'0';
with pix_x(8 downto 3) select
char_addr_escm <=
"1000101" when "101101", --E
"1110011" when "101110", --s
173
174
175
176
177
178
179
180
181
182
183
else
graph_rgb <= "01000000";
end if;
elsif estado="0000" and t_f1_on='1' then
char_addr <= char_addr_f1;
row_addr <= row_addr_8x16;
bit_addr <= bit_addr_8x16;
if font_bit='1' then
graph_rgb <= textorange_rgb;
else
graph_rgb <= "01000000";
end if;
elsif estado="0000" and t_f2_on='1' then
char_addr <= char_addr_f2;
row_addr <= row_addr_8x16;
bit_addr <= bit_addr_8x16;
if font_bit='1' then
graph_rgb <= textorange_rgb;
else
graph_rgb <= "01000000";
end if;
elsif estado="0000" and t_f3_on='1' then
char_addr <= char_addr_f3;
row_addr <= row_addr_8x16;
bit_addr <= bit_addr_8x16;
if font_bit='1' then
graph_rgb <= textorange_rgb;
else
graph_rgb <= "01000000";
end if;
elsif estado="0000" and t_f4_on='1' then
char_addr <= char_addr_f4;
row_addr <= row_addr_8x16;
bit_addr <= bit_addr_8x16;
if font_bit='1' then
graph_rgb <= textorange_rgb;
else
graph_rgb <= "01000000";
end if;
elsif estado="0001" and t_livre_on='1' then
char_addr <= char_addr_livre;
row_addr <= row_addr_16x32;
bit_addr <= bit_addr_16x32;
if font_bit='1' then
graph_rgb <= textyellow_rgb;
else
graph_rgb <= "01000000";
end if;
elsif estado="0010" and t_memg_on='1' then
char_addr <= char_addr_memg;
row_addr <= row_addr_16x32;
bit_addr <= bit_addr_16x32;
if font_bit='1' then
graph_rgb <= textyellow_rgb;
else
graph_rgb <= "01000000";
end if;
elsif (estado="0010" or estado="0101") and t_1_on='1' then
char_addr <= char_addr_1;
row_addr <= row_addr_8x16;
184
185
end if;
elsif estado="0110" and t_memm_on='1' then
char_addr <= char_addr_memm;
row_addr <= row_addr_16x32;
bit_addr <= bit_addr_16x32;
if font_bit='1' then
graph_rgb <= textyellow_rgb;
else
graph_rgb <= "01000000";
end if;
elsif estado="0111" and t_memt_on='1' then
char_addr <= char_addr_memt;
row_addr <= row_addr_16x32;
bit_addr <= bit_addr_16x32;
if font_bit='1' then
graph_rgb <= textyellow_rgb;
else
graph_rgb <= "01000000";
end if;
elsif estado="1000" and t_leitura_on='1' then
char_addr <= char_addr_leitura;
row_addr <= row_addr_16x32;
bit_addr <= bit_addr_16x32;
if font_bit='1' then
graph_rgb <= textyellow_rgb;
else
graph_rgb <= "01000000";
end if;
elsif estado="1001" and t_mema_on='1' then
char_addr <= char_addr_mema;
row_addr <= row_addr_16x32;
bit_addr <= bit_addr_16x32;
if font_bit='1' then
graph_rgb <= textyellow_rgb;
else
graph_rgb <= "01000000";
end if;
elsif estado="0110" and t_qm_on='1' then
char_addr <= char_addr_qm;
row_addr <= row_addr_8x16;
bit_addr <= bit_addr_8x16;
if font_bit='1' then
graph_rgb <= textorange_rgb;
else
graph_rgb <= "01000000";
end if;
elsif estado="0110" and t_am_on='1' then
char_addr <= char_addr_am;
row_addr <= row_addr_8x16;
bit_addr <= bit_addr_8x16;
if font_bit='1' then
graph_rgb <= textorange_rgb;
else
graph_rgb <= "01000000";
end if;
elsif estado="0110" and t_wm_on='1' then
char_addr <= char_addr_wm;
row_addr <= row_addr_8x16;
bit_addr <= bit_addr_8x16;
if font_bit='1' then
186
187
188
end if;
elsif estado="0110" and t_gm_on='1' then
char_addr <= char_addr_gm;
row_addr <= row_addr_8x16;
bit_addr <= bit_addr_8x16;
if font_bit='1' then
graph_rgb <= textorange_rgb;
else
graph_rgb <= "01000000";
end if;
elsif estado="0110" and t_hm_on='1' then
char_addr <= char_addr_hm;
row_addr <= row_addr_8x16;
bit_addr <= bit_addr_8x16;
if font_bit='1' then
graph_rgb <= textorange_rgb;
else
graph_rgb <= "01000000";
end if;
elsif estado="0110" and t_jm_on='1' then
char_addr <= char_addr_jm;
row_addr <= row_addr_8x16;
bit_addr <= bit_addr_8x16;
if font_bit='1' then
graph_rgb <= textorange_rgb;
else
graph_rgb <= "01000000";
end if;
elsif estado="0110" and t_km_on='1' then
char_addr <= char_addr_km;
row_addr <= row_addr_8x16;
bit_addr <= bit_addr_8x16;
if font_bit='1' then
graph_rgb <= textorange_rgb;
else
graph_rgb <= "01000000";
end if;
elsif estado="0110" and t_lm_on='1' then
char_addr <= char_addr_lm;
row_addr <= row_addr_8x16;
bit_addr <= bit_addr_8x16;
if font_bit='1' then
graph_rgb <= textorange_rgb;
else
graph_rgb <= "01000000";
end if;
elsif estado="0110" and t_3m_on='1' then
char_addr <= char_addr_3m;
row_addr <= row_addr_8x16;
bit_addr <= bit_addr_8x16;
if font_bit='1' then
graph_rgb <= textorange_rgb;
else
graph_rgb <= "01000000";
end if;
elsif estado="0110" and t_4m_on='1' then
char_addr <= char_addr_4m;
row_addr <= row_addr_8x16;
bit_addr <= bit_addr_8x16;
if font_bit='1' then
189
190
191
end if;
elsif estado="0111" and t_dt_on='1' then
char_addr <= char_addr_dt;
row_addr <= row_addr_8x16;
bit_addr <= bit_addr_8x16;
if font_bit='1' then
graph_rgb <= textorange_rgb;
else
graph_rgb <= "01000000";
end if;
elsif estado="0111" and t_ft_on='1' then
char_addr <= char_addr_ft;
row_addr <= row_addr_8x16;
bit_addr <= bit_addr_8x16;
if font_bit='1' then
graph_rgb <= textorange_rgb;
else
graph_rgb <= "01000000";
end if;
elsif estado="0111" and t_gt_on='1' then
char_addr <= char_addr_gt;
row_addr <= row_addr_8x16;
bit_addr <= bit_addr_8x16;
if font_bit='1' then
graph_rgb <= textorange_rgb;
else
graph_rgb <= "01000000";
end if;
elsif estado="0111" and t_ht_on='1' then
char_addr <= char_addr_ht;
row_addr <= row_addr_8x16;
bit_addr <= bit_addr_8x16;
if font_bit='1' then
graph_rgb <= textorange_rgb;
else
graph_rgb <= "01000000";
end if;
elsif estado="0111" and t_jt_on='1' then
char_addr <= char_addr_jt;
row_addr <= row_addr_8x16;
bit_addr <= bit_addr_8x16;
if font_bit='1' then
graph_rgb <= textorange_rgb;
else
graph_rgb <= "01000000";
end if;
elsif estado="0111" and t_kt_on='1' then
char_addr <= char_addr_kt;
row_addr <= row_addr_8x16;
bit_addr <= bit_addr_8x16;
if font_bit='1' then
graph_rgb <= textorange_rgb;
else
graph_rgb <= "01000000";
end if;
elsif estado="0111" and t_entert_on='1' then
char_addr <= char_addr_entert;
row_addr <= row_addr_8x16;
bit_addr <= bit_addr_8x16;
if font_bit='1' then
192
193
else
graph_rgb <= marcapoff_rgb;
end if;
elsif marcab51_on='1' then
if nota1_mod="000111" or nota2_mod="000111" or nota3_mod="000111"
or nota4_mod="000111" or nota5_mod="000111" then
graph_rgb <= marcabon_rgb;
else
graph_rgb <= marcaboff_rgb;
end if;
elsif marcap41_on='1' then
if nota1_mod="001000" or nota2_mod="001000" or nota3_mod="001000"
or nota4_mod="001000" or nota5_mod="001000" then
graph_rgb <= marcapon_rgb;
else
graph_rgb <= marcapoff_rgb;
end if;
elsif marcab61_on='1' then
if nota1_mod="001001" or nota2_mod="001001" or nota3_mod="001001"
or nota4_mod="001001" or nota5_mod="001001" then
graph_rgb <= marcabon_rgb;
else
graph_rgb <= marcaboff_rgb;
end if;
elsif marcap51_on='1' then
if nota1_mod="001010" or nota2_mod="001010" or nota3_mod="001010"
or nota4_mod="001010" or nota5_mod="001010" then
graph_rgb <= marcapon_rgb;
else
graph_rgb <= marcapoff_rgb;
end if;
elsif marcab71_on='1' then
if nota1_mod="001011" or nota2_mod="001011" or nota3_mod="001011"
or nota4_mod="001011" or nota5_mod="001011" then
graph_rgb <= marcabon_rgb;
else
graph_rgb <= marcaboff_rgb;
end if;
elsif marcab12_on='1' then
if nota1_mod="001100" or nota2_mod="001100" or nota3_mod="001100"
or nota4_mod="001100" or nota5_mod="001100" then
graph_rgb <= marcabon_rgb;
else
graph_rgb <= marcaboff_rgb;
end if;
elsif marcap12_on='1' then
if nota1_mod="001101" or nota2_mod="001101" or nota3_mod="001101"
or nota4_mod="001101" or nota5_mod="001101" then
graph_rgb <= marcapon_rgb;
else
graph_rgb <= marcapoff_rgb;
end if;
elsif marcab22_on='1' then
if nota1_mod="001110" or nota2_mod="001110" or nota3_mod="001110"
or nota4_mod="001110" or nota5_mod="001110" then
graph_rgb <= marcabon_rgb;
else
graph_rgb <= marcaboff_rgb;
end if;
elsif marcap22_on='1' then
194
195
196
197
198
199
200
201
"11111110", -- 6 *******
"11111110", -- 7 *******
"11111110", -- 8 *******
"01111100", -- 9 *****
"00111000", -- a ***
"00010000", -- b *
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x08
"11111111", -- 0 ********
"11111111", -- 1 ********
"11111111", -- 2 ********
"11111111", -- 3 ********
"11111111", -- 4 ********
"11111111", -- 5 ********
"11100111", -- 6 *** ***
"11000011", -- 7 ** **
"11000011", -- 8 ** **
"11100111", -- 9 *** ***
"11111111", -- a ********
"11111111", -- b ********
"11111111", -- c ********
"11111111", -- d ********
"11111111", -- e ********
"11111111", -- f ********
-- code x09
"00000000", -- 0
"00000000", -- 1
"00000000", -- 2
"00000000", -- 3
"00000000", -- 4
"00111100", -- 5 ****
"01100110", -- 6 ** **
"01000010", -- 7 * *
"01000010", -- 8 * *
"01100110", -- 9 ** **
"00111100", -- a ****
"00000000", -- b
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x0a
"11111111", -- 0 ********
"11111111", -- 1 ********
"11111111", -- 2 ********
"11111111", -- 3 ********
"11111111", -- 4 ********
"11000011", -- 5 ** **
"10011001", -- 6 * ** *
"10111101", -- 7 * **** *
"10111101", -- 8 * **** *
"10011001", -- 9 * ** *
"11000011", -- a ** **
"11111111", -- b ********
"11111111", -- c ********
"11111111", -- d ********
"11111111", -- e ********
"11111111", -- f ********
-- code x0b
"00000000", -- 0
"00000000", -- 1
"00011110", -- 2 ****
"00001110", -- 3 ***
"00011010", -- 4 ** *
"00110010", -- 5 ** *
"01111000", -- 6 ****
"11001100", -- 7 ** **
"11001100", -- 8 ** **
"11001100", -- 9 ** **
"11001100", -- a ** **
"01111000", -- b ****
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x0c
"00000000", -- 0
"00000000", -- 1
"00111100", -- 2 ****
"01100110", -- 3 ** **
"01100110", -- 4 ** **
"01100110", -- 5 ** **
"01100110", -- 6 ** **
"00111100", -- 7 ****
"00011000", -- 8 **
"01111110", -- 9 ******
"00011000", -- a **
"00011000", -- b **
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x0d
"00000000", -- 0
"00000000", -- 1
"00111111", -- 2 ******
"00110011", -- 3 ** **
"00111111", -- 4 ******
"00110000", -- 5 **
"00110000", -- 6 **
"00110000", -- 7 **
"00110000", -- 8 **
"01110000", -- 9 ***
"11110000", -- a ****
"11100000", -- b ***
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x0e
"00000000", -- 0
"00000000", -- 1
"01111111", -- 2 *******
"01100011", -- 3 ** **
"01111111", -- 4 *******
"01100011", -- 5 ** **
"01100011", -- 6 ** **
"01100011", -- 7 ** **
"01100011", -- 8 ** **
"01100111", -- 9 ** ***
"11100111", -- a *** ***
"11100110", -- b *** **
"11000000", -- c **
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x0f
"00000000", -- 0
"00000000", -- 1
"00000000", -- 2
"00011000", -- 3 **
"00011000", -- 4 **
"11011011", -- 5 ** ** **
"00111100", -- 6 ****
"11100111", -- 7 *** ***
"00111100", -- 8 ****
"11011011", -- 9 ** ** **
"00011000", -- a **
"00011000", -- b **
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x10
"00000000", -- 0
"10000000", -- 1 *
"11000000", -- 2 **
"11100000", -- 3 ***
"11110000", -- 4 ****
"11111000", -- 5 *****
"11111110", -- 6 *******
"11111000", -- 7 *****
"11110000", -- 8 ****
"11100000", -- 9 ***
"11000000", -- a **
"10000000", -- b *
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x11
"00000000", -- 0
"00000010", -- 1
*
"00000110", -- 2
**
"00001110", -- 3 ***
"00011110", -- 4 ****
"00111110", -- 5 *****
"11111110", -- 6 *******
"00111110", -- 7 *****
"00011110", -- 8 ****
"00001110", -- 9 ***
"00000110", -- a
**
"00000010", -- b
*
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
202
-- code x12
"00000000", -- 0
"00000000", -- 1
"00011000", -- 2 **
"00111100", -- 3 ****
"01111110", -- 4 ******
"00011000", -- 5 **
"00011000", -- 6 **
"00011000", -- 7 **
"01111110", -- 8 ******
"00111100", -- 9 ****
"00011000", -- a **
"00000000", -- b
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x13
"00000000", -- 0
"00000000", -- 1
"01100110", -- 2 ** **
"01100110", -- 3 ** **
"01100110", -- 4 ** **
"01100110", -- 5 ** **
"01100110", -- 6 ** **
"01100110", -- 7 ** **
"01100110", -- 8 ** **
"00000000", -- 9
"01100110", -- a ** **
"01100110", -- b ** **
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x14
"00000000", -- 0
"00000000", -- 1
"01111111", -- 2 *******
"11011011", -- 3 ** ** **
"11011011", -- 4 ** ** **
"11011011", -- 5 ** ** **
"01111011", -- 6 **** **
"00011011", -- 7 ** **
"00011011", -- 8 ** **
"00011011", -- 9 ** **
"00011011", -- a ** **
"00011011", -- b ** **
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x15
"00000000", -- 0
"01111100", -- 1 *****
"11000110", -- 2 ** **
"01100000", -- 3 **
"00111000", -- 4 ***
"01101100", -- 5 ** **
"11000110", -- 6 ** **
"11000110", -- 7 ** **
"01101100", -- 8 ** **
"00111000", -- 9 ***
"00001100", -- a **
"11000110", -- b ** **
"01111100", -- c *****
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x16
"00000000", -- 0
"00000000", -- 1
"00000000", -- 2
"00000000", -- 3
"00000000", -- 4
"00000000", -- 5
"00000000", -- 6
"00000000", -- 7
"11111110", -- 8 *******
"11111110", -- 9 *******
"11111110", -- a *******
"11111110", -- b *******
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x17
"00000000", -- 0
"00000000", -- 1
"00011000", -- 2 **
"00111100", -- 3 ****
"01111110", -- 4 ******
"00011000", -- 5 **
"00011000", -- 6 **
"00011000", -- 7 **
"01111110", -- 8 ******
"00111100", -- 9 ****
"00011000", -- a **
"01111110", -- b ******
"00110000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x18
"00000000", -- 0
"00000000", -- 1
"00011000", -- 2 **
"00111100", -- 3 ****
"01111110", -- 4 ******
"00011000", -- 5 **
"00011000", -- 6 **
"00011000", -- 7 **
"00011000", -- 8 **
"00011000", -- 9 **
"00011000", -- a **
"00011000", -- b **
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x19
"00000000", -- 0
"00000000", -- 1
"00011000", -- 2 **
"00011000", -- 3 **
"00011000", -- 4 **
"00011000", -- 5 **
"00011000", -- 6 **
"00011000", -- 7 **
"00011000", -- 8 **
"01111110", -- 9 ******
"00111100", -- a ****
"00011000", -- b **
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x1a
"00000000", -- 0
"00000000", -- 1
"00000000", -- 2
"00000000", -- 3
"00000000", -- 4
"00011000", -- 5 **
"00001100", -- 6 **
"11111110", -- 7 *******
"00001100", -- 8 **
"00011000", -- 9 **
"00000000", -- a
"00000000", -- b
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x1b
"00000000", -- 0
"00000000", -- 1
"00000000", -- 2
"00000000", -- 3
"00000000", -- 4
"00110000", -- 5 **
"01100000", -- 6 **
"11111110", -- 7 *******
"01100000", -- 8 **
"00110000", -- 9 **
"00000000", -- a
"00000000", -- b
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x1c
"00000000", -- 0
"00000000", -- 1
"00000000", -- 2
"00000000", -- 3
"00000000", -- 4
"00000000", -- 5
"11000000", -- 6 **
"11000000", -- 7 **
"11000000", -- 8 **
203
"11111110", -- 9 *******
"00000000", -- a
"00000000", -- b
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x1d
"00000000", -- 0
"00000000", -- 1
"00000000", -- 2
"00000000", -- 3
"00000000", -- 4
"00100100", -- 5 * *
"01100110", -- 6 ** **
"11111111", -- 7 ********
"01100110", -- 8 ** **
"00100100", -- 9 * *
"00000000", -- a
"00000000", -- b
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x1e
"00000000", -- 0
"00000000", -- 1
"00000000", -- 2
"00000000", -- 3
"00010000", -- 4 *
"00111000", -- 5 ***
"00111000", -- 6 ***
"01111100", -- 7 *****
"01111100", -- 8 *****
"11111110", -- 9 *******
"11111110", -- a *******
"00000000", -- b
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x1f
"00000000", -- 0
"00000000", -- 1
"00000000", -- 2
"00000000", -- 3
"11111110", -- 4 *******
"11111110", -- 5 *******
"01111100", -- 6 *****
"01111100", -- 7 *****
"00111000", -- 8 ***
"00111000", -- 9 ***
"00010000", -- a *
"00000000", -- b
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x20
"00000000", -- 0
"00000000", -- 1
"00000000", -- 2
"00000000", -- 3
"00000000", -- 4
"00000000", -- 5
"00000000", -- 6
"00000000", -- 7
"00000000", -- 8
"00000000", -- 9
"00000000", -- a
"00000000", -- b
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x21
"00000000", -- 0
"00000000", -- 1
"00011000", -- 2 **
"00111100", -- 3 ****
"00111100", -- 4 ****
"00111100", -- 5 ****
"00011000", -- 6 **
"00011000", -- 7 **
"00011000", -- 8 **
"00000000", -- 9
"00011000", -- a **
"00011000", -- b **
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x22
"00000000", -- 0
"01100110", -- 1 ** **
"01100110", -- 2 ** **
"01100110", -- 3 ** **
"00100100", -- 4 * *
"00000000", -- 5
"00000000", -- 6
"00000000", -- 7
"00000000", -- 8
"00000000", -- 9
"00000000", -- a
"00000000", -- b
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x23
"00000000", -- 0
"00000000", -- 1
"00000000", -- 2
"01101100", -- 3 ** **
"01101100", -- 4 ** **
"11111110", -- 5 *******
"01101100", -- 6 ** **
"01101100", -- 7 ** **
"01101100", -- 8 ** **
"11111110", -- 9 *******
"01101100", -- a ** **
"01101100", -- b ** **
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x24
"00011000", -- 0 **
"00011000", -- 1 **
"01111100", -- 2 *****
"11000110", -- 3 ** **
"11000010", -- 4 ** *
"11000000", -- 5 **
"01111100", -- 6 *****
"00000110", -- 7
**
"00000110", -- 8
**
"10000110", -- 9 * **
"11000110", -- a ** **
"01111100", -- b *****
"00011000", -- c **
"00011000", -- d **
"00000000", -- e
"00000000", -- f
-- code x25
"00000000", -- 0
"00000000", -- 1
"00000000", -- 2
"00000000", -- 3
"11000010", -- 4 ** *
"11000110", -- 5 ** **
"00001100", -- 6 **
"00011000", -- 7 **
"00110000", -- 8 **
"01100000", -- 9 **
"11000110", -- a ** **
"10000110", -- b * **
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x26
"00000000", -- 0
"00000000", -- 1
"00111000", -- 2 ***
"01101100", -- 3 ** **
"01101100", -- 4 ** **
"00111000", -- 5 ***
"01110110", -- 6 *** **
"11011100", -- 7 ** ***
"11001100", -- 8 ** **
"11001100", -- 9 ** **
"11001100", -- a ** **
"01110110", -- b *** **
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x27
"00000000", -- 0
"00110000", -- 1 **
204
"00110000", -- 2 **
"00110000", -- 3 **
"01100000", -- 4 **
"00000000", -- 5
"00000000", -- 6
"00000000", -- 7
"00000000", -- 8
"00000000", -- 9
"00000000", -- a
"00000000", -- b
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x28
"00000000", -- 0
"00000000", -- 1
"00001100", -- 2 **
"00011000", -- 3 **
"00110000", -- 4 **
"00110000", -- 5 **
"00110000", -- 6 **
"00110000", -- 7 **
"00110000", -- 8 **
"00110000", -- 9 **
"00011000", -- a **
"00001100", -- b **
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x29
"00000000", -- 0
"00000000", -- 1
"00110000", -- 2 **
"00011000", -- 3 **
"00001100", -- 4 **
"00001100", -- 5 **
"00001100", -- 6 **
"00001100", -- 7 **
"00001100", -- 8 **
"00001100", -- 9 **
"00011000", -- a **
"00110000", -- b **
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x2a
"00000000", -- 0
"00000000", -- 1
"00000000", -- 2
"00000000", -- 3
"00000000", -- 4
"01100110", -- 5 ** **
"00111100", -- 6 ****
"11111111", -- 7 ********
"00111100", -- 8 ****
"01100110", -- 9 ** **
"00000000", -- a
"00000000", -- b
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x2b
"00000000", -- 0
"00000000", -- 1
"00000000", -- 2
"00000000", -- 3
"00000000", -- 4
"00011000", -- 5
"00011000", -- 6
"01111110", -- 7
"00011000", -- 8
"00011000", -- 9
"00000000", -- a
"00000000", -- b
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x2c
"00000000", -- 0
"00000000", -- 1
"00000000", -- 2
"00000000", -- 3
"00000000", -- 4
"00000000", -- 5
"00000000", -- 6
"00000000", -- 7
"00000000", -- 8
"00011000", -- 9
"00011000", -- a
"00011000", -- b
"00110000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x2d
"00000000", -- 0
"00000000", -- 1
"00000000", -- 2
"00000000", -- 3
"00000000", -- 4
"00000000", -- 5
"00000000", -- 6
"01111110", -- 7
"00000000", -- 8
"00000000", -- 9
"00000000", -- a
"00000000", -- b
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x2e
"00000000", -- 0
"00000000", -- 1
"00000000", -- 2
**
**
******
**
**
**
**
**
**
******
"00000000", -- 3
"00000000", -- 4
"00000000", -- 5
"00000000", -- 6
"00000000", -- 7
"00000000", -- 8
"00000000", -- 9
"00011000", -- a **
"00011000", -- b **
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x2f
"00000000", -- 0
"00000000", -- 1
"00000000", -- 2
"00000000", -- 3
"00000010", -- 4
*
"00000110", -- 5
**
"00001100", -- 6 **
"00011000", -- 7 **
"00110000", -- 8 **
"01100000", -- 9 **
"11000000", -- a **
"10000000", -- b *
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x30
"00000000", -- 0
"00000000", -- 1
"01111100", -- 2 *****
"11000110", -- 3 ** **
"11000110", -- 4 ** **
"11001110", -- 5 ** ***
"11011110", -- 6 ** ****
"11110110", -- 7 **** **
"11100110", -- 8 *** **
"11000110", -- 9 ** **
"11000110", -- a ** **
"01111100", -- b *****
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x31
"00000000", -- 0
"00000000", -- 1
"00011000", -- 2
"00111000", -- 3
"01111000", -- 4 **
"00011000", -- 5 ***
"00011000", -- 6 ****
"00011000", -- 7 **
"00011000", -- 8 **
"00011000", -- 9 **
"00011000", -- a **
"01111110", -- b **
205
"00000000", -- c **
"00000000", -- d ******
"00000000", -- e
"00000000", -- f
-- code x32
"00000000", -- 0
"00000000", -- 1
"01111100", -- 2 *****
"11000110", -- 3 ** **
"00000110", -- 4
**
"00001100", -- 5 **
"00011000", -- 6 **
"00110000", -- 7 **
"01100000", -- 8 **
"11000000", -- 9 **
"11000110", -- a ** **
"11111110", -- b *******
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x33
"00000000", -- 0
"00000000", -- 1
"01111100", -- 2 *****
"11000110", -- 3 ** **
"00000110", -- 4
**
"00000110", -- 5
**
"00111100", -- 6 ****
"00000110", -- 7
**
"00000110", -- 8
**
"00000110", -- 9
**
"11000110", -- a ** **
"01111100", -- b *****
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x34
"00000000", -- 0
"00000000", -- 1
"00001100", -- 2 **
"00011100", -- 3 ***
"00111100", -- 4 ****
"01101100", -- 5 ** **
"11001100", -- 6 ** **
"11111110", -- 7 *******
"00001100", -- 8 **
"00001100", -- 9 **
"00001100", -- a **
"00011110", -- b ****
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x35
"00000000", -- 0
"00000000", -- 1
"11111110", -- 2 *******
"11000000", -- 3 **
"11000000", -- 4 **
"11000000", -- 5 **
"11111100", -- 6 ******
"00000110", -- 7
**
"00000110", -- 8
**
"00000110", -- 9
**
"11000110", -- a ** **
"01111100", -- b *****
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x36
"00000000", -- 0
"00000000", -- 1
"00111000", -- 2 ***
"01100000", -- 3 **
"11000000", -- 4 **
"11000000", -- 5 **
"11111100", -- 6 ******
"11000110", -- 7 ** **
"11000110", -- 8 ** **
"11000110", -- 9 ** **
"11000110", -- a ** **
"01111100", -- b *****
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x37
"00000000", -- 0
"00000000", -- 1
"11111110", -- 2 *******
"11000110", -- 3 ** **
"00000110", -- 4
**
"00000110", -- 5
**
"00001100", -- 6 **
"00011000", -- 7 **
"00110000", -- 8 **
"00110000", -- 9 **
"00110000", -- a **
"00110000", -- b **
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x38
"00000000", -- 0
"00000000", -- 1
"01111100", -- 2 *****
"11000110", -- 3 ** **
"11000110", -- 4 ** **
"11000110", -- 5 ** **
"01111100", -- 6 *****
"11000110", -- 7 ** **
"11000110", -- 8 ** **
"11000110", -- 9 ** **
"11000110", -- a ** **
"01111100", -- b *****
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x39
"00000000", -- 0
"00000000", -- 1
"01111100", -- 2 *****
"11000110", -- 3 ** **
"11000110", -- 4 ** **
"11000110", -- 5 ** **
"01111110", -- 6 ******
"00000110", -- 7
**
"00000110", -- 8
**
"00000110", -- 9
**
"00001100", -- a **
"01111000", -- b ****
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x3a
"00000000", -- 0
"00000000", -- 1
"00000000", -- 2
"00000000", -- 3
"00011000", -- 4 **
"00011000", -- 5 **
"00000000", -- 6
"00000000", -- 7
"00000000", -- 8
"00011000", -- 9 **
"00011000", -- a **
"00000000", -- b
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x3b
"00000000", -- 0
"00000000", -- 1
"00000000", -- 2
"00000000", -- 3
"00011000", -- 4 **
"00011000", -- 5 **
"00000000", -- 6
"00000000", -- 7
"00000000", -- 8
"00011000", -- 9 **
"00011000", -- a **
"00110000", -- b **
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x3c
"00000000", -- 0
"00000000", -- 1
"00000000", -- 2
"00000110", -- 3
**
"00001100", -- 4 **
206
"00011000", -- 5 **
"00110000", -- 6 **
"01100000", -- 7 **
"00110000", -- 8 **
"00011000", -- 9 **
"00001100", -- a **
"00000110", -- b
**
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x3d
"00000000", -- 0
"00000000", -- 1
"00000000", -- 2
"00000000", -- 3
"00000000", -- 4
"01111110", -- 5 ******
"00000000", -- 6
"00000000", -- 7
"01111110", -- 8 ******
"00000000", -- 9
"00000000", -- a
"00000000", -- b
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x3e
"00000000", -- 0
"00000000", -- 1
"00000000", -- 2
"01100000", -- 3 **
"00110000", -- 4 **
"00011000", -- 5 **
"00001100", -- 6 **
"00000110", -- 7
**
"00001100", -- 8 **
"00011000", -- 9 **
"00110000", -- a **
"01100000", -- b **
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x3f
"00000000", -- 0
"00000000", -- 1
"01111100", -- 2 *****
"11000110", -- 3 ** **
"11000110", -- 4 ** **
"00001100", -- 5 **
"00011000", -- 6 **
"00011000", -- 7 **
"00011000", -- 8 **
"00000000", -- 9
"00011000", -- a **
"00011000", -- b **
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x40
"00000000", -- 0
"00000000", -- 1
"01111100", -- 2 *****
"11000110", -- 3 ** **
"11000110", -- 4 ** **
"11000110", -- 5 ** **
"11011110", -- 6 ** ****
"11011110", -- 7 ** ****
"11011110", -- 8 ** ****
"11011100", -- 9 ** ***
"11000000", -- a **
"01111100", -- b *****
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x41
"00000000", -- 0
"00000000", -- 1
"00010000", -- 2 *
"00111000", -- 3 ***
"01101100", -- 4 ** **
"11000110", -- 5 ** **
"11000110", -- 6 ** **
"11111110", -- 7 *******
"11000110", -- 8 ** **
"11000110", -- 9 ** **
"11000110", -- a ** **
"11000110", -- b ** **
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x42
"00000000", -- 0
"00000000", -- 1
"11111100", -- 2 ******
"01100110", -- 3 ** **
"01100110", -- 4 ** **
"01100110", -- 5 ** **
"01111100", -- 6 *****
"01100110", -- 7 ** **
"01100110", -- 8 ** **
"01100110", -- 9 ** **
"01100110", -- a ** **
"11111100", -- b ******
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x43
"00000000", -- 0
"00000000", -- 1
"00111100", -- 2 ****
"01100110", -- 3 ** **
"11000010", -- 4 ** *
"11000000", -- 5 **
"11000000", -- 6 **
"11000000", -- 7 **
"11000000", -- 8 **
"11000010", -- 9 ** *
"01100110", -- a ** **
"00111100", -- b ****
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x44
"00000000", -- 0
"00000000", -- 1
"11111000", -- 2 *****
"01101100", -- 3 ** **
"01100110", -- 4 ** **
"01100110", -- 5 ** **
"01100110", -- 6 ** **
"01100110", -- 7 ** **
"01100110", -- 8 ** **
"01100110", -- 9 ** **
"01101100", -- a ** **
"11111000", -- b *****
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x45
"00000000", -- 0
"00000000", -- 1
"11111110", -- 2 *******
"01100110", -- 3 ** **
"01100010", -- 4 ** *
"01101000", -- 5 ** *
"01111000", -- 6 ****
"01101000", -- 7 ** *
"01100000", -- 8 **
"01100010", -- 9 ** *
"01100110", -- a ** **
"11111110", -- b *******
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x46
"00000000", -- 0
"00000000", -- 1
"11111110", -- 2 *******
"01100110", -- 3 ** **
"01100010", -- 4 ** *
"01101000", -- 5 ** *
"01111000", -- 6 ****
"01101000", -- 7 ** *
"01100000", -- 8 **
"01100000", -- 9 **
"01100000", -- a **
"11110000", -- b ****
"00000000", -- c
"00000000", -- d
"00000000", -- e
207
"00000000", -- f
-- code x47
"00000000", -- 0
"00000000", -- 1
"00111100", -- 2 ****
"01100110", -- 3 ** **
"11000010", -- 4 ** *
"11000000", -- 5 **
"11000000", -- 6 **
"11011110", -- 7 ** ****
"11000110", -- 8 ** **
"11000110", -- 9 ** **
"01100110", -- a ** **
"00111010", -- b *** *
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x48
"00000000", -- 0
"00000000", -- 1
"11000110", -- 2 ** **
"11000110", -- 3 ** **
"11000110", -- 4 ** **
"11000110", -- 5 ** **
"11111110", -- 6 *******
"11000110", -- 7 ** **
"11000110", -- 8 ** **
"11000110", -- 9 ** **
"11000110", -- a ** **
"11000110", -- b ** **
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x49
"00000000", -- 0
"00000000", -- 1
"00111100", -- 2 ****
"00011000", -- 3 **
"00011000", -- 4 **
"00011000", -- 5 **
"00011000", -- 6 **
"00011000", -- 7 **
"00011000", -- 8 **
"00011000", -- 9 **
"00011000", -- a **
"00111100", -- b ****
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x4a
"00000000", -- 0
"00000000", -- 1
"00011110", -- 2 ****
"00001100", -- 3 **
"00001100", -- 4 **
"00001100", -- 5 **
"00001100", -- 6 **
"00001100", -- 7 **
"11001100", -- 8 ** **
"11001100", -- 9 ** **
"11001100", -- a ** **
"01111000", -- b ****
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x4b
"00000000", -- 0
"00000000", -- 1
"11100110", -- 2 *** **
"01100110", -- 3 ** **
"01100110", -- 4 ** **
"01101100", -- 5 ** **
"01111000", -- 6 ****
"01111000", -- 7 ****
"01101100", -- 8 ** **
"01100110", -- 9 ** **
"01100110", -- a ** **
"11100110", -- b *** **
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x4c
"00000000", -- 0
"00000000", -- 1
"11110000", -- 2 ****
"01100000", -- 3 **
"01100000", -- 4 **
"01100000", -- 5 **
"01100000", -- 6 **
"01100000", -- 7 **
"01100000", -- 8 **
"01100010", -- 9 ** *
"01100110", -- a ** **
"11111110", -- b *******
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x4d
"00000000", -- 0
"00000000", -- 1
"11000011", -- 2 ** **
"11100111", -- 3 *** ***
"11111111", -- 4 ********
"11111111", -- 5 ********
"11011011", -- 6 ** ** **
"11000011", -- 7 ** **
"11000011", -- 8 ** **
"11000011", -- 9 ** **
"11000011", -- a ** **
"11000011", -- b ** **
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x4e
"00000000", -- 0
"00000000", -- 1
"11000110", -- 2 ** **
"11100110", -- 3 *** **
"11110110", -- 4 **** **
"11111110", -- 5 *******
"11011110", -- 6 ** ****
"11001110", -- 7 ** ***
"11000110", -- 8 ** **
"11000110", -- 9 ** **
"11000110", -- a ** **
"11000110", -- b ** **
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x4f
"00000000", -- 0
"00000000", -- 1
"01111100", -- 2 *****
"11000110", -- 3 ** **
"11000110", -- 4 ** **
"11000110", -- 5 ** **
"11000110", -- 6 ** **
"11000110", -- 7 ** **
"11000110", -- 8 ** **
"11000110", -- 9 ** **
"11000110", -- a ** **
"01111100", -- b *****
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x50
"00000000", -- 0
"00000000", -- 1
"11111100", -- 2 ******
"01100110", -- 3 ** **
"01100110", -- 4 ** **
"01100110", -- 5 ** **
"01111100", -- 6 *****
"01100000", -- 7 **
"01100000", -- 8 **
"01100000", -- 9 **
"01100000", -- a **
"11110000", -- b ****
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x51
"00000000", -- 0
"00000000", -- 1
"01111100", -- 2 *****
"11000110", -- 3 ** **
"11000110", -- 4 ** **
"11000110", -- 5 ** **
"11000110", -- 6 ** **
"11000110", -- 7 ** **
208
"11000110", -- 8 ** **
"11010110", -- 9 ** * **
"11011110", -- a ** ****
"01111100", -- b *****
"00001100", -- c **
"00001110", -- d ***
"00000000", -- e
"00000000", -- f
-- code x52
"00000000", -- 0
"00000000", -- 1
"11111100", -- 2 ******
"01100110", -- 3 ** **
"01100110", -- 4 ** **
"01100110", -- 5 ** **
"01111100", -- 6 *****
"01101100", -- 7 ** **
"01100110", -- 8 ** **
"01100110", -- 9 ** **
"01100110", -- a ** **
"11100110", -- b *** **
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x53
"00000000", -- 0
"00000000", -- 1
"01111100", -- 2 *****
"11000110", -- 3 ** **
"11000110", -- 4 ** **
"01100000", -- 5 **
"00111000", -- 6 ***
"00001100", -- 7 **
"00000110", -- 8
**
"11000110", -- 9 ** **
"11000110", -- a ** **
"01111100", -- b *****
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x54
"00000000", -- 0
"00000000", -- 1
"11111111", -- 2 ********
"11011011", -- 3 ** ** **
"10011001", -- 4 * ** *
"00011000", -- 5 **
"00011000", -- 6 **
"00011000", -- 7 **
"00011000", -- 8 **
"00011000", -- 9 **
"00011000", -- a **
"00111100", -- b ****
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x55
"00000000", -- 0
"00000000", -- 1
"11000110", -- 2 ** **
"11000110", -- 3 ** **
"11000110", -- 4 ** **
"11000110", -- 5 ** **
"11000110", -- 6 ** **
"11000110", -- 7 ** **
"11000110", -- 8 ** **
"11000110", -- 9 ** **
"11000110", -- a ** **
"01111100", -- b *****
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x56
"00000000", -- 0
"00000000", -- 1
"11000011", -- 2 ** **
"11000011", -- 3 ** **
"11000011", -- 4 ** **
"11000011", -- 5 ** **
"11000011", -- 6 ** **
"11000011", -- 7 ** **
"11000011", -- 8 ** **
"01100110", -- 9 ** **
"00111100", -- a ****
"00011000", -- b **
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x57
"00000000", -- 0
"00000000", -- 1
"11000011", -- 2 ** **
"11000011", -- 3 ** **
"11000011", -- 4 ** **
"11000011", -- 5 ** **
"11000011", -- 6 ** **
"11011011", -- 7 ** ** **
"11011011", -- 8 ** ** **
"11111111", -- 9 ********
"01100110", -- a ** **
"01100110", -- b ** **
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x58
"00000000", -- 0
"00000000", -- 1
"11000011", -- 2 ** **
"11000011", -- 3 ** **
"01100110", -- 4 ** **
"00111100", -- 5 ****
"00011000", -- 6 **
"00011000", -- 7 **
"00111100", -- 8 ****
"01100110", -- 9 ** **
"11000011", -- a ** **
"11000011", -- b ** **
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x59
"00000000", -- 0
"00000000", -- 1
"11000011", -- 2 ** **
"11000011", -- 3 ** **
"11000011", -- 4 ** **
"01100110", -- 5 ** **
"00111100", -- 6 ****
"00011000", -- 7 **
"00011000", -- 8 **
"00011000", -- 9 **
"00011000", -- a **
"00111100", -- b ****
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x5a
"00000000", -- 0
"00000000", -- 1
"11111111", -- 2 ********
"11000011", -- 3 ** **
"10000110", -- 4 * **
"00001100", -- 5 **
"00011000", -- 6 **
"00110000", -- 7 **
"01100000", -- 8 **
"11000001", -- 9 ** *
"11000011", -- a ** **
"11111111", -- b ********
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x5b
"00000000", -- 0
"00000000", -- 1
"00111100", -- 2 ****
"00110000", -- 3 **
"00110000", -- 4 **
"00110000", -- 5 **
"00110000", -- 6 **
"00110000", -- 7 **
"00110000", -- 8 **
"00110000", -- 9 **
"00110000", -- a **
"00111100", -- b ****
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x5c
209
"00000000", -- 0
"00000000", -- 1
"00000000", -- 2
"10000000", -- 3 *
"11000000", -- 4 **
"11100000", -- 5 ***
"01110000", -- 6 ***
"00111000", -- 7 ***
"00011100", -- 8 ***
"00001110", -- 9 ***
"00000110", -- a
**
"00000010", -- b
*
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x5d
"00000000", -- 0
"00000000", -- 1
"00111100", -- 2 ****
"00001100", -- 3 **
"00001100", -- 4 **
"00001100", -- 5 **
"00001100", -- 6 **
"00001100", -- 7 **
"00001100", -- 8 **
"00001100", -- 9 **
"00001100", -- a **
"00111100", -- b ****
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x5e
"00010000", -- 0 *
"00111000", -- 1 ***
"01101100", -- 2 ** **
"11000110", -- 3 ** **
"00000000", -- 4
"00000000", -- 5
"00000000", -- 6
"00000000", -- 7
"00000000", -- 8
"00000000", -- 9
"00000000", -- a
"00000000", -- b
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x5f
"00000000", -- 0
"00000000", -- 1
"00000000", -- 2
"00000000", -- 3
"00000000", -- 4
"00000000", -- 5
"00000000", -- 6
"00000000", -- 7
"00000000", -- 8
"00000000", -- 9
"00000000", -- a
"00000000", -- b
"00000000", -- c
"11111111", -- d ********
"00000000", -- e
"00000000", -- f
-- code x60
"00110000", -- 0 **
"00110000", -- 1 **
"00011000", -- 2 **
"00000000", -- 3
"00000000", -- 4
"00000000", -- 5
"00000000", -- 6
"00000000", -- 7
"00000000", -- 8
"00000000", -- 9
"00000000", -- a
"00000000", -- b
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x61
"00000000", -- 0
"00000000", -- 1
"00000000", -- 2
"00000000", -- 3
"00000000", -- 4
"01111000", -- 5 ****
"00001100", -- 6 **
"01111100", -- 7 *****
"11001100", -- 8 ** **
"11001100", -- 9 ** **
"11001100", -- a ** **
"01110110", -- b *** **
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x62
"00000000", -- 0
"00000000", -- 1
"11100000", -- 2 ***
"01100000", -- 3 **
"01100000", -- 4 **
"01111000", -- 5 ****
"01101100", -- 6 ** **
"01100110", -- 7 ** **
"01100110", -- 8 ** **
"01100110", -- 9 ** **
"01100110", -- a ** **
"01111100", -- b *****
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x63
"00000000", -- 0
"00000000", -- 1
"00000000", -- 2
"00000000", -- 3
"00000000", -- 4
"01111100", -- 5 *****
"11000110", -- 6 ** **
"11000000", -- 7 **
"11000000", -- 8 **
"11000000", -- 9 **
"11000110", -- a ** **
"01111100", -- b *****
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x64
"00000000", -- 0
"00000000", -- 1
"00011100", -- 2 ***
"00001100", -- 3 **
"00001100", -- 4 **
"00111100", -- 5 ****
"01101100", -- 6 ** **
"11001100", -- 7 ** **
"11001100", -- 8 ** **
"11001100", -- 9 ** **
"11001100", -- a ** **
"01110110", -- b *** **
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x65
"00000000", -- 0
"00000000", -- 1
"00000000", -- 2
"00000000", -- 3
"00000000", -- 4
"01111100", -- 5 *****
"11000110", -- 6 ** **
"11111110", -- 7 *******
"11000000", -- 8 **
"11000000", -- 9 **
"11000110", -- a ** **
"01111100", -- b *****
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x66
"00000000", -- 0
"00000000", -- 1
"00111000", -- 2 ***
"01101100", -- 3 ** **
"01100100", -- 4 ** *
"01100000", -- 5 **
"11110000", -- 6 ****
"01100000", -- 7 **
"01100000", -- 8 **
"01100000", -- 9 **
210
"01100000", -- a **
"11110000", -- b ****
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x67
"00000000", -- 0
"00000000", -- 1
"00000000", -- 2
"00000000", -- 3
"00000000", -- 4
"01110110", -- 5 *** **
"11001100", -- 6 ** **
"11001100", -- 7 ** **
"11001100", -- 8 ** **
"11001100", -- 9 ** **
"11001100", -- a ** **
"01111100", -- b *****
"00001100", -- c **
"11001100", -- d ** **
"01111000", -- e ****
"00000000", -- f
-- code x68
"00000000", -- 0
"00000000", -- 1
"11100000", -- 2 ***
"01100000", -- 3 **
"01100000", -- 4 **
"01101100", -- 5 ** **
"01110110", -- 6 *** **
"01100110", -- 7 ** **
"01100110", -- 8 ** **
"01100110", -- 9 ** **
"01100110", -- a ** **
"11100110", -- b *** **
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x69
"00000000", -- 0
"00000000", -- 1
"00011000", -- 2 **
"00011000", -- 3 **
"00000000", -- 4
"00111000", -- 5 ***
"00011000", -- 6 **
"00011000", -- 7 **
"00011000", -- 8 **
"00011000", -- 9 **
"00011000", -- a **
"00111100", -- b ****
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x6a
"00000000", -- 0
"00000000", -- 1
"00000110", -- 2
**
"00000110", -- 3
**
"00000000", -- 4
"00001110", -- 5 ***
"00000110", -- 6
**
"00000110", -- 7
**
"00000110", -- 8
**
"00000110", -- 9
**
"00000110", -- a
**
"00000110", -- b
**
"01100110", -- c ** **
"01100110", -- d ** **
"00111100", -- e ****
"00000000", -- f
-- code x6b
"00000000", -- 0
"00000000", -- 1
"11100000", -- 2 ***
"01100000", -- 3 **
"01100000", -- 4 **
"01100110", -- 5 ** **
"01101100", -- 6 ** **
"01111000", -- 7 ****
"01111000", -- 8 ****
"01101100", -- 9 ** **
"01100110", -- a ** **
"11100110", -- b *** **
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x6c
"00000000", -- 0
"00000000", -- 1
"00111000", -- 2 ***
"00011000", -- 3 **
"00011000", -- 4 **
"00011000", -- 5 **
"00011000", -- 6 **
"00011000", -- 7 **
"00011000", -- 8 **
"00011000", -- 9 **
"00011000", -- a **
"00111100", -- b ****
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x6d
"00000000", -- 0
"00000000", -- 1
"00000000", -- 2
"00000000", -- 3
"00000000", -- 4
"11100110", -- 5 *** **
"11111111", -- 6 ********
"11011011", -- 7 ** ** **
"11011011", -- 8 ** ** **
"11011011", -- 9 ** ** **
"11011011", -- a ** ** **
"11011011", -- b ** ** **
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x6e
"00000000", -- 0
"00000000", -- 1
"00000000", -- 2
"00000000", -- 3
"00000000", -- 4
"11011100", -- 5 ** ***
"01100110", -- 6 ** **
"01100110", -- 7 ** **
"01100110", -- 8 ** **
"01100110", -- 9 ** **
"01100110", -- a ** **
"01100110", -- b ** **
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x6f
"00000000", -- 0
"00000000", -- 1
"00000000", -- 2
"00000000", -- 3
"00000000", -- 4
"01111100", -- 5 *****
"11000110", -- 6 ** **
"11000110", -- 7 ** **
"11000110", -- 8 ** **
"11000110", -- 9 ** **
"11000110", -- a ** **
"01111100", -- b *****
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x70
"00000000", -- 0
"00000000", -- 1
"00000000", -- 2
"00000000", -- 3
"00000000", -- 4
"11011100", -- 5 ** ***
"01100110", -- 6 ** **
"01100110", -- 7 ** **
"01100110", -- 8 ** **
"01100110", -- 9 ** **
"01100110", -- a ** **
"01111100", -- b *****
"01100000", -- c **
"01100000", -- d **
"11110000", -- e ****
"00000000", -- f
-- code x71
"00000000", -- 0
"00000000", -- 1
"00000000", -- 2
211
"00000000", -- 3
"00000000", -- 4
"01110110", -- 5 *** **
"11001100", -- 6 ** **
"11001100", -- 7 ** **
"11001100", -- 8 ** **
"11001100", -- 9 ** **
"11001100", -- a ** **
"01111100", -- b *****
"00001100", -- c **
"00001100", -- d **
"00011110", -- e ****
"00000000", -- f
-- code x72
"00000000", -- 0
"00000000", -- 1
"00000000", -- 2
"00000000", -- 3
"00000000", -- 4
"11011100", -- 5 ** ***
"01110110", -- 6 *** **
"01100110", -- 7 ** **
"01100000", -- 8 **
"01100000", -- 9 **
"01100000", -- a **
"11110000", -- b ****
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x73
"00000000", -- 0
"00000000", -- 1
"00000000", -- 2
"00000000", -- 3
"00000000", -- 4
"01111100", -- 5 *****
"11000110", -- 6 ** **
"01100000", -- 7 **
"00111000", -- 8 ***
"00001100", -- 9 **
"11000110", -- a ** **
"01111100", -- b *****
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x74
"00000000", -- 0
"00000000", -- 1
"00010000", -- 2 *
"00110000", -- 3 **
"00110000", -- 4 **
"11111100", -- 5 ******
"00110000", -- 6 **
"00110000", -- 7 **
"00110000", -- 8 **
"00110000", -- 9 **
"00110110", -- a ** **
"00011100", -- b ***
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x75
"00000000", -- 0
"00000000", -- 1
"00000000", -- 2
"00000000", -- 3
"00000000", -- 4
"11001100", -- 5 ** **
"11001100", -- 6 ** **
"11001100", -- 7 ** **
"11001100", -- 8 ** **
"11001100", -- 9 ** **
"11001100", -- a ** **
"01110110", -- b *** **
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x76
"00000000", -- 0
"00000000", -- 1
"00000000", -- 2
"00000000", -- 3
"00000000", -- 4
"11000011", -- 5 ** **
"11000011", -- 6 ** **
"11000011", -- 7 ** **
"11000011", -- 8 ** **
"01100110", -- 9 ** **
"00111100", -- a ****
"00011000", -- b **
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x77
"00000000", -- 0
"00000000", -- 1
"00000000", -- 2
"00000000", -- 3
"00000000", -- 4
"11000011", -- 5 ** **
"11000011", -- 6 ** **
"11000011", -- 7 ** **
"11011011", -- 8 ** ** **
"11011011", -- 9 ** ** **
"11111111", -- a ********
"01100110", -- b ** **
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x78
"00000000", -- 0
"00000000", -- 1
"00000000", -- 2
"00000000", -- 3
"00000000", -- 4
"11000011", -- 5 ** **
"01100110", -- 6 ** **
"00111100", -- 7 ****
"00011000", -- 8 **
"00111100", -- 9 ****
"01100110", -- a ** **
"11000011", -- b ** **
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x79
"00000000", -- 0
"00000000", -- 1
"00000000", -- 2
"00000000", -- 3
"00000000", -- 4
"11000110", -- 5 ** **
"11000110", -- 6 ** **
"11000110", -- 7 ** **
"11000110", -- 8 ** **
"11000110", -- 9 ** **
"11000110", -- a ** **
"01111110", -- b ******
"00000110", -- c
**
"00001100", -- d **
"11111000", -- e *****
"00000000", -- f
-- code x7a
"00000000", -- 0
"00000000", -- 1
"00000000", -- 2
"00000000", -- 3
"00000000", -- 4
"11111110", -- 5 *******
"11001100", -- 6 ** **
"00011000", -- 7 **
"00110000", -- 8 **
"01100000", -- 9 **
"11000110", -- a ** **
"11111110", -- b *******
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x7b
"00000000", -- 0
"00000000", -- 1
"00001110", -- 2 ***
"00011000", -- 3 **
"00011000", -- 4 **
"00011000", -- 5 **
"01110000", -- 6 ***
"00011000", -- 7 **
"00011000", -- 8 **
"00011000", -- 9 **
"00011000", -- a **
"00001110", -- b ***
"00000000", -- c
212
"00000000", -- d
"00011000", -- 3 **
"00000000", -- e
"00011000", -- 4 **
"00000000", -- f
"00011000", -- 5 **
-- code x7c
"00001110", -- 6 ***
"00000000", -- 0
"00011000", -- 7 **
"00000000", -- 1
"00011000", -- 8 **
"00011000", -- 2 **
"00011000", -- 9 **
"00011000", -- 3 **
"00011000", -- a **
"00011000", -- 4 **
"01110000", -- b ***
"00011000", -- 5 **
"00000000", -- c
"00000000", -- 6
"00000000", -- d
"00011000", -- 7 **
"00000000", -- e
"00011000", -- 8 **
"00000000", -- f
"00011000", -- 9 **
-- code x7e
"00011000", -- a **
"00000000", -- 0
"00011000", -- b **
"00000000", -- 1
"00000000", -- c
"01110110", -- 2 *** **
"00000000", -- d
"11011100", -- 3 ** ***
"00000000", -- e
"00000000", -- 4
"00000000", -- f
"00000000", -- 5
-- code x7d
"00000000", -- 6
"00000000", -- 0
"00000000", -- 7
"00000000", -- 1
"00000000", -- 8
"01110000", -- 2 ***
"00000000", -- 9
begin
process(clk)
begin
if (clk'event and clk='1') then
addr_reg <= addr;
end if;
end process;
data <= ROM(to_integer(unsigned(addr_reg)));
end font_rom;
"00000000", -- a
"00000000", -- b
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000", -- f
-- code x7f
"00000000", -- 0
"00000110", -- 1
"00001100", -- 2
"00011000", -- 3
"00000000", -- 4
"00000000", -- 5
"00000000", -- 6
"00000000", -- 7
"00000000", -- 8
"00000000", -- 9
"00000000", -- a
"00000000", -- b
"00000000", -- c
"00000000", -- d
"00000000", -- e
"00000000" -- f
);
**
**
**
213
214
215