Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add vivado vlog support#100

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
fr89k wants to merge5 commits intosuoto:master
base:master
Choose a base branch
Loading
fromfr89k:add-vivado-vlog-support
Open
Changes from1 commit
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
PrevPrevious commit
NextNext commit
Fixing pylint problems in xsim builder
  • Loading branch information
Arne Kreddig committedJan 27, 2023
commitab4cf0f80480364fb6fb974df57a6680e4ee6eed
25 changes: 13 additions & 12 deletionshdl_checker/builders/xsim.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -22,14 +22,14 @@
import tempfile
from typing import Iterable, Mapping, Optional

from .base_builder import BaseBuilder

from hdl_checker.diagnostics import BuilderDiag, DiagType
from hdl_checker.parsers.elements.identifier import Identifier
from hdl_checker.path import Path
from hdl_checker.types import BuildFlags, FileType
from hdl_checker.utils import runShellCommand

from .base_builder import BaseBuilder

_ITER_REBUILD_UNITS = re.compile(
r"ERROR:\s*\[[^\]]*\]\s*"
r"'?.*/(?P<library_name>\w+)/(?P<unit_name>\w+)\.vdb'?"
Expand DownExpand Up@@ -74,10 +74,11 @@ def _shouldIgnoreLine(self, line):
def __init__(self, *args, **kwargs):
# type: (...) -> None
self._version = ""
super(XSIM, self).__init__(*args, **kwargs)
super().__init__(*args, **kwargs)
self._xsimini = p.join(self._work_folder, ".xsim.init")
# Create the ini file
open(self._xsimini, "w").close()
with open(self._xsimini, "w", encoding="utf8"):
pass

def _makeRecords(self, line):
# type: (str) -> Iterable[BuilderDiag]
Expand DownExpand Up@@ -125,7 +126,7 @@ def _checkEnvironment(self):
)
self._version = re.findall(r"^Vivado Simulator\s+([\d\.]+)", stdout[0])[0]
self._logger.info(
"xvhdl version string: '%s'." "Version number is '%s'",
"xvhdl version string: '%s'. Version number is '%s'",
stdout[:-1],
self._version,
)
Expand All@@ -144,26 +145,26 @@ def isAvailable():

def _createLibrary(self, library):
# type: (Identifier) -> None
with open(self._xsimini, mode="w") as fd:
with open(self._xsimini, mode="w", encoding="utf8") as fd:
content = "\n".join(
[
"%s=%s" %(x,p.join(self._work_folder, x.name))
f"{x}=%s" % p.join(self._work_folder, x.name)
for x in self._added_libraries
]
)
fd.write(content)

def _buildSource(self, path, library, flags=None):
# type: (Path, Identifier, Optional[BuildFlags]) -> Iterable[str]
xsimCmd = None
xsim_cmd = None
filetype = FileType.fromPath(path)
if filetype == FileType.vhdl:
xsimCmd = "xvhdl"
xsim_cmd = "xvhdl"
if filetype in (FileType.verilog, FileType.systemverilog):
xsimCmd = "xvlog"
assert( xsimCmd != None )
xsim_cmd = "xvlog"
assert xsim_cmd is not None
cmd = [
xsimCmd,
xsim_cmd,
"--nolog",
"--verbose",
"0",
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp