File Exists Error when using OpenROAD+nangate45 build for Hammer

126 views
Skip to first unread message

heavy hussar

unread,
Aug 26, 2022, 2:08:21 AM8/26/22
to Chipyard
I'm using OpenROAD flow with the nangate45  PDK as a VLSI backend for Hammer. I'm running this on Chisel 1.7.1 on an Ubuntu 20.04 machine. Each time I run the example here, I get the following error message:

Running with RISCV=/home/ajtorek/chipyard/riscv-tools-install
cd /home/ajtorek/chipyard/vlsi &&  ./example-vlsi -e /home/ajtorek/chipyard/vlsi/env.yml  -p example-tools.yml  -p example-nangate45.yml  -p /home/ajtorek/chipyard/vlsi/build/chipyard.TestHarness.RocketConfig-ChipTop/sram_generator-input.yml --obj_dir /home/ajtorek/chipyard/vlsi/generated-src/chipyard.TestHarness.RocketConfig sram_generator
[<global>] Loading hammer-vlsi libraries and reading settings
[<global>] Loading technology 'nangate45'
/home/ajtorek/chipyard/vlsi/hammer/src/hammer_config/config_src.py:772: UserWarning: Key technology.nangate45.install_dir is not associated with a type
  warn(f"Key {key} is not associated with a type")
[<global>] Starting SRAM Generator with tool 'sram_compiler'
[sram_generator] Running sub-step 'generate_all_srams_and_corners'
Traceback (most recent call last):
  File "./example-vlsi", line 62, in <module>
    ExampleDriver().main()
  File "/home/ajtorek/chipyard/vlsi/hammer/src/hammer-vlsi/hammer_vlsi/cli_driver.py", line 1471, in main
    sys.exit(self.run_main_parsed(vars(parser.parse_args(args))))
  File "/home/ajtorek/chipyard/vlsi/hammer/src/hammer-vlsi/hammer_vlsi/cli_driver.py", line 1376, in run_main_parsed
    output_config = action_func(driver, errors.append)  # type: Optional[dict]
  File "/home/ajtorek/chipyard/vlsi/hammer/src/hammer-vlsi/hammer_vlsi/cli_driver.py", line 536, in action
    success, output = driver.run_sram_generator(
  File "/home/ajtorek/chipyard/vlsi/hammer/src/hammer-vlsi/hammer_vlsi/driver.py", line 1180, in run_sram_generator
    run_succeeded = self.sram_generator_tool.run(hooks_to_use)
  File "/home/ajtorek/chipyard/vlsi/hammer/src/hammer-vlsi/hammer_vlsi/hammer_tool.py", line 116, in run
    if not self.run_steps(self.steps, hook_actions):
  File "/home/ajtorek/chipyard/vlsi/hammer/src/hammer-vlsi/hammer_vlsi/hammer_tool.py", line 631, in run_steps
    func_out = step.func(self)  # type: bool
  File "/home/ajtorek/chipyard/vlsi/hammer/src/hammer-vlsi/hammer_vlsi/hammer_tool.py", line 675, in wrapper
    return func.__func__(x)  # type: ignore # no type stub for builtin __func__
  File "/home/ajtorek/chipyard/vlsi/hammer/src/hammer-vlsi/hammer_vlsi/hammer_vlsi_impl.py", line 228, in generate_all_srams_and_corners
    srams_corners = list(map(lambda c: self.generate_all_srams(c), self.get_mmmc_corners())) # type: List[List[ExtraLibrary]]
  File "/home/ajtorek/chipyard/vlsi/hammer/src/hammer-vlsi/hammer_vlsi/hammer_vlsi_impl.py", line 228, in <lambda>
    srams_corners = list(map(lambda c: self.generate_all_srams(c), self.get_mmmc_corners())) # type: List[List[ExtraLibrary]]
  File "/home/ajtorek/chipyard/vlsi/hammer/src/hammer-vlsi/hammer_vlsi/hammer_vlsi_impl.py", line 236, in generate_all_srams
    srams = list(map(lambda p: self.generate_sram(p, corner), self.input_parameters)) # type: List[ExtraLibrary]
  File "/home/ajtorek/chipyard/vlsi/hammer/src/hammer-vlsi/hammer_vlsi/hammer_vlsi_impl.py", line 236, in <lambda>
    srams = list(map(lambda p: self.generate_sram(p, corner), self.input_parameters)) # type: List[ExtraLibrary]
  File "/home/ajtorek/chipyard/vlsi/hammer/src/hammer-vlsi/technology/nangate45/sram_compiler/__init__.py", line 62, in generate_sram
    os.symlink(src_lib, dst_lib)
FileExistsError: [Errno 17] File exists: '/home/ajtorek/OpenROAD-flow-scripts/flow/designs/src/tinyRocket/fakeram45_1024x32.lib' -> '/home/ajtorek/chipyard/vlsi/generated-src/chipyard.TestHarness.RocketConfig/tech-nangate45-cache/fakeram45_1024x32_PVT_1P1V_25C.lib'
make: *** No rule to make target 'drc'.  Stop.

I don't know what is directly causing this error. I am unable to fix it or figure out why I keep getting it. Reinstalls of both Chipyard and OpenROAD-flow have not worked. Any help would be greatly appreciated.


Marco Brohet

unread,
Sep 14, 2022, 3:34:05 AM9/14/22
to Chipyard
Hi,

Unfortunately, I wasn't able to finish the OpenROAD flow with nangate45 myself, so I opened a Github issue with some additional information [1]. But for this the error is relatively easy to fix (and I forgot to include that in the Github issue):

In vlsi/hammer/src/hammer-vlsi/technology/nangate45/sram_compiler/__init__.py, change "flow/designs/src/tinyRocket" to "flow/designs/nangate45/tinyRocket"

I'll try to submit a pull request for hammer later today after I verify this (I think I just copied the fakeram*.* from nangate45/tinyRocket to src/tinyRocket)

By the way, the flow of OpenROAD-flow-scripts itself did work for me, i.e. following the instruction here [2] for tinyRocket with nangate45.

Cheers,
Marco

Harrison Liew

unread,
Sep 16, 2022, 2:29:48 PM9/16/22
to Chipyard
Unfortunately, when we updated the OpenROAD plugin for Sky130, we broke nangate45 support since hard-coded values in the old plugin that were needed for the OpenROAD scripts directly were removed. For now, you will need to use OpenROAD-flow-scripts instead as Marco did.
Reply all
Reply to author
Forward
0 new messages