byuccl / RapidSmith2

RapidSmith2 - the Vivado successor to RapidSmith. Released Jan 4, 2017.
Other
41 stars 13 forks source link

Updated Site::setType to check the allowed site types #321

Closed trharoldsen closed 6 years ago

trharoldsen commented 6 years ago

and throws an error if the types don't match.

In lieu of the potential slow down, I added a new setTypeUnchecked method which will forgo the check. I was going to update the setType calls in the tcp reader, but a TODO task already existed for checking the type to ensure it is valid, so I left the check in.

I don't foresee a big slow down since this is not a commonly used method in most situations the size of the list are normally no more than 2-3 elements large.

trharoldsen commented 6 years ago

Reference error from #302. This seems a pretty common error which can be tricky to debug.

trharoldsen commented 6 years ago

Correct, it been a problem for some people in the past, so I figured we'd make the default behavior be to check the update but leave the quick version open for "expert" users.