Skip to content

Commit 70d0b82

Browse files
authored
Update help.txt: hex values, signed func fix
1) In the text file mode, it accepts a text file that contains hexadecimal values (instead of integers). I made this change because it would be confusing to ask users to convert their floating point values into fixed-point then into integers and then into unsigned integers. Now, they can provide hexadecimal values (refer to example.txt in the attached file). 2) In the function mode, it implements signed functions without changing the original equation. The tool prints out the input and output format as well.
1 parent 9b700fd commit 70d0b82

File tree

1 file changed

+21
-15
lines changed

1 file changed

+21
-15
lines changed

help.txt

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,41 @@
11
Instructions
22
-------------------------------------------------------------------
33
This program generates source code for univariate functions. It
4-
works in two modes: you can either (1) specify a .txt file that
5-
contains the values of a look-up table specifying f(x) for all x
4+
works in two modes: you can either (1) specify a text file that
5+
contains the values of a lookup table specifying f(x) for all x
66
values, or (2) describe the function by providing its equation.
77

8-
1) Lookup table as .txt File --> Please specify the following
8+
1) Lookup table as a text File --> Please specify the following
99
arguments:
10-
-table (string) : the path of the table, in which
11-
each line has a single integer
12-
value. The table size must be
13-
a power of 2.
10+
-table (string) : path of the table, in which
11+
each line has a single
12+
hexadecimal value. The table size
13+
must be a power of 2. The input
14+
and output bit width are
15+
determined based on the table
16+
size and the maximum absolute
17+
value of the table, respectively.
1418

15-
2) Function equation --> Please specify the following arguments:
16-
-function (string) : the function's equation as a
19+
2) Lookup table as a math equation --> Please specify the following
20+
arguments:
21+
-function (string) : function's equation as a
1722
string in quotation marks "".
1823
-f_in (int) : fractional bit width of the
1924
function's input. Since the
2025
function is evaluated in [0, 1),
2126
there are no integer bits for
2227
the input.
2328
-f_out (int) : fractional bit width of the
24-
function's output. The output
25-
integer bit width is determined
29+
function's output. The signedness
30+
and integer bit width of the
31+
output are determined
2632
automatically.
2733

2834
The following optional arguments can be used in either mode.
29-
-name (string) : output table and file name
30-
-output (string) : the output folder for the
31-
generated files. The folder must
32-
already exist.
35+
-name (string) : output table and file name.
36+
-output (string) : output folder for the generated
37+
files. The folder must already
38+
exist.
3339
-mdbw (int) : minimum decomposition bit width.
3440
The default value is 2.
3541
-hbs (0/1) : higher-bit split. The default

0 commit comments

Comments
 (0)