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

30 lines
968 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
localparam ASIC = `CFG_ASIC; // use asic library
2016-03-31 19:18:15 -04:00
`ifdef TARGET_SIM
assign vddg = ((vdd===1'b1) && (npower===1'b0)) ? 1'b1 : 1'bX;
`else
generate
if(ASIC)
2016-04-17 10:37:08 -04:00
begin : asic
asic_pwr_header i_header (.npower(npower),
.vdd(vdd),
.vddg(vddg));
end
endgenerate
2016-03-31 19:18:15 -04:00
`endif
2016-04-02 22:39:37 -04:00
2016-03-31 19:18:15 -04:00
endmodule // oh_pwr_gate