Skip to content

Commit

Permalink
Add core filename to output of fusesoc core show.
Browse files Browse the repository at this point in the history
This commit updates the output of `fusesoc core show` to add the
filename of the core file itself. This change is required for tools such
as the filelist Edalize backend as discussed in
olofk/edalize#25.

The output of `fusesoc core show` now looks like:

CORE INFO
Name:        vee:el:en:vee
Description: Top bombing
Core root:   /root/path/to/core/file
Core file:   basename.core
  • Loading branch information
shareefj committed Aug 31, 2023
1 parent 74a4fa1 commit 01378fa
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions fusesoc/capi2/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ def __init__(

self.cache_root = cache_root

basename = os.path.basename(self.core_file)

self.core_basename = os.path.basename(self.core_file)
self.core_root = os.path.dirname(self.core_file)

# Populated by CoreDB._solve(). TODO: Find a better solution for that.
Expand Down Expand Up @@ -516,6 +515,7 @@ def info(self):
Name: {}
Description: {}
Core root: {}
Core file: {}
Targets:
{}"""
Expand All @@ -539,6 +539,7 @@ def info(self):
str(self.name),
str(self.get_description() or "<No description>"),
str(self.core_root),
str(self.core_basename),
targets,
)

Expand Down

0 comments on commit 01378fa

Please sign in to comment.