diff options
Diffstat (limited to 'techlibs/coolrunner2/cells_sim.v')
-rw-r--r-- | techlibs/coolrunner2/cells_sim.v | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/techlibs/coolrunner2/cells_sim.v b/techlibs/coolrunner2/cells_sim.v index baeb97fa5..474d35a9a 100644 --- a/techlibs/coolrunner2/cells_sim.v +++ b/techlibs/coolrunner2/cells_sim.v @@ -41,3 +41,17 @@ module ORTERM(IN, OUT); end end endmodule + +module MACROCELL_XOR(IN_PTC, IN_ORTERM, OUT); + parameter INVERT_PTC = 0; + parameter INVERT_OUT = 0; + + input IN_PTC; + input IN_ORTERM; + output wire OUT; + + wire xor_intermed; + + assign OUT = INVERT_OUT ? ~xor_intermed : xor_intermed; + assign xor_intermed = INVERT_PTC ? IN_ORTERM ^ ~IN_PTC : IN_ORTERM ^ IN_PTC; +endmodule |