Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding autoname and opt_clean -purge Yosys pass to synth.tcl #183

Merged
merged 1 commit into from
Sep 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions synthesis/synth.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,22 @@ hierarchy -check -top $top
yosys proc -nomux
yosys proc_mux
yosys flatten

# Remove internal only aliases for public nets and then give created instances
# useful names. At this stage it is mainly flipflops created by the `proc`
# pass.
yosys opt_clean -purge
yosys autoname

yosys synth -top $top

# Remove internal only aliases for public nets and then give created instances
# useful names. At this stage it is all the other synthesizable constructs.
# This should be done before techmapping where things can be converted
# dramatically and having useful names is helpful for debugging.
yosys opt_clean -purge
yosys autoname

# mapping to liberty
set liberty $::env(LIBERTY)
dfflibmap -liberty $liberty
Expand All @@ -58,6 +72,12 @@ if { [info exists ::env(CLOCK_PERIOD) ] } {
abc -liberty $liberty -dff -g aig
}

# Remove internal only aliases for public nets and then give created instances
# useful names. At this stage it is anything generated by the techmapping
# passes.
yosys opt_clean -purge
yosys autoname

# write synthesized design
set output $::env(OUTPUT)
write_verilog $output
Expand Down
Loading