use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity omsp_quadcount is
+ generic (
+ ADDR : std_logic_vector (15 downto 0) := X"0150");
port (
mclk : in std_logic;
per_addr : in std_logic_vector (7 downto 0);
-- When reading whole 32-bit qcount input, first QCNTL has to be loaded, because
-- this event causes QCNTH to latch appropriate value of qcount. This procedure
-- ensures that correct value is readed.
- constant QCNTL : std_logic_vector (15 downto 0) := X"0150"; -- qcount lower word logic address
- constant QCNTH : std_logic_vector (15 downto 0) := X"0152"; -- qcount higher word logic address
+
+ -- qcount lower word logic address
+ constant QCNTL : std_logic_vector (15 downto 0) := ADDR;
+ -- qcount higher word logic address
+ constant QCNTH : std_logic_vector (15 downto 0) := ADDR + 2;
signal qcntl_sel : boolean;
signal qcnth_sel : boolean;