<regname="num_inputs"read="yes"reset="num_inputs"bits="8"comment="Total number of inputs attached to the TLU"/>
<regname="input_select"read="yes"write="yes"bits="8"comment="Write the configuration of this input"/>
<regname="enable"read="yes"write="yes"bits="1"comment="Will this input generate timing events on an edge"/>
<regname="stable"read="yes"write="yes"bits="32"comment="Signal must be high/low for stable cycles to be counted as a valid transition"/>
<regname="event_hi"read="yes"write="yes"bits="32"comment="Timing Event to generate (high word)"/>
<regname="event_lo"read="yes"write="yes"bits="32"comment="Timing Event to generate (low word), lowest bit is replaced with the edge of the transition"/>
<regname="write"pulse="yes"write="yes"bits="1"comment="Write register contents to TLU configuration"/>
signals_error_i:std_logic_vector(1-1downto0):=(others=>'0');-- Error control
signals_stall_i:std_logic_vector(1-1downto0):=(others=>'0');-- flow control
signalr_num_inputs:std_logic_vector(8-1downto0):=std_logic_vector(to_unsigned(g_num_inputs,8));-- Total number of inputs attached to the TLU
signalr_input_select:std_logic_vector(8-1downto0):=(others=>'0');-- Write the configuration of this input
signalr_enable:std_logic_vector(1-1downto0):=(others=>'0');-- Will this input generate timing events on an edge
signalr_stable:std_logic_vector(32-1downto0):=(others=>'0');-- Signal must be high/low for stable cycles to be counted as a valid transition
signalr_event_hi:std_logic_vector(32-1downto0):=(others=>'0');-- Timing Event to generate (high word)
signalr_event_lo:std_logic_vector(32-1downto0):=(others=>'0');-- Timing Event to generate (low word), lowest bit is replaced with the edge of the transition
signalr_write:std_logic_vector(1-1downto0):=(others=>'0');-- Write register contents to TLU configuration
begin
sp:wb_skidpad
genericmap(
g_adrbits=>3
)
Portmap(
clk_i=>clk_sys_i,
rst_n_i=>rst_sys_n_i,
push_i=>s_push,
pop_i=>s_pop,
full_o=>s_full,
empty_o=>s_empty,
adr_i=>slave_i.adr(4downto2),
dat_i=>slave_i.dat,
sel_i=>slave_i.sel,
we_i=>slave_i.we,
adr_o=>s_a,
dat_o=>s_d,
sel_o=>s_s,
we_o=>s_w
);
validmux:withto_integer(unsigned(s_a_ext))select
s_valid<=
'1'whenothers;
s_a_ext<=s_a&"00";
s_stall<=s_full;
s_push<=slave_i.cycandslave_i.stbandnots_stall;
-- push if wb op not stalled
s_e<=not(s_emptyorr_e_waitorstall_i(0));-- op enable when skidpad not empty and not waiting for completion
s_pop<=(s_eorr_e_wait)ands_valid;-- if op enabled or waiting for completion, pop on valid from entity