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

Subversion Repositories fixed_extensions

[/] [fixed_extensions/] [trunk/] [doc/] [README] - Blame information for rev 3

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 3 kavi
==============================
2
 fixed_extensions user manual
3
==============================
4 2 kavi
 
5 3 kavi
+-------------------+----------------------------------------------------------+
6
| **Title**         | fixed_extensions (VHDL fixed-point arithmetic extensions |
7
|                   | package)                                                 |
8
+-------------------+----------------------------------------------------------+
9
| **Author**        | Nikolaos Kavvadias 2011, 2012, 2013, 2014                |
10
+-------------------+----------------------------------------------------------+
11
| **Contact**       | nikos@nkavvadias.com                                     |
12
+-------------------+----------------------------------------------------------+
13
| **Website**       | http://www.nkavvadias.com                                |
14
+-------------------+----------------------------------------------------------+
15
| **Release Date**  | 21 February 2014                                         |
16
+-------------------+----------------------------------------------------------+
17
| **Version**       | 0.1.0                                                    |
18
+-------------------+----------------------------------------------------------+
19
| **Rev. history**  |                                                          |
20
+-------------------+----------------------------------------------------------+
21
|        **v0.1.0** | 21-02-2014                                               |
22
|                   |                                                          |
23
|                   | Changed documentation format to RestructuredText.        |
24
+-------------------+----------------------------------------------------------+
25
|        **v0.0.5** | 25-07-2011                                               |
26
|                   |                                                          |
27
|                   | First public release.                                    |
28
+-------------------+----------------------------------------------------------+
29 2 kavi
 
30
 
31 3 kavi
1. Introduction
32
===============
33
 
34
``fixed_extensions_pkg`` is a fixed-point arithmetic package written in VHDL
35 2 kavi
according to the VHDL-2008 update of the standard. It uses VHDL-2008 back-
36
compatible libraries (by David Bishop) that are included in this distribution
37
for the sake of completeness.
38
 
39
Currently, the "fixed_extensions_pkg" package implements the following:
40
 
41 3 kavi
-ceil:
42
  round towards plus infinity.
43
-fix:
44
  round towards zero.
45
-floor:
46
  round towards minus infinity.
47
-round:
48
  round to nearest; ties to greatest absolute value.
49
-nearest:
50
  round to nearest; ties to plus infinity.
51
-convergent:
52
  round to nearest; ties to closest even.
53
-bitinsert:
54
  bit-field insertion to word
55
-bitextract:
56
  bit-field extraction from word
57 2 kavi
 
58 3 kavi
``fixed_extensions`` is distributed along with a tool (gentestround) to generate
59
customized VHDL test designs.
60 2 kavi
 
61 3 kavi
The ``fixed_extensions`` project can be download from the following OpenCores
62
website: http://opencores.org/project,fixed_extensions
63 2 kavi
 
64
 
65 3 kavi
2. File listing
66
===============
67 2 kavi
 
68 3 kavi
The ``fixed_extensions`` distribution includes the following files:
69
 
70
+-----------------------+------------------------------------------------------+
71
| /fixed_extensions     | Top-level directory                                  |
72
+-----------------------+------------------------------------------------------+
73
| /bench/vhdl           | Benchmarks VHDL directory                            |
74
+-----------------------+------------------------------------------------------+
75
| testrounding_tb.vhd   | Standard testbench file.                             |
76
+-----------------------+------------------------------------------------------+
77
| /doc                  | Documentation directory                              |
78
+-----------------------+------------------------------------------------------+
79
| AUTHORS               | List of authors.                                     |
80
+-----------------------+------------------------------------------------------+
81
| BUGS                  | Bug list.                                            |
82
+-----------------------+------------------------------------------------------+
83
| ChangeLog             | A log for code changes.                              |
84
+-----------------------+------------------------------------------------------+
85
| COPYING.BSD           | The modified BSD license.                            |
86
+-----------------------+------------------------------------------------------+
87
| README                | This file.                                           |
88
+-----------------------+------------------------------------------------------+
89
| README.html           | HTML version of README.                              |
90
+-----------------------+------------------------------------------------------+
91
| README.pdf            | PDF version of README.                               |
92
+-----------------------+------------------------------------------------------+
93
| rst2docs.sh           | Bash script for generating the HTML and PDF versions.|
94
+-----------------------+------------------------------------------------------+
95
| THANKS                | Acknowledgements.                                    |
96
+-----------------------+------------------------------------------------------+
97
| TODO                  | A list of future enhancements.                       |
98
+-----------------------+------------------------------------------------------+
99
| VERSION               | Current version of the project sources.              |
100
+-----------------------+------------------------------------------------------+
101
| /gen/vhdl             | Generated RTL VHDL code directory.                   |
102
+-----------------------+------------------------------------------------------+
103
| testroundings.vhd     | Auto-generated test file for sfixed arithmetic.      |
104
+-----------------------+------------------------------------------------------+
105
| testroundingu.vhd     | Auto-generated test file for ufixed arithmetic.      |
106
+-----------------------+------------------------------------------------------+
107
| /rtl/vhdl             | RTL source code directory for the package            |
108
+-----------------------+------------------------------------------------------+
109
| fixed_extensions_pkg- | The VHDL package for simulation-oriented use.        |
110
| _sim.vhd              |                                                      |
111
+-----------------------+------------------------------------------------------+
112
| /sim/rtl_sim          | RTL simulation files directory                       |
113
+-----------------------+------------------------------------------------------+
114
| /sim/rtl_sim/bin      | RTL simulation scripts directory                     |
115
+-----------------------+------------------------------------------------------+
116
| run.sh                | A bash script for testing the package.               |
117
+-----------------------+------------------------------------------------------+
118
| testroundings.do      | Modelsim macro script for testing sfixed arithmetic. |
119
+-----------------------+------------------------------------------------------+
120
| testroundings.sh      | Bash script for running an sfixed simulation.        |
121
+-----------------------+------------------------------------------------------+
122
| testroundingu.do      | Modelsim macro script for testing ufixed arithmetic. |
123
+-----------------------+------------------------------------------------------+
124
| testroundingu.sh      | Bash script for running an ufixed simulation.        |
125
+-----------------------+------------------------------------------------------+
126
| /sim/rtl_sim/src      | Various source files for running RTL simulations     |
127
+-----------------------+------------------------------------------------------+
128
| fixed_float_typ       | VHDL package with definitions for fixed-point        |
129
| es_custom.vhd         | arithmetic.                                          |
130
+-----------------------+------------------------------------------------------+
131
| fixed_pkg_c.vhd       | VHDL package implementing fixed-point arithmetic     |
132
|                       | (VHDL'93 version of the VHDL-2008 package as found   |
133
|                       | http://www.eda.org/fphdl/).                          |
134
+-----------------------+------------------------------------------------------+
135
| math_real.vhd         | VHDL package with some real arithmetic functions     |
136
|                       | (also part of the IEEE 1076 standard for VHDL).      |
137
+-----------------------+------------------------------------------------------+
138
| /sw                   | Software utilities                                   |
139
+-----------------------+------------------------------------------------------+
140
| Makefile              | Makefile for compiling the test design generator.    |
141
+-----------------------+------------------------------------------------------+
142
| gentestround.c        | Test design generator written in ANSI C.             |
143
+-----------------------+------------------------------------------------------+
144 2 kavi
 
145
 
146 3 kavi
3. ``fixed_extensions`` usage
147
=============================
148 2 kavi
 
149 3 kavi
The fixed_extensions package can be used as follows. Assuming that the user has
150
changed directory to ``./fixed_extensions``, the following can be used:
151 2 kavi
 
152 3 kavi
| ``$ cd sim/rtl_sim/bin``
153
| ``$ ./run.sh``
154 2 kavi
 
155 3 kavi
Alternatively, the user can only generate and run some tests for solely the
156
signed fixed-point and unsigned fixed-point data types. This is correspondingly
157
performed as:
158 2 kavi
 
159 3 kavi
| ``$ ./testroundings.sh``
160 2 kavi
 
161 3 kavi
and
162 2 kavi
 
163 3 kavi
| ``$./testroundingu.sh``
164 2 kavi
 
165
 
166 3 kavi
4. Prerequisities
167
=================
168
 
169
- Standard UNIX-based tools (tested on cygwin/x86)
170
 
171
  * make
172
  * bash
173
 
174
- [optional] Mentor Modelsim (``mti``) from http://www.model.com
175
 
176
  Provides a simulation environment to run the tests.

powered by: WebSVN 2.1.0

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