Compare commits
3 Commits
729ed70f16
...
9ae99282b2
Author | SHA1 | Date |
---|---|---|
|
9ae99282b2 | |
|
6feb0209a4 | |
|
f4f8978227 |
|
@ -1,41 +1,33 @@
|
|||
update=Tue 11 Oct 2016 05:25:07 PM PDT
|
||||
update=22/05/2015 07:44:53
|
||||
version=1
|
||||
last_client=kicad
|
||||
[cvpcb]
|
||||
[general]
|
||||
version=1
|
||||
NetIExt=net
|
||||
RootSch=
|
||||
BoardNm=
|
||||
[pcbnew]
|
||||
version=1
|
||||
PageLayoutDescrFile=
|
||||
LastNetListRead=
|
||||
UseCmpFile=1
|
||||
PadDrill=0.600000000000
|
||||
PadDrillOvalY=0.600000000000
|
||||
PadSizeH=1.500000000000
|
||||
PadSizeV=1.500000000000
|
||||
PcbTextSizeV=1.016000000000
|
||||
PcbTextSizeH=1.016000000000
|
||||
PcbTextThickness=0.152400000000
|
||||
ModuleTextSizeV=1.016000000000
|
||||
ModuleTextSizeH=1.016000000000
|
||||
ModuleTextSizeThickness=0.152400000000
|
||||
SolderMaskClearance=0.003000000000
|
||||
SolderMaskMinWidth=0.004000000000
|
||||
DrawSegmentWidth=0.152400000000
|
||||
BoardOutlineThickness=0.152400000000
|
||||
ModuleOutlineThickness=0.152400000000
|
||||
PcbTextSizeV=1.500000000000
|
||||
PcbTextSizeH=1.500000000000
|
||||
PcbTextThickness=0.300000000000
|
||||
ModuleTextSizeV=1.000000000000
|
||||
ModuleTextSizeH=1.000000000000
|
||||
ModuleTextSizeThickness=0.150000000000
|
||||
SolderMaskClearance=0.000000000000
|
||||
SolderMaskMinWidth=0.000000000000
|
||||
DrawSegmentWidth=0.200000000000
|
||||
BoardOutlineThickness=0.100000000000
|
||||
ModuleOutlineThickness=0.150000000000
|
||||
[cvpcb]
|
||||
version=1
|
||||
NetIExt=net
|
||||
[eeschema]
|
||||
version=1
|
||||
LibDir=
|
||||
[eeschema/libraries]
|
||||
[schematic_editor]
|
||||
version=1
|
||||
PageLayoutDescrFile=
|
||||
PlotDirectoryName=
|
||||
SubpartIdSeparator=0
|
||||
SubpartFirstId=65
|
||||
NetFmtName=
|
||||
SpiceForceRefPrefix=0
|
||||
SpiceUseNetNumbers=0
|
||||
LabSize=50
|
||||
[general]
|
||||
version=1
|
||||
|
|
|
@ -1,57 +0,0 @@
|
|||
12607631572004
|
||||
bldc-parts
|
||||
Battery_Connector
|
||||
|
||||
|
||||
0
|
||||
2
|
||||
2
|
||||
bldc-parts
|
||||
Infineon_PG-TDSON-8-33
|
||||
|
||||
|
||||
0
|
||||
10
|
||||
8
|
||||
bldc-parts
|
||||
Lattice_QFN-48UP
|
||||
|
||||
|
||||
0
|
||||
49
|
||||
49
|
||||
bldc-parts
|
||||
Maxim_TQFN-28
|
||||
|
||||
|
||||
0
|
||||
29
|
||||
29
|
||||
bldc-parts
|
||||
Motor_Connector
|
||||
|
||||
|
||||
0
|
||||
3
|
||||
3
|
||||
bldc-parts
|
||||
TI_RGZ-48
|
||||
|
||||
|
||||
0
|
||||
49
|
||||
49
|
||||
bldc-parts
|
||||
TT_OARS-XP-4Terminal
|
||||
|
||||
|
||||
0
|
||||
6
|
||||
4
|
||||
bldc-parts
|
||||
stencil_alignment_pin
|
||||
|
||||
|
||||
0
|
||||
0
|
||||
0
|
|
@ -72,7 +72,7 @@
|
|||
(pcbplotparams
|
||||
(layerselection 0x310fc_ffffffff)
|
||||
(usegerberextensions true)
|
||||
(usegerberattributes true)
|
||||
(usegerberattributes false)
|
||||
(usegerberadvancedattributes false)
|
||||
(creategerberjobfile false)
|
||||
(excludeedgelayer true)
|
||||
|
@ -7574,7 +7574,7 @@
|
|||
(segment (start 22.413514 120.05) (end 19.749999 117.386485) (width 0.254) (layer B.Cu) (net 91))
|
||||
(segment (start 23.55 120.05) (end 22.413514 120.05) (width 0.254) (layer B.Cu) (net 91))
|
||||
|
||||
(zone (net 2) (net_name /VDRAIN) (layer F.Cu) (tstamp 5DFC9E31) (hatch edge 0.508)
|
||||
(zone (net 2) (net_name /VDRAIN) (layer F.Cu) (tstamp 5DFC615E) (hatch edge 0.508)
|
||||
(priority 4)
|
||||
(connect_pads yes (clearance 0.254))
|
||||
(min_thickness 0.254)
|
||||
|
@ -7597,7 +7597,7 @@
|
|||
)
|
||||
)
|
||||
)
|
||||
(zone (net 84) (net_name /VSOURCE) (layer F.Cu) (tstamp 5DFC9E2E) (hatch edge 0.508)
|
||||
(zone (net 84) (net_name /VSOURCE) (layer F.Cu) (tstamp 5DFC615B) (hatch edge 0.508)
|
||||
(priority 5)
|
||||
(connect_pads yes (clearance 0.254))
|
||||
(min_thickness 0.254)
|
||||
|
@ -7649,7 +7649,7 @@
|
|||
)
|
||||
)
|
||||
)
|
||||
(zone (net 2) (net_name /VDRAIN) (layer F.Cu) (tstamp 5DFC9E2B) (hatch edge 0.508)
|
||||
(zone (net 2) (net_name /VDRAIN) (layer F.Cu) (tstamp 5DFC6158) (hatch edge 0.508)
|
||||
(priority 4)
|
||||
(connect_pads yes (clearance 0.254))
|
||||
(min_thickness 0.254)
|
||||
|
@ -7669,7 +7669,7 @@
|
|||
)
|
||||
)
|
||||
)
|
||||
(zone (net 2) (net_name /VDRAIN) (layer F.Cu) (tstamp 5DFC9E28) (hatch edge 0.508)
|
||||
(zone (net 2) (net_name /VDRAIN) (layer F.Cu) (tstamp 5DFC6155) (hatch edge 0.508)
|
||||
(priority 3)
|
||||
(connect_pads yes (clearance 0.1524))
|
||||
(min_thickness 0.254)
|
||||
|
@ -7706,7 +7706,7 @@
|
|||
)
|
||||
)
|
||||
)
|
||||
(zone (net 2) (net_name /VDRAIN) (layer B.Cu) (tstamp 5DFC9E25) (hatch edge 0.508)
|
||||
(zone (net 2) (net_name /VDRAIN) (layer B.Cu) (tstamp 5DFC6152) (hatch edge 0.508)
|
||||
(priority 4)
|
||||
(connect_pads yes (clearance 0.254))
|
||||
(min_thickness 0.254)
|
||||
|
@ -7739,7 +7739,7 @@
|
|||
)
|
||||
)
|
||||
)
|
||||
(zone (net 84) (net_name /VSOURCE) (layer F.Cu) (tstamp 5DFC9E22) (hatch edge 0.508)
|
||||
(zone (net 84) (net_name /VSOURCE) (layer F.Cu) (tstamp 5DFC614F) (hatch edge 0.508)
|
||||
(priority 3)
|
||||
(connect_pads yes (clearance 0.254))
|
||||
(min_thickness 0.254)
|
||||
|
@ -7769,7 +7769,7 @@
|
|||
)
|
||||
)
|
||||
)
|
||||
(zone (net 2) (net_name /VDRAIN) (layer B.Cu) (tstamp 5DFC9E1F) (hatch edge 0.508)
|
||||
(zone (net 2) (net_name /VDRAIN) (layer B.Cu) (tstamp 5DFC614C) (hatch edge 0.508)
|
||||
(priority 4)
|
||||
(connect_pads yes (clearance 0.1524))
|
||||
(min_thickness 0.254)
|
||||
|
@ -7795,7 +7795,7 @@
|
|||
)
|
||||
)
|
||||
)
|
||||
(zone (net 2) (net_name /VDRAIN) (layer B.Cu) (tstamp 5DFC9E1C) (hatch edge 0.508)
|
||||
(zone (net 2) (net_name /VDRAIN) (layer B.Cu) (tstamp 5DFC6149) (hatch edge 0.508)
|
||||
(priority 4)
|
||||
(connect_pads yes (clearance 0.254))
|
||||
(min_thickness 0.254)
|
||||
|
@ -7814,7 +7814,7 @@
|
|||
)
|
||||
)
|
||||
)
|
||||
(zone (net 84) (net_name /VSOURCE) (layer B.Cu) (tstamp 5DFC9E19) (hatch edge 0.508)
|
||||
(zone (net 84) (net_name /VSOURCE) (layer B.Cu) (tstamp 5DFC6146) (hatch edge 0.508)
|
||||
(priority 3)
|
||||
(connect_pads yes (clearance 0.254))
|
||||
(min_thickness 0.254)
|
||||
|
@ -7862,7 +7862,7 @@
|
|||
)
|
||||
)
|
||||
)
|
||||
(zone (net 28) (net_name /A) (layer F.Cu) (tstamp 5DFC9E16) (hatch edge 0.508)
|
||||
(zone (net 28) (net_name /A) (layer F.Cu) (tstamp 5DFC6143) (hatch edge 0.508)
|
||||
(priority 2)
|
||||
(connect_pads yes (clearance 0.1524))
|
||||
(min_thickness 0.254)
|
||||
|
@ -7890,7 +7890,7 @@
|
|||
)
|
||||
)
|
||||
)
|
||||
(zone (net 29) (net_name /B) (layer F.Cu) (tstamp 5DFC9E13) (hatch edge 0.508)
|
||||
(zone (net 29) (net_name /B) (layer F.Cu) (tstamp 5DFC6140) (hatch edge 0.508)
|
||||
(priority 2)
|
||||
(connect_pads yes (clearance 0.254))
|
||||
(min_thickness 0.254)
|
||||
|
@ -7919,7 +7919,7 @@
|
|||
)
|
||||
)
|
||||
)
|
||||
(zone (net 27) (net_name /C) (layer F.Cu) (tstamp 5DFC9E10) (hatch edge 0.508)
|
||||
(zone (net 27) (net_name /C) (layer F.Cu) (tstamp 5DFC613D) (hatch edge 0.508)
|
||||
(priority 2)
|
||||
(connect_pads yes (clearance 0.1524))
|
||||
(min_thickness 0.254)
|
||||
|
@ -7944,7 +7944,7 @@
|
|||
)
|
||||
)
|
||||
)
|
||||
(zone (net 1) (net_name GND) (layer F.Cu) (tstamp 5DFC9E0D) (hatch edge 0.508)
|
||||
(zone (net 1) (net_name GND) (layer F.Cu) (tstamp 5DFC613A) (hatch edge 0.508)
|
||||
(connect_pads (clearance 0.1524))
|
||||
(min_thickness 0.254)
|
||||
(fill yes (arc_segments 32) (thermal_gap 0.508) (thermal_bridge_width 0.508))
|
||||
|
@ -9274,7 +9274,7 @@
|
|||
)
|
||||
)
|
||||
)
|
||||
(zone (net 1) (net_name GND) (layer B.Cu) (tstamp 5DFC9E0A) (hatch edge 0.508)
|
||||
(zone (net 1) (net_name GND) (layer B.Cu) (tstamp 5DFC6137) (hatch edge 0.508)
|
||||
(connect_pads (clearance 0.254))
|
||||
(min_thickness 0.254)
|
||||
(fill yes (arc_segments 32) (thermal_gap 0.508) (thermal_bridge_width 0.508))
|
||||
|
@ -9806,7 +9806,7 @@
|
|||
)
|
||||
)
|
||||
)
|
||||
(zone (net 27) (net_name /C) (layer B.Cu) (tstamp 5DFC9E07) (hatch edge 0.508)
|
||||
(zone (net 27) (net_name /C) (layer B.Cu) (tstamp 5DFC6134) (hatch edge 0.508)
|
||||
(connect_pads (clearance 0.254))
|
||||
(min_thickness 0.254)
|
||||
(fill yes (arc_segments 32) (thermal_gap 0.508) (thermal_bridge_width 0.508))
|
||||
|
@ -9823,7 +9823,7 @@
|
|||
)
|
||||
)
|
||||
)
|
||||
(zone (net 29) (net_name /B) (layer B.Cu) (tstamp 5DFC9E04) (hatch edge 0.508)
|
||||
(zone (net 29) (net_name /B) (layer B.Cu) (tstamp 5DFC6131) (hatch edge 0.508)
|
||||
(connect_pads (clearance 0.254))
|
||||
(min_thickness 0.254)
|
||||
(fill yes (arc_segments 32) (thermal_gap 0.508) (thermal_bridge_width 0.508))
|
||||
|
@ -9838,7 +9838,7 @@
|
|||
)
|
||||
)
|
||||
)
|
||||
(zone (net 28) (net_name /A) (layer B.Cu) (tstamp 5DFC9E01) (hatch edge 0.508)
|
||||
(zone (net 28) (net_name /A) (layer B.Cu) (tstamp 5DFC612E) (hatch edge 0.508)
|
||||
(connect_pads (clearance 0.254))
|
||||
(min_thickness 0.254)
|
||||
(fill yes (arc_segments 32) (thermal_gap 0.508) (thermal_bridge_width 0.508))
|
|
@ -0,0 +1,41 @@
|
|||
update=Tue 11 Oct 2016 05:25:07 PM PDT
|
||||
version=1
|
||||
last_client=kicad
|
||||
[cvpcb]
|
||||
version=1
|
||||
NetIExt=net
|
||||
[pcbnew]
|
||||
version=1
|
||||
PageLayoutDescrFile=
|
||||
LastNetListRead=
|
||||
PadDrill=0.600000000000
|
||||
PadDrillOvalY=0.600000000000
|
||||
PadSizeH=1.500000000000
|
||||
PadSizeV=1.500000000000
|
||||
PcbTextSizeV=1.016000000000
|
||||
PcbTextSizeH=1.016000000000
|
||||
PcbTextThickness=0.152400000000
|
||||
ModuleTextSizeV=1.016000000000
|
||||
ModuleTextSizeH=1.016000000000
|
||||
ModuleTextSizeThickness=0.152400000000
|
||||
SolderMaskClearance=0.003000000000
|
||||
SolderMaskMinWidth=0.004000000000
|
||||
DrawSegmentWidth=0.152400000000
|
||||
BoardOutlineThickness=0.152400000000
|
||||
ModuleOutlineThickness=0.152400000000
|
||||
[eeschema]
|
||||
version=1
|
||||
LibDir=
|
||||
[eeschema/libraries]
|
||||
[schematic_editor]
|
||||
version=1
|
||||
PageLayoutDescrFile=
|
||||
PlotDirectoryName=
|
||||
SubpartIdSeparator=0
|
||||
SubpartFirstId=65
|
||||
NetFmtName=
|
||||
SpiceForceRefPrefix=0
|
||||
SpiceUseNetNumbers=0
|
||||
LabSize=50
|
||||
[general]
|
||||
version=1
|
|
@ -3985,4 +3985,8 @@ F 4 "NoPart" H 5100 8650 50 0001 C CNN "Mouser"
|
|||
1 5100 8650
|
||||
1 0 0 -1
|
||||
$EndComp
|
||||
Text Notes 8450 2600 0 50 ~ 0
|
||||
TODO fix C30's part number,\n isn't rated for 25V
|
||||
Text Notes 2500 7400 0 50 ~ 0
|
||||
TODO fix silkscreen position of C6 and C8
|
||||
$EndSCHEMATC
|
|
@ -3950,10 +3950,10 @@ Wire Wire Line
|
|||
Wire Wire Line
|
||||
3050 9400 3950 9400
|
||||
$Comp
|
||||
L Mechanical:MountingHole H?
|
||||
L Mechanical:MountingHole H3
|
||||
U 1 1 5E00E72A
|
||||
P 4050 8650
|
||||
F 0 "H?" H 4050 8850 50 0000 C CNN
|
||||
F 0 "H3" H 4050 8850 50 0000 C CNN
|
||||
F 1 "MountingHole" H 4050 8775 50 0000 C CNN
|
||||
F 2 "bldc-parts:stencil_alignment_pin" H 4050 8650 50 0001 C CNN
|
||||
F 3 "~" H 4050 8650 50 0001 C CNN
|
||||
|
@ -3962,10 +3962,10 @@ F 4 "NoPart" H 4050 8650 50 0001 C CNN "Mouser"
|
|||
1 0 0 -1
|
||||
$EndComp
|
||||
$Comp
|
||||
L Mechanical:MountingHole H?
|
||||
L Mechanical:MountingHole H4
|
||||
U 1 1 5E00EA64
|
||||
P 4600 8650
|
||||
F 0 "H?" H 4600 8850 50 0000 C CNN
|
||||
F 0 "H4" H 4600 8850 50 0000 C CNN
|
||||
F 1 "MountingHole" H 4600 8775 50 0000 C CNN
|
||||
F 2 "bldc-parts:stencil_alignment_pin" H 4600 8650 50 0001 C CNN
|
||||
F 3 "~" H 4600 8650 50 0001 C CNN
|
||||
|
@ -3974,10 +3974,10 @@ F 4 "NoPart" H 4600 8650 50 0001 C CNN "Mouser"
|
|||
1 0 0 -1
|
||||
$EndComp
|
||||
$Comp
|
||||
L Mechanical:MountingHole H?
|
||||
L Mechanical:MountingHole H5
|
||||
U 1 1 5E00EE37
|
||||
P 5100 8650
|
||||
F 0 "H?" H 5100 8850 50 0000 C CNN
|
||||
F 0 "H5" H 5100 8850 50 0000 C CNN
|
||||
F 1 "MountingHole" H 5100 8775 50 0000 C CNN
|
||||
F 2 "bldc-parts:stencil_alignment_pin" H 5100 8650 50 0001 C CNN
|
||||
F 3 "~" H 5100 8650 50 0001 C CNN
|
||||
|
@ -3985,4 +3985,6 @@ F 4 "NoPart" H 5100 8650 50 0001 C CNN "Mouser"
|
|||
1 5100 8650
|
||||
1 0 0 -1
|
||||
$EndComp
|
||||
Text Notes 8450 2600 0 50 ~ 0
|
||||
TODO fix C30's part number,\n isn't rated for 25V
|
||||
$EndSCHEMATC
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,3 @@
|
|||
*.asc
|
||||
*.bin
|
||||
*.json
|
|
@ -0,0 +1,22 @@
|
|||
# Note: Yosys chokes on spaces in library directories (reported to yosys)
|
||||
# Library path if not overriden (environment)
|
||||
NEXTPNR_OPTS=--up5k --package sg48
|
||||
ICETIME_OPTS=-d up5k
|
||||
FN=bldc
|
||||
|
||||
${FN}.bin: ${FN}.asc
|
||||
icepack ${FN}.asc ${FN}.bin
|
||||
|
||||
${FN}.json: ${FN}.v
|
||||
./run_yosys.sh ${FN}
|
||||
|
||||
${FN}.asc: ${FN}.json ${FN}.pcf
|
||||
nextpnr-ice40 ${NEXTPNR_OPTS} --pcf "${FN}.pcf" --json "${FN}.json" --asc "${FN}.asc"
|
||||
|
||||
#${FN}.rpt: ${FN}.pcf ${FN}.txt
|
||||
# icetime $ICETIME_OPTS -p "${FN}.pcf" -mtr "${FN}.rpt" "${FN}.txt"
|
||||
|
||||
clean:
|
||||
rm ${FN}.json ${FN}.asc ${FN}.bin
|
||||
|
||||
flash: $FN.bin
|
|
@ -0,0 +1,3 @@
|
|||
set_io --warn-no-port if_int 32
|
||||
|
||||
set_io --warn-no-port clk 20
|
|
@ -0,0 +1,13 @@
|
|||
module bldc (
|
||||
input clk,
|
||||
output if_int
|
||||
);
|
||||
|
||||
reg tmp = 0;
|
||||
assign if_int = tmp;
|
||||
|
||||
always @(posedge clk) begin
|
||||
tmp <= ~tmp;
|
||||
end
|
||||
|
||||
endmodule
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
flashrom -p ft2232_spi:type=232H,port=A
|
|
@ -0,0 +1,131 @@
|
|||
#!/bin/bash
|
||||
# Script by Al Williams (Hackaday)
|
||||
|
||||
#### Things you might want to change:
|
||||
#### Note that none of these will clobber what's already there
|
||||
#### In the environment/env file/command line
|
||||
|
||||
# Note: Yosys chokes on spaces in library directories (reported to yosys)
|
||||
# Library path if not overriden (environment)
|
||||
DEF_YOSYS_LIBDIR=".:library"
|
||||
# Default yosys options
|
||||
DEF_YOSYS_OPTS=
|
||||
# Default read_verilog options
|
||||
DEF_YOSYS_V_OPTS=-noautowire
|
||||
# default Arachne-pnr options
|
||||
DEF_ARACHNE_OPTS=-d\ 1k
|
||||
# default icetime options
|
||||
DEF_ICETIME_OPTS=-d\ hx1k
|
||||
# default project name
|
||||
DEF_YOSYS_PROJECT=
|
||||
|
||||
# You probably don't need to change much below this line
|
||||
|
||||
# for -n option. Put it here so you can override the default
|
||||
# in the env file but that's not likely to happen
|
||||
PROG=1
|
||||
|
||||
# Set per directory defaults
|
||||
# look for ice40flow.env in current directory
|
||||
if [ -f ice40flow.env ]
|
||||
then
|
||||
# Note that if you want to not clobber existing environment
|
||||
# You should set the DEF_ variables from above
|
||||
# If you set the others you will override command line/user environment
|
||||
# which is probably not what you want
|
||||
source ice40flow.env
|
||||
fi
|
||||
|
||||
|
||||
# Note: Yosys chokes on spaces in library directories (reported to yosys)
|
||||
# Library path if not overriden (environment)
|
||||
YOSYS_LIBDIR=${YOSYS_LIBDIR:-$DEF_YOSYS_LIBDIR}
|
||||
# Default yosys options
|
||||
YOSYS_OPTS=${YOSYS_OPTS:-$DEF_YOSYS_OPTS}
|
||||
# Default read_verilog options
|
||||
YOSYS_V_OPTS=${YOSYS_V_OPTS:-$DEF_YOSYS_V_OPTS}
|
||||
# default Arachne-pnr options
|
||||
ARACHNE_OPTS=${ARACHNE_OPTS:-$DEF_ARACHNE_OPTS}
|
||||
# default icetime options
|
||||
ICETIME_OPTS=${ICETIME_OPTS:-$DEF_ICETIME_OPTS}
|
||||
# Default project
|
||||
YOSYS_DEFPROJECT=${YOSYS_DEFPROJECT:-$DEF_YOSYS_PROJECT}
|
||||
|
||||
|
||||
|
||||
|
||||
# Handle -n options (didn't use getopts for one option)
|
||||
# Note the default is set before reading env
|
||||
# so if you wanted to never program you could
|
||||
# set PROG=0 in the env file
|
||||
# but there would be no good way to override
|
||||
# Maybe put PROG=${PROG:-0} so you could say
|
||||
# PROG=1 ice40flow to program? I don't know...
|
||||
if [ "$1" == "-n" ]
|
||||
then
|
||||
PROG=0
|
||||
shift
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# If you provide project name in environment we will
|
||||
# use that unless you provide the name on the command line
|
||||
# No project is an error
|
||||
FN=${1-$YOSYS_DEFPROJECT}
|
||||
if [ ! -z "$FN" -a ! -f "$FN.v" ]
|
||||
then
|
||||
echo 1>&2 "Can't find $FN.v"
|
||||
unset FN
|
||||
fi
|
||||
|
||||
if [ -z "$FN" ]
|
||||
then
|
||||
echo 1>&2 "Usage: ice40flow [-n] project"
|
||||
echo 1>&2 " -n = Do not program device"
|
||||
echo 1>&2 " Note: project name of foo implies foo.v exists"
|
||||
echo 1>&2 " do not supply the .v suffix on the project name"
|
||||
echo 1>&2 " You can set the following options in the environment or in ice40flow.env:"
|
||||
echo 1>&2 " YOSYS_DEFPROJECT = default project name if not specified on command line"
|
||||
echo 1>&2 " YOSYS_LIBDIR = Colon separated directories to search (no spaces)"
|
||||
echo 1>&2 " YOSYS_OPTS = Options to pass to yosys (try -Qq for quiet output)"
|
||||
echo 1>&2 " YOSYS_V_OPTS = Options to pass to yosys read_verilog (default -noautowire)"
|
||||
echo 1>&2 " ARACHNE_OPTS = Options to pass to Arachne-pnr (default -d 1k)"
|
||||
echo 1>&2 " ICETIME_OPTS = Options to pass to icetime (default -d hx1k)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# temporary test to warn people about Yosys not liking spaces in the libdir
|
||||
if [[ "$YOSYS_LIBDIR" =~ " " ]]
|
||||
then
|
||||
echo 1>&2 "Error: Yosys currently won't accept spaces in library directory names!"
|
||||
echo 1>&2 "Please change the library path and try again."
|
||||
exit 99
|
||||
fi
|
||||
|
||||
if [[ "$FN" =~ " " ]]
|
||||
then
|
||||
echo 1>&2 "Error: Please do not use spaces in the project name!"
|
||||
exit 98
|
||||
fi
|
||||
|
||||
|
||||
|
||||
yosys $YOSYS_OPTS <<EOF~
|
||||
read_verilog $YOSYS_V_OPTS "$FN.v"
|
||||
$( IFS=':'; for LD in $YOSYS_LIBDIR; do echo hierarchy -libdir $LD ; done )
|
||||
synth_ice40 -blif $FN.blif
|
||||
EOF~
|
||||
if [ $? != 0 ]
|
||||
then exit
|
||||
fi
|
||||
if ! arachne-pnr $ARACHNE_OPTS -p "$FN.pcf" -o "$FN.txt" "$FN.blif"
|
||||
then exit
|
||||
fi
|
||||
icetime $ICETIME_OPTS -p "$FN.pcf" -mtr "$FN.rpt" "$FN.txt"
|
||||
icepack $FN.txt $FN.bin
|
||||
if [ $PROG == 1 ]
|
||||
then iceprog $FN.bin
|
||||
else
|
||||
echo 1>&2 "Programming disabled by -n option"
|
||||
fi
|
|
@ -0,0 +1,12 @@
|
|||
# Generally, you want to only set DEF_xxx variables here
|
||||
# unless you really mean to override the user's environment
|
||||
|
||||
# DEF_YOSYS_LIBDIR = Default library path (colon separated directories; default .:library)
|
||||
# DEF_YOSYS_OPTS = Default yosys command line options (default none)
|
||||
# DEF_YOSYS_V_OPTS = Default yosys read_verilog options (default -noautowire)
|
||||
# DEF_ARACHNE_OPTS = Default arachne-pnr options (default -d 1k)
|
||||
# DEF_ICETIME_OPTS = Default icetime options (default -d hx1k)
|
||||
# DEF_YOSYS_PROJECT = Default project name (default none)
|
||||
|
||||
DEF_YOSYS_PROJECT=top
|
||||
DEF_YOSYS_OPTS=-qQ
|
|
@ -0,0 +1,15 @@
|
|||
#!/bin/bash
|
||||
|
||||
YOSYS_LIBDIR=".:library"
|
||||
YOSYS_OPTS=
|
||||
YOSYS_V_OPTS=-noautowire
|
||||
|
||||
FN=$1
|
||||
|
||||
yosys ${YOSYS_OPTS} <<EOF~
|
||||
read_verilog ${YOSYS_V_OPTS} "${FN}.v"
|
||||
$( IFS=':'; for LD in ${YOSYS_LIBDIR}; do echo hierarchy -libdir ${LD} ; done )
|
||||
synth_ice40 -top ${FN} -json ${FN}.json
|
||||
EOF~
|
||||
|
||||
|
Loading…
Reference in New Issue