opencos-eda 0.2.48__py3-none-any.whl → 0.2.49__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. opencos/__init__.py +4 -2
  2. opencos/_version.py +10 -7
  3. opencos/commands/flist.py +8 -7
  4. opencos/commands/multi.py +13 -14
  5. opencos/commands/sweep.py +3 -2
  6. opencos/deps/__init__.py +0 -0
  7. opencos/deps/defaults.py +69 -0
  8. opencos/deps/deps_commands.py +419 -0
  9. opencos/deps/deps_file.py +326 -0
  10. opencos/deps/deps_processor.py +670 -0
  11. opencos/deps_schema.py +7 -8
  12. opencos/eda.py +84 -64
  13. opencos/eda_base.py +572 -316
  14. opencos/eda_config.py +80 -14
  15. opencos/eda_extract_targets.py +22 -14
  16. opencos/eda_tool_helper.py +33 -7
  17. opencos/export_helper.py +166 -86
  18. opencos/export_json_convert.py +31 -23
  19. opencos/files.py +2 -1
  20. opencos/hw/__init__.py +0 -0
  21. opencos/{oc_cli.py → hw/oc_cli.py} +9 -4
  22. opencos/names.py +0 -4
  23. opencos/peakrdl_cleanup.py +13 -7
  24. opencos/seed.py +19 -11
  25. opencos/tests/helpers.py +3 -2
  26. opencos/tests/test_deps_helpers.py +35 -32
  27. opencos/tests/test_eda.py +36 -29
  28. opencos/tests/test_eda_elab.py +5 -3
  29. opencos/tests/test_eda_synth.py +1 -1
  30. opencos/tests/test_oc_cli.py +1 -1
  31. opencos/tests/test_tools.py +3 -2
  32. opencos/tools/iverilog.py +2 -2
  33. opencos/tools/modelsim_ase.py +2 -2
  34. opencos/tools/riviera.py +1 -1
  35. opencos/tools/slang.py +1 -1
  36. opencos/tools/surelog.py +1 -1
  37. opencos/tools/verilator.py +1 -1
  38. opencos/tools/vivado.py +1 -1
  39. opencos/tools/yosys.py +4 -3
  40. opencos/util.py +374 -468
  41. opencos/utils/__init__.py +0 -0
  42. opencos/utils/markup_helpers.py +98 -0
  43. opencos/utils/str_helpers.py +111 -0
  44. opencos/utils/subprocess_helpers.py +108 -0
  45. {opencos_eda-0.2.48.dist-info → opencos_eda-0.2.49.dist-info}/METADATA +1 -1
  46. opencos_eda-0.2.49.dist-info/RECORD +88 -0
  47. {opencos_eda-0.2.48.dist-info → opencos_eda-0.2.49.dist-info}/entry_points.txt +1 -1
  48. opencos/deps_helpers.py +0 -1346
  49. opencos_eda-0.2.48.dist-info/RECORD +0 -79
  50. /opencos/{pcie.py → hw/pcie.py} +0 -0
  51. {opencos_eda-0.2.48.dist-info → opencos_eda-0.2.49.dist-info}/WHEEL +0 -0
  52. {opencos_eda-0.2.48.dist-info → opencos_eda-0.2.49.dist-info}/licenses/LICENSE +0 -0
  53. {opencos_eda-0.2.48.dist-info → opencos_eda-0.2.49.dist-info}/licenses/LICENSE.spdx +0 -0
  54. {opencos_eda-0.2.48.dist-info → opencos_eda-0.2.49.dist-info}/top_level.txt +0 -0
opencos/tools/riviera.py CHANGED
@@ -11,8 +11,8 @@ import shutil
11
11
  import subprocess
12
12
 
13
13
  from opencos import util
14
- from opencos.util import sanitize_defines_for_sh
15
14
  from opencos.tools.modelsim_ase import ToolModelsimAse, CommandSimModelsimAse
15
+ from opencos.utils.str_helpers import sanitize_defines_for_sh
16
16
 
17
17
  class ToolRiviera(ToolModelsimAse):
18
18
  '''ToolRiviera used by opencos.eda for --tool=riviera'''
opencos/tools/slang.py CHANGED
@@ -10,9 +10,9 @@ import shutil
10
10
  import subprocess
11
11
 
12
12
  from opencos import util
13
- from opencos.util import sanitize_defines_for_sh
14
13
  from opencos.eda_base import Tool
15
14
  from opencos.commands import CommandElab
15
+ from opencos.utils.str_helpers import sanitize_defines_for_sh
16
16
 
17
17
 
18
18
  class ToolSlang(Tool):
opencos/tools/surelog.py CHANGED
@@ -7,9 +7,9 @@ import shutil
7
7
  import subprocess
8
8
 
9
9
  from opencos import util
10
- from opencos.util import sanitize_defines_for_sh
11
10
  from opencos.eda_base import Tool
12
11
  from opencos.commands import CommandElab
12
+ from opencos.utils.str_helpers import sanitize_defines_for_sh
13
13
 
14
14
 
15
15
  class ToolSurelog(Tool):
@@ -10,9 +10,9 @@ import shutil
10
10
  import subprocess
11
11
 
12
12
  from opencos import util
13
- from opencos.util import sanitize_defines_for_sh
14
13
  from opencos.eda_base import Tool
15
14
  from opencos.commands import CommandSim
15
+ from opencos.utils.str_helpers import sanitize_defines_for_sh
16
16
 
17
17
  class ToolVerilator(Tool):
18
18
  '''ToolVerilator used by opencos.eda for --tool=verilator'''
opencos/tools/vivado.py CHANGED
@@ -182,7 +182,7 @@ class CommandSimVivado(CommandSim, ToolVivado):
182
182
  ['./simulate.sh'],
183
183
  ])
184
184
 
185
- util.write_eda_config_and_args(dirpath=self.args['work-dir'], command_obj_ref=self)
185
+ self.write_eda_config_and_args()
186
186
 
187
187
  def compile(self):
188
188
  if self.args['stop-before-compile']:
opencos/tools/yosys.py CHANGED
@@ -9,9 +9,10 @@ import os
9
9
  import shutil
10
10
  import subprocess
11
11
 
12
- from opencos import util
12
+ from opencos import util, eda_config
13
13
  from opencos.eda_base import Tool, get_eda_exec
14
14
  from opencos.commands import CommandSynth, CommandLec
15
+ from opencos.utils.markup_helpers import yaml_safe_load
15
16
 
16
17
 
17
18
  def get_commands_to_run_scriptfiles(
@@ -543,8 +544,8 @@ class CommandLecYosys(CommandLec, ToolYosys):
543
544
  '''Returns the top name given the design number that we synthesized'''
544
545
 
545
546
  work_dir = self.synth_work_dirs[design_num]
546
- output_cfg_fpath = os.path.join(work_dir, util.EDA_OUTPUT_CONFIG_FNAME)
547
- data = util.yaml_safe_load(output_cfg_fpath)
547
+ output_cfg_fpath = os.path.join(work_dir, eda_config.EDA_OUTPUT_CONFIG_FNAME)
548
+ data = yaml_safe_load(output_cfg_fpath)
548
549
  top = data.get('args', {}).get('top', '')
549
550
  if not top:
550
551
  self.error(f'"top" not found in synth run from {work_dir=} in',