Skip to content

Commit

Permalink
Add a Vivado Elaboration example (using hooks)
Browse files Browse the repository at this point in the history
Closes #39
  • Loading branch information
rodrigomelo9 committed Aug 11, 2024
1 parent e1c6ebf commit e0943bd
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions examples/hooks/vivado-elab.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
"""Vivado elaboration example."""

from pyfpga.vivado import Vivado


prj = Vivado()

prj.set_part('xc7z010-1-clg400')

prj.add_param('FREQ', '125000000')
prj.add_param('SECS', '1')
prj.add_define('DEFINE1', '1')
prj.add_define('DEFINE2', '1')

prj.add_include('../sources/slog/include1')
prj.add_include('../sources/slog/include2')
prj.add_slog('../sources/slog/*.sv')

prj.set_top('Top')

prj.add_hook('presyn', 'synth_design -rtl -rtl_skip_mlo; exit 0')

prj.make()

0 comments on commit e0943bd

Please sign in to comment.