24 use ieee.std_logic_1164.
all;
88 type state_type is (idle, load_data, wait_shift_reg_full, calculate_paralel, data_valid_state, calculate_serial);
135 fsm_adder_state_transition:
process (
clk,
reset)
is 137 if (reset = '1') then 139 elsif (rising_edge(clk)) then 159 when wait_shift_reg_full => 166 when calculate_paralel => 173 when calculate_serial => 180 when data_valid_state => 196 when wait_shift_reg_full => 200 when calculate_paralel => 204 when calculate_serial => 212 when data_valid_state => 219 cnt_process:
process (
clk)
is 221 if (rising_edge(clk)) then 225 when wait_shift_reg_full => 231 when calculate_paralel => 235 when calculate_serial => in resetstd_logic
Reset signal.
Entitiy declaration for shiftreg.
in a_sstd_logic
Serial input 1.
in clkstd_logic
clk signal
in b_sstd_logic
Serial input 2.
in resetstd_logic
Sequential circuit reset signal.
shiftreg shift_reg_sumshift_reg_sum
integer range 0 to reg_width+ 1 timeout_counter
out out_validstd_logic
Output valid.
in clkstd_logic
clk signal
in b_pstd_logic_vector( reg_width- 1 downto 0)
Paralel input 2.
in b_sstd_logic
Serial input 2.
in a_sstd_logic
Serial input 1.
in pinstd_logic_vector( reg_width- 1 downto 0)
serial_adder serial_adder_instserial_adder_inst
std_logic_vector( reg_width downto 0) generic_pin_for_sum_reg
out sum_sstd_logic
Serial output sum.
out sum_sstd_logic
Serial output sum.
shiftreg shift_reg_ashift_reg_a
out poutstd_logic_vector( reg_width- 1 downto 0)
Entitiy declaration for serial_adder.
in par_addstd_logic
Paralel input/output data write/read control signal.
in a_pstd_logic_vector( reg_width- 1 downto 0)
Paralel input 1.
shiftreg shift_reg_bshift_reg_b
in serial_activestd_logic
Serial input/output data write/read control signal.
out sum_pstd_logic_vector( reg_width downto 0)
Paralel output sum.
(idle,load_data,wait_shift_reg_full,calculate_paralel,data_valid_state,calculate_serial) state_type
Entitiy declaration for fsm_adder component.