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

Subversion Repositories big_counter

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 3 to Rev 4
    Reverse comparison

Rev 3 → Rev 4

/tags/arelease/doc/src/BigCounter.odt Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream
tags/arelease/doc/src/BigCounter.odt Property changes : Deleted: svn:mime-type ## -1 +0,0 ## -application/octet-stream \ No newline at end of property Index: tags/arelease/doc/src/srl counter drawings.odg =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: tags/arelease/doc/src/srl counter drawings.odg =================================================================== --- tags/arelease/doc/src/srl counter drawings.odg (revision 3) +++ tags/arelease/doc/src/srl counter drawings.odg (nonexistent)
tags/arelease/doc/src/srl counter drawings.odg Property changes : Deleted: svn:mime-type ## -1 +0,0 ## -application/octet-stream \ No newline at end of property Index: trunk/rtl/am_srl_counter_rtl.vhd =================================================================== --- trunk/rtl/am_srl_counter_rtl.vhd (revision 3) +++ trunk/rtl/am_srl_counter_rtl.vhd (nonexistent) @@ -1,125 +0,0 @@ ------------------------------------------------------------------------ ----- ---- ----- ---- ----- This file is part of the big_counter project ---- ----- http://www.opencores.org/cores/big_counter ---- ----- ---- ----- Description ---- ----- Implementation of a large counter made of SRL's ---- ----- ---- ----- ---- ----- To Do: ---- ----- NA ---- ----- ---- ----- Author(s): ---- ----- Andrew Mulcock, amulcock@opencores.org ---- ----- ---- ------------------------------------------------------------------------ ----- ---- ----- Copyright (C) 2007 Authors and OPENCORES.ORG ---- ----- ---- ----- This source file may be used and distributed without ---- ----- restriction provided that this copyright statement is not ---- ----- removed from the file and that any derivative work contains ---- ----- the original copyright notice and the associated disclaimer. ---- ----- ---- ----- This source file is free software; you can redistribute it ---- ----- and/or modify it under the terms of the GNU Lesser General ---- ----- Public License as published by the Free Software Foundation; ---- ----- either version 2.1 of the License, or (at your option) any ---- ----- later version. ---- ----- ---- ----- This source is distributed in the hope that it will be ---- ----- useful, but WITHOUT ANY WARRANTY; without even the implied ---- ----- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ---- ----- PURPOSE. See the GNU Lesser General Public License for more ---- ----- details. ---- ----- ---- ----- You should have received a copy of the GNU Lesser General ---- ----- Public License along with this source; if not, download it ---- ----- from http://www.opencores.org/lgpl.shtml ---- ----- ---- ------------------------------------------------------------------------ --- ---- --- CVS Revision History ---- --- ---- --- $Log: not supported by cvs2svn $ ---- --- ---- - - - -library ieee; -use ieee.std_logic_1164.all; - -entity am_srl_counter_rtl is - generic ( - no_of_stages : integer := 200 - ); - port( clk : in std_logic; - en_in : in std_logic; - rco : out std_logic_vector ( no_of_stages - 1 downto 0) - ); -end am_srl_counter_rtl; - -architecture Behavioral of am_srl_counter_rtl is - - -type shift_counter_type is array ( no_of_stages - 1 downto 0 ) of STD_LOGIC_VECTOR ( 15 downto 0 ) ; - -signal shift_srl : shift_counter_type := ( others => X"0001" ); -signal clk_en : std_logic_vector ( no_of_stages - 1 downto 0) := ( others => '0'); -signal rco_int : std_logic_vector ( no_of_stages - 1 downto 0) := ( others => '0'); - - -begin - - -gen_srls : for n in 0 to no_of_stages - 1 generate - - tap_a: if n = 0 generate - clk_en(n) <= en_in; - srl_proc_a :process (clk) - begin - if rising_edge( clk ) then - if clk_en(n) = '1' then - shift_srl(n) <= shift_srl(n)(shift_srl(n)'left-1 downto 0) & shift_srl(n)(shift_srl(n)'left); - end if; - end if; - end process srl_proc_a; - rco_int(n) <= shift_srl(n)(shift_srl(n)'left); - end generate tap_a; - - - tap_b: if n = 1 generate - clk_en(n) <= rco_int(n-1) and en_in; - srl_proc_b :process (clk) - begin - if rising_edge( clk) then - if clk_en(n) = '1' then - shift_srl(n) <= shift_srl(n)(shift_srl(n)'left-1 downto 0) & shift_srl(n)(shift_srl(n)'left); - end if; - end if; - end process srl_proc_b; - rco_int(n) <= en_in and shift_srl(n)(shift_srl(n)'left); - end generate tap_b; - - tap_cp: if n > 1 generate - clk_en(n) <= rco_int(n-1) and rco_int(0); - srl_proc_c :process (clk) - begin - if rising_edge( clk) then - if clk_en(n) = '1' then - shift_srl(n) <= shift_srl(n)(shift_srl(n)'left-1 downto 0) & shift_srl(n)(shift_srl(n)'left); - end if; - end if; - end process srl_proc_c; - rco_int(n) <= rco_int(n-1) and shift_srl(n)(shift_srl(n)'left); - end generate tap_cp; - -rco <= rco_int; - - -end generate gen_srls; - - -end Behavioral; Index: trunk/doc/src/BigCounter.odt =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: trunk/doc/src/BigCounter.odt =================================================================== --- trunk/doc/src/BigCounter.odt (revision 3) +++ trunk/doc/src/BigCounter.odt (nonexistent)
trunk/doc/src/BigCounter.odt Property changes : Deleted: svn:mime-type ## -1 +0,0 ## -application/octet-stream \ No newline at end of property Index: trunk/doc/src/srl counter drawings.odg =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: trunk/doc/src/srl counter drawings.odg =================================================================== --- trunk/doc/src/srl counter drawings.odg (revision 3) +++ trunk/doc/src/srl counter drawings.odg (nonexistent)
trunk/doc/src/srl counter drawings.odg Property changes : Deleted: svn:mime-type ## -1 +0,0 ## -application/octet-stream \ No newline at end of property Index: big_counter/trunk/rtl/am_srl_counter_rtl.vhd =================================================================== --- big_counter/trunk/rtl/am_srl_counter_rtl.vhd (nonexistent) +++ big_counter/trunk/rtl/am_srl_counter_rtl.vhd (revision 4) @@ -0,0 +1,125 @@ +----------------------------------------------------------------------- +---- ---- +---- ---- +---- This file is part of the big_counter project ---- +---- http://www.opencores.org/cores/big_counter ---- +---- ---- +---- Description ---- +---- Implementation of a large counter made of SRL's ---- +---- ---- +---- ---- +---- To Do: ---- +---- NA ---- +---- ---- +---- Author(s): ---- +---- Andrew Mulcock, amulcock@opencores.org ---- +---- ---- +----------------------------------------------------------------------- +---- ---- +---- Copyright (C) 2007 Authors and OPENCORES.ORG ---- +---- ---- +---- This source file may be used and distributed without ---- +---- restriction provided that this copyright statement is not ---- +---- removed from the file and that any derivative work contains ---- +---- the original copyright notice and the associated disclaimer. ---- +---- ---- +---- This source file is free software; you can redistribute it ---- +---- and/or modify it under the terms of the GNU Lesser General ---- +---- Public License as published by the Free Software Foundation; ---- +---- either version 2.1 of the License, or (at your option) any ---- +---- later version. ---- +---- ---- +---- This source is distributed in the hope that it will be ---- +---- useful, but WITHOUT ANY WARRANTY; without even the implied ---- +---- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ---- +---- PURPOSE. See the GNU Lesser General Public License for more ---- +---- details. ---- +---- ---- +---- You should have received a copy of the GNU Lesser General ---- +---- Public License along with this source; if not, download it ---- +---- from http://www.opencores.org/lgpl.shtml ---- +---- ---- +----------------------------------------------------------------------- +-- ---- +-- CVS Revision History ---- +-- ---- +-- $Log: not supported by cvs2svn $ ---- +-- ---- + + + +library ieee; +use ieee.std_logic_1164.all; + +entity am_srl_counter_rtl is + generic ( + no_of_stages : integer := 200 + ); + port( clk : in std_logic; + en_in : in std_logic; + rco : out std_logic_vector ( no_of_stages - 1 downto 0) + ); +end am_srl_counter_rtl; + +architecture Behavioral of am_srl_counter_rtl is + + +type shift_counter_type is array ( no_of_stages - 1 downto 0 ) of STD_LOGIC_VECTOR ( 15 downto 0 ) ; + +signal shift_srl : shift_counter_type := ( others => X"0001" ); +signal clk_en : std_logic_vector ( no_of_stages - 1 downto 0) := ( others => '0'); +signal rco_int : std_logic_vector ( no_of_stages - 1 downto 0) := ( others => '0'); + + +begin + + +gen_srls : for n in 0 to no_of_stages - 1 generate + + tap_a: if n = 0 generate + clk_en(n) <= en_in; + srl_proc_a :process (clk) + begin + if rising_edge( clk ) then + if clk_en(n) = '1' then + shift_srl(n) <= shift_srl(n)(shift_srl(n)'left-1 downto 0) & shift_srl(n)(shift_srl(n)'left); + end if; + end if; + end process srl_proc_a; + rco_int(n) <= shift_srl(n)(shift_srl(n)'left); + end generate tap_a; + + + tap_b: if n = 1 generate + clk_en(n) <= rco_int(n-1) and en_in; + srl_proc_b :process (clk) + begin + if rising_edge( clk) then + if clk_en(n) = '1' then + shift_srl(n) <= shift_srl(n)(shift_srl(n)'left-1 downto 0) & shift_srl(n)(shift_srl(n)'left); + end if; + end if; + end process srl_proc_b; + rco_int(n) <= en_in and shift_srl(n)(shift_srl(n)'left); + end generate tap_b; + + tap_cp: if n > 1 generate + clk_en(n) <= rco_int(n-1) and rco_int(0); + srl_proc_c :process (clk) + begin + if rising_edge( clk) then + if clk_en(n) = '1' then + shift_srl(n) <= shift_srl(n)(shift_srl(n)'left-1 downto 0) & shift_srl(n)(shift_srl(n)'left); + end if; + end if; + end process srl_proc_c; + rco_int(n) <= rco_int(n-1) and shift_srl(n)(shift_srl(n)'left); + end generate tap_cp; + +rco <= rco_int; + + +end generate gen_srls; + + +end Behavioral; Index: big_counter/trunk/doc/src/BigCounter.odt =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: big_counter/trunk/doc/src/BigCounter.odt =================================================================== --- big_counter/trunk/doc/src/BigCounter.odt (nonexistent) +++ big_counter/trunk/doc/src/BigCounter.odt (revision 4)
big_counter/trunk/doc/src/BigCounter.odt Property changes : Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Index: big_counter/trunk/doc/src/srl counter drawings.odg =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: big_counter/trunk/doc/src/srl counter drawings.odg =================================================================== --- big_counter/trunk/doc/src/srl counter drawings.odg (nonexistent) +++ big_counter/trunk/doc/src/srl counter drawings.odg (revision 4)
big_counter/trunk/doc/src/srl counter drawings.odg Property changes : Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Index: big_counter/trunk =================================================================== --- big_counter/trunk (nonexistent) +++ big_counter/trunk (revision 4)
big_counter/trunk Property changes : Added: svn:mergeinfo ## -0,0 +0,0 ## Index: big_counter/web_uploads =================================================================== --- big_counter/web_uploads (nonexistent) +++ big_counter/web_uploads (revision 4)
big_counter/web_uploads Property changes : Added: svn:mergeinfo ## -0,0 +0,0 ## Index: big_counter/branches =================================================================== --- big_counter/branches (nonexistent) +++ big_counter/branches (revision 4)
big_counter/branches Property changes : Added: svn:mergeinfo ## -0,0 +0,0 ## Index: big_counter/tags/arelease/rtl/am_srl_counter_rtl.vhd =================================================================== --- big_counter/tags/arelease/rtl/am_srl_counter_rtl.vhd (nonexistent) +++ big_counter/tags/arelease/rtl/am_srl_counter_rtl.vhd (revision 4) @@ -0,0 +1,125 @@ +----------------------------------------------------------------------- +---- ---- +---- ---- +---- This file is part of the big_counter project ---- +---- http://www.opencores.org/cores/big_counter ---- +---- ---- +---- Description ---- +---- Implementation of a large counter made of SRL's ---- +---- ---- +---- ---- +---- To Do: ---- +---- NA ---- +---- ---- +---- Author(s): ---- +---- Andrew Mulcock, amulcock@opencores.org ---- +---- ---- +----------------------------------------------------------------------- +---- ---- +---- Copyright (C) 2007 Authors and OPENCORES.ORG ---- +---- ---- +---- This source file may be used and distributed without ---- +---- restriction provided that this copyright statement is not ---- +---- removed from the file and that any derivative work contains ---- +---- the original copyright notice and the associated disclaimer. ---- +---- ---- +---- This source file is free software; you can redistribute it ---- +---- and/or modify it under the terms of the GNU Lesser General ---- +---- Public License as published by the Free Software Foundation; ---- +---- either version 2.1 of the License, or (at your option) any ---- +---- later version. ---- +---- ---- +---- This source is distributed in the hope that it will be ---- +---- useful, but WITHOUT ANY WARRANTY; without even the implied ---- +---- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ---- +---- PURPOSE. See the GNU Lesser General Public License for more ---- +---- details. ---- +---- ---- +---- You should have received a copy of the GNU Lesser General ---- +---- Public License along with this source; if not, download it ---- +---- from http://www.opencores.org/lgpl.shtml ---- +---- ---- +----------------------------------------------------------------------- +-- ---- +-- CVS Revision History ---- +-- ---- +-- $Log: not supported by cvs2svn $ ---- +-- ---- + + + +library ieee; +use ieee.std_logic_1164.all; + +entity am_srl_counter_rtl is + generic ( + no_of_stages : integer := 200 + ); + port( clk : in std_logic; + en_in : in std_logic; + rco : out std_logic_vector ( no_of_stages - 1 downto 0) + ); +end am_srl_counter_rtl; + +architecture Behavioral of am_srl_counter_rtl is + + +type shift_counter_type is array ( no_of_stages - 1 downto 0 ) of STD_LOGIC_VECTOR ( 15 downto 0 ) ; + +signal shift_srl : shift_counter_type := ( others => X"0001" ); +signal clk_en : std_logic_vector ( no_of_stages - 1 downto 0) := ( others => '0'); +signal rco_int : std_logic_vector ( no_of_stages - 1 downto 0) := ( others => '0'); + + +begin + + +gen_srls : for n in 0 to no_of_stages - 1 generate + + tap_a: if n = 0 generate + clk_en(n) <= en_in; + srl_proc_a :process (clk) + begin + if rising_edge( clk ) then + if clk_en(n) = '1' then + shift_srl(n) <= shift_srl(n)(shift_srl(n)'left-1 downto 0) & shift_srl(n)(shift_srl(n)'left); + end if; + end if; + end process srl_proc_a; + rco_int(n) <= shift_srl(n)(shift_srl(n)'left); + end generate tap_a; + + + tap_b: if n = 1 generate + clk_en(n) <= rco_int(n-1) and en_in; + srl_proc_b :process (clk) + begin + if rising_edge( clk) then + if clk_en(n) = '1' then + shift_srl(n) <= shift_srl(n)(shift_srl(n)'left-1 downto 0) & shift_srl(n)(shift_srl(n)'left); + end if; + end if; + end process srl_proc_b; + rco_int(n) <= en_in and shift_srl(n)(shift_srl(n)'left); + end generate tap_b; + + tap_cp: if n > 1 generate + clk_en(n) <= rco_int(n-1) and rco_int(0); + srl_proc_c :process (clk) + begin + if rising_edge( clk) then + if clk_en(n) = '1' then + shift_srl(n) <= shift_srl(n)(shift_srl(n)'left-1 downto 0) & shift_srl(n)(shift_srl(n)'left); + end if; + end if; + end process srl_proc_c; + rco_int(n) <= rco_int(n-1) and shift_srl(n)(shift_srl(n)'left); + end generate tap_cp; + +rco <= rco_int; + + +end generate gen_srls; + + +end Behavioral; Index: big_counter/tags/arelease/doc/src/BigCounter.odt =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: big_counter/tags/arelease/doc/src/BigCounter.odt =================================================================== --- big_counter/tags/arelease/doc/src/BigCounter.odt (nonexistent) +++ big_counter/tags/arelease/doc/src/BigCounter.odt (revision 4)
big_counter/tags/arelease/doc/src/BigCounter.odt Property changes : Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Index: big_counter/tags/arelease/doc/src/srl counter drawings.odg =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: big_counter/tags/arelease/doc/src/srl counter drawings.odg =================================================================== --- big_counter/tags/arelease/doc/src/srl counter drawings.odg (nonexistent) +++ big_counter/tags/arelease/doc/src/srl counter drawings.odg (revision 4)
big_counter/tags/arelease/doc/src/srl counter drawings.odg Property changes : Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Index: big_counter/tags =================================================================== --- big_counter/tags (nonexistent) +++ big_counter/tags (revision 4)
big_counter/tags Property changes : Added: svn:mergeinfo ## -0,0 +0,0 ##

powered by: WebSVN 2.1.0

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