From 593df7900ae0d8b7cbe9afe8d72bcdbd29b3d1c0 Mon Sep 17 00:00:00 2001 From: Jan Michel Date: Fri, 4 Apr 2014 18:42:53 +0200 Subject: [PATCH] moved LCD Text to config package --- pulser/lcd_config.vhd | 33 +++++++++++++++++++++++++++++++++ pulser/padiwa_pulser.prj | 1 + source/lcd.vhd | 23 +++-------------------- 3 files changed, 37 insertions(+), 20 deletions(-) create mode 100644 pulser/lcd_config.vhd diff --git a/pulser/lcd_config.vhd b/pulser/lcd_config.vhd new file mode 100644 index 0000000..d7fcb02 --- /dev/null +++ b/pulser/lcd_config.vhd @@ -0,0 +1,33 @@ +library ieee; +USE IEEE.std_logic_1164.ALL; +use ieee.numeric_std.all; + + +package lcd_config is + + + type data_t is array (0 to 1023) of std_logic_vector(7 downto 0); + constant dataram : data_t := ( + x"36",x"48",x"3A",x"55",x"29",x"2A",x"00",x"00", + x"00",x"EF",x"2B",x"00",x"00",x"01",x"3F",x"2C", + x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00", + x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00", + + + x"50", x"61", x"64", x"69", x"77", x"61", x"20", x"53", x"74", x"61", x"74", x"75", x"73", x"0a", + x"0a", + x"54", x"65", x"6d", x"70", x"65", x"72", x"61", x"74", x"75", x"72", x"65", x"20", x"20", x"20", x"20", x"20", x"20", x"84", x"0a", + x"55", x"49", x"44", x"20", x"20", x"83", x"82", x"81", x"80", x"0a", + x"45", x"6e", x"61", x"62", x"6c", x"65", x"20", x"20", x"20", x"20", x"20", x"20", x"20", x"20", x"20", x"20", x"20", x"85", x"0a", + x"49", x"6e", x"76", x"65", x"72", x"74", x"20", x"20", x"20", x"20", x"20", x"20", x"20", x"20", x"20", x"20", x"20", x"86", x"0a", + x"49", x"6e", x"70", x"75", x"74", x"20", x"20", x"20", x"20", x"20", x"20", x"20", x"20", x"20", x"20", x"20",x"20", x"87", x"0a", + x"0a", + x"54", x"69", x"6d", x"65", x"72", x"20", x"20", x"20", x"20", x"20", x"20", x"20", x"20", x"8F", x"8E", x"0a", + others => x"00"); + +end; + +package body lcd_config is + + +end package body; \ No newline at end of file diff --git a/pulser/padiwa_pulser.prj b/pulser/padiwa_pulser.prj index dbb7ab1..812c7bb 100644 --- a/pulser/padiwa_pulser.prj +++ b/pulser/padiwa_pulser.prj @@ -3,6 +3,7 @@ add_file -vhdl -lib work "/d/jspc29/lattice/diamond/3.0_x64/cae_library/synthesis/vhdl/machxo2.vhd" add_file -vhdl -lib work "version.vhd" +add_file -vhdl -lib work "lcd_config.vhd" add_file -vhdl -lib work "../../trbnet/trb_net_std.vhd" add_file -vhdl -lib work "../../trbnet/trb_net_components.vhd" diff --git a/source/lcd.vhd b/source/lcd.vhd index 157e091..8384d5f 100644 --- a/source/lcd.vhd +++ b/source/lcd.vhd @@ -2,6 +2,9 @@ library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; +library work; +use work.lcd_config.all; + entity lcd is port( @@ -154,26 +157,6 @@ constant fontram : fontram_t := ( type initdc_t is array (0 to 15) of std_logic; constant initdc : initdc_t := ('0','1','0','1','0','0','1','1','1','1','0','1','1','1','1','0'); - type data_t is array (0 to 1023) of std_logic_vector(7 downto 0); - constant dataram : data_t := ( - x"36",x"48",x"3A",x"55",x"29",x"2A",x"00",x"00", - x"00",x"EF",x"2B",x"00",x"00",x"01",x"3F",x"2C", - x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00", - x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00", - - - x"50", x"61", x"64", x"69", x"77", x"61", x"20", x"53", x"74", x"61", x"74", x"75", x"73", x"0a", - x"0a", - x"54", x"65", x"6d", x"70", x"65", x"72", x"61", x"74", x"75", x"72", x"65", x"20", x"20", x"20", x"20", x"20", x"20", x"84", x"0a", - x"55", x"49", x"44", x"20", x"20", x"83", x"82", x"81", x"80", x"0a", - x"45", x"6e", x"61", x"62", x"6c", x"65", x"20", x"20", x"20", x"20", x"20", x"20", x"20", x"20", x"20", x"20", x"20", x"85", x"0a", - x"49", x"6e", x"76", x"65", x"72", x"74", x"20", x"20", x"20", x"20", x"20", x"20", x"20", x"20", x"20", x"20", x"20", x"86", x"0a", - x"49", x"6e", x"70", x"75", x"74", x"20", x"20", x"20", x"20", x"20", x"20", x"20", x"20", x"20", x"20", x"20",x"20", x"87", x"0a", - x"0a", - x"54", x"69", x"6d", x"65", x"72", x"20", x"20", x"20", x"20", x"20", x"20", x"20", x"20", x"8F", x"8E", x"0a", - others => x"00"); - - signal timer : unsigned(27 downto 0) := (others => '0'); --2**16: 2.5ms --2**20: 40ms -- 2.43.0