Add timer component and testbench for it

This commit is contained in:
2022-11-06 16:44:50 +01:00
parent 31cd05f4a3
commit dd4ca39450
4 changed files with 252 additions and 2 deletions

View File

@@ -28,6 +28,7 @@ package config is
constant CFG_DMEM : integer := CFG_MEM+1;
constant CFG_LED : integer := CFG_DMEM+1;
constant CFG_SW : integer := CFG_LED+1;
constant CFG_TIMER : integer := CFG_SW+1;
-----------------------------
-- base address (BADR) & mask address (MADR)
@@ -38,6 +39,7 @@ package config is
--constant CFG_BADR_NEXTFREEADDRESS : generic_addr_type := 16#00000800#;
constant CFG_BADR_LED : generic_addr_type := 16#000F0000#;
constant CFG_BADR_SW : generic_addr_type := 16#000F0004#;
constant CFG_BADR_TIMER : generic_addr_type := 16#000F0008#;
-- mask addr
constant CFG_MADR_ZERO : generic_mask_type := 0;
@@ -46,6 +48,7 @@ package config is
constant CFG_MADR_DMEM : generic_mask_type := 16#3FFFFF# - (256 -1); -- uses 6 word-bits, size 256 byte
constant CFG_MADR_LED : generic_mask_type := 16#3FFFFF#; -- size=1 byte
constant CFG_MADR_SW : generic_mask_type := 16#3FFFFF# - (4 - 1); -- size=4 byte
constant CFG_MADR_TIMER : generic_mask_type := 16#3FFFFF# - (8 - 1); -- size=8 byte (2 words)
end package config;