architecture rtl of simple_axi_reg is signal reg0 : std_logic_vector(31 downto 0) := (others => '0'); begin process(clk) begin if rising_edge(clk) then if resetn = '0' then reg0 <= (others => '0'); elsif s_axi_awvalid and s_axi_wvalid then reg0 <= s_axi_wdata; end if; end if; end process; end architecture;
With multi-gigahertz FPGAs, metastability is a menace. Good PDF guides include: modern digital designs with eda vhdl and fpga pdf
Note: This shows a synthesizable, ready-to-use AXI-lite write register. architecture rtl of simple_axi_reg is signal reg0 :