def METHOD_NAME(fasm_file, params_json):
    sites, diff_tiles = create_sites_from_fasm(fasm_file)
    with open(params_json) as f:
        params = json.load(f)
    count = 0
    for p in params['tiles']:
        tile = p['tile']
        for site in p['site'].split(' '):
            site_y = int(site[site.find('Y') + 1:]) % 2
            if generate.skip_broken_tiles(p):
                continue
            site_key = 'IOB_Y{}'.format(site_y)
            if (tile, site_key) not in sites:
                assert p['type'] is None, p
                continue
            site_from_fasm = sites[(tile, site_key)]
            if site_y == 0 or tile not in diff_tiles:
                assert p['type'] in site_from_fasm['type'], (
                    tile, site_key, p['type'], site_from_fasm['type'])
            else:
                # Y1 on DIFF tiles is always none.
                assert p['type'] is None, p
            if p['type'] is None:
                continue
            assert 'PULLTYPE' in p, p
            assert 'PULLTYPE' in site_from_fasm, site_from_fasm
            if verilog.unquote(p['PULLTYPE']) == '':
                # Default is None.
                pulltype = verilog.quote('NONE')
            else:
                pulltype = p['PULLTYPE']
            assert pulltype == site_from_fasm['PULLTYPE'], (
                tile, site_key, p, site_from_fasm)
            assert 'IOSTANDARDS' in site_from_fasm, (tile, site)
            iostandard = verilog.unquote(p['IOSTANDARD'])
            if iostandard.startswith('DIFF_'):
                iostandard = iostandard[5:]
            assert iostandard in site_from_fasm['IOSTANDARDS'], (
                p['IOSTANDARD'],
                site_from_fasm['IOSTANDARDS'],
            )
            if p['type'] not in ['IBUF', 'IBUFDS']:
                if verilog.unquote(p['SLEW']) == '':
                    # Default is None.
                    slew = verilog.quote('SLOW')
                else:
                    slew = p['SLEW']
                assert slew == site_from_fasm['SLEW'], (
                    tile, site_key, p, site_from_fasm)
                assert 'DRIVES' not in p, p
                assert 'DRIVES' in site_from_fasm, (
                    tile, site, p['type'], site_from_fasm)
                if p['DRIVE'] is None:
                    assert None in site_from_fasm['DRIVES'], (
                        tile, site_key, p['DRIVE'], site_from_fasm['DRIVES'])
                elif p['DRIVE'] == '':
                    if None in site_from_fasm['DRIVES']:
                        # IOSTANDARD has not DRIVE setting, ignore
                        pass
                    else:
                        # Check that drive is at default
                        assert 'I12' in site_from_fasm['DRIVES'], (
                            tile, site_key, p['DRIVE'],
                            site_from_fasm['DRIVES'])
                else:
                    assert 'I{}'.format(
                        p['DRIVE']) in site_from_fasm['DRIVES'], (
                            tile, site_key, p['DRIVE'],
                            site_from_fasm['DRIVES'])
            count += 1
    return count