rdaly525 / coreir

BSD 3-Clause "New" or "Revised" License
100 stars 24 forks source link

Adds support for outputs inside a compile guard #992

Closed leonardt closed 3 years ago

leonardt commented 3 years ago

By default, we drive outputs to be 0 inside the else clause (should work for arbitrary ports since types have been flattened).

This allows for "stubs" to be inserted when a compile_guard is not active.

This feature is simpler than supporting a general output handler in the compile guard, since then we'd need to support multiple drivers from different compile guard cases which is tricky since in magma/coreir we only allow a single driver for a port. This covers the use case at FB without having to dive into the details of general output handling.