ls2: add support for the Nexys Video board
[ls2.git] / src / icarusversa.py
1 from nmigen_boards.versa_ecp5 import VersaECP5Platform
2 from nmigen.build import TemplatedPlatform
3
4
5 # override Versa platform behaviour to output nothing but the ilang.
6 # this can then be used
7 class IcarusVersaPlatform(VersaECP5Platform):
8 @property
9 def required_tools(self):
10 return ["yosys"]
11
12 @property
13 def file_templates(self):
14 return {
15 **TemplatedPlatform.build_script_templates,
16 "{{name}}.il": r"""
17 # {{autogenerated}}
18 {{emit_rtlil()}}
19 """,
20 }
21
22 @property
23 def command_templates(self):
24 return []