-
Notifications
You must be signed in to change notification settings - Fork 162
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
Make sure net is valid before setting it as wire LUT output #1719
base: master
Are you sure you want to change the base?
Conversation
@tangxifan, I request you to review since I saw you are the one who write/modify the file most in file history. |
|
@tangxifan, as @chungshien-chai pointed out, there are 3 places this function is called, 2 are guarded by the "if condition". @chungshien-chai is simply adding the guarding to the 3rd location in this PR. A more precise error message should also be added when a clock is used as data, as bitstream (routing) is illegal. |
@alaindargelas Thank you for the details. Now I understand the issue you are facing.
|
@tangxifan when the architecture file contains no clock to data or data to clock path, then clock used at data should be illegal. When using ideal clock network with no routing elements in the clock that is the case. |
@alaindargelas This makes sens to me. Sanity checks should be applied before repack. Using existing data structure, I believe it is not difficult. |
In order to set and read if an output LUT is "wire LUT output", there are two functions that involved:
Function is_wire_lut_output() is called twice in the code
Function set_wire_lut_output() is called twice in the code
Currently there is potential that the code setting the output as "wire LUT output" even if the output net is AtomNetId::INVALID (or -1). And when this happen, this will raise assertion in later checking stage - https://github.com/lnis-uofu/OpenFPGA/blob/master/openfpga/src/repack/build_physical_truth_table.cpp#L153