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

Axi test harness #1153

Merged
merged 68 commits into from
Jan 1, 2023
Merged

Axi test harness #1153

merged 68 commits into from
Jan 1, 2023

Conversation

nathanielnrn
Copy link
Contributor

Thought it would be useful to open a draft PR to allow time to get feedback while classes are starting and I'm less available. This is nearly done.

Pull request allows for runt testing of cocotb simulation which outputs the execution of a kernel based on examples/dahlia .data and .expected files.
Also introduces a subdirectory specifically for cocotb tests.

DRAFT: Regarding the reason this is a draft. Currently, running the make commands from runt does not behave the same way as running each command from a single shell one by one. Specifically, the Makefile does not use a new toplevel.v in spite of the -B flag. This means that a single computation (i.e dot-product) is performed on all data (i.e vectorized add data).

Additionally, make outputs some text which is specific to the file system running the command. For example, make outputs the commands it performs. Is there a way to selectively gather this text within runt? Just adding some tail and head commands to our output in the rust.toml?

This commit succesfully writes the output of our computation kernel to
an cocotbext-Axi AxiLiteRam.
We are now able to call runt and have coctb run simulations on correct
data.
However, currently cocotb does not perform the correct computation on
all data, rather it will choose one kernel to use for all data.
Additionally, there are some extraneous outputs in runt output.
@@ -0,0 +1,771 @@
/**
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this file need to be committed? Seems like it is generated from Calyx

nathanielnrn and others added 2 commits October 21, 2022 19:29

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@rachitnigam
Copy link
Contributor

Looks like everything is passing @nathanielnrn! Merge when ready!

Copy link
Contributor

@rachitnigam rachitnigam left a comment

Choose a reason for hiding this comment

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

Actually I noticed there is a really big .sv file we're committing. Is that intentional?

@nathanielnrn
Copy link
Contributor Author

Latest commit makes the toplevel.v and main.sv we use for cocotb be dynamically generated as expected. However, the runt tests we have aren't passing due to differences in a newline here and lack of a new line there. I'm not able to reproduce failing cases on locally built docker containers.
Any thoughts from anyone by any chance? I'll keeping looking into it in the mean time.

@sampsyo
Copy link
Contributor

sampsyo commented Oct 25, 2022

Neat! Hella weird about the newline nonsense. I guess I suspect some vagary about the test's shell pipeline…

May I recommend using fud -v or whatever it is to get verbose output from Fud instead of that progress indicator thingy ⠋⠙?

@rachitnigam
Copy link
Contributor

Usually we use -q with fud in tests to make it stop producing any execution related output

github-actions bot and others added 4 commits November 15, 2022 22:17

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@rachitnigam
Copy link
Contributor

Okay, my changes should fix the silly fud problem @nathanielnrn was running into. Once this is merged, we should check off tasks in #1104 and create a new issue to turn the cocotb hackery embedded in the runt commands into a fud stage so we can start running lots of different Calyx kernels with this harness

@rachitnigam
Copy link
Contributor

@nathanielnrn if you'd like, feel free to press the big green button! Congratulations on a successful summer research project!

@nathanielnrn nathanielnrn merged commit c6f750a into master Jan 1, 2023
@nathanielnrn nathanielnrn deleted the axi-test-harness branch January 1, 2023 08:40
sampsyo added a commit that referenced this pull request May 28, 2023
I'm not sure how, but it seems like these symlinks got rearranged into the
wrong directories in #1153. The `compile/` and `emulate/` directories are just
supposed to contain outputs, and the inputs are supposed to be in the main
test directory.
sampsyo added a commit that referenced this pull request May 28, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
* Clean up Xilinx tests

I'm not sure how, but it seems like these symlinks got rearranged into the
wrong directories in #1153. The `compile/` and `emulate/` directories are just
supposed to contain outputs, and the inputs are supposed to be in the main
test directory.

* Fix XML generation

Adapt to quick_xml >= 0.28.0.

* Fix Xilinx Verilog compilation tests

Put the expect files into their own proper directory, and point the Runt
config at that. The `compile/` directory is supposed to be empty files,
just marking the success of the Vivado execution.

* Add empty placeholders for compile tests

* Add tests for kernel.xml generation
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

3 participants