Skip to content

Commit fc8bee0

Browse files
Merge pull request #88 from the-snowwhite/DE10_Nano_FB_Cramps
De10 nano fb cramps
2 parents de7edf0 + 6405271 commit fc8bee0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+6577
-0
lines changed
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
DE10_Nano_Commands:
2+
3+
u-boot: (replace xx:xx:xx:xx:xx:xx with a REAL mac address)
4+
5+
setenv ethaddr xx:xx:xx:xx:xx:xx
6+
setenv hostname mksocfpga-nano-soc
7+
saveenv
8+
reset
9+
10+
sudo apt update
11+
12+
Machinekit:
13+
14+
sudo apt-get install $(apt-cache depends machinekit | grep Depends | sed "s/.*ends:\ //" | tr '\n' ' ')
15+
sudo apt purge machinekit
16+
(sudo dpkg -i machinekit-rt-preempt_0.1.1-1_armhf.deb machinekit_0.1.1-1_armhf.deb)
17+
(sudo apt-get autoremove)
18+
sudo apt install machinekit-rt-preempt
19+
20+
Configs:
21+
sudo apt install socfpga-rbf
22+
sudo apt install git ca-certificates
23+
24+
git clone https://github.com/the-snowwhite/Hm2-soc_FDM.git
25+
for De10_Nano:
26+
27+
cd Hm2-soc_FDM
28+
git checkout DE10_Nano_FB_Cramps
29+
cd ~/
30+
31+
git clone https://github.com/the-snowwhite/Machineface.git
32+
cd Machineface
33+
git checkout work-updated
34+
cd ~/
35+
git clone https://github.com/the-snowwhite/Cetus.git
36+
cd Cetus
37+
git checkout probework2
38+
cd ~/
39+
40+
SPI for tmc2130 stepper drivers:
41+
42+
git clone --recursive https://github.com/the-snowwhite/SPI.git
43+
sudo apt install python-dev
44+
cd SPI/py-spidev
45+
sudo python setup.py install
46+
cd ~/
47+
48+
if /usr/include/features.h:374:25: fatal error: sys/cdefs.h: No such file or directory
49+
-->sudo apt install --reinstall libc6-dev
50+
sudo python setup.py install
51+
cd ~/
52+
53+
gksu leafpad /etc/linuxcnc/machinekit.ini
54+
--> REMOTE=1
55+
56+
cat <<EOT > start.sh
57+
#!/bin/bash
58+
59+
## Enable debug
60+
sudo sh -c 'echo 1 > /proc/sys/fs/suid_dumpable'
61+
export DEBUG=5
62+
63+
/home/machinekit/SPI/set_tmc2130.sh 8
64+
/usr/bin/mklauncher /home/machinekit/Hm2-soc_FDM
65+
66+
EOT
67+
68+
chmod +x start.sh
69+
70+
./start.sh
71+
72+
then run machinekit client :-)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.qip
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<library>
3+
<path path="../../cv-ip/**/*" />
4+
</library>
Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
## Generated SDC file "DE10_Nano_FB_Cramps.out.sdc"
2+
3+
## Copyright (C) 1991-2016 Altera Corporation. All rights reserved.
4+
## Your use of Altera Corporation's design tools, logic functions
5+
## and other software and tools, and its AMPP partner logic
6+
## functions, and any output files from any of the foregoing
7+
## (including device programming or simulation files), and any
8+
## associated documentation or information are expressly subject
9+
## to the terms and conditions of the Altera Program License
10+
## Subscription Agreement, the Altera Quartus Prime License Agreement,
11+
## the Altera MegaCore Function License Agreement, or other
12+
## applicable license agreement, including, without limitation,
13+
## that your use is for the sole purpose of programming logic
14+
## devices manufactured by Altera and sold by Altera or its
15+
## authorized distributors. Please refer to the applicable
16+
## agreement for further details.
17+
18+
19+
## VENDOR "Altera"
20+
## PROGRAM "Quartus Prime"
21+
## VERSION "Version 15.1.2 Build 193 02/01/2016 SJ Standard Edition"
22+
23+
## DATE "Tue Aug 29 13:25:32 2017"
24+
25+
##
26+
## DEVICE "5CSEBA6U23I7"
27+
##
28+
29+
30+
#**************************************************************
31+
# Time Information
32+
#**************************************************************
33+
34+
set_time_format -unit ns -decimal_places 3
35+
36+
37+
38+
#**************************************************************
39+
# Create Clock
40+
#**************************************************************
41+
42+
create_clock -name {fpga_clk1_50} -period "50.0 MHz" [get_ports {FPGA_CLK1_50}]
43+
create_clock -name {fpga_clk2_50} -period "50.0 MHz" [get_ports {FPGA_CLK2_50}]
44+
create_clock -name {fpga_clk3_50} -period "50.0 MHz" [get_ports {FPGA_CLK3_50}]
45+
46+
# for enhancing USB BlasterII to be reliable, 25MHz
47+
create_clock -name {altera_reserved_tck} -period 40 {altera_reserved_tck}
48+
set_input_delay -clock altera_reserved_tck -clock_fall 3 [get_ports altera_reserved_tdi]
49+
set_input_delay -clock altera_reserved_tck -clock_fall 3 [get_ports altera_reserved_tms]
50+
set_output_delay -clock altera_reserved_tck 3 [get_ports altera_reserved_tdo]
51+
52+
#**************************************************************
53+
# Create Generated Clock
54+
#**************************************************************
55+
56+
create_generated_clock -name {soc_system:u0|soc_system_pll_stream:pll_stream|altera_pll:altera_pll_i|general[0].gpll~FRACTIONAL_PLL_O_VCOPH0} -source [get_pins {u0|pll_stream|altera_pll_i|general[0].gpll~FRACTIONAL_PLL|refclkin}] -duty_cycle 50.000 -multiply_by 12 -divide_by 2 -master_clock {fpga_clk1_50} [get_pins {u0|pll_stream|altera_pll_i|general[0].gpll~FRACTIONAL_PLL|vcoph[0]}]
57+
create_generated_clock -name {soc_system:u0|soc_system_pll_stream:pll_stream|altera_pll:altera_pll_i|outclk_wire[0]} -source [get_pins {u0|pll_stream|altera_pll_i|general[0].gpll~PLL_OUTPUT_COUNTER|vco0ph[0]}] -duty_cycle 50.000 -multiply_by 1 -divide_by 2 -master_clock {soc_system:u0|soc_system_pll_stream:pll_stream|altera_pll:altera_pll_i|general[0].gpll~FRACTIONAL_PLL_O_VCOPH0} [get_pins {u0|pll_stream|altera_pll_i|general[0].gpll~PLL_OUTPUT_COUNTER|divclk}]
58+
create_generated_clock -name {soc_system:u0|soc_system_pll_stream:pll_stream|altera_pll:altera_pll_i|outclk_wire[1]} -source [get_pins {u0|pll_stream|altera_pll_i|general[1].gpll~PLL_OUTPUT_COUNTER|vco0ph[0]}] -duty_cycle 50.000 -multiply_by 1 -divide_by 4 -master_clock {soc_system:u0|soc_system_pll_stream:pll_stream|altera_pll:altera_pll_i|general[0].gpll~FRACTIONAL_PLL_O_VCOPH0} [get_pins {u0|pll_stream|altera_pll_i|general[1].gpll~PLL_OUTPUT_COUNTER|divclk}]
59+
60+
61+
#**************************************************************
62+
# Set Clock Latency
63+
#**************************************************************
64+
65+
66+
67+
#**************************************************************
68+
# Set Clock Uncertainty
69+
#**************************************************************
70+
71+
set_clock_uncertainty -rise_from [get_clocks {fpga_clk1_50}] -rise_to [get_clocks {fpga_clk1_50}] -setup 0.310
72+
set_clock_uncertainty -rise_from [get_clocks {fpga_clk1_50}] -rise_to [get_clocks {fpga_clk1_50}] -hold 0.270
73+
set_clock_uncertainty -rise_from [get_clocks {fpga_clk1_50}] -fall_to [get_clocks {fpga_clk1_50}] -setup 0.310
74+
set_clock_uncertainty -rise_from [get_clocks {fpga_clk1_50}] -fall_to [get_clocks {fpga_clk1_50}] -hold 0.270
75+
set_clock_uncertainty -fall_from [get_clocks {fpga_clk1_50}] -rise_to [get_clocks {fpga_clk1_50}] -setup 0.310
76+
set_clock_uncertainty -fall_from [get_clocks {fpga_clk1_50}] -rise_to [get_clocks {fpga_clk1_50}] -hold 0.270
77+
set_clock_uncertainty -fall_from [get_clocks {fpga_clk1_50}] -fall_to [get_clocks {fpga_clk1_50}] -setup 0.310
78+
set_clock_uncertainty -fall_from [get_clocks {fpga_clk1_50}] -fall_to [get_clocks {fpga_clk1_50}] -hold 0.270
79+
80+
81+
#**************************************************************
82+
# Set Input Delay
83+
#**************************************************************
84+
85+
86+
87+
#**************************************************************
88+
# Set Output Delay
89+
#**************************************************************
90+
91+
92+
93+
#**************************************************************
94+
# Set Clock Groups
95+
#**************************************************************
96+
97+
98+
99+
#**************************************************************
100+
# Set False Path
101+
#**************************************************************
102+
103+
104+
105+
#**************************************************************
106+
# Set Multicycle Path
107+
#**************************************************************
108+
109+
110+
111+
#**************************************************************
112+
# Set Maximum Delay
113+
#**************************************************************
114+
115+
116+
117+
#**************************************************************
118+
# Set Minimum Delay
119+
#**************************************************************
120+
121+
122+
123+
#**************************************************************
124+
# Set Input Transition
125+
#**************************************************************
126+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
DATE = "17:14:54 March 04, 2015"
2+
QUARTUS_VERSION = "14.1"
3+
4+
# Revisions
5+
6+
PROJECT_REVISION = "DE10_Nano_FB_Cramps"

0 commit comments

Comments
 (0)