Skip to content

Commit

Permalink
Set snapshot dir to a known location in FuseSoC SweRV config generator
Browse files Browse the repository at this point in the history
The previous fix for the FuseSoC SweRV config generator was not complete
  • Loading branch information
olofk committed Sep 24, 2020
1 parent 1e8c6e3 commit 801d0f6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions configs/swerv_config_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,17 @@

class SwervConfigGenerator(Generator):
def run(self):
build_path="swerv_config"
script_root = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), '..'))
files = [
{"snapshots/default/common_defines.vh" : {
{os.path.join(build_path, "common_defines.vh") : {
"copyto" : "config/common_defines.vh",
"file_type" : "systemVerilogSource"}},
{"snapshots/default/pic_ctrl_verilator_unroll.sv" : {
{os.path.join(build_path, "pic_ctrl_verilator_unroll.sv") : {
"copyto" : "config/pic_ctrl_verilator_unroll.sv",
"is_include_file" : True,
"file_type" : "systemVerilogSource"}},
{"snapshots/default/pic_map_auto.h" : {
{os.path.join(build_path, "pic_map_auto.h") : {
"copyto" : "config/pic_map_auto.h",
"is_include_file" : True,
"file_type" : "systemVerilogSource"}}]
Expand All @@ -33,6 +34,7 @@ def run(self):

env = os.environ.copy()
env['RV_ROOT'] = tmp_dir
env['BUILD_PATH'] = build_path
args = ['configs/swerv.config'] + self.config.get('args', [])
rc = subprocess.call(args, cwd=cwd, env=env, stdout=devnull)
if rc:
Expand Down

0 comments on commit 801d0f6

Please sign in to comment.