1
0
mirror of https://github.com/olofk/serv.git synced 2026-02-11 01:59:47 +00:00

Add nexys a7 support

This commit is contained in:
Olof Kindgren
2019-06-24 13:18:20 +02:00
parent fe9d2677ba
commit 4b371c533f
4 changed files with 83 additions and 8 deletions

27
servant/servix.v Normal file
View File

@@ -0,0 +1,27 @@
`default_nettype none
module servix
(
input wire i_clk,
output wire q);
parameter memfile = "zephyr_hello.hex";
parameter memsize = 8192;
parameter PLL = "NONE";
wire wb_clk;
wire wb_rst;
servix_clock_gen clock_gen
(.i_clk (i_clk),
.o_clk (wb_clk),
.o_rst (wb_rst));
servant
#(.memfile (memfile),
.memsize (memsize))
servant
(.wb_clk (wb_clk),
.wb_rst (wb_rst),
.q (q));
endmodule

View File

@@ -0,0 +1,37 @@
`default_nettype none
module servix_clock_gen
(input wire i_clk,
output wire o_clk,
output reg o_rst);
wire clkfb;
wire locked;
reg locked_r;
PLLE2_BASE
#(.BANDWIDTH("OPTIMIZED"),
.CLKFBOUT_MULT(16),
.CLKIN1_PERIOD(10.0), //100MHz
.CLKOUT0_DIVIDE(50),
.DIVCLK_DIVIDE(1),
.STARTUP_WAIT("FALSE"))
PLLE2_BASE_inst
(.CLKOUT0(o_clk),
.CLKOUT1(),
.CLKOUT2(),
.CLKOUT3(),
.CLKOUT4(),
.CLKOUT5(),
.CLKFBOUT(clkfb),
.LOCKED(locked),
.CLKIN1(i_clk),
.PWRDWN(1'b0),
.RST(1'b0),
.CLKFBIN(clkfb));
always @(posedge o_clk) begin
locked_r <= locked;
o_rst <= !locked_r;
end
endmodule