Skip to content
Snippets Groups Projects
Commit 49e71015 authored by Eric Kooistra's avatar Eric Kooistra
Browse files

Added g_incr to common_lfsr_nxt_seq() to support any integer increment for the...

Added g_incr to common_lfsr_nxt_seq() to support any integer increment for the counter sequence data.
parent 54f1370a
No related branches found
No related tags found
No related merge requests found
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
LIBRARY IEEE; LIBRARY IEEE;
USE IEEE.std_logic_1164.ALL; USE IEEE.std_logic_1164.ALL;
USE IEEE.numeric_std.ALL; USE IEEE.numeric_std.ALL;
USE work.common_pkg.ALL;
PACKAGE common_lfsr_sequences_pkg IS PACKAGE common_lfsr_sequences_pkg IS
...@@ -118,6 +119,7 @@ PACKAGE common_lfsr_sequences_pkg IS ...@@ -118,6 +119,7 @@ PACKAGE common_lfsr_sequences_pkg IS
-- Procedure for calculating the next PSRG and COUNTER sequence value -- Procedure for calculating the next PSRG and COUNTER sequence value
PROCEDURE common_lfsr_nxt_seq(CONSTANT c_lfsr_nr : IN NATURAL; PROCEDURE common_lfsr_nxt_seq(CONSTANT c_lfsr_nr : IN NATURAL;
CONSTANT g_incr : IN INTEGER;
in_en : IN STD_LOGIC; in_en : IN STD_LOGIC;
in_req : IN STD_LOGIC; in_req : IN STD_LOGIC;
in_dat : IN STD_LOGIC_VECTOR; in_dat : IN STD_LOGIC_VECTOR;
...@@ -138,6 +140,7 @@ END common_lfsr_sequences_pkg; ...@@ -138,6 +140,7 @@ END common_lfsr_sequences_pkg;
PACKAGE BODY common_lfsr_sequences_pkg IS PACKAGE BODY common_lfsr_sequences_pkg IS
PROCEDURE common_lfsr_nxt_seq(CONSTANT c_lfsr_nr : IN NATURAL; PROCEDURE common_lfsr_nxt_seq(CONSTANT c_lfsr_nr : IN NATURAL;
CONSTANT g_incr : IN INTEGER;
in_en : IN STD_LOGIC; in_en : IN STD_LOGIC;
in_req : IN STD_LOGIC; in_req : IN STD_LOGIC;
in_dat : IN STD_LOGIC_VECTOR; in_dat : IN STD_LOGIC_VECTOR;
...@@ -165,7 +168,7 @@ PACKAGE BODY common_lfsr_sequences_pkg IS ...@@ -165,7 +168,7 @@ PACKAGE BODY common_lfsr_sequences_pkg IS
nxt_prsg(0) <= NOT v_feedback; nxt_prsg(0) <= NOT v_feedback;
-- COUNTER -- COUNTER
nxt_cntr <= STD_LOGIC_VECTOR(UNSIGNED(cntr)+1); nxt_cntr <= INCR_UVEC(cntr, g_incr);
END IF; END IF;
END common_lfsr_nxt_seq; END common_lfsr_nxt_seq;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment