OpenCores
URL https://opencores.org/ocsvn/mod_sim_exp/mod_sim_exp/trunk

Subversion Repositories mod_sim_exp

[/] [mod_sim_exp/] [trunk/] [rtl/] [vhdl/] [core/] [sys_last_cell_logic.vhd] - Diff between revs 30 and 39

Show entire file | Details | Blame | View Log

Rev 30 Rev 39
Line 66... Line 66...
  );
  );
end sys_last_cell_logic;
end sys_last_cell_logic;
 
 
 
 
architecture Behavorial of sys_last_cell_logic is
architecture Behavorial of sys_last_cell_logic is
  signal cell_result_high       : std_logic_vector(1 downto 0);
  signal cin_reg   : std_logic;
  signal cell_result_high_reg   : std_logic_vector(1 downto 0);
 
  signal red_cout_end           : std_logic;
 
begin
begin
 
 
  -- half adder: cout_last_stage + cell_result_high_reg(1)
  a_0 <= cin_reg;
  cell_result_high(0) <= cin xor cell_result_high_reg(1); --result
 
  cell_result_high(1) <= cin and cell_result_high_reg(1); --cout
  last_reg : register_1b
 
 
  a_0 <= cell_result_high_reg(0);
 
 
 
  last_reg : register_n
 
  generic map(
 
    width => 2
 
  )
 
  port map(
  port map(
    core_clk => core_clk,
    core_clk => core_clk,
    ce       => start,
    ce       => start,
    reset    => reset,
    reset    => reset,
    din      => cell_result_high,
    din      => cin,
    dout     => cell_result_high_reg
    dout     => cin_reg
  );
  );
 
 
  -- reduction, finishing last 2 bits
  -- reduction, finishing last bit
  reduction_adder_a : cell_1b_adder
  reduction_adder : cell_1b_adder
  port map(
  port map(
    a     => '1', -- for 2s complement of m
    a     => '1', -- for 2s complement of m
    b     => cell_result_high_reg(0),
    b     => cin_reg,
    cin   => red_cin,
    cin   => red_cin,
    cout  => red_cout_end
 
  );
 
 
 
  reduction_adder_b : cell_1b_adder
 
  port map(
 
    a     => '1', -- for 2s complement of m
 
    b     => cell_result_high_reg(1),
 
    cin   => red_cout_end,
 
    cout  => r_sel
    cout  => r_sel
  );
  );
 
 
end Behavorial;
end Behavorial;
 
 
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.