Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@teqdruid
Copy link
Contributor

Start of static C++ header file generation. Just integer constants for now. Can work off of any manifest and will even connect to a live accelerator and read the manifest from there.

Generates a types.h file and one per module listed in the manifest. Inside the module header file, generates one class per module and adds the constants to that class. Puts everything in a namespace specified by the user as system_name.

@teqdruid teqdruid added the ESI label Aug 14, 2024
@teqdruid teqdruid requested a review from mortbopet August 14, 2024 14:42
@teqdruid teqdruid force-pushed the teqdruid/esirt/cppgen branch from 0e1b7b3 to f5a7f62 Compare August 14, 2024 14:47
Copy link
Contributor

@mortbopet mortbopet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing a test/check on the generated .h file. Would also make this PR a bit easier to review if there was something that one could inspect to see the output of the generator.

s = f"""
/// Generated header for {system_name} module {module_info.name}.
#pragma once
#include "types.h"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Way too generic, and alias-prone. ESITypes.h at a minimum. Ideally, there'd be some include path here (#include "ESI/types.h").

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea is that users could choose the name of the folder in which to output the files. (e.g. ESI/ or <system-specific-name>/) so the output file would be something like ESI/types.h.

Comment on lines 143 to 145
"--platform",
type=str,
help="Name of backend for live accelerator connection.")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

platform or backend? Seems like it's referring to backends, but maybe im misunderstanding the scope of backends/(platforms?).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Backend ~= platform. Technically, a backend is a particular runtime implementation of an FPGA platform. I do expect a 1:1 mapping in most cases. I tend to refer to platform for anything user facing.

@teqdruid teqdruid requested a review from mortbopet August 19, 2024 15:07
@teqdruid teqdruid merged commit 29b1c1c into main Aug 20, 2024
@teqdruid teqdruid deleted the teqdruid/esirt/cppgen branch August 20, 2024 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants