FreeCalypso > hg > fc-sim-sniff
annotate fpga/tools/yosys-tee @ 58:95ed46b5f8f1 default tip
doc/Sniffing-hw-setup: mv-sniffer is here
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Wed, 04 Oct 2023 05:55:09 +0000 |
parents | cbfcc480d61b |
children |
rev | line source |
---|---|
18
af1a9732da1f
FPGA build: include yosys-wrap in this repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 #!/bin/sh |
af1a9732da1f
FPGA build: include yosys-wrap in this repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 |
52
cbfcc480d61b
fpga build: migrate to yosys-tee wrapper
Mychaela Falconia <falcon@freecalypso.org>
parents:
18
diff
changeset
|
3 if [ $# -lt 4 ] |
18
af1a9732da1f
FPGA build: include yosys-wrap in this repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 then |
52
cbfcc480d61b
fpga build: migrate to yosys-tee wrapper
Mychaela Falconia <falcon@freecalypso.org>
parents:
18
diff
changeset
|
5 echo "usage: $0 top-module json-output report-out verilog-src..." 1>&2 |
18
af1a9732da1f
FPGA build: include yosys-wrap in this repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 exit 1 |
af1a9732da1f
FPGA build: include yosys-wrap in this repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 fi |
af1a9732da1f
FPGA build: include yosys-wrap in this repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 |
af1a9732da1f
FPGA build: include yosys-wrap in this repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 top="$1" |
af1a9732da1f
FPGA build: include yosys-wrap in this repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 json="$2" |
52
cbfcc480d61b
fpga build: migrate to yosys-tee wrapper
Mychaela Falconia <falcon@freecalypso.org>
parents:
18
diff
changeset
|
11 report="$3" |
18
af1a9732da1f
FPGA build: include yosys-wrap in this repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 |
af1a9732da1f
FPGA build: include yosys-wrap in this repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 shift |
af1a9732da1f
FPGA build: include yosys-wrap in this repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 shift |
52
cbfcc480d61b
fpga build: migrate to yosys-tee wrapper
Mychaela Falconia <falcon@freecalypso.org>
parents:
18
diff
changeset
|
15 shift |
18
af1a9732da1f
FPGA build: include yosys-wrap in this repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 |
af1a9732da1f
FPGA build: include yosys-wrap in this repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 rm -f "$json" |
52
cbfcc480d61b
fpga build: migrate to yosys-tee wrapper
Mychaela Falconia <falcon@freecalypso.org>
parents:
18
diff
changeset
|
18 yosys -p "synth_ice40 -top $top -json $json" "$@" | tee "$report" |
18
af1a9732da1f
FPGA build: include yosys-wrap in this repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 |
af1a9732da1f
FPGA build: include yosys-wrap in this repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 if [ -f "$json" ] |
af1a9732da1f
FPGA build: include yosys-wrap in this repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 then |
af1a9732da1f
FPGA build: include yosys-wrap in this repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 echo "$json created, declaring success" |
af1a9732da1f
FPGA build: include yosys-wrap in this repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 exit 0 |
af1a9732da1f
FPGA build: include yosys-wrap in this repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
24 else |
af1a9732da1f
FPGA build: include yosys-wrap in this repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
25 echo "$json NOT created, declaring error" |
af1a9732da1f
FPGA build: include yosys-wrap in this repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
26 exit 1 |
af1a9732da1f
FPGA build: include yosys-wrap in this repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
27 fi |