ucb-bar / hammer

Hammer: Highly Agile Masks Made Effortlessly from RTL
BSD 3-Clause "New" or "Revised" License
255 stars 59 forks source link

MMMC Corners Error Message #546

Open hngenc opened 4 years ago

hngenc commented 4 years ago

When MMMC corners have not been specified, the user gets this error message:

  File "/tools/B/hngenc/chipyard/vlsi/hammer/src/hammer-vlsi/hammer_vlsi/hammer_vlsi_impl.py", line 234, in generate_all_srams_and_corners
    srams = reduce(list.__add__, list(map(lambda c: self.generate_all_srams(c), self.get_mmmc_corners()))) # type: List[ExtraLibrary]
TypeError: reduce() of empty sequence with no initial value
make: *** No rule to make target '/tools/B/hngenc/chipyard/vlsi/generated-src/gemmini.GemminiAcceleratorConfig/sram_generator-output.json', needed by '/tools/B/hngenc/chipyard/vlsi/build/gemmini.GemminiAcceleratorConfig-RocketTile/hammer.d'.  Stop.

I think it would be better if the length of the self.get_mmmc_corners() list was checked first, so that the user could get an error message alerting them more directly that they haven't set the variable appropriately.

colinschmidt commented 4 years ago

Yeah we should be guarding its use correctly. I'm making some updates to MMMC stuff now so I'll try to check its use to be more robust.