Skip to content
Snippets Groups Projects
Commit 7507a354 authored by Pepping's avatar Pepping
Browse files

Added g_default_value

parent 8935e7d3
No related branches found
No related tags found
No related merge requests found
...@@ -38,6 +38,9 @@ USE common_lib.common_pkg.ALL; ...@@ -38,6 +38,9 @@ USE common_lib.common_pkg.ALL;
USE common_lib.common_mem_pkg.ALL; USE common_lib.common_mem_pkg.ALL;
ENTITY dp_xonoff_reg IS ENTITY dp_xonoff_reg IS
GENERIC (
g_default_value : STD_LOGIC := '1'
);
PORT ( PORT (
-- Clocks and reset -- Clocks and reset
mm_rst : IN STD_LOGIC; mm_rst : IN STD_LOGIC;
...@@ -61,7 +64,7 @@ ARCHITECTURE str OF dp_xonoff_reg IS ...@@ -61,7 +64,7 @@ ARCHITECTURE str OF dp_xonoff_reg IS
adr_w => 1, adr_w => 1,
dat_w => c_word_w, dat_w => c_word_w,
nof_dat => 1, nof_dat => 1,
init_sl => '0'); init_sl => g_default_value);
SIGNAL mm_xonoff_reg : STD_LOGIC_VECTOR(0 DOWNTO 0); SIGNAL mm_xonoff_reg : STD_LOGIC_VECTOR(0 DOWNTO 0);
...@@ -73,7 +76,7 @@ BEGIN ...@@ -73,7 +76,7 @@ BEGIN
-- Read access -- Read access
sla_out <= c_mem_miso_rst; sla_out <= c_mem_miso_rst;
-- Write access, register values -- Write access, register values
mm_xonoff_reg(0) <= '1'; mm_xonoff_reg(0) <= g_default_value;
ELSIF rising_edge(mm_clk) THEN ELSIF rising_edge(mm_clk) THEN
-- Read access defaults -- Read access defaults
......
...@@ -30,7 +30,8 @@ ENTITY mms_dp_xonoff IS ...@@ -30,7 +30,8 @@ ENTITY mms_dp_xonoff IS
GENERIC ( GENERIC (
g_nof_streams : NATURAL := 1; g_nof_streams : NATURAL := 1;
g_combine_streams : BOOLEAN := FALSE; g_combine_streams : BOOLEAN := FALSE;
g_bypass : BOOLEAN := FALSE g_bypass : BOOLEAN := FALSE;
g_default_value : STD_LOGIC := '1'
); );
PORT ( PORT (
-- Memory-mapped clock domain -- Memory-mapped clock domain
...@@ -82,6 +83,9 @@ BEGIN ...@@ -82,6 +83,9 @@ BEGIN
gen_reg : FOR i IN 0 TO c_nof_ctrl_streams-1 GENERATE gen_reg : FOR i IN 0 TO c_nof_ctrl_streams-1 GENERATE
u_reg : ENTITY work.dp_xonoff_reg u_reg : ENTITY work.dp_xonoff_reg
GENERIC MAP(
g_default_value => g_default_value
)
PORT MAP ( PORT MAP (
-- Clocks and reset -- Clocks and reset
mm_rst => mm_rst, mm_rst => mm_rst,
......
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