lcd_char(lcd_data(1),rs,cs);
lcd_char(lcd_data(2),rs,cs);
I wonder, how you convert that sequence into synthesisable HDL code.
These are defined as procedures under packages. For eg.,
I define it this way
Process(clk_lcd)
begin
If rising_edge(clk_lcd) then
cnt <= cnt+1;
case cnt is
when 1 => lcd_char(lcd_init,rs,cs,flag_set); --(lcd_int = initalizing data bits)
if(flag_set = '1') then
cnt <= 2;
flag_set <= '0'; -- disable the flag
else
cnt <= 1;
endif; -- I will set the flag in function after lcd intialization.
when 2 => i:=i+1;
If (i <=7 ) THEN
lcd_char(lcd_ascii(i),rs,cs,flag_set);
elsif(i = 8 ) then
lcd_char(lcd_ascii(i),rs,cs,flag_set);
i:=0;
cnt <= 4; -- after writing last char,goto cnt4
end if;
when 3 => if(flag_set = '1' ) then --lcd char write cylce is complete
cnt <= 2;
flag_set <= '0'; --goto next char fetch,disable flag
else
cnt <= 3; ---if char write process isn't complete, loop here till
end if;
when 4 => Proceed likewise for other operations
when 5 => .....
when 6 => .....
when n => .....
when others => null
end case;
end if;
end process;
The above program is a sample of how I code for using packages for lcd. sine these functions are defined under "clk_lcd" which is at 2KHz(usu lcd clk) is the same clock for executing statements inside the function"lcd_inti" and "lcd_char". Just I sent the value of i for char disp. A flag named "flag_set" is also passed and returned to fn which is set when the lcd char write process is over so that the next databits can be placed in. I will at proper time,clear that flag for next data operation. This helps me keep my timming constant.So for this means of coding there seems no problem in timming constraints for lcd display.