Skip to content

Commit 4a70bcc

Browse files
author
Luca Toniolo
committed
halcompile: warn on fp/nofp, remove from in-tree .comp files
Add optfp_warn() in halcompile that silently forces fp to 1 when fp or nofp keywords are used in function declarations. Out-of-tree .comp files will still parse without error. Remove fp/nofp from all in-tree .comp files, conv.comp.in template, and mkconv.sh generator. Based on patch by BsAtHome. Ref: #3895
1 parent da2e867 commit 4a70bcc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+56
-54
lines changed

src/hal/components/abs_s32.comp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ pin out bit sign "Sign of input, false for positive, true for negative" ;
2121
pin out bit is_positive "TRUE if input is positive, FALSE if input is 0 or negative";
2222
pin out bit is_negative "TRUE if input is negative, FALSE if input is 0 or positive";
2323

24-
function _ nofp;
24+
function _;
2525
license "GPL";
2626
author "Sebastian Kuzminsky";
2727
;;

src/hal/components/and2.comp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Otherwise,
1414
\\fBout=FALSE\\fR
1515
.RE"""
1616
;
17-
function _ nofp;
17+
function _;
1818
see_also """
1919
\\fBlogic\\fR(9),
2020
\\fBlut5\\fR(9),

src/hal/components/bin2gray.comp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ pin in unsigned in "binary code in";
44
pin out unsigned out "gray code out";
55
license "GPL";
66
author "Andy Pugh";
7-
function _ nofp;
7+
function _;
88
;;
99
out = (in >> 1) ^ in;

src/hal/components/bitslice.comp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ pin in u32 in "The input value";
77
pin out bit out-##[32:personality];
88
author "Andy Pugh";
99
license "GPL2+";
10-
function _ nofp;
10+
function _;
1111
option personality yes;
1212
;;
1313
int i;

src/hal/components/bitwise.comp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ pin out u32 out-xnor "The inverse of the bitwise XOR";
1010

1111
author "Andy Pugh";
1212
license "GPL 2+";
13-
function _ nofp;
13+
function _;
1414
;;
1515

1616
out_and = (in0 & in1);

src/hal/components/charge_pump.comp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ pin out bit out "Square wave if 'enable' is TRUE or unconnected, low if 'enable'
2121
pin out bit out-2 "Square wave at half the frequency of 'out'";
2222
pin out bit out-4 "Square wave at a quarter of the frequency of 'out'";
2323
pin in bit enable = TRUE "If FALSE, forces all 'out' pins to be low";
24-
function _ nofp "Toggle the output bit (if enabled)";
24+
function _ "Toggle the output bit (if enabled)";
2525
description """
2626
The 'Charge Pump' should be added to the base thread function.
2727
When enabled the output is on for one period and off for one period. To calculate the

src/hal/components/comp.comp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ separated by distance \\fBhyst\\fR around the point where \\fBin1\\fR = \\fBin0\
1212
Keep in mind that floating point calculations are never absolute
1313
and it is wise to always set \\fBhyst\\fR if you intend to use equal """;
1414

15-
function _ fp "Update the comparator";
15+
function _ "Update the comparator";
1616
license "GPL";
1717
author "Jeff Epler";
1818
;;

src/hal/components/conv.comp.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ pin in @IN@ in_;
33
pin out @OUT@ out;
44
@CC@ pin out bit out_of_range "TRUE when 'in' is not in the range of @OUT@";
55
@CC@ param rw bit clamp """If TRUE, then clamp to the range of @OUT@. If FALSE, then allow the value to "wrap around".""";
6-
function _ @FP@ "Update 'out' based on 'in'";
6+
function _ "Update 'out' based on 'in'";
77
license "GPL";
88
author "Jeff Epler";
99

src/hal/components/dbounce.comp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ pin out bit out;
99
pin in u32 delay = 5;
1010

1111
variable int state;
12-
function _ nofp;
12+
function _;
1313
license "GPL";
1414
author "Dewey Garrett";
1515
;;

src/hal/components/edge.comp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ param r signed time_left_ns "Time left in this output pulse";
2828
param r bit last_in "Previous input value";
2929
variable int first = 1;
3030

31-
function _ nofp "Produce output pulses from input edges";
31+
function _ "Produce output pulses from input edges";
3232
license "GPL";
3333
author "Jeff Epler";
3434
;;

0 commit comments

Comments
 (0)