mirror of
https://github.com/olofk/serv.git
synced 2026-03-03 17:56:16 +00:00
Add support for LX9 Microboard
This commit is contained in:
9
data/lx9_microboard.ucf
Normal file
9
data/lx9_microboard.ucf
Normal file
@@ -0,0 +1,9 @@
|
||||
CONFIG VCCAUX=3.3;
|
||||
|
||||
NET i_clk LOC = V10 | IOSTANDARD = LVCMOS33;
|
||||
NET i_rst LOC = V4 | IOSTANDARD = LVCMOS33 | PULLDOWN;
|
||||
NET q LOC = P4 | IOSTANDARD = LVCMOS18;
|
||||
NET o_uart_tx LOC = T7 | IOSTANDARD = LVCMOS33;
|
||||
|
||||
NET i_clk TNM_NET = clk;
|
||||
TIMESPEC TS_USER_CLOCK = PERIOD clk 40000 kHz;
|
||||
20
servant.core
20
servant.core
@@ -47,6 +47,12 @@ filesets:
|
||||
icebreaker : {files: [data/icebreaker.pcf : {file_type : PCF}]}
|
||||
alhambra : {files: [data/alhambra.pcf : {file_type : PCF}]}
|
||||
|
||||
lx9_microboard:
|
||||
files:
|
||||
- servant/servant_lx9_clock_gen.v : {file_type : verilogSource}
|
||||
- servant/servant_lx9.v : {file_type : verilogSource}
|
||||
- data/lx9_microboard.ucf : {file_type : UCF}
|
||||
|
||||
nexys_a7:
|
||||
files:
|
||||
- servant/servix_clock_gen.v : {file_type : verilogSource}
|
||||
@@ -108,6 +114,20 @@ targets:
|
||||
pnr: next
|
||||
toplevel : service
|
||||
|
||||
lx9_microboard:
|
||||
default_tool: ise
|
||||
description : LX9 Microboard
|
||||
filesets : [mem_files, soc, lx9_microboard]
|
||||
parameters : [memfile, memsize]
|
||||
tools:
|
||||
ise:
|
||||
family : Spartan6
|
||||
device : xc6slx9
|
||||
package : csg324
|
||||
speed : -2
|
||||
toplevel : servant_lx9
|
||||
|
||||
|
||||
tinyfpga_bx:
|
||||
default_tool : icestorm
|
||||
filesets : [mem_files, soc, service, tinyfpga_bx]
|
||||
|
||||
32
servant/servant_lx9.v
Normal file
32
servant/servant_lx9.v
Normal file
@@ -0,0 +1,32 @@
|
||||
`default_nettype none
|
||||
module servant_lx9
|
||||
(
|
||||
input wire i_clk,
|
||||
input wire i_rst,
|
||||
output wire o_uart_tx,
|
||||
output wire q);
|
||||
|
||||
parameter memfile = "zephyr_hello.hex";
|
||||
parameter memsize = 8192;
|
||||
|
||||
wire wb_clk;
|
||||
wire wb_rst;
|
||||
|
||||
assign o_uart_tx = q;
|
||||
|
||||
servant_lx9_clock_gen
|
||||
clock_gen
|
||||
(.i_clk (i_clk),
|
||||
.i_rst (i_rst),
|
||||
.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
|
||||
35
servant/servant_lx9_clock_gen.v
Normal file
35
servant/servant_lx9_clock_gen.v
Normal file
@@ -0,0 +1,35 @@
|
||||
`default_nettype none
|
||||
module servant_lx9_clock_gen
|
||||
(input wire i_clk,
|
||||
input wire i_rst,
|
||||
output wire o_clk,
|
||||
output reg o_rst);
|
||||
|
||||
wire clkfb;
|
||||
wire locked;
|
||||
reg locked_r;
|
||||
|
||||
PLL_BASE
|
||||
#(.BANDWIDTH("OPTIMIZED"),
|
||||
.CLKFBOUT_MULT(16),
|
||||
.CLKIN_PERIOD(25.0), //40MHz
|
||||
.CLKOUT1_DIVIDE(40), //16MHz
|
||||
.DIVCLK_DIVIDE(1))
|
||||
PLL_BASE_inst
|
||||
(.CLKOUT1(o_clk),
|
||||
.CLKOUT2(),
|
||||
.CLKOUT3(),
|
||||
.CLKOUT4(),
|
||||
.CLKOUT5(),
|
||||
.CLKFBOUT(clkfb),
|
||||
.LOCKED(locked),
|
||||
.CLKIN(i_clk),
|
||||
.RST(i_rst),
|
||||
.CLKFBIN(clkfb));
|
||||
|
||||
always @(posedge o_clk) begin
|
||||
locked_r <= locked;
|
||||
o_rst <= !locked_r;
|
||||
end
|
||||
|
||||
endmodule
|
||||
Reference in New Issue
Block a user