mirror of https://github.com/YosysHQ/yosys.git
Merge pull request #1222 from koriakin/s6-example
Add a simple example for Spartan 6
This commit is contained in:
commit
d6a289d3e3
|
@ -0,0 +1,8 @@
|
||||||
|
A simple example design, based on the Numato Labs Mimas V2 board
|
||||||
|
================================================================
|
||||||
|
|
||||||
|
This example uses Yosys for synthesis and Xilinx ISE
|
||||||
|
for place&route and bit-stream creation.
|
||||||
|
|
||||||
|
To synthesize:
|
||||||
|
bash run.sh
|
|
@ -0,0 +1,13 @@
|
||||||
|
CONFIG VCCAUX = "3.3" ;
|
||||||
|
|
||||||
|
|
||||||
|
NET "CLK" LOC = D9 | IOSTANDARD = LVCMOS33 | PERIOD = 12MHz ;
|
||||||
|
|
||||||
|
NET "LED[7]" LOC = P15 | IOSTANDARD = LVCMOS33 | DRIVE = 8 | SLEW = SLOW ;
|
||||||
|
NET "LED[6]" LOC = P16 | IOSTANDARD = LVCMOS33 | DRIVE = 8 | SLEW = SLOW ;
|
||||||
|
NET "LED[5]" LOC = N15 | IOSTANDARD = LVCMOS33 | DRIVE = 8 | SLEW = SLOW ;
|
||||||
|
NET "LED[4]" LOC = N16 | IOSTANDARD = LVCMOS33 | DRIVE = 8 | SLEW = SLOW ;
|
||||||
|
NET "LED[3]" LOC = U17 | IOSTANDARD = LVCMOS33 | DRIVE = 8 | SLEW = SLOW ;
|
||||||
|
NET "LED[2]" LOC = U18 | IOSTANDARD = LVCMOS33 | DRIVE = 8 | SLEW = SLOW ;
|
||||||
|
NET "LED[1]" LOC = T17 | IOSTANDARD = LVCMOS33 | DRIVE = 8 | SLEW = SLOW ;
|
||||||
|
NET "LED[0]" LOC = T18 | IOSTANDARD = LVCMOS33 | DRIVE = 8 | SLEW = SLOW ;
|
|
@ -0,0 +1,14 @@
|
||||||
|
module example(
|
||||||
|
input wire CLK,
|
||||||
|
output wire [7:0] LED
|
||||||
|
);
|
||||||
|
|
||||||
|
reg [27:0] ctr;
|
||||||
|
initial ctr = 0;
|
||||||
|
|
||||||
|
always @(posedge CLK)
|
||||||
|
ctr <= ctr + 1;
|
||||||
|
|
||||||
|
assign LED = ctr[27:20];
|
||||||
|
|
||||||
|
endmodule
|
|
@ -0,0 +1,8 @@
|
||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
yosys run_yosys.ys
|
||||||
|
edif2ngd example.edif
|
||||||
|
ngdbuild example -uc example.ucf -p xc6slx9csg324-3
|
||||||
|
map -w example
|
||||||
|
par -w example.ncd example_par.ncd
|
||||||
|
bitgen -w example_par.ncd -g StartupClk:JTAGClk
|
|
@ -0,0 +1,4 @@
|
||||||
|
read_verilog example.v
|
||||||
|
synth_xilinx -top example -family xc6s
|
||||||
|
iopadmap -bits -outpad OBUF I:O -inpad IBUF O:I
|
||||||
|
write_edif -pvector bra example.edif
|
Loading…
Reference in New Issue