Posit arithmetic [1] is an alternative numeric representation that tries to overcome some of the problems of floating-point arithmetic. A posit number (p) is composed of a sign value (s), a regime value (k), an exponent value (e) and a mantissa value (m), as described in the equation below:
The aim of this project are:
- convert the integer input data represented in 2's complement signed fixed-point to a standard posit number in (16,1) format;
- sum the two operands using the addition stated in the posit arithmetic.
The module (Fig. 1) is fed by two fixed-point numbers, namely
It is made of two units:
- 16-bit 2's complement fixed-point 0.15 coded to 16-bit standard posit (16,1) converter, namely fixed to posit converter,
- posit adder, that executes the addition of posit numbers according to the posit standard.
The conversion is operated as described in [1], leveraging a leading zero counter [2] and some glue logic.
The addition leverages the architecture presented in [3].
Module inputs and outputs are stated in the next table:
mode | signal |
---|---|
input | |
input | |
output | |
output | |
output | |
output | |
output |
[1] J. Gustafson. "Posit arithmetic." Mathematica Notebook describing the posit number system, 2017.
[2] Milenković, Nebojša & Stankovic, Vladimir & Milić, Miljana. (2015). Modular Design Of Fast Leading Zeros Counting Circuit. Journal of Electrical Engineering. 66. 329-333. 10.2478/jee-2015-0054.
[3] R. Murillo, A. A. Del Barrio and G. Botella, "Customized Posit Adders and Multipliers using the FloPoCo Core Generator," 2020 IEEE International Symposium on Circuits and Systems (ISCAS), 2020, pp. 1-5, doi: 10.1109/ISCAS45731.2020.9180771.
Given the comunication protocol implemented, to test the design it is needed to provide the two operands in 8-bit little endian strings.
The steps to write two two 16-bit operands
- give the
$a_f$ [7:0] and assert data valid; - wait for 4 clock cycles and deassert data valid;
- wait for 4 clock cycles;
- repeat with
$a_f$ [15:8],$b_f$ [7:0] and$b_f$ [15:8]
The steps to read the data are as follows:
- assert read data valid and read the first operand LSBs, a[7:0];
- wait for 4 clock cycles and deassert read data valid;
- wait for 8 clock cycles;
- repeat to read
$a_f$ [15:8],$b_f$ [7:0],$b_f$ [15:8], {s,k,e} of a converted to posit ($a_p$ ), {s,k,e} of b converted to posit ($b_p$ ), m [15:8] of$a_p$ , m [7:0] of$a_p$ , m [15:8] of$b_p$ , m [7:0] of$b_p$ ,$s_p$ [7:0] and$s_p$ [15:0].
Companies: (a) University of Salerno, Fisciano (SA), Italy; (b) STMicroelectronics, Napoli, Italy.
Engineer: Andrea Fasolino (a), Gian Domenico Licciardo (a), Aldo Torino (b), Francesco Del Prete (b), Claudio Parrella (b).
Emails: afasolino@unisa.it, gdlicciardo@unisa.it, aldo.torino@st.com, francesco.delprete@st.com, claudio.parrella@st.com