Created
May 9, 2018 21:30
-
-
Save mithro/d83777b61a881f326b402d9206974bce to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class SwitchType(enum.Enum): | |
| mux = "mux" | |
| tristate = "tristate" | |
| pass_gate = "pass_gate" | |
| short = "short" | |
| buffer = "buffer" | |
| @property | |
| def isolating(self): | |
| """If switch type is isolating. | |
| Isolating switches include a buffer which partition their input and | |
| output into separate DC-connected sub-circuits. | |
| Non-isolating switch do not isolate their input and output, which can | |
| increase RC wire delays. | |
| """ | |
| return self in (self.mux, self.tristate, self.buffer) | |
| @property | |
| def configurable(self): | |
| """If a switch type is configurable. | |
| Configurable switches can be turned on/off at configuration time. | |
| Non-configurable switches can not be controlled at configuration time. | |
| These are typically used to model non-optional connections such as | |
| electrical shorts and in-line buffers. | |
| """ | |
| return self in (self.mux, self.tristate, self.pass_gate) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment