Skip to content

Commit

Permalink
Merge pull request #391 from coldav/colin/fix_cookie_atomic64
Browse files Browse the repository at this point in the history
Cookie changes required to build offline including atomic64
  • Loading branch information
coldav authored Mar 5, 2024
2 parents 636d252 + fd21edb commit a7cd218
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
3 changes: 3 additions & 0 deletions modules/mux/cookie/hooks/post_gen_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ def copy_file_replace_riscv(src_dir, src_file, dst_dir, dst_file=None):
line = ("/// Copyright (C) Codeplay Software Limited. All Rights Reserved.\n")
if "{{cookiecutter.copyright_name}}" != "":
line += ("/// Additional changes Copyright (C) {{cookiecutter.copyright_name}}. All Rights\n/// Reserved.\n")
# Replace 64 bit for device_info.cpp since we currently copy risc-v base file
if "{{cookiecutter.capabilities_atomic64}}" == "false" and "device_info.cpp" in src_path:
line = line.replace(" | mux_atomic_capabilities_64bit", "")
fout.write(line)
#close input and output files
fin.close()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,7 @@ target_link_libraries({{cookiecutter.target_name}}
PUBLIC
cargo
tracer
compiler-pipeline
compiler-binary-metadata
utils
md_handler
)
target_link_libraries({{cookiecutter.target_name}} PUBLIC loader)
if(NOT CA_HAL_{{cookiecutter.target_name_capitals}}_NAME STREQUAL "" AND TARGET "hal_${CA_HAL_{{cookiecutter.target_name_capitals}}_NAME}")
Expand All @@ -152,6 +150,9 @@ if({{cookiecutter.target_name_capitals}}_32_BITS)
else()
list(APPEND {{cookiecutter.target_name}}Capabilities "64bit")
endif()
{%- if cookiecutter.capabilities_atomic64 == "true" %}
list(APPEND {{cookiecutter.target_name}}Capabilities "atomic64")
{%- endif %}

if({{cookiecutter.target_name_capitals}}_FP64)
list(APPEND {{cookiecutter.target_name}}Capabilities "fp64")
Expand Down
1 change: 1 addition & 0 deletions scripts/create_target.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"bit_width" : 32 or 64 bits.
"capabilities_fp16" : true if has fp16 capability else false.
"capabilities_fp64" : true if has fp64 capability else false.
"capabilities_atomic64" : true if has atomic64 capability else false (true default).
"feature" : A list of features (normally tutorials) to enable as a ';' separated string
Tutorials can be part finished e.g. clmul_1 or just clmul
Current list is "replace_mem", "refsi_wrapper_pass" and "clmul"
Expand Down
1 change: 1 addition & 0 deletions scripts/default_target_cookie.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"bit_width": "64",
"capabilities_fp16": "false",
"capabilities_fp64": "true",
"capabilities_atomic64": "true",
"feature" : "",
"copyright_name" : ""
}

0 comments on commit a7cd218

Please sign in to comment.