-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
134 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,5 @@ | ||
## Building the ultra96 example - RapidWright | ||
- Run `java -jar rapidwright_bbaexport.jar xczu3eg-sbva484-1-e xilinx/constids.inc xilinx/xczu7ev.bba` | ||
- Run `./bbasm xilinx/xczu3eg.bba xilinx/xczu3eg.bin -b` | ||
- Run `blinky.sh` in `xilinx/examples/ultra96`. | ||
|
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,6 @@ | ||
#!/usr/bin/env bash | ||
set -ex | ||
yosys -p "synth_xilinx -flatten -arch xcup -nobram -top top; write_json blinky.json" ../attosoc/attosoc.v blinky.v | ||
../../../nextpnr-xilinx --chipdb ../../xczu3eg.bin --json blinky.json --xdc ultra96.xdc --write blinky_routed.json | ||
java -jar ../../../rapidwright_json2dcp.jar xczu3eg-sbva484-1-e blinky_routed.json blinky.dcp | ||
vivado -mode batch -nojournal -nolog -source blinky.tcl |
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,3 @@ | ||
open_checkpoint blinky.dcp | ||
write_verilog -force blinky_out.v | ||
write_bitstream -force blinky.bit |
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,40 @@ | ||
module top (input clk_p, clk_n, reset, output [3:0] led); | ||
wire clk_i; | ||
IBUFDS clk_ibuf ( | ||
.I(clk_p), | ||
.IB(clk_n), | ||
.O(clk_i) | ||
); | ||
BUFGCTRL bufg_i ( | ||
.I0(clk_i), | ||
.CE0(1'b1), | ||
.S0(1'b1), | ||
.O(clk) | ||
); | ||
|
||
//`define BLINKY | ||
`ifdef BLINKY | ||
reg clkdiv; | ||
reg [21:0] ctr; | ||
|
||
always @(posedge clk) {clkdiv, ctr} <= ctr + 1'b1; | ||
|
||
reg [3:0] led_r; | ||
|
||
always @(posedge clk) begin | ||
if (clkdiv) | ||
led_r <= led_r - 1'b1; | ||
end | ||
assign led = led_r; | ||
`else | ||
wire [7:0] soc_led; | ||
|
||
attosoc soc_i( | ||
.clk(clk), | ||
.reset(reset), | ||
.led(soc_led) | ||
); | ||
|
||
assign led = soc_led[3:0]; | ||
`endif | ||
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,64 @@ | ||
00100413 | ||
020004b7 | ||
01000993 | ||
00140413 | ||
01344463 | ||
00200413 | ||
00200913 | ||
00895e63 | ||
00040513 | ||
00090593 | ||
01c000ef | ||
00050a63 | ||
00190913 | ||
fe9ff06f | ||
0084a023 | ||
018000ef | ||
fcdff06f | ||
00100293 | ||
40b50533 | ||
fe555ee3 | ||
00008067 | ||
0036f2b7 | ||
e8028293 | ||
fff28293 | ||
fe029ee3 | ||
00008067 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 |
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,16 @@ | ||
set_property LOC D5 [get_ports led[0]] | ||
set_property LOC D6 [get_ports led[1]] | ||
set_property LOC A5 [get_ports led[2]] | ||
set_property LOC B5 [get_ports led[3]] | ||
|
||
set_property IOSTANDARD LVCMOS33 [get_ports led[0]] | ||
set_property IOSTANDARD LVCMOS33 [get_ports led[1]] | ||
set_property IOSTANDARD LVCMOS33 [get_ports led[2]] | ||
set_property IOSTANDARD LVCMOS33 [get_ports led[3]] | ||
|
||
set_property LOC M11 [get_ports reset] | ||
set_property IOSTANDARD LVCMOS33 [get_ports reset] | ||
|
||
set_property LOC F23 [get_ports clk_p] | ||
set_property LOC E23 [get_ports clk_n] | ||
set_property IOSTANDARD LVDS [get_ports clk_p] |