1
0
mirror of https://github.com/aolofsson/oh.git synced 2025-02-07 06:44:09 +08:00
oh/src/common/hdl/oh_pwr_gate.v

19 lines
760 B
Coq
Raw Normal View History

//#############################################################################
//# Function: Power supply header switch #
//#############################################################################
//# Author: Andreas Olofsson #
//# License: MIT (see LICENSE file in OH! repository) #
//#############################################################################
2016-03-31 19:18:15 -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