-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New: Add ASIC synthesis flow, run in CI flow
Change: Add details in the various README
- Loading branch information
Showing
11 changed files
with
206 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
*.v | ||
*.log | ||
*.history |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Synthesis | ||
|
||
This folder contains basic synthesis scripts using Yosys. | ||
|
||
To run them: | ||
|
||
```bash | ||
|
||
# To run AXI4 crossbar | ||
./syn_asic.sh axicb_axi4.ys | ||
|
||
# To run AXI4-lite crossbar | ||
./syn_asic.sh axicb_axi4lite.ys | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# read design modules | ||
read -incdir ../../rtl | ||
read -sv2012 ../../rtl/axicb_checker.sv | ||
read -sv2012 ../../rtl/axicb_crossbar_lite_top.sv | ||
read -sv2012 ../../rtl/axicb_crossbar_top.sv | ||
read -sv2012 ../../rtl/axicb_mst_if.sv | ||
read -sv2012 ../../rtl/axicb_mst_switch.sv | ||
read -sv2012 ../../rtl/axicb_pipeline.sv | ||
read -sv2012 ../../rtl/axicb_round_robin.sv | ||
read -sv2012 ../../rtl/axicb_round_robin_core.sv | ||
read -sv2012 ../../rtl/axicb_scfifo.sv | ||
read -sv2012 ../../rtl/axicb_scfifo_ram.sv | ||
read -sv2012 ../../rtl/axicb_slv_if.sv | ||
read -sv2012 ../../rtl/axicb_slv_switch.sv | ||
read -sv2012 ../../rtl/axicb_switch_top.sv | ||
|
||
# synthesize the core | ||
synth -top axicb_crossbar_top | ||
|
||
# convert design to (logical) gate-level netlists | ||
# +/adff2dff.v convert async reset to sync reset, used to mapp FFD correctly | ||
techmap +/adff2dff.v; opt | ||
# dffunmap | ||
|
||
# map internal register types to the ones from the cell library | ||
dfflibmap -liberty cmos.lib | ||
|
||
# use ABC to map remaining logic to cells from the cell library | ||
abc -liberty cmos.lib | ||
|
||
# cleanup | ||
clean | ||
|
||
# write synthesized design | ||
write_verilog axicb_crossbar_top.v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# read design modules | ||
read -incdir ../../rtl | ||
|
||
read -sv2012 ../../rtl/axicb_checker.sv | ||
read -sv2012 ../../rtl/axicb_crossbar_lite_top.sv | ||
read -sv2012 ../../rtl/axicb_crossbar_top.sv | ||
read -sv2012 ../../rtl/axicb_mst_if.sv | ||
read -sv2012 ../../rtl/axicb_mst_switch.sv | ||
read -sv2012 ../../rtl/axicb_pipeline.sv | ||
read -sv2012 ../../rtl/axicb_round_robin.sv | ||
read -sv2012 ../../rtl/axicb_round_robin_core.sv | ||
read -sv2012 ../../rtl/axicb_scfifo.sv | ||
read -sv2012 ../../rtl/axicb_scfifo_ram.sv | ||
read -sv2012 ../../rtl/axicb_slv_if.sv | ||
read -sv2012 ../../rtl/axicb_slv_switch.sv | ||
read -sv2012 ../../rtl/axicb_switch_top.sv | ||
|
||
# synthesize the core | ||
synth -top axicb_crossbar_lite_top | ||
|
||
# convert design to (logical) gate-level netlists | ||
# +/adff2dff.v convert async reset to sync reset, used to mapp FFD correctly | ||
techmap +/adff2dff.v; opt | ||
# dffunmap | ||
|
||
# map internal register types to the ones from the cell library | ||
dfflibmap -liberty cmos.lib | ||
|
||
# use ABC to map remaining logic to cells from the cell library | ||
abc -liberty cmos.lib | ||
|
||
# cleanup | ||
clean | ||
|
||
# write synthesized design | ||
write_verilog axicb_crossbar_lite_top.v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
// test comment | ||
/* test comment */ | ||
library(demo) { | ||
cell(BUF) { | ||
area: 6; | ||
pin(A) { direction: input; } | ||
pin(Y) { direction: output; | ||
function: "A"; } | ||
} | ||
cell(NOT) { | ||
area: 3; | ||
pin(A) { direction: input; } | ||
pin(Y) { direction: output; | ||
function: "A'"; } | ||
} | ||
cell(NAND) { | ||
area: 4; | ||
pin(A) { direction: input; } | ||
pin(B) { direction: input; } | ||
pin(Y) { direction: output; | ||
function: "(A*B)'"; } | ||
} | ||
cell(NOR) { | ||
area: 4; | ||
pin(A) { direction: input; } | ||
pin(B) { direction: input; } | ||
pin(Y) { direction: output; | ||
function: "(A+B)'"; } | ||
} | ||
cell(DFF) { | ||
area: 18; | ||
ff(IQ, IQN) { clocked_on: C; | ||
next_state: D; } | ||
pin(C) { direction: input; | ||
clock: true; } | ||
pin(D) { direction: input; } | ||
pin(Q) { direction: output; | ||
function: "IQ"; } | ||
} | ||
cell(DFFSR) { | ||
area: 18; | ||
ff("IQ", "IQN") { clocked_on: C; | ||
next_state: D; | ||
preset: S; | ||
clear: R; } | ||
pin(C) { direction: input; | ||
clock: true; } | ||
pin(D) { direction: input; } | ||
pin(Q) { direction: output; | ||
function: "IQ"; } | ||
pin(S) { direction: input; } | ||
pin(R) { direction: input; } | ||
; // empty statement | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/usr/bin/env bash | ||
|
||
# -e: exit if one command fails | ||
# -o pipefail: causes a pipeline to fail if any command fails | ||
set -e -o pipefail | ||
|
||
design="./axicb_axi4.ys" | ||
|
||
# Check if a design is specified | ||
if [[ -n $1 ]]; then | ||
echo "INFO: will start $1 synthesis" | ||
design="$1" | ||
fi | ||
|
||
echo "INFO: Start synthesis flow" | ||
yosys -V | ||
|
||
yosys "$design" | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters