CIRCT 23.0.0git
Loading...
Searching...
No Matches
ImportVerilog.cpp
Go to the documentation of this file.
1//===- ImportVerilog.cpp - Slang Verilog frontend integration -------------===//
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// This implements bridging from the slang Verilog frontend to CIRCT dialects.
10//
11//===----------------------------------------------------------------------===//
12
19#include "mlir/Conversion/SCFToControlFlow/SCFToControlFlow.h"
20#include "mlir/IR/Diagnostics.h"
21#include "mlir/IR/Verifier.h"
22#include "mlir/Pass/PassManager.h"
23#include "mlir/Support/Timing.h"
24#include "mlir/Tools/mlir-translate/Translation.h"
25#include "mlir/Transforms/Passes.h"
26#include "llvm/ADT/Hashing.h"
27#include "llvm/Support/SourceMgr.h"
28
29#include "slang/analysis/AnalysisManager.h"
30#include "slang/diagnostics/DiagnosticClient.h"
31#include "slang/driver/Driver.h"
32#include "slang/parsing/Preprocessor.h"
33#include "slang/syntax/SyntaxPrinter.h"
34#include "slang/util/VersionInfo.h"
35
36using namespace mlir;
37using namespace circt;
38using namespace ImportVerilog;
39
40using llvm::SourceMgr;
41
43 std::string buffer;
44 llvm::raw_string_ostream os(buffer);
45 os << "slang version ";
46 os << slang::VersionInfo::getMajor() << ".";
47 os << slang::VersionInfo::getMinor() << ".";
48 os << slang::VersionInfo::getPatch() << "+";
49 os << slang::VersionInfo::getHash();
50 return buffer;
51}
52
53//===----------------------------------------------------------------------===//
54// Diagnostics
55//===----------------------------------------------------------------------===//
56
57/// Convert a slang `SourceLocation` to an MLIR `Location`.
58static Location convertLocation(MLIRContext *context,
59 const slang::SourceManager &sourceManager,
60 slang::SourceLocation loc) {
61 if (loc && loc.buffer() != slang::SourceLocation::NoLocation.buffer()) {
62 auto fileName = sourceManager.getFileName(loc);
63 auto line = sourceManager.getLineNumber(loc);
64 auto column = sourceManager.getColumnNumber(loc);
65 return FileLineColLoc::get(context, fileName, line, column);
66 }
67 return UnknownLoc::get(context);
68}
69
70/// Convert a slang `SourceRange` to an MLIR `Location`.
71static Location convertLocation(MLIRContext *context,
72 const slang::SourceManager &sourceManager,
73 slang::SourceRange range) {
74 auto start = range.start();
75 auto end = range.end();
76 if (start && start.buffer() != slang::SourceLocation::NoLocation.buffer()) {
77 auto fileName = sourceManager.getFileName(start);
78 auto startLine = sourceManager.getLineNumber(start);
79 auto startColumn = sourceManager.getColumnNumber(start);
80 if (end && end.buffer() == start.buffer()) {
81 auto endLine = sourceManager.getLineNumber(end);
82 auto endColumn = sourceManager.getColumnNumber(end);
83 return FileLineColRange::get(context, fileName, startLine, startColumn,
84 endLine, endColumn);
85 }
86 return FileLineColLoc::get(context, fileName, startLine, startColumn);
87 }
88 return UnknownLoc::get(context);
89}
90
91Location Context::convertLocation(slang::SourceLocation loc) {
92 return ::convertLocation(getContext(), sourceManager, loc);
93}
94
95Location Context::convertLocation(slang::SourceRange range) {
96 return ::convertLocation(getContext(), sourceManager, range);
97}
98
99namespace {
100/// A converter that can be plugged into a slang `DiagnosticEngine` as a client
101/// that will map slang diagnostics to their MLIR counterpart and emit them.
102class MlirDiagnosticClient : public slang::DiagnosticClient {
103public:
104 MlirDiagnosticClient(MLIRContext *context) : context(context) {}
105
106 void report(const slang::ReportedDiagnostic &diag) override {
107 // Generate the primary MLIR diagnostic.
108 auto &diagEngine = context->getDiagEngine();
109 Location loc = !diag.ranges.empty() ? convertLocation(diag.ranges[0])
110 : convertLocation(diag.location);
111
112 auto mlirDiag = diagEngine.emit(loc, getSeverity(diag.severity));
113 mlirDiag << diag.formattedMessage;
114
115 // Append the name of the option that can be used to control this
116 // diagnostic.
117 auto optionName = engine->getOptionName(diag.originalDiagnostic.code);
118 if (!optionName.empty())
119 mlirDiag << " [-W" << optionName << "]";
120
121 // Write out macro expansions, if we have any, in reverse order.
122 for (auto loc : std::views::reverse(diag.expansionLocs)) {
123 auto &note = mlirDiag.attachNote(
124 convertLocation(sourceManager->getFullyOriginalLoc(loc)));
125 auto macroName = sourceManager->getMacroName(loc);
126 if (macroName.empty())
127 note << "expanded from here";
128 else
129 note << "expanded from macro '" << macroName << "'";
130 }
131
132 // Write out the include stack.
133 slang::SmallVector<slang::SourceLocation> includeStack;
134 getIncludeStack(diag.location.buffer(), includeStack);
135 for (auto &loc : std::views::reverse(includeStack))
136 mlirDiag.attachNote(convertLocation(loc)) << "included from here";
137 }
138
139 /// Convert a slang `SourceLocation` to an MLIR `Location`.
140 Location convertLocation(slang::SourceLocation loc) const {
141 return ::convertLocation(context, *sourceManager, loc);
142 }
143
144 /// Convert a slang `SourceRange` to an MLIR `Location`.
145 Location convertLocation(slang::SourceRange range) const {
146 return ::convertLocation(context, *sourceManager, range);
147 }
148
149 static DiagnosticSeverity getSeverity(slang::DiagnosticSeverity severity) {
150 switch (severity) {
151 case slang::DiagnosticSeverity::Fatal:
152 case slang::DiagnosticSeverity::Error:
153 return DiagnosticSeverity::Error;
154 case slang::DiagnosticSeverity::Warning:
155 return DiagnosticSeverity::Warning;
156 case slang::DiagnosticSeverity::Ignored:
157 case slang::DiagnosticSeverity::Note:
158 return DiagnosticSeverity::Remark;
159 }
160 llvm_unreachable("all slang diagnostic severities should be handled");
161 return DiagnosticSeverity::Error;
162 }
163
164private:
165 MLIRContext *context;
166};
167} // namespace
168
169// Allow for `slang::BufferID` to be used as hash map keys.
170namespace llvm {
171template <>
172struct DenseMapInfo<slang::BufferID> {
173 static slang::BufferID getEmptyKey() { return slang::BufferID(); }
174 static slang::BufferID getTombstoneKey() {
175 return slang::BufferID(UINT32_MAX - 1, ""sv);
176 // UINT32_MAX is already used by `BufferID::getPlaceholder`.
177 }
178 static unsigned getHashValue(slang::BufferID id) {
179 return llvm::hash_value(id.getId());
180 }
181 static bool isEqual(slang::BufferID a, slang::BufferID b) { return a == b; }
182};
183} // namespace llvm
184
185//===----------------------------------------------------------------------===//
186// Driver
187//===----------------------------------------------------------------------===//
188
189namespace {
190const static ImportVerilogOptions defaultOptions;
191
192struct ImportDriver {
193 ImportDriver(MLIRContext *mlirContext, TimingScope &ts,
194 const ImportVerilogOptions *options)
195 : mlirContext(mlirContext), ts(ts),
196 options(options ? *options : defaultOptions) {}
197
198 LogicalResult prepareDriver(SourceMgr &sourceMgr);
199 LogicalResult importVerilog(ModuleOp module);
200 LogicalResult preprocessVerilog(llvm::raw_ostream &os);
201
202 MLIRContext *mlirContext;
203 TimingScope &ts;
204 const ImportVerilogOptions &options;
205
206 // Use slang's driver which conveniently packages a lot of the things we
207 // need for compilation.
208 slang::driver::Driver driver;
209};
210} // namespace
211
212/// Populate the Slang driver with source files from the given `sourceMgr`, and
213/// configure driver options based on the `ImportVerilogOptions` passed to the
214/// `ImportDriver` constructor.
215LogicalResult ImportDriver::prepareDriver(SourceMgr &sourceMgr) {
216 // Use slang's driver which conveniently packages a lot of the things we
217 // need for compilation.
218 auto diagClient = std::make_shared<MlirDiagnosticClient>(mlirContext);
219 driver.diagEngine.addClient(diagClient);
220
221 for (const auto &value : options.commandFiles)
222 if (!driver.processCommandFiles(value, /*makeRelative=*/true,
223 /*separateUnit=*/true))
224 return failure();
225
226 // Populate the source manager with the source files.
227 // NOTE: This is a bit ugly since we're essentially copying the Verilog
228 // source text in memory. At a later stage we'll want to extend slang's
229 // SourceManager such that it can contain non-owned buffers. This will do
230 // for now.
231 DenseSet<StringRef> seenBuffers;
232 for (unsigned i = 0, e = sourceMgr.getNumBuffers(); i < e; ++i) {
233 const llvm::MemoryBuffer *mlirBuffer = sourceMgr.getMemoryBuffer(i + 1);
234 auto name = mlirBuffer->getBufferIdentifier();
235 if (!name.empty() && !seenBuffers.insert(name).second)
236 continue; // Slang doesn't like listing the same buffer twice
237 auto slangBuffer =
238 driver.sourceManager.assignText(name, mlirBuffer->getBuffer());
239 driver.sourceLoader.addBuffer(slangBuffer);
240 }
241
242 for (const auto &libDir : options.libDirs)
243 driver.sourceLoader.addSearchDirectories(libDir);
244
245 for (const auto &libExt : options.libExts)
246 driver.sourceLoader.addSearchExtension(libExt);
247
248 for (const auto &[i, f] : llvm::enumerate(options.libraryFiles)) {
249 // Include a space to avoid conflicts with explicitly-specified names.
250 auto libName = "library " + std::to_string(i);
251 driver.sourceLoader.addLibraryFiles(libName, f);
252 }
253
254 for (const auto &includeDir : options.includeDirs)
255 if (driver.sourceManager.addUserDirectories(includeDir))
256 return failure();
257
258 for (const auto &includeSystemDir : options.includeSystemDirs)
259 if (driver.sourceManager.addSystemDirectories(includeSystemDir))
260 return failure();
261
262 // Populate the driver options.
263 driver.options.excludeExts.insert(options.excludeExts.begin(),
264 options.excludeExts.end());
265 driver.options.ignoreDirectives = options.ignoreDirectives;
266
267 driver.options.maxIncludeDepth = options.maxIncludeDepth;
268 driver.options.defines = options.defines;
269 driver.options.undefines = options.undefines;
270 driver.options.librariesInheritMacros = options.librariesInheritMacros;
271
272 driver.options.timeScale = options.timeScale;
273 driver.options.compilationFlags.emplace(
274 slang::ast::CompilationFlags::AllowUseBeforeDeclare,
275 options.allowUseBeforeDeclare);
276 driver.options.compilationFlags.emplace(
277 slang::ast::CompilationFlags::IgnoreUnknownModules,
278 options.ignoreUnknownModules);
279 driver.options.compilationFlags.emplace(
280 slang::ast::CompilationFlags::LintMode,
282 driver.options.compilationFlags.emplace(
283 slang::ast::CompilationFlags::DisableInstanceCaching, false);
284 driver.options.topModules = options.topModules;
285 driver.options.paramOverrides = options.paramOverrides;
286
287 driver.options.errorLimit = options.errorLimit;
288 driver.options.warningOptions = options.warningOptions;
289
290 driver.options.singleUnit = options.singleUnit;
291
292 return success(driver.processOptions());
293}
294
295/// Parse and elaborate the prepared source files, and populate the given MLIR
296/// `module` with corresponding operations.
297LogicalResult ImportDriver::importVerilog(ModuleOp module) {
298 // Parse the input.
299 auto parseTimer = ts.nest("Verilog parser");
300 bool parseSuccess = driver.parseAllSources();
301 parseTimer.stop();
302
303 // Elaborate the input.
304 auto compileTimer = ts.nest("Verilog elaboration");
305 auto compilation = driver.createCompilation();
306
307 // Semantic analysis
308 auto analysisTimer = ts.nest("Semantic analysis");
309 driver.runAnalysis(*compilation);
310
311 for (auto &diag : compilation->getAllDiagnostics())
312 driver.diagEngine.issue(diag);
313 if (!parseSuccess || driver.diagEngine.getNumErrors() > 0)
314 return failure();
315 compileTimer.stop();
316
317 // If we were only supposed to lint the input, return here. This leaves the
318 // module empty, but any Slang linting messages got reported as diagnostics.
319 if (options.mode == ImportVerilogOptions::Mode::OnlyLint)
320 return success();
321
322 // Traverse the parsed Verilog AST and map it to the equivalent CIRCT ops.
323 mlirContext
324 ->loadDialect<moore::MooreDialect, hw::HWDialect, cf::ControlFlowDialect,
325 func::FuncDialect, verif::VerifDialect, ltl::LTLDialect,
326 debug::DebugDialect>();
327 auto conversionTimer = ts.nest("Verilog to dialect mapping");
328 Context context(options, *compilation, module, driver.sourceManager);
329 if (failed(context.convertCompilation()))
330 return failure();
331 conversionTimer.stop();
332
333 // Run the verifier on the constructed module to ensure it is clean.
334 auto verifierTimer = ts.nest("Post-parse verification");
335 return verify(module);
336}
337
338/// Preprocess the prepared source files and print them to the given output
339/// stream.
340LogicalResult ImportDriver::preprocessVerilog(llvm::raw_ostream &os) {
341 auto parseTimer = ts.nest("Verilog preprocessing");
342
343 // Run the preprocessor to completion across all sources previously added with
344 // `pushSource`, report diagnostics, and print the output.
345 auto preprocessAndPrint = [&](slang::parsing::Preprocessor &preprocessor) {
346 slang::syntax::SyntaxPrinter output;
347 output.setIncludeComments(false);
348 while (true) {
349 slang::parsing::Token token = preprocessor.next();
350 output.print(token);
351 if (token.kind == slang::parsing::TokenKind::EndOfFile)
352 break;
353 }
354
355 for (auto &diag : preprocessor.getDiagnostics()) {
356 if (diag.isError()) {
357 driver.diagEngine.issue(diag);
358 return failure();
359 }
360 }
361 os << output.str();
362 return success();
363 };
364
365 // Depending on whether the single-unit option is set, either add all source
366 // files to a single preprocessor such that they share define macros and
367 // directives, or create a separate preprocessor for each, such that each
368 // source file is in its own compilation unit.
369 auto optionBag = driver.createOptionBag();
370 if (driver.options.singleUnit == true) {
371 slang::BumpAllocator alloc;
372 slang::Diagnostics diagnostics;
373 slang::parsing::Preprocessor preprocessor(driver.sourceManager, alloc,
374 diagnostics, optionBag);
375 // Sources have to be pushed in reverse, as they form a stack in the
376 // preprocessor. Last pushed source is processed first.
377 auto sources = driver.sourceLoader.loadSources();
378 for (auto &buffer : std::views::reverse(sources))
379 preprocessor.pushSource(buffer);
380 if (failed(preprocessAndPrint(preprocessor)))
381 return failure();
382 } else {
383 for (auto &buffer : driver.sourceLoader.loadSources()) {
384 slang::BumpAllocator alloc;
385 slang::Diagnostics diagnostics;
386 slang::parsing::Preprocessor preprocessor(driver.sourceManager, alloc,
387 diagnostics, optionBag);
388 preprocessor.pushSource(buffer);
389 if (failed(preprocessAndPrint(preprocessor)))
390 return failure();
391 }
392 }
393
394 return success();
395}
396
397//===----------------------------------------------------------------------===//
398// Entry Points
399//===----------------------------------------------------------------------===//
400
401/// Parse the specified Verilog inputs into the specified MLIR context.
402LogicalResult circt::importVerilog(SourceMgr &sourceMgr,
403 MLIRContext *mlirContext, TimingScope &ts,
404 ModuleOp module,
405 const ImportVerilogOptions *options) {
406 ImportDriver importDriver(mlirContext, ts, options);
407 if (failed(importDriver.prepareDriver(sourceMgr)))
408 return failure();
409 return importDriver.importVerilog(module);
410}
411
412/// Run the files in a source manager through Slang's Verilog preprocessor and
413/// emit the result to the given output stream.
414LogicalResult circt::preprocessVerilog(SourceMgr &sourceMgr,
415 MLIRContext *mlirContext,
416 TimingScope &ts, llvm::raw_ostream &os,
417 const ImportVerilogOptions *options) {
418 ImportDriver importDriver(mlirContext, ts, options);
419 if (failed(importDriver.prepareDriver(sourceMgr)))
420 return failure();
421 return importDriver.preprocessVerilog(os);
422}
423
424/// Entry point as an MLIR translation.
426 static TranslateToMLIRRegistration fromVerilog(
427 "import-verilog", "import Verilog or SystemVerilog",
428 [](llvm::SourceMgr &sourceMgr, MLIRContext *context) {
429 TimingScope ts;
431 ModuleOp::create(UnknownLoc::get(context)));
432 ImportVerilogOptions options;
433 options.debugInfo = true;
434 options.warningOptions.push_back("no-missing-top");
435 if (failed(
436 importVerilog(sourceMgr, context, ts, module.get(), &options)))
437 module = {};
438 return module;
439 });
440}
441
442//===----------------------------------------------------------------------===//
443// Pass Pipeline
444//===----------------------------------------------------------------------===//
445
446/// Optimize and simplify the Moore dialect IR.
447void circt::populateVerilogToMoorePipeline(OpPassManager &pm) {
448 {
449 // Perform an initial cleanup and preprocessing across all
450 // modules/functions.
451 auto &anyPM = pm.nestAny();
452 anyPM.addPass(mlir::createCSEPass());
453 anyPM.addPass(mlir::createCanonicalizerPass());
454 }
455
456 pm.addPass(moore::createVTablesPass());
457
458 // Remove unused symbols.
459 pm.addPass(mlir::createSymbolDCEPass());
460
461 {
462 // Perform module-specific transformations.
463 auto &modulePM = pm.nest<moore::SVModuleOp>();
464 modulePM.addPass(moore::createSimplifyRefsPass());
465 // TODO: Enable the following once it not longer interferes with @(...)
466 // event control checks. The introduced dummy variables make the event
467 // control observe a static local variable that never changes, instead of
468 // observing a module-wide signal.
469 // modulePM.addPass(moore::createSimplifyProceduresPass());
470 modulePM.addPass(mlir::createSROA());
471 }
472
473 {
474 // Perform a final cleanup across all modules/functions.
475 auto &anyPM = pm.nestAny();
476 anyPM.addPass(mlir::createMem2Reg());
477 anyPM.addPass(mlir::createCSEPass());
478 anyPM.addPass(mlir::createCanonicalizerPass());
479 }
480}
481
482/// Convert Moore dialect IR into core dialect IR
483void circt::populateMooreToCorePipeline(OpPassManager &pm) {
484 // Perform the conversion.
485 pm.addPass(createConvertMooreToCorePass());
486
487 {
488 // Conversion to the core dialects likely uncovers new canonicalization
489 // opportunities.
490 auto &anyPM = pm.nestAny();
491 anyPM.addPass(mlir::createCSEPass());
492 anyPM.addPass(mlir::createCanonicalizerPass());
493 }
494}
495
496/// Convert LLHD dialect IR into core dialect IR
498 OpPassManager &pm, const LlhdToCorePipelineOptions &options) {
499 // Inline function calls and lower SCF to CF.
500 pm.addNestedPass<hw::HWModuleOp>(llhd::createWrapProceduralOpsPass());
501 pm.addPass(mlir::createSCFToControlFlowPass());
502 pm.addPass(llhd::createInlineCallsPass());
503 pm.addPass(mlir::createSymbolDCEPass());
504
505 // Simplify processes, replace signals with process results, and detect
506 // registers.
507 auto &modulePM = pm.nest<hw::HWModuleOp>();
508 // See https://github.com/llvm/circt/issues/8804.
509 if (options.sroa) {
510 modulePM.addPass(mlir::createSROA());
511 }
512 modulePM.addPass(llhd::createMem2RegPass());
513 modulePM.addPass(llhd::createHoistSignalsPass());
514 modulePM.addPass(llhd::createDeseqPass());
515 modulePM.addPass(llhd::createLowerProcessesPass());
516 modulePM.addPass(mlir::createCSEPass());
517 modulePM.addPass(mlir::createCanonicalizerPass());
518
519 // Unroll loops and remove control flow.
520 modulePM.addPass(llhd::createUnrollLoopsPass());
521 modulePM.addPass(mlir::createCSEPass());
522 modulePM.addPass(mlir::createCanonicalizerPass());
523 modulePM.addPass(llhd::createRemoveControlFlowPass());
524 modulePM.addPass(mlir::createCSEPass());
525 modulePM.addPass(mlir::createCanonicalizerPass());
526
527 // Convert `arith.select` generated by some of the control flow canonicalizers
528 // to `comb.mux`.
529 modulePM.addPass(createMapArithToCombPass(true));
530
531 // Simplify module-level signals.
532 modulePM.addPass(llhd::createCombineDrivesPass());
533 modulePM.addPass(llhd::createSig2Reg());
534 modulePM.addPass(mlir::createCSEPass());
535 modulePM.addPass(mlir::createCanonicalizerPass());
536
537 // Map `seq.firreg` with array type and `hw.array_inject` self-feedback to
538 // `seq.firmem` ops.
539 if (options.detectMemories) {
540 modulePM.addPass(seq::createRegOfVecToMem());
541 modulePM.addPass(mlir::createCSEPass());
542 modulePM.addPass(mlir::createCanonicalizerPass());
543 }
544}
static std::unique_ptr< Context > context
static Location convertLocation(MLIRContext *context, const slang::SourceManager &sourceManager, slang::SourceLocation loc)
Convert a slang SourceLocation to an MLIR Location.
static llvm::lsp::DiagnosticSeverity getSeverity(slang::DiagnosticSeverity severity)
std::unique_ptr< mlir::Pass > createSimplifyRefsPass()
std::unique_ptr< mlir::Pass > createVTablesPass()
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.
std::unique_ptr< mlir::Pass > createMapArithToCombPass(bool enableBestEffortLowering=false)
void populateVerilogToMoorePipeline(mlir::OpPassManager &pm)
Optimize and simplify the Moore dialect IR.
void populateMooreToCorePipeline(mlir::OpPassManager &pm)
Convert Moore dialect IR into core dialect IR.
void populateLlhdToCorePipeline(mlir::OpPassManager &pm, const LlhdToCorePipelineOptions &options)
std::string getSlangVersion()
Return a human-readable string describing the slang frontend version linked into CIRCT.
std::unique_ptr< OperationPass< ModuleOp > > createConvertMooreToCorePass()
Create an Moore to Comb/HW/LLHD conversion pass.
mlir::LogicalResult importVerilog(llvm::SourceMgr &sourceMgr, mlir::MLIRContext *context, mlir::TimingScope &ts, mlir::ModuleOp module, const ImportVerilogOptions *options=nullptr)
Parse files in a source manager as Verilog source code and populate the given MLIR module with corres...
mlir::LogicalResult preprocessVerilog(llvm::SourceMgr &sourceMgr, mlir::MLIRContext *context, mlir::TimingScope &ts, llvm::raw_ostream &os, const ImportVerilogOptions *options=nullptr)
Run the files in a source manager through Slang's Verilog preprocessor and emit the result to the giv...
void registerFromVerilogTranslation()
Register the import-verilog MLIR translation.
llvm::hash_code hash_value(const DenseSet< T > &set)
Definition sv.py:1
Options that control how Verilog input files are parsed and processed.
std::vector< std::string > warningOptions
A list of warning options that will be passed to the DiagnosticEngine.
@ OnlyLint
Only lint the input, without elaboration and lowering to CIRCT IR.
bool debugInfo
Generate debug information in the form of debug dialect ops in the IR.
A helper class to facilitate the conversion from a Slang AST to MLIR operations.
const slang::SourceManager & sourceManager
MLIRContext * getContext()
Return the MLIR context.
Location convertLocation(slang::SourceLocation loc)
Convert a slang SourceLocation into an MLIR Location.
Convert LLHD dialect IR into core dialect IR.
static bool isEqual(slang::BufferID a, slang::BufferID b)
static slang::BufferID getTombstoneKey()
static unsigned getHashValue(slang::BufferID id)