Skip to content

Commit

Permalink
Renamed 'imp' to 'pnr' as discussed in #5
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigomelo9 committed Jul 22, 2021
1 parent 198e05b commit 62a0697
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 37 deletions.
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ help:
snippets:
@echo "Generating $@"
@symbiflow -h > help.txt
@for cmd in all syn imp bit pgm; do \
@for cmd in all syn pnr bit pgm; do \
symbiflow $$cmd -h > help-$$cmd.txt ; \
done
@echo "$@ generated"
Expand Down
2 changes: 1 addition & 1 deletion docs/devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def gen_file(filename, default, families, packages):
part = "{}-{}".format(family, package)
obj.set_part(part)
try:
obj.implementation()
obj.pnr()
parts.append(part)
except:
print('Unsupported part {}'.format(part))
Expand Down
4 changes: 2 additions & 2 deletions docs/user-guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ symbiflow syn

.. literalinclude:: help-syn.txt

symbiflow imp
symbiflow pnr
-------------

.. literalinclude:: help-imp.txt
.. literalinclude:: help-pnr.txt

symbiflow bit
-------------
Expand Down
18 changes: 9 additions & 9 deletions examples/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ VLOGDIR = ../resources/verilog
CONSDIR = ../resources/constraints/$(BOARD)


test: all syn imp bit
test: all syn pnr bit

#
# Complete flow examples
Expand All @@ -21,7 +21,7 @@ all: all-ice40
all-ice40:
symbiflow all --oci-engine $(ENGINE) --part $(ICE40) \
--vlog $(VLOGDIR)/blink.v \
--icf $(CONSDIR)/clk.pcf $(CONSDIR)/led.pcf \
--pcf $(CONSDIR)/clk.pcf $(CONSDIR)/led.pcf \
--top Blink -o build-ice40 --project ice40

#
Expand Down Expand Up @@ -99,18 +99,18 @@ syn-ecp5:
--top Blink -o build-ecp5 --project ecp5

#
# Implementation examples
# Place and Route examples
#

imp: imp-ice40 imp-ecp5
pnr: pnr-ice40 pnr-ecp5

imp-ice40:
symbiflow imp --oci-engine $(ENGINE) --part $(ICE40) \
--icf $(CONSDIR)/clk.pcf $(CONSDIR)/led.pcf \
pnr-ice40:
symbiflow pnr --oci-engine $(ENGINE) --part $(ICE40) \
--pcf $(CONSDIR)/clk.pcf $(CONSDIR)/led.pcf \
-o build-ice40 --project ice40

imp-ecp5:
symbiflow imp --oci-engine $(ENGINE) --part $(ECP5) \
pnr-ecp5:
symbiflow pnr --oci-engine $(ENGINE) --part $(ECP5) \
-o build-ecp5 --project ecp5

#
Expand Down
2 changes: 1 addition & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ bash icestick.sh program

```bash
make syn-ice40
make imp-ice40
make pnr-ice40
make bit-ice40
make pgm-ice40
```
Expand Down
8 changes: 4 additions & 4 deletions examples/icestick.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ symbiflow syn --oci-engine docker --part hx1k-tq144 \
--vlog ../resources/verilog/blink.v \
--top Blink -o build-icestick --project icestick

echo "Implementation"
echo "Place and Route"

symbiflow imp --oci-engine docker --part hx1k-tq144 \
--icf ../resources/constraints/icestick/clk.pcf ../resources/constraints/icestick/led.pcf \
symbiflow pnr --oci-engine docker --part hx1k-tq144 \
--pcf ../resources/constraints/icestick/clk.pcf ../resources/constraints/icestick/led.pcf \
-o build-icestick --project icestick

echo "Bitstream generation"
Expand All @@ -28,7 +28,7 @@ echo "From Synthesis to Bitstream generation in one step (VHDL)"

symbiflow all --oci-engine docker --part hx1k-tq144 \
--vhdl ../resources/vhdl/blink.vhdl \
--icf ../resources/constraints/icestick/clk.pcf ../resources/constraints/icestick/led.pcf \
--pcf ../resources/constraints/icestick/clk.pcf ../resources/constraints/icestick/led.pcf \
--top Blink -o build-icestick --project icestick

if [ "$1" == "program" ]; then
Expand Down
28 changes: 14 additions & 14 deletions symbiflow/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

_ALL_DESC = 'Performs from synthesis to bitstream generation'
_SYN_DESC = 'Performs synthesis'
_IMP_DESC = 'Performs implementation'
_PNR_DESC = 'Performs place and route'
_BIT_DESC = 'Performs bitstream generation'
_PGM_DESC = 'Performs programming'

Expand All @@ -31,7 +31,7 @@
_DEF_OCI_VOLUMES = ['$HOME:$HOME']
_DEF_OCI_WORK = '$PWD'

_COMMANDS = ['all', 'syn', 'imp', 'bit', 'pgm']
_COMMANDS = ['all', 'syn', 'pnr', 'bit', 'pgm']


# pylint: disable=too-many-statements
Expand Down Expand Up @@ -154,14 +154,14 @@ def main():
help='Synthesis Constraint Files'
)

# Arguments for implementation
# Arguments for pnr

args_for_imp = argparse.ArgumentParser(add_help=False)
args_for_imp.add_argument(
'--icf',
args_for_pnr = argparse.ArgumentParser(add_help=False)
args_for_pnr.add_argument(
'--pcf',
metavar='FILE',
nargs='+',
help='Implementation Constraint Files'
help='Physical Constraint Files'
)

#
Expand All @@ -188,7 +188,7 @@ def main():
'all',
description=_ALL_DESC,
help=_ALL_DESC,
parents=[args_for_syn, args_for_imp, args_shared]
parents=[args_for_syn, args_for_pnr, args_shared]
)

subparsers.add_parser(
Expand All @@ -199,10 +199,10 @@ def main():
)

subparsers.add_parser(
'imp',
description=_IMP_DESC,
help=_IMP_DESC,
parents=[args_for_imp, args_shared]
'pnr',
description=_PNR_DESC,
help=_PNR_DESC,
parents=[args_for_pnr, args_shared]
)

subparsers.add_parser(
Expand Down Expand Up @@ -249,8 +249,8 @@ def main():
if args.command in ['all', 'syn']:
prj.synthesis(args.top, args.vhdl, args.vlog, args.slog, args.scf,
args.param, args.arch, args.define, args.include)
if args.command in ['all', 'imp']:
prj.implementation(args.icf)
if args.command in ['all', 'pnr']:
prj.pnr(args.pcf)
if args.command in ['all', 'bit']:
prj.bitstream()
if args.command == 'pgm':
Expand Down
10 changes: 5 additions & 5 deletions symbiflow/symbiflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,18 +162,18 @@ def _vhdl_options(self, arch, param):
)]
return options

def implementation(self, icf=None):
"""Performs implementation.
def pnr(self, pcf=None):
"""Performs Place and Route.
:param icf: Implementation Constraint Files
:type icf: list
:param pcf: Physical Constraint Files
:type pcf: list
"""
family = self.part['family']
if family == 'ice40':
ext = 'pcf'
else: # family == 'ecp5'
ext = 'lpf'
self._create_constraint(icf, ext)
self._create_constraint(pcf, ext)
# Prepare and run P&R
cmd = _template('nextpnr-{}'.format(family)).format(
command=self.oci.get_command('nextpnr-{}'.format(family)),
Expand Down

0 comments on commit 62a0697

Please sign in to comment.