Exemplo n.º 1
0
    def test_bisect_frequencies_infeasible(self):
        port, proc = self._start_server(['--max_frequency_ghz=2.0'])

        channel_creds = client_credentials.get_credentials()
        with grpc.secure_channel(f'localhost:{port}',
                                 channel_creds) as channel:
            result = synthesis_utils.bisect_frequency('verilog', 'main',
                                                      int(3e9), int(4e9),
                                                      int(0.1e9), channel)
        self.assertEqual(result.max_frequency_hz, 0)
        proc.terminate()
        proc.wait()
Exemplo n.º 2
0
    def test_bisect_frequencies_with_error(self):
        port, proc = self._start_server(
            ['--max_frequency_ghz=2.0', '--serve_errors'])

        channel_creds = client_credentials.get_credentials()
        with grpc.secure_channel(f'localhost:{port}',
                                 channel_creds) as channel:
            with self.assertRaises(grpc.RpcError):
                _ = synthesis_utils.bisect_frequency('verilog', 'main',
                                                     int(1.5e9), int(3e9),
                                                     int(0.1e9), channel)
        proc.terminate()
        proc.wait()