Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippvK committed Feb 16, 2024
1 parent ff225f1 commit d0617b8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
4 changes: 3 additions & 1 deletion seal5/backends/riscv_isa_info/writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ def gen_riscv_isa_info_str(name: str, ext_settings: ExtensionsSettings):
print("ext_settings", ext_settings)
arch = ext_settings.get_arch(name=name)
version = ext_settings.get_version()
assert isinstance(version, float)
if not isinstance(version, str):
assert isinstance(version, (int, float))
version = str(float(version))
version_major, version_minor = str(version).split(".", 1)

content_template = Template(MAKO_TEMPLATE)
Expand Down
2 changes: 1 addition & 1 deletion seal5/flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -1267,7 +1267,7 @@ def generate(self, verbose: bool = False):
if "riscv_features" not in skip:
self.gen_riscv_features_patch()
if "riscv_isa_infos" not in skip:
self.gen_riscv_isa_infos_patch()
self.gen_riscv_isa_info_patch()
# if "subtarget_tests" not in skip:
# patches.extend(self.gen_subtarget_tests_patches())

Expand Down
6 changes: 6 additions & 0 deletions seal5/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,12 @@ class ExtensionsSettings(YAMLSettings):
instructions: Optional[List[str]] = None
# patches

def get_version(self):
if self.version:
return self.version
else:
return "1.0"

def get_description(self, name: Optional[str] = None):
if self.description is None:
if name:
Expand Down

0 comments on commit d0617b8

Please sign in to comment.