"ratpack" is a rational arithmetic package written in VHDL.
Currently, the "ratpack" package implements the following:
- the RATIONAL data type.
- to_rational: construction function of a rational given two integers
(numerator and denominator).
- int2rat: conversion function of an integer to its rational
- numerator: extracts the numerator of a rational number.
- denominator: extracts the denominator of a rational number.
- "+", "-", "*", "/": implementation of the basic arithmetic
operations for rationals.
- abs: extracts the absolute value of a given rational number.
- ">", "=", " rationals.
- gcd: computes the greatest common divisor of two integers (positive,
covers the pathological case of division by zero).
- mediant: computes the mediant rational of two given rationals.
"ratpack" is distributed along with two VHDL testbenches: a simple one
(ratpack_tb1.vhd) and a testbench generating the Farey series of orders 1 to 12
Feel free to visit http://www.nkavvadias.com for updates to my development projects.
Contact me at: nikolaos-dot-kavvadias-at-gmail-dot-com