Skip to content

Commit 5accf04

Browse files
authored
Merge pull request #1239 from slaclab/team-never-tabs
Update surf_ci.yml to check for tabs
2 parents 3c39923 + 31547a3 commit 5accf04

File tree

17 files changed

+3133
-3100
lines changed

17 files changed

+3133
-3100
lines changed

.github/workflows/surf_ci.yml

+9-2
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,19 @@ jobs:
4444
git clone https://github.com/slaclab/ruckus.git
4545
pip install -r ruckus/scripts/pip_requirements.txt
4646
47-
- name: Check for trailing whitespace
47+
- name: Check for trailing whitespace and tabs
4848
run: |
49-
if grep -rnI '[[:blank:]]$' --include=\*.{vhd,v,tcl,py} .; then
49+
# Check for trailing whitespace
50+
if grep -rnI '[[:blank:]]$' --include=\*.{vhd,tcl,py} .; then
5051
echo "Error: Trailing whitespace found in the repository!"
5152
exit 1
5253
fi
54+
55+
# Check for tab characters instead of spaces
56+
if grep -rnI $'\t' --include=\*.{vhd,tcl,py} .; then
57+
echo "Error: Tab characters found in the repository! Please use spaces for indentation."
58+
exit 1
59+
fi
5360
5461
- name: Python Syntax and Linter Checking
5562
run: |

base/general/rtl/PrbsPkg.vhd

100644100755
+11-11
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ use surf.StdRtlPkg.all;
2222
package PrbsPkg is
2323

2424
-- Randomizers based on the ITU-T O.150 Standard
25-
function getPrbs1xTap (input : slv; tap0 : natural) return slv;
26-
function getPrbs2xTap (input : slv; tap0, tap1 : natural) return slv;
27-
function getPrbs3xTap (input : slv; tap0, tap1, tap2 : natural) return slv;
28-
function getPrbs4xTap (input : slv; tap0, tap1, tap2, tap3 : natural) return slv;
29-
function getGaloisPrbs4xTap (input : slv; tap0, tap1, tap2, tap3 : natural) return slv;
25+
function getPrbs1xTap (input : slv; tap0 : natural) return slv;
26+
function getPrbs2xTap (input : slv; tap0, tap1 : natural) return slv;
27+
function getPrbs3xTap (input : slv; tap0, tap1, tap2 : natural) return slv;
28+
function getPrbs4xTap (input : slv; tap0, tap1, tap2, tap3 : natural) return slv;
29+
function getGaloisPrbs4xTap (input : slv; tap0, tap1, tap2, tap3 : natural) return slv;
3030

3131
-- Randomizer based LTC2270 IC
3232
function getXorRand (input : slv; tap : natural) return slv; -- NOTE: same function for encoding and decoding
@@ -135,13 +135,13 @@ package body PrbsPkg is
135135
for i in 0 to (input'left-1) loop
136136
retVar(i) := input(i+1);
137137
end loop;
138-
retVar(retVar'left) := '0';
138+
retVar(retVar'left) := '0';
139139

140-
for i in 0 to (input'left) loop
141-
if (i = tap0 or i = tap1 or i = tap2 or i = tap3) then
142-
retVar(i) := retVar(i) xor input(0);
143-
end if;
144-
end loop;
140+
for i in 0 to (input'left) loop
141+
if (i = tap0 or i = tap1 or i = tap2 or i = tap3) then
142+
retVar(i) := retVar(i) xor input(0);
143+
end if;
144+
end loop;
145145

146146
--return the result
147147
return retVar;

base/vhdl-libs/std/standard.vhd

+66-66
Original file line numberDiff line numberDiff line change
@@ -1,97 +1,97 @@
11
-- $Id: standard.vhd,v 1.1 2003/01/17 19:41:54 kumar Exp $
22
package STANDARD is
33

4-
-- predefined enumeration types:
4+
-- predefined enumeration types:
55

6-
type BOOLEAN is (FALSE, TRUE);
6+
type BOOLEAN is (FALSE, TRUE);
77

8-
type BIT is ('0', '1');
8+
type BIT is ('0', '1');
99

10-
type CHARACTER is (
11-
NUL, SOH, STX, ETX, EOT, ENQ, ACK, BEL,
12-
BS, HT, LF, VT, FF, CR, SO, SI,
13-
DLE, DC1, DC2, DC3, DC4, NAK, SYN, ETB,
14-
CAN, EM, SUB, ESC, FSP, GSP, RSP, USP,
10+
type CHARACTER is (
11+
NUL, SOH, STX, ETX, EOT, ENQ, ACK, BEL,
12+
BS, HT, LF, VT, FF, CR, SO, SI,
13+
DLE, DC1, DC2, DC3, DC4, NAK, SYN, ETB,
14+
CAN, EM, SUB, ESC, FSP, GSP, RSP, USP,
1515

16-
' ', '!', '"', '#', '$', '%', '&', ''',
17-
'(', ')', '*', '+', ',', '-', '.', '/',
18-
'0', '1', '2', '3', '4', '5', '6', '7',
19-
'8', '9', ':', ';', '<', '=', '>', '?',
16+
' ', '!', '"', '#', '$', '%', '&', ''',
17+
'(', ')', '*', '+', ',', '-', '.', '/',
18+
'0', '1', '2', '3', '4', '5', '6', '7',
19+
'8', '9', ':', ';', '<', '=', '>', '?',
2020

21-
'@', 'A', 'B', 'C', 'D', 'E', 'F', 'G',
22-
'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
23-
'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
24-
'X', 'Y', 'Z', '[', '\', ']', '^', '_',
21+
'@', 'A', 'B', 'C', 'D', 'E', 'F', 'G',
22+
'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
23+
'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
24+
'X', 'Y', 'Z', '[', '\', ']', '^', '_',
2525

26-
'`', 'a', 'b', 'c', 'd', 'e', 'f', 'g',
27-
'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
28-
'p', 'q', 'r', 's', 't', 'u', 'v', 'w',
29-
'x', 'y', 'z', '{', '|', '}', '~', DEL,
26+
'`', 'a', 'b', 'c', 'd', 'e', 'f', 'g',
27+
'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
28+
'p', 'q', 'r', 's', 't', 'u', 'v', 'w',
29+
'x', 'y', 'z', '{', '|', '}', '~', DEL,
3030

31-
C128, C129, C130, C131, C132, C133, C134, C135,
32-
C136, C137, C138, C139, C140, C141, C142, C143,
33-
C144, C145, C146, C147, C148, C149, C150, C151,
34-
C152, C153, C154, C155, C156, C157, C158, C159,
31+
C128, C129, C130, C131, C132, C133, C134, C135,
32+
C136, C137, C138, C139, C140, C141, C142, C143,
33+
C144, C145, C146, C147, C148, C149, C150, C151,
34+
C152, C153, C154, C155, C156, C157, C158, C159,
3535

36-
' ', '¡', '¢', '£', '¤', '¥', '¦', '§',
37-
'¨', '©', 'ª', '«', '¬', '­', '®', '¯',
38-
'°', '±', '²', '³', '´', 'µ', '', '·',
39-
'¸', '¹', 'º', '»', '¼', '½', '¾', '¿',
40-
'À', 'Á', 'Â', 'Ã', 'Ä', 'Å', 'Æ', 'Ç',
41-
'È', 'É', 'Ê', 'Ë', 'Ì', 'Í', 'Î', 'Ï',
42-
'Ð', 'Ñ', 'Ò', 'Ó', 'Ô', 'Õ', 'Ö', '×',
43-
'Ø', 'Ù', 'Ú', 'Û', 'Ü', 'Ý', 'Þ', 'ß',
44-
'à', 'á', 'â', 'ã', 'ä', 'å', 'æ', 'ç',
45-
'è', 'é', 'ê', 'ë', 'ì', 'í', 'î', 'ï',
46-
'ð', 'ñ', 'ò', 'ó', 'ô', 'õ', 'ö', '÷',
47-
'ø', 'ù', 'ú', 'û', 'ü', 'ý', 'þ', 'ÿ' );
36+
' ', '¡', '¢', '£', '¤', '¥', '¦', '§',
37+
'¨', '©', 'ª', '«', '¬', '­', '®', '¯',
38+
'°', '±', '²', '³', '´', 'µ', '', '·',
39+
'¸', '¹', 'º', '»', '¼', '½', '¾', '¿',
40+
'À', 'Á', 'Â', 'Ã', 'Ä', 'Å', 'Æ', 'Ç',
41+
'È', 'É', 'Ê', 'Ë', 'Ì', 'Í', 'Î', 'Ï',
42+
'Ð', 'Ñ', 'Ò', 'Ó', 'Ô', 'Õ', 'Ö', '×',
43+
'Ø', 'Ù', 'Ú', 'Û', 'Ü', 'Ý', 'Þ', 'ß',
44+
'à', 'á', 'â', 'ã', 'ä', 'å', 'æ', 'ç',
45+
'è', 'é', 'ê', 'ë', 'ì', 'í', 'î', 'ï',
46+
'ð', 'ñ', 'ò', 'ó', 'ô', 'õ', 'ö', '÷',
47+
'ø', 'ù', 'ú', 'û', 'ü', 'ý', 'þ', 'ÿ' );
4848

49-
type SEVERITY_LEVEL is (NOTE, WARNING, ERROR, FAILURE);
49+
type SEVERITY_LEVEL is (NOTE, WARNING, ERROR, FAILURE);
5050

51-
type FILE_OPEN_KIND is (READ_MODE, WRITE_MODE, APPEND_MODE);
51+
type FILE_OPEN_KIND is (READ_MODE, WRITE_MODE, APPEND_MODE);
5252

53-
type FILE_OPEN_STATUS is (OPEN_OK, STATUS_ERROR, NAME_ERROR, MODE_ERROR);
53+
type FILE_OPEN_STATUS is (OPEN_OK, STATUS_ERROR, NAME_ERROR, MODE_ERROR);
5454

55-
-- predefined numeric types:
55+
-- predefined numeric types:
5656

57-
type INTEGER is range -2147483647 to 2147483647;
57+
type INTEGER is range -2147483647 to 2147483647;
5858

59-
type REAL is range -1.7014111e+308 to 1.7014111e+308;
59+
type REAL is range -1.7014111e+308 to 1.7014111e+308;
6060

61-
-- predefined type TIME:
61+
-- predefined type TIME:
6262

63-
type TIME is range -2147483647 to 2147483647
64-
-- this declaration is for the convenience of the parser. Internally
65-
-- the parser treats it as if the range were:
66-
-- range -9223372036854775807 to 9223372036854775807
67-
units
68-
fs; -- femtosecond
69-
ps = 1000 fs; -- picosecond
70-
ns = 1000 ps; -- nanosecond
71-
us = 1000 ns; -- microsecond
72-
ms = 1000 us; -- millisecond
73-
sec = 1000 ms; -- second
74-
min = 60 sec; -- minute
75-
hr = 60 min; -- hour
76-
end units;
63+
type TIME is range -2147483647 to 2147483647
64+
-- this declaration is for the convenience of the parser. Internally
65+
-- the parser treats it as if the range were:
66+
-- range -9223372036854775807 to 9223372036854775807
67+
units
68+
fs; -- femtosecond
69+
ps = 1000 fs; -- picosecond
70+
ns = 1000 ps; -- nanosecond
71+
us = 1000 ns; -- microsecond
72+
ms = 1000 us; -- millisecond
73+
sec = 1000 ms; -- second
74+
min = 60 sec; -- minute
75+
hr = 60 min; -- hour
76+
end units;
7777

78-
subtype DELAY_LENGTH is TIME range 0 fs to TIME'HIGH;
78+
subtype DELAY_LENGTH is TIME range 0 fs to TIME'HIGH;
7979

80-
-- function that returns the current simulation time:
80+
-- function that returns the current simulation time:
8181

82-
function NOW return DELAY_LENGTH;
82+
function NOW return DELAY_LENGTH;
8383

84-
-- predefined numeric subtypes:
84+
-- predefined numeric subtypes:
8585

86-
subtype NATURAL is INTEGER range 0 to INTEGER'HIGH;
86+
subtype NATURAL is INTEGER range 0 to INTEGER'HIGH;
8787

88-
subtype POSITIVE is INTEGER range 1 to INTEGER'HIGH;
88+
subtype POSITIVE is INTEGER range 1 to INTEGER'HIGH;
8989

90-
-- predefined array types:
90+
-- predefined array types:
9191

92-
type STRING is array (POSITIVE range <>) of CHARACTER;
92+
type STRING is array (POSITIVE range <>) of CHARACTER;
9393

94-
type BIT_VECTOR is array (NATURAL range <>) of BIT;
94+
type BIT_VECTOR is array (NATURAL range <>) of BIT;
9595

9696
attribute FOREIGN: STRING;
9797
end STANDARD;

0 commit comments

Comments
 (0)