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

Subversion Repositories ratpack

Compare Revisions

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

Rev 2 → Rev 3

/ratpack/trunk/VERSION
1,?rev1len? → ?rev2line?,?rev2len?
0.1.1
0.1.2
/ratpack/trunk/ratpack.vhd
2,7 → 2,7
-- Filename: ratpack.vhd
-- Purpose : Rational arithmetic package
-- Author : Nikolaos Kavvadias <nikolaos.kavvadias@gmail.com>
-- Date : 14-May-2010
-- Date : 17-Nov-2010
-- Version : 0.1
-- Revision: 0.0.0 (2009/07/25)
-- Initial version. Added the definition of a rational number, and the
13,6 → 13,8
-- Added: numerator, denominator, abs, relational operators (>, <, >=,
-- <=, =, /=, changed the int2rat to to_rational, new version of
-- int2rat (casting an integer to a rational).
-- 0.0.2 (2010/11/17)
-- Added an iterative version for the gcd computation (gcditer).
-- License : Copyright (C) 2009, 2010 by Nikolaos Kavvadias
-- This program is free software. You can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public License,
48,6 → 50,7
function "=" (a, b : rational) return boolean;
function "/=" (a, b : rational) return boolean;
function gcd (a, b : integer) return integer;
function gcditer (a, b : integer) return integer;
function mediant (a, b : rational) return rational;
 
end ratpack;
205,22 → 208,40
return (diff(numer) /= 0);
end "/=";
 
function gcd (a, b : integer) return integer is
begin
if a = 0 then
return b;
end if;
if b = 0 then
return a;
end if;
if (a > b) then
return gcd(b, a mod b);
else
return gcd(a, b mod a);
end if;
end gcd;
function gcd (a, b : integer) return integer is
begin
if a = 0 then
return b;
end if;
if b = 0 then
return a;
end if;
if (a > b) then
return gcd(b, a mod b);
else
return gcd(a, b mod a);
end if;
end gcd;
function mediant (a, b : rational) return rational is
function gcditer (a, b : integer) return integer is
variable x, y : integer;
begin
x := a;
y := b;
if ((x = 0) and (y = 0)) then
return 0;
end if;
while (x /= y) loop
if (x >= y) then
x := x - y;
else
y := y - x;
end if;
end loop;
return x;
end gcditer;
function mediant (a, b : rational) return rational is
variable r : rational;
variable tn, td : integer;
begin
/ratpack/trunk/ChangeLog
6,4 → 6,8
 
* Minor release 0.1.1.
 
2010-11-17 Nikolaos Kavvadias <nikolaos.kavvadias@gmail.com>
 
* Minor release 0.1.2.
 
ChangeLog ends here
/ratpack/trunk/THANKS
3,5 → 3,5
X.Y. for whatever.
 
 
Thessaloniki, Greece, 2010-05-14
Thessaloniki, Greece, 2010-11-17
 
/ratpack/trunk/README
4,8 → 4,8
-- Contact : nikolaos.kavvadias@gmail.com --
-- : http://electronics.physics.auth.gr/people/nkavv/ --
-- : http://www.nkavvadias.eu --
-- Release Date : O7 June 2010 --
-- Version : 0.1.1 --
-- Release Date : 17 November 2010 --
-- Version : 0.1.2 --
--------------------:---------------------------------------------------------
-- Revision history : --
-- v0.1 : 2010-05-14 --
12,6 → 12,8
-- : Initial release. --
-- v0.1.1 : 2010-06-07 --
-- : Minor update in documentation (README). --
-- v0.1.2 : 2010-11-17 --
-- : Added gcditer. --
------------------------------------------------------------------------------
 
 

powered by: WebSVN 2.1.0

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