mit-ll / CEP

The Common Evaluation Platform (CEP), based on UCB's Chipyard Framework, is an SoC design that contains only license-unencumbered, freely available components.
BSD 2-Clause "Simplified" License
60 stars 20 forks source link

vlsi_rom_gen fails due to iterate_by_n raising #3

Closed aalthoff closed 4 years ago

aalthoff commented 4 years ago

The result is that the rom.v file is not generated completely (only the top comment). The effect is that make -f Makefile.vc707-u500devkit mcs fails the first run, but succeeds the second run (due to the rom.v file being created, but incompletely). Then other things break down the line.

Quick fix:

in parse_line definition in vlsi_rom_gen:

    params = line.split()
    kwargs = {key: try_cast_int(val)
              for key, val in zip(params[::2], params[1::2])}

This does not generalize but resolves the issue in this case.

It would also be great to not create a partial rom file. If an error raises, clean up the partial file (or better, cache the file contents in a string then write it out at the end of the script).

bchetwynd commented 4 years ago

Odd. We increased the size of the bootrom code, by adding the comment and changed the appropriate parameters in the linker file and the bootrom chisel. I have had it build successfully on the first run (from a clean build) and thus have not seen this issue....

I'll have to see if I can replicate.

bchetwynd commented 4 years ago

@aalthoff - Can you confirm the status of this issue? Have you tried to build with the latest version of the CEP?