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
Support verilog and systemverilog in xsim builder
  • Loading branch information
Arne Kreddig committedJan 27, 2023
commit640e7c518811e627d10503b8604722a331d3f9d3
17 changes: 13 additions & 4 deletionshdl_checker/builders/xsim.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -51,12 +51,11 @@


class XSIM(BaseBuilder):
"""Builder implementation of the xvhdl compiler"""
"""Builder implementation of the xvhdland xvlogcompiler"""

# Implementation of abstract class properties
builder_name = "xsim"
# TODO: Add xvlog support
file_types = {FileType.vhdl}
file_types = {FileType.vhdl, FileType.verilog, FileType.systemverilog}

def _shouldIgnoreLine(self, line):
# type: (str) -> bool
Expand DownExpand Up@@ -136,6 +135,7 @@ def isAvailable():
try:
temp_dir = tempfile.mkdtemp()
runShellCommand(["xvhdl", "--nolog", "--version"], cwd=temp_dir)
runShellCommand(["xvlog", "--nolog", "--version"], cwd=temp_dir)
return True
except OSError:
return False
Expand All@@ -155,8 +155,15 @@ def _createLibrary(self, library):

def _buildSource(self, path, library, flags=None):
# type: (Path, Identifier, Optional[BuildFlags]) -> Iterable[str]
xsimCmd = None
filetype = FileType.fromPath(path)
if filetype == FileType.vhdl:
xsimCmd = "xvhdl"
if filetype in (FileType.verilog, FileType.systemverilog):
xsimCmd = "xvlog"
assert( xsimCmd != None )
cmd = [
"xvhdl",
xsimCmd,
"--nolog",
"--verbose",
"0",
Expand All@@ -165,6 +172,8 @@ def _buildSource(self, path, library, flags=None):
"--work",
library.name,
]
if filetype == FileType.systemverilog:
cmd += ["-sv"]
cmd += [str(x) for x in (flags or [])]
cmd += [path.name]
return runShellCommand(cmd, cwd=self._work_folder)
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp