-
Notifications
You must be signed in to change notification settings - Fork 1
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
VHPIDIRECT, HDL_LOGIC_STATE/CHAR, C access example, #1
VHPIDIRECT, HDL_LOGIC_STATE/CHAR, C access example, #1
Conversation
I found the page to be a little unclear in when and why to link to externally generated object files. It is a simple point in hindsight, but moving Linking foreign object files to GHDL to right after Foreign Declarations of Function makes it easier to see the link. I also added a Hint on how to pass command line arguments to ghdl_main, and wrote that the one code block is Python code (which wasn't immediately obvious to me at least).
Move Linking... back to original spot. Better hint, and extra reference to simulation options.
Clean up reference hint.
Further clean reference hints.
Improve hints.
…umarcor-eg-vhpidirect Want to grab definitions for VHDL_BIT_STATE/CHAR
Grab VHDL_BIT_STATE/CHAR
83204ac
to
579fd30
Compare
Now the ghdl_NaturalDimArr_t->bounds is of type range_t*, enabling capabilities for unconstrained arrays of any dimension. This also simplified the ghdlFrom/ToArray() functions. All tests are still passing. Each index of an array is given the value of 11*(indexId+1), where indexId is the sequential enumeration of the possible indices: eg. 2D array (2, 3): (0,0)=0, (0,1)=1, (0,2)=2, (1,0)=3, (2,0)=4...etc. This is the output:
|
a87d827
to
9f99a98
Compare
Now that ghdl/ghdl-cosim is created, I think that this PR should be split into, at least, three different PRs:
Having 5 separate PRs will hopefully make it easier to review them. I think that 1, 3 and 5 will be fast, while 2 and 4 might require some more care. Since there are ~50 commits in this PR, I'd suggest to first rebase and then use filter-branch to extract subsets of changes. |
I will keep track of the PRs that spawn off of this one:
|
I was thinking this last night... Rather keen, but I will leave it for last as it is the most novel. |
Description
I moved my Caccess example to under VHPIDIRECT examples, and added to appropriate toc.
I cleaned Examples page, reads more easily (directs one to quick_start then to VHPIDIRECT examples)
I added a label to .. _foreign_declarations:
I added HDL_LOGIC_STATE/CHAR to ghdl.h and expanded the tests in tb.vhdl and main.c
I think main.c should be renamed, its name had me searching for main() and anticipating ghd_main() calls.
🚨 Before submitting your PR, please read contribute in the Docs, and review the following checklist:
When contributing to the GHDL codebase...
When contributing to the docs...
Further comments
Primarily related to merging HDL_LOGIC_STATE and CHAR
❤️ Thank you!
Edit
ghdlFromArray
returning an unconstrained array of integers from C to VHDL (top of doc: add VHPIDIRECT demo ghdl/ghdl#1059)