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

uut_build_for_iob_soc_tester.mk #28

Open
jjts opened this issue Jun 18, 2023 · 2 comments
Open

uut_build_for_iob_soc_tester.mk #28

jjts opened this issue Jun 18, 2023 · 2 comments

Comments

@jjts
Copy link
Contributor

jjts commented Jun 18, 2023

Why is this not called sim_build.mk?

@arturum1
Copy link
Contributor

arturum1 commented Jun 19, 2023

It's because the sim_build.mk of iob-soc needs to include a file with a different name.
In this case it tries to include the file named uut_build_for_iob_soc.mk. https://github.com/IObundle/iob-soc/blob/python-setup/hardware/simulation/sim_build.mk

It could not include a file named sim_build.mk form inside the sim_build.mk of iob-soc (it would be including itself).

@arturum1
Copy link
Contributor

In relation to the _for_iob_soc_tester suffix of the file name, this is needed to separate includes from different systems.

The iob-soc-sut and Tester are both based on iob-soc, therefore they will both copy the sim_build.mk of iob-soc, and rename any string iob_soc in that file to the correct system name: iob_soc_sut for the SUT, iob_soc_tester for the Tester.
Therefore, the SUT and the Tester will have the following lines in their sim_build.mk files:

  • sim_build.mk of SUT:
ifneq ($(wildcard uut_build_for_iob_soc_sut.mk),)
include uut_build_for_iob_soc_sut.mk
endif
  • sim_build.mk of Tester:
ifneq ($(wildcard uut_build_for_iob_soc_tester.mk),)
include uut_build_for_iob_soc_tester.mk
endif

If the files did not have the suffix with the corename, and were only named uut_build.mk, then both the sim_build.mk of tester and the sim_build.mk of the SUT would include the same file (named uut_build.mk), which can cause problems.

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

No branches or pull requests

2 participants