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

Fix efinity tool #407

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
67 changes: 67 additions & 0 deletions edalize/efinity.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Copyright edalize contributors
# Licensed under the 2-Clause BSD License, see LICENSE for details.
# SPDX-License-Identifier: BSD-2-Clause

import logging
import os.path
import platform
import re
import subprocess

from edalize.edatool import Edatool
from edalize.flows.efinity import Efinity as Efinity_underlying

logger = logging.getLogger(__name__)


class Efinity(Edatool):
"""
Efinity Backend.

A core (usually the system core) can add the following files:

* Standard design sources
* Constraints
"""

argtypes = ["vlogdefine", "vlogparam", "generic"]

@classmethod
def get_doc(cls, api_ver):
if api_ver == 0:
return {
"description": "The Efinity backend executes Efinity to build systems and program the FPGA",
"members": [
{
"name": "family",
"type": "String",
"desc": "Accepted is Trion and Titanium (default)",
},
{
"name": "part",
"type": "String",
"desc": "FPGA part number (e.g. Ti180M484)",
},
{
"name": "timing",
"type": "String",
"desc": "Speed grade (e.g. C4)",
},
],
}

def __init__(self, edam=None, work_root=None, eda_api=None, verbose=True):
super().__init__(edam, work_root, eda_api, verbose)
# edam["flow_options"] = edam["tool_options"]["efinity"]
self.efinity = Efinity_underlying(edam, work_root, verbose)

def configure_main(self):
self.efinity.configure()

def build_main(self):
"""
Synthesize and place
"""
logger.info("Building")
args = []
self._run_tool("make", args)
1 change: 0 additions & 1 deletion edalize/flows/efinity.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ def get_flow_options(cls):
@classmethod
def get_tool_options(cls, flow_options):
flow = flow_options.get("frontends", []).copy() + ["efinity"]

return cls.get_filtered_tool_options(flow, cls.FLOW_DEFINED_TOOL_OPTIONS)

def configure_flow(self, flow_options):
Expand Down