Skip to content

Instantly share code, notes, and snippets.

@olofk
Last active March 10, 2022 13:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save olofk/1566e3d11e0f91bc0a4ecddcae674020 to your computer and use it in GitHub Desktop.
Save olofk/1566e3d11e0f91bc0a4ecddcae674020 to your computer and use it in GitHub Desktop.
`default_nettype none
module servive
(
input wire i_clk,
input wire i_rst_n,
output wire q,
output wire uart_txd);
parameter memfile = "zephyr_hello.hex";
parameter memsize = 8192;
assign uart_txd = q;
reg [4:0] rst_reg = 5'b11111;
always @(posedge i_clk)
rst_reg <= {!i_rst_n, rst_reg[4:1]};
servant
#(.memfile (memfile),
.memsize (memsize))
servant
(.wb_clk (i_clk),
.wb_rst (rst_reg[0]),
.q (q));
endmodule
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment