Skip to content
This repository has been archived by the owner on May 28, 2024. It is now read-only.

Commit

Permalink
add generated output
Browse files Browse the repository at this point in the history
  • Loading branch information
SinaKarvandi committed Feb 23, 2024
1 parent 6f5a6c9 commit f550489
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 1 deletion.
26 changes: 26 additions & 0 deletions generated/Blinky.sv
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Generated by CIRCT firtool-1.62.0
module Blinky(
input clock,
reset,
output io_led0
);

reg led;
reg [8:0] counterWrap_c_value;
always @(posedge clock) begin
if (reset) begin
led <= 1'h0;
counterWrap_c_value <= 9'h0;
end
else begin
automatic logic counterWrap = counterWrap_c_value == 9'h1F3;
led <= counterWrap ^ led;
if (counterWrap)
counterWrap_c_value <= 9'h0;
else
counterWrap_c_value <= counterWrap_c_value + 9'h1;
end
end // always @(posedge)
assign io_led0 = led;
endmodule

1 change: 1 addition & 0 deletions generated/filelist.f
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Blinky.sv
8 changes: 7 additions & 1 deletion src/main/scala/top.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,13 @@ object Main extends App {
println(
ChiselStage.emitSystemVerilog(
new Blinky(1000),
firtoolOpts = Array("-disable-all-randomization", "-strip-debug-info")
firtoolOpts = Array(
"-disable-all-randomization",
"-strip-debug-info",
"--split-verilog", // The intention for this argument (and next argument) is to separate generated files.
"-o",
"generated/",
)
)
)
}

0 comments on commit f550489

Please sign in to comment.