architecture behavioral of host_ctrl is
+ -- Internal reset from power-on-reset generator
+ -- Can be re-reset with rst_i, and is also sent to device
+ signal rst_int: std_logic;
+
-- Host Wishbone bus from EPP bridge
signal h_cyc: std_logic;
signal h_stb: std_logic;
begin
+ -- Power-on-reset
+ e_por: entity utility.power_on_reset
+ port map (
+ rst_i => rst_i,
+ clk_i => clk_i,
+ rst_o => rst_int
+ );
+
+ d_rst_o <= rst_int or ctrl(7);
+
-- EPP to Wishbone bridge
e_epp_wb: entity work.epp_wb
port map (
EppDB => EppDB,
EppWait => EppWait,
- rst_i => rst_i,
+ rst_i => rst_int,
clk_i => clk_i,
adr_o => h_adr,
dat_i => h_dat_miso,
-- Wishbone slave for control registers
e_host_regs: entity work.host_regs
port map (
- rst_i => rst_i,
+ rst_i => rst_int,
clk_i => clk_i,
h_cyc_i => h_cyc_ctl,
sw => sw
);
- -- Auxiliary signals to device
- d_rst_o <= ctrl(7);
-
-- Wishbone slave for out-of-band memory controller
e_mem_oob: entity work.mem_wb_basic
port map (
clk_i => clk_i,
- rst_i => rst_i,
+ rst_i => rst_int,
cyc_i => h_cyc_oob,
stb_i => h_stb,
-- Wishbone slave for debug reads
e_debug: entity utility.wb_debug
port map (
- rst_i => rst_i,
+ rst_i => rst_int,
clk_i => clk_i,
cyc_i => h_cyc_deb,
stb_i => h_stb,
architecture behavioral of nexys2 is
-- Device Wishbone SYSCON
- signal g_rst: std_logic; -- Global power-on-reset
- signal h_rst: std_logic; -- Host controller reset
signal d_rst: std_logic; -- Device reset (P.O.R. or host)
signal d_clk: std_logic; -- Device clock, in case DCM used instead of clk_50 later
d_clk <= clk_50;
- e_por: entity utility.power_on_reset
- port map (
- rst_i => '0',
- clk_i => d_clk,
- rst_o => g_rst
- );
-
- d_rst <= g_rst or h_rst;
-- Flash: 0x00000000-0x00ffffff
-- Ram: 0x01000000-0x01ffffff
e_host: entity nexys2_lib.host_ctrl
port map (
clk_i => d_clk,
- rst_i => g_rst,
+ rst_i => '0',
-- Signals to the internal device
- d_rst_o => h_rst,
+ d_rst_o => d_rst,
d_flags_o => host_flags,
debug_i => (others => '0'),
debug_o => open,