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

Architecture Seg Fault Issue #2552

Merged
merged 3 commits into from
May 16, 2024
Merged

Architecture Seg Fault Issue #2552

merged 3 commits into from
May 16, 2024

Conversation

saaramahmoudi
Copy link
Contributor

In the current codebase, when we activate --echo_file, we might get a segmentation file while writing the architecture file. The reason is that we look at the number of layouts instead of layers. The architecture might have different layouts but still not be 3D using multiple <fixed_layout> options.

This PR addresses the following issue:
Segmentation Fault

Types of changes

  • Bug fix (change which fixes an issue)
  • New feature (change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

@vaughnbetz

@saaramahmoudi saaramahmoudi changed the title bug fixed, used to check number of layouts instead of number of layers Architecture Seg Fault Issue May 14, 2024
@github-actions github-actions bot added libarchfpga Library for handling FPGA Architecture descriptions lang-cpp C/C++ code labels May 14, 2024
@@ -232,9 +232,13 @@ void PrintArchInfo(FILE* Echo, const t_arch* arch) {
}

fprintf(Echo, "\tInput Connect Block Switch Name Within a Same Die: %s\n", arch->ipin_cblock_switch_name[0].c_str());
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's worth commenting the [0] and [1] indices: [0] is the ipin_cblock_switch_name for within die and [1] is between dice? This might be more clear with constexpr that gives names to 0 and 1 for the lookups.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@vaughnbetz fixed it

@vaughnbetz
Copy link
Contributor

vaughnbetz commented May 14, 2024 via email

@saaramahmoudi
Copy link
Contributor Author

@vaughnbetz Sorry about that, I accidentally had an extra [, which causes compile issue. Fixed now!

@vaughnbetz vaughnbetz merged commit f4bd1be into master May 16, 2024
100 checks passed
@vaughnbetz vaughnbetz deleted the echo_seg_fault_fix branch May 16, 2024 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lang-cpp C/C++ code libarchfpga Library for handling FPGA Architecture descriptions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants