def extract_generics(error_lines):
    """
    Parse the errors output from ghdl to determine what generics
    are required by the generators.
    """
    ds = []
    for line in error_lines:
        d = {}
        pieces = line.split('Generator')
        if len(pieces) == 2:
            params = pieces[1].split()
            for param in params:
                key, value = param.split('=')
                assert key not in d
                d[key] = value
                ds.append(d)
    return ds
