Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

General C/C++ Updates #1174

Merged
merged 26 commits into from
Jul 10, 2024
Merged

General C/C++ Updates #1174

merged 26 commits into from
Jul 10, 2024

Conversation

ruck314
Copy link
Contributor

@ruck314 ruck314 commented Jul 7, 2024

Description

  • Improves the code quality by running the linter automatically for every commit via Github action
  • removing xvcSrv (depreciated)
    • Users should use rogue.protocols.xilinx.Xvc instead at this point
  • removing base/general/simlink's VhpiGeneric.c/.h because redundant and obsolete with respect to axi/simlink/src/VhpiGeneric.c/.h
  • adding *.so to .gitignore

ruck314 added 25 commits July 7, 2024 12:46
Found C system header after other header. Should be: ssi_printf.h, c system, c++ system, other.  [build/include_order]
Disable the build/header_guard check
Disable the readability/casting check
Tab found; better to use spaces  [whitespace/tab]
Extra space before ( in function call  [whitespace/parens]
…d obsolete to axi/simlink/src/VhpiGeneric.c/.h
Weird number of spaces at line-start.  [whitespace/indent]
Missing space after ,  [whitespace/comma]
Disable the build/include_subdir check
At least two spaces is best between code and comments  [whitespace/comments]
Redundant blank line at the end of a code block should be deleted.  [whitespace/blank_line]
Missing spaces around XXX operator [whitespace/operators]
If an else has a brace on one side, it should have it on both  [readability/braces]
'time.h' already included at ./axi/simlink/src/RogueTcpStream.c:13  [build/include]
'time.h' already included at ./axi/simlink/src/RogueTcpStream.c:13  [whitespace/braces]
Could not find a newline character at the end of the file.  [whitespace/ending_newline]
Else clause should never be on same line as else (use 2 lines)  [whitespace/newline]
Semicolon defining empty statement. Use {} instead.  [whitespace/semicolon]
Use int16/int64/etc, rather than the C type long  [runtime/int]
Almost always, snprintf is better than strcpy  [runtime/printf]
Never use sprintf. Use snprintf instead.  [runtime/printf]
Weird number of spaces at line-start.  [whitespace/indent]
@ruck314
Copy link
Contributor Author

ruck314 commented Jul 7, 2024

Confirmed that the VCS simulation with both TCP stream and TCP memory still works as before:

Verdi>run
RogueTcpMemory: Listening on ports 10000 & 10001
RogueTcpStream: Listening on ports 10002 & 10003
1290000 PS
Assertion WARNING at 1290000 PS in design unit ICAPE3(ICAPE3_V) from process /SIMPLE10GBERUDPKCU105EXAMPLETB/U_FPGA/U_CORE/U_AXIVERSION/GEN_ICAP/IPROG_1/GEN_ULTRA_SCALE/IPROGULTRASCALE_INST/ICAPE3_INST/... {private_object}:
    " Note: [Unisim MODULE_NAME-4] ICAPE3 has finished initialization. User can start read/write operation."
11808729600 RogueTcpMemory: Got Tran: Id 1, Addr 0x0, Size 4, Type 1
11808780800 RogueTcpMemory: Send Tran: Id 1, Addr 0x0, Size 4, Type 1, Resp 0x0
11808787200 RogueTcpMemory: Got Tran: Id 2, Addr 0x4, Size 4, Type 1
11808838400 RogueTcpMemory: Send Tran: Id 2, Addr 0x4, Size 4, Type 1, Resp 0x0
11808844800 RogueTcpMemory: Got Tran: Id 3, Addr 0x8, Size 4, Type 1
11808896000 RogueTcpMemory: Send Tran: Id 3, Addr 0x8, Size 4, Type 1, Resp 0x0
11808902400 RogueTcpMemory: Got Tran: Id 4, Addr 0x100, Size 4, Type 1
11808953600 RogueTcpMemory: Send Tran: Id 4, Addr 0x100, Size 4, Type 1, Resp 0x0
11808960000 RogueTcpMemory: Got Tran: Id 5, Addr 0x108, Size 4, Type 1
11809011200 RogueTcpMemory: Send Tran: Id 5, Addr 0x108, Size 4, Type 1, Resp 0x0
11809017600 RogueTcpMemory: Got Tran: Id 6, Addr 0x10c, Size 4, Type 1
11809068800 RogueTcpMemory: Send Tran: Id 6, Addr 0x10c, Size 4, Type 1, Resp 0x0
11809075200 RogueTcpMemory: Got Tran: Id 7, Addr 0x300, Size 8, Type 1
11809184000 RogueTcpMemory: Send Tran: Id 7, Addr 0x300, Size 8, Type 1, Resp 0x0
11809190400 RogueTcpMemory: Got Tran: Id 8, Addr 0x500, Size 4, Type 1
11809241600 RogueTcpMemory: Send Tran: Id 8, Addr 0x500, Size 4, Type 1, Resp 0x0
11809248000 RogueTcpMemory: Got Tran: Id 9, Addr 0x600, Size 20, Type 1
11809529600 RogueTcpMemory: Send Tran: Id 9, Addr 0x600, Size 20, Type 1, Resp 0x0
11809536000 RogueTcpMemory: Got Tran: Id 10, Addr 0x700, Size 16, Type 1
11809760000 RogueTcpMemory: Send Tran: Id 10, Addr 0x700, Size 16, Type 1, Resp 0x0
11809766400 RogueTcpMemory: Got Tran: Id 11, Addr 0x800, Size 256, Type 1
11813446400 RogueTcpMemory: Send Tran: Id 11, Addr 0x800, Size 256, Type 1, Resp 0x0
11813452800 RogueTcpMemory: Got Tran: Id 12, Addr 0x80000000, Size 4, Type 1
11813529600 RogueTcpMemory: Send Tran: Id 12, Addr 0x80000000, Size 4, Type 1, Resp 0x0
11813536000 RogueTcpMemory: Got Tran: Id 13, Addr 0x80000008, Size 4, Type 1
11813612800 RogueTcpMemory: Send Tran: Id 13, Addr 0x80000008, Size 4, Type 1, Resp 0x0
11813619200 RogueTcpMemory: Got Tran: Id 14, Addr 0x8000000c, Size 4, Type 1
11813696000 RogueTcpMemory: Send Tran: Id 14, Addr 0x8000000c, Size 4, Type 1, Resp 0x0
11813702400 RogueTcpMemory: Got Tran: Id 15, Addr 0x80000010, Size 4, Type 1
11813779200 RogueTcpMemory: Send Tran: Id 15, Addr 0x80000010, Size 4, Type 1, Resp 0x0
11813785600 RogueTcpMemory: Got Tran: Id 16, Addr 0x80010000, Size 1024, Type 1
11841632000 RogueTcpMemory: Send Tran: Id 16, Addr 0x80010000, Size 1024, Type 1, Resp 0x0
16099040000 RogueTcpMemory: Got Tran: Id 17, Addr 0x80000004, Size 4, Type 2
16099116800 RogueTcpMemory: Send Tran: Id 17, Addr 0x80000004, Size 4, Type 2, Resp 0x0
16937958400 RogueTcpStream: Send data: Size: 1048568, flags: 2, chan: 0, err: 0, port: 10003
17776812800 RogueTcpStream: Send data: Size: 1048568, flags: 2, chan: 0, err: 0, port: 10003
18615667200 RogueTcpStream: Send data: Size: 1048568, flags: 2, chan: 0, err: 0, port: 10003
19454521600 RogueTcpStream: Send data: Size: 1048568, flags: 2, chan: 0, err: 0, port: 10003
20293376000 RogueTcpStream: Send data: Size: 1048568, flags: 2, chan: 0, err: 0, port: 10003
21132230400 RogueTcpStream: Send data: Size: 1048568, flags: 2, chan: 0, err: 0, port: 10003
21971084800 RogueTcpStream: Send data: Size: 1048568, flags: 2, chan: 0, err: 0, port: 10003
22809939200 RogueTcpStream: Send data: Size: 1048568, flags: 2, chan: 0, err: 0, port: 10003

image

@ruck314 ruck314 requested a review from bengineerd July 7, 2024 22:34
@ruck314 ruck314 marked this pull request as ready for review July 7, 2024 22:35
@ruck314 ruck314 merged commit 15a7282 into pre-release Jul 10, 2024
3 checks passed
@ruck314 ruck314 deleted the cpplinter branch July 10, 2024 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants