Skip to content

Commit ab79cff

Browse files
committed
add inline blackbox for PowerOnResetFPGAOnly.
1 parent f9fb9fd commit ab79cff

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

src/main/scala/ip/xilinx/Xilinx.scala

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ package sifive.fpgashells.ip.xilinx
44
import Chisel._
55
import chisel3.{Input, Output}
66
import chisel3.experimental.{Analog, attach}
7+
import chisel3.util.HasBlackBoxInline
78
import freechips.rocketchip.util.{ElaborationArtefacts}
89

910
import sifive.blocks.devices.pinctrl.{BasePin}
@@ -80,11 +81,29 @@ class reset_mig extends BlackBox {
8081

8182
// This is a FPGA-Only construct, which uses
8283
// 'initial' constructions
83-
class PowerOnResetFPGAOnly extends BlackBox {
84+
class PowerOnResetFPGAOnly extends BlackBox with HasBlackBoxInline {
8485
val io = new Bundle {
8586
val clock = Input(Clock())
8687
val power_on_reset = Output(Bool())
8788
}
89+
setInline("",
90+
"""// See LICENSE file for license details.
91+
|(* keep_hierarchy = "yes" *) module PowerOnResetFPGAOnly(
92+
| input clock,
93+
| (* dont_touch = "true" *) output power_on_reset
94+
|);
95+
| reg reset;
96+
| assign power_on_reset = reset;
97+
|
98+
| initial begin
99+
| reset <= 1'b1;
100+
| end
101+
|
102+
| always @(posedge clock) begin
103+
| reset <= 1'b0;
104+
| end
105+
|endmodule
106+
|""".stripMargin)
88107
}
89108

90109
object PowerOnResetFPGAOnly {

0 commit comments

Comments
 (0)