VLSIDA / OpenCache

An open-source custom cache generator.
BSD 3-Clause "New" or "Revised" License
26 stars 3 forks source link

Can't get OpenCache to work #5

Closed nachiket closed 8 months ago

nachiket commented 8 months ago

When I try to run OpenCache on the default config files, I'm getting this error:

nachiket in generator git:(dev*) 24-03-14 11:56AM python3 opencache.py tests/configs/config.py
|==============================================================================|
|=========                      OpenCache v0.0.1                      =========|
|=========                                                            =========|
|=========               VLSI Design and Automation Lab               =========|
|=========        Computer Science and Engineering Department         =========|
|=========            University of California Santa Cruz             =========|
|=========                                                            =========|
|=========          Usage help: openram-user-group@ucsc.edu           =========|
|=========        Development help: openram-dev-group@ucsc.edu        =========|
|=========                See LICENSE for license info                =========|
|==============================================================================|
** Start: 03/14/2024 11:56:59

Cache type: Data
Word size: 32
Words per line: 4
Number of ways: 1
Replacement policy: None
Write policy: None
Return type: Word
Data hazard: True

Saving output files...
Config: Writing to /home/nachiket/OpenCache/generator/outputs/unit_test/cache_8192b_32b_1_none/cache_8192b_32b_1_none_data_array_config.py
Config: Writing to /home/nachiket/OpenCache/generator/outputs/unit_test/cache_8192b_32b_1_none/cache_8192b_32b_1_none_tag_array_config.py
** Config: 0.0 seconds
Verilog: Writing to /home/nachiket/OpenCache/generator/outputs/unit_test/cache_8192b_32b_1_none/cache_8192b_32b_1_none.v
Traceback (most recent call last):
  File "opencache.py", line 56, in <module>
    c.save()
  File "/home/nachiket/OpenCache/generator/cache/cache.py", line 72, in save
    self.verilog_write(vpath)
  File "/home/nachiket/OpenCache/generator/cache/cache.py", line 47, in verilog_write
    self.c.verilog_write(path)
  File "/home/nachiket/OpenCache/generator/base/design.py", line 41, in verilog_write
    ports = self.add_io_signals()
  File "/home/nachiket/OpenCache/generator/base/design.py", line 107, in add_io_signals
    self.flush = cache_signal()
  File "/home/nachiket/.local/lib/python3.8/site-packages/amaranth/hdl/ast.py", line 1075, in __call__
    signal = super().__call__(shape, **kwargs, src_loc_at=src_loc_at + 1)
TypeError: __init__() got an unexpected keyword argument 'src_loc_at'
erendn commented 8 months ago

Can you check your amaranth version? I had used version 0.3 when I was working on OpenCache. This might be caused by some incompatibility. It may work if you switch to version 0.3.

nachiket commented 8 months ago

That worked. I needed pip3 install amaranth==0.3 amaranth-yosys. Maybe edit requirements.txt for this?

nachiket commented 3 weeks ago

Looks like amaranth=0.3 now has some weird packaging issues. What might it take to upgrade amaranth version? I can't get it to work with newer versions.

(base) ➜ generator git:(dev) ✗ pip3 install amaranth==0.3 Collecting amaranth==0.3 Using cached amaranth-0.3-py3-none-any.whl.metadata (822 bytes) WARNING: Ignoring version 0.3 of amaranth since it has invalid metadata: Requested amaranth==0.3 from https://files.pythonhosted.org/packages/0f/b5/afa16ebdf98fb79142f19281a481c200df694d537b68808538d423bd635b/amaranth-0.3-py3-none-any.whl has invalid metadata: . suffix can only be used with == or != operators amaranth-yosys (>=0.10.) ; extra == 'builtin-yosys'


Please use pip<24.1 if you need to use this version.
ERROR: Ignored the following yanked versions: 0.6.0
ERROR: Could not find a version that satisfies the requirement amaranth==0.3 (from versions: 0, 0.3, 0.4.0, 0.4.1, 0.4.2, 0.4.3, 0.4.4, 0.4.5, 0.5.0, 0.5.1, 0.5.2)
ERROR: No matching distribution found for amaranth==0.3