2016-04-11 12:01:59 -04:00
|
|
|
//#############################################################################
|
|
|
|
//# Function: Power supply header switch #
|
|
|
|
//#############################################################################
|
|
|
|
//# Author: Andreas Olofsson #
|
|
|
|
//# License: MIT (see LICENSE file in OH! repository) #
|
|
|
|
//#############################################################################
|
2016-03-31 19:18:15 -04:00
|
|
|
|
2016-04-11 12:01:59 -04:00
|
|
|
module oh_pwr_gate (input npower, // active low power on
|
|
|
|
input vdd, // input supply
|
|
|
|
output vddg // gated output supply
|
|
|
|
);
|
2016-03-31 19:18:15 -04:00
|
|
|
|
|
|
|
`ifdef TARGET_SIM
|
|
|
|
assign vddg = ((vdd===1'b1) && (npower===1'b0)) ? 1'b1 : 1'bX;
|
|
|
|
`else
|
|
|
|
`endif
|
2016-04-02 22:39:37 -04:00
|
|
|
|
2016-03-31 19:18:15 -04:00
|
|
|
endmodule // oh_pwr_gate
|