vga/ps/2: ip-core hinzugefuegt
[hwmod.git] / src / textmode_vga / font_rom_beh.vhd
diff --git a/src/textmode_vga/font_rom_beh.vhd b/src/textmode_vga/font_rom_beh.vhd
new file mode 100644 (file)
index 0000000..c01a3c0
--- /dev/null
@@ -0,0 +1,27 @@
+-------------------------------------------------------------------------\r
+--\r
+-- Filename: font_rom_beh.vhd\r
+-- =========\r
+--\r
+-- Short Description:\r
+-- ==================\r
+--   Behavioral architecture of the font ROM entity.\r
+--\r
+-------------------------------------------------------------------------\r
+\r
+library ieee;
+use ieee.std_logic_1164.all;
+use ieee.numeric_std.all;
+use work.font_pkg.all;
+
+architecture beh of font_rom is
+begin
+  process(vga_clk)
+    variable address : std_logic_vector(log2c(CHAR_COUNT) + log2c(CHAR_HEIGHT) - 1 downto 0);
+  begin
+    if rising_edge(vga_clk) then
+      address := char & char_height_pixel;
+      decoded_char <= FONT_TABLE(to_integer(unsigned(address)));
+    end if;
+  end process;
+end architecture beh;