Commit 0aae97ff authored by Tomasz Wlostowski's avatar Tomasz Wlostowski

wrc_core/wrc_periph: reset fix (reason for hangs still unclear)

parent f1c00720
......@@ -6,7 +6,7 @@
-- Author : Grzegorz Daniluk
-- Company : Elproma
-- Created : 2011-04-04
-- Last update: 2012-02-28
-- Last update: 2012-04-30
-- Platform : FPGA-generics
-- Standard : VHDL
-------------------------------------------------------------------------------
......@@ -76,10 +76,10 @@ architecture struct of wrc_periph is
function f_cnt_memsize(words : integer) return std_logic_vector is
begin
return std_logic_vector(to_unsigned(words * 4 / 1024 / 64 - 1, 4));
return std_logic_vector(to_unsigned(words * 4 / 1024 / 16 - 1, 4));
-- *4 - to get size in bytes
-- /1024 - to get size in kB
-- /64 -1 - to get size in format of MEMSIZE@sysc_hwfr register
-- /16 -1 - to get size in format of MEMSIZE@sysc_hwfr register
end f_cnt_memsize;
signal sysc_regs_i : t_sysc_in_registers;
......@@ -97,6 +97,27 @@ begin
-------------------------------------
-- reset wrc
-------------------------------------
--process(clk_sys_i)
--begin
-- if rising_edge(clk_sys_i) then
-- if(rst_n_i = '0') then
-- rst_wrc_n_o <= '0';
-- rst_net_n_o <= '0';
-- rst_wrc_n_o_reg <= '1'; -- Resume CPU 1 cycle after reset
-- else
-- if(sysc_regs_o.rstr_trig_wr_o = '1' and sysc_regs_o.rstr_trig_o = x"deadbee") then
-- rst_wrc_n_o_reg <= not sysc_regs_o.rstr_rst_o;
-- --else
-- --rst_wrc_n_o <= '1';
-- end if;
-- rst_wrc_n_o <= rst_wrc_n_o_reg;
-- rst_net_n_o <= not sysc_regs_o.gpsr_net_rst_o;
-- end if;
-- end if;
--end process;
process(clk_sys_i)
begin
if rising_edge(clk_sys_i) then
......@@ -107,17 +128,14 @@ begin
else
if(sysc_regs_o.rstr_trig_wr_o = '1' and sysc_regs_o.rstr_trig_o = x"deadbee") then
rst_wrc_n_o_reg <= not sysc_regs_o.rstr_rst_o;
--else
--rst_wrc_n_o <= '1';
end if;
rst_wrc_n_o <= rst_wrc_n_o_reg;
rst_wrc_n_o <= not sysc_regs_o.rstr_rst_o;
end if;
rst_net_n_o <= not sysc_regs_o.gpsr_net_rst_o;
end if;
end if;
end if;
end if;
end process;
-------------------------------------
-- LEDs
-------------------------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment