Skip to content

Commit

Permalink
ZCU102 AXI C2C design: connect reset/status signals to ipbus_example …
Browse files Browse the repository at this point in the history
…entity. See #133
  • Loading branch information
tswilliams committed Nov 7, 2019
1 parent 8e0769f commit 5092aa3
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 3 deletions.
1 change: 1 addition & 0 deletions boards/zcu102/c2c_loopback/synth/firmware/cfg/top.dep
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ setup -f add_block_designs.tcl
include zu9.dep

src top_zcu102_c2c_loopback.vhd
src -c ipbus-firmware:components/ipbus_util ipbus_cdc_reg.vhd
include zcu102_c2c_loopback_infra.dep
src -c components/ipbus_core ipbus_package.vhd

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,15 @@ architecture rtl of top is

signal aclk : std_logic;
signal aresetn : std_logic;

signal ipb_soft_rst : std_logic;
signal c2c_areset : std_logic;
signal c2c_aresetn : std_logic;

signal c2c_master_stat_axiclk, c2c_master_stat_ipbclk : std_logic_vector(9 downto 0);
signal c2c_slave_stat_axiclk, c2c_slave_stat_ipbclk : std_logic_vector(7 downto 0);


begin

local_infra_inst: entity work.zcu102_infra_c2c_loopback_master
Expand All @@ -64,7 +72,7 @@ begin
gt_txn => c2c_m_gt_txn,
gt_txp => c2c_m_gt_txp,
--
c2c_aresetn => '1',
c2c_aresetn => c2c_aresetn,
c2c_stat => open,
--
ipb_clk => local_ipb_clk,
Expand All @@ -80,7 +88,34 @@ begin
ipb_rst => local_ipb_rst,
ipb_in => local_ipb_out,
ipb_out => local_ipb_in,
userled => leds(0)
userled => leds(0),
status(7 downto 0) => c2c_slave_stat_ipbclk,
status(17 downto 8) => c2c_master_stat_ipbclk,
status(19 downto 18) => "00",
status(31 downto 20) => X"abc"
);

c2c_reset_cdc: entity work.ipbus_cdc_reg
port map (
clk => local_ipb_clk,
clks => aclk,
d(0) => ipb_soft_rst,
q(0) => c2c_areset
);

c2c_aresetn <= not c2c_areset;

c2c_stat_cdc: entity work.ipbus_cdc_reg
generic map (
N => 18
)
port map (
clk => aclk,
clks => local_ipb_clk,
d(7 downto 0) => c2c_slave_stat_axiclk,
d(17 downto 8) => c2c_master_stat_axiclk,
q(7 downto 0) => c2c_slave_stat_ipbclk,
q(17 downto 8) => c2c_master_stat_ipbclk
);


Expand Down
3 changes: 2 additions & 1 deletion components/ipbus_util/firmware/hdl/ipbus_example.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ entity ipbus_example is
ipb_rst: in std_logic;
ipb_in: in ipb_wbus;
ipb_out: out ipb_rbus;
status: in std_logic_vector(31 downto 0) := X"abcdfedc";
nuke: out std_logic;
soft_rst: out std_logic;
userled: out std_logic
Expand Down Expand Up @@ -85,7 +86,7 @@ begin
q => ctrl
);

stat(0) <= X"abcdfedc";
stat(0) <= status;
soft_rst <= ctrl(0)(0);
nuke <= ctrl(0)(1);
userled <= ctrl(0)(2);
Expand Down

0 comments on commit 5092aa3

Please sign in to comment.