CIRCT 22.0.0git
Loading...
Searching...
No Matches
CirctVerilogLspServerMain.h
Go to the documentation of this file.
1//===----------------------------------------------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// Main entry function for circt-verilog-lsp-server for when built as standalone
10// binary.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef CIRCT_TOOLS_CIRCT_VERILOG_LSP_SERVER_CIRCTVERILOGLSPSERVERMAIN_H
15#define CIRCT_TOOLS_CIRCT_VERILOG_LSP_SERVER_CIRCTVERILOGLSPSERVERMAIN_H
16#include "mlir/Support/LLVM.h"
17#include "llvm/ADT/StringRef.h"
18#include "llvm/Support/LSP/Transport.h"
19#include <memory>
20#include <optional>
21#include <string>
22#include <vector>
23
24namespace llvm {
25struct LogicalResult;
26} // namespace llvm
27
28namespace mlir {
29namespace lsp {
30class JSONTransport;
31} // namespace lsp
32} // namespace mlir
33
34namespace circt {
35namespace lsp {
37 VerilogServerOptions(const std::vector<std::string> &libDirs,
38 const std::vector<std::string> &extraSourceLocationDirs,
39 const std::vector<std::string> &commandFiles)
42 /// Additional list of RTL directories to search.
43 const std::vector<std::string> &libDirs;
44 /// Additional list of external source directories to search.
45 const std::vector<std::string> &extraSourceLocationDirs;
46 /// Additional list of command files that reference dependencies of the
47 /// project.
48 const std::vector<std::string> &commandFiles;
49};
50// namespace lsp
51
57
58 /// Disable debouncing entirely (updates applied synchronously).
59 const bool disableDebounce;
60
61 /// Minimum debounce delay in milliseconds.
62 const unsigned debounceMinMs;
63
64 /// Maximum debounce delay in milliseconds.
65 /// A value of 0 means "no cap".
66 const unsigned debounceMaxMs;
67};
68
69/// Implementation for tools like `circt-verilog-lsp-server`.
70llvm::LogicalResult
72 const VerilogServerOptions &options,
73 llvm::lsp::JSONTransport &transport);
74
75} // namespace lsp
76} // namespace circt
77
78#endif // CIRCT_TOOLS_CIRCT_VERILOG_LSP_SERVER_CIRCTVERILOGLSPSERVERMAIN_H
llvm::LogicalResult CirctVerilogLspServerMain(const LSPServerOptions &lspOptions, const VerilogServerOptions &options, llvm::lsp::JSONTransport &transport)
Implementation for tools like circt-verilog-lsp-server.
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.
const unsigned debounceMinMs
Minimum debounce delay in milliseconds.
const unsigned debounceMaxMs
Maximum debounce delay in milliseconds.
LSPServerOptions(bool disableDebounce=false, unsigned debounceMinMs=200, unsigned debounceMaxMs=1500)
const bool disableDebounce
Disable debouncing entirely (updates applied synchronously).
VerilogServerOptions(const std::vector< std::string > &libDirs, const std::vector< std::string > &extraSourceLocationDirs, const std::vector< std::string > &commandFiles)
const std::vector< std::string > & libDirs
Additional list of RTL directories to search.
const std::vector< std::string > & extraSourceLocationDirs
Additional list of external source directories to search.
const std::vector< std::string > & commandFiles
Additional list of command files that reference dependencies of the project.