-
Notifications
You must be signed in to change notification settings - Fork 194
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding support for DE1 SoC revF board for servant
- Loading branch information
Showing
6 changed files
with
100 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Main system clock (50 Mhz) | ||
create_clock -name "clk" -period 20.000ns [get_ports {i_clk}] | ||
|
||
# Automatically constrain PLL and other generated clocks | ||
derive_pll_clocks -create_base_clocks | ||
|
||
# Automatically calculate clock uncertainty to jitter and other effects. | ||
derive_clock_uncertainty |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
set_location_assignment PIN_AF14 -to i_clk | ||
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to i_clk | ||
|
||
set_location_assignment PIN_AA14 -to i_rst_n | ||
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to i_rst_n | ||
|
||
set_location_assignment PIN_V16 -to q | ||
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to q | ||
|
||
set_location_assignment PIN_AC18 -to uart_txd | ||
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to uart* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
`default_nettype none | ||
module servde1_soc_revF | ||
( | ||
input wire i_clk, | ||
input wire i_rst_n, | ||
output wire q, | ||
output wire uart_txd); | ||
|
||
parameter memfile = "zephyr_hello.hex"; | ||
parameter memsize = 8192; | ||
|
||
wire wb_clk; | ||
wire wb_rst; | ||
|
||
assign uart_txd = q; | ||
|
||
servde1_soc_revF_clock_gen clock_gen | ||
(.i_clk (i_clk), | ||
.i_rst (!i_rst_n), | ||
.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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
`default_nettype none | ||
module servde1_soc_revF_clock_gen | ||
(input wire i_clk, | ||
input wire i_rst, | ||
output wire o_clk, | ||
output wire o_rst); | ||
|
||
wire locked; | ||
reg [9:0] r; | ||
|
||
assign o_rst = r[9]; | ||
|
||
always @(posedge o_clk) | ||
if (locked) | ||
r <= {r[8:0],1'b0}; | ||
else | ||
r <= 10'b1111111111; | ||
|
||
wire [5:0] clk; | ||
|
||
assign o_clk = clk[0]; | ||
|
||
altpll | ||
#(.operation_mode ("NORMAL"), | ||
.clk0_divide_by (25), | ||
.clk0_multiply_by (8), | ||
.inclk0_input_frequency (20000)) | ||
pll | ||
(.areset (i_rst), | ||
.inclk ({1'b0, i_clk}), | ||
.clk (clk), | ||
.locked (locked)); | ||
|
||
endmodule |