Skip to content

Instantly share code, notes, and snippets.

@arjenroodselaar
Created October 13, 2017 18:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arjenroodselaar/bc84d7a4a68cee5dec2e0f29edf55fba to your computer and use it in GitHub Desktop.
Save arjenroodselaar/bc84d7a4a68cee5dec2e0f29edf55fba to your computer and use it in GitHub Desktop.
Buck macros for Icarus Verilog
def verilog_module(**kwargs):
export_file(**kwargs)
def verilog_test(**kwargs):
genrule(
name = kwargs['name'],
srcs = kwargs.get('srcs', []),
out = kwargs['name'],
cmd = 'iverilog -g2012 -Wall -Wno-timescale -o $OUT {deps} $SRCS'.format(
deps = ' '.join([
'$(location {})'.format(dep) for dep in kwargs.get('deps', [])
])
),
executable = True,
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment