mirror of https://github.com/llvm/circt.git
[Sim] Include operations and types in dialect doc
The dialect documentation was missing operations and types. Add those as separate subsections.
This commit is contained in:
parent
e6abe22f5c
commit
1244f589bd
|
@ -1,17 +1,13 @@
|
|||
# Simulation (Sim) Dialect Rationale
|
||||
# Simulation Dialect
|
||||
|
||||
This document describes various design points of the `sim` dialect, why it is
|
||||
the way it is, and current status. This follows in the spirit of other [MLIR
|
||||
Rationale docs](https://mlir.llvm.org/docs/Rationale/).
|
||||
|
||||
## Introduction
|
||||
|
||||
The `sim` dialect provides a high-level representation for simulator-specific
|
||||
This dialect provides a high-level representation for simulator-specific
|
||||
operations. The purpose of the dialect is to provide a high-level representation
|
||||
for constructs which interact with simulators (Verilator, VCS, Arc, ...) that
|
||||
are easy to analyze and transform in the compiler.
|
||||
|
||||
## Operations
|
||||
[TOC]
|
||||
|
||||
## Rationale
|
||||
|
||||
### Plusargs
|
||||
|
||||
|
@ -20,3 +16,11 @@ the SystemVerilog built-ins which access command-line arguments.
|
|||
They are cleaner from a data-flow perspective, as they package the wires
|
||||
and if-statements involved into compact operations that can be trivially
|
||||
handled by analyses.
|
||||
|
||||
## Types
|
||||
|
||||
[include "Dialects/SimTypes.md"]
|
||||
|
||||
## Operations
|
||||
|
||||
[include "Dialects/SimOps.md"]
|
|
@ -1 +0,0 @@
|
|||
# 'sim' Dialect
|
|
@ -1,17 +1,6 @@
|
|||
##===- CMakeLists.txt - Sim dialect build definitions ---------*- cmake -*-===//
|
||||
##
|
||||
## Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
## See https://llvm.org/LICENSE.txt for license information.
|
||||
## SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
##
|
||||
##===----------------------------------------------------------------------===//
|
||||
##
|
||||
##
|
||||
##===----------------------------------------------------------------------===//
|
||||
|
||||
add_circt_dialect(Sim sim)
|
||||
add_circt_dialect_doc(Sim sim)
|
||||
add_dependencies(circt-headers MLIRSimIncGen)
|
||||
add_circt_doc(SimOps Dialects/SimOps -gen-op-doc)
|
||||
add_circt_doc(SimTypes Dialects/SimTypes -gen-typedef-doc -dialect sim)
|
||||
|
||||
set(LLVM_TARGET_DEFINITIONS SimPasses.td)
|
||||
mlir_tablegen(SimPasses.h.inc -gen-pass-decls)
|
||||
|
|
|
@ -6,13 +6,15 @@
|
|||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This contains the SimDialect definition to be included in other files.
|
||||
// This contains the Sim dialect definition to be included in other files.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef CIRCT_DIALECT_SIM_SIMDIALECT
|
||||
#define CIRCT_DIALECT_SIM_SIMDIALECT
|
||||
|
||||
include "mlir/IR/DialectBase.td"
|
||||
|
||||
def SimDialect : Dialect {
|
||||
let name = "sim";
|
||||
let cppNamespace = "::circt::sim";
|
||||
|
|
|
@ -21,6 +21,7 @@ include "circt/Dialect/Sim/SimTypes.td"
|
|||
include "mlir/Interfaces/FunctionInterfaces.td"
|
||||
include "mlir/Interfaces/InferTypeOpInterface.td"
|
||||
include "mlir/Interfaces/SideEffectInterfaces.td"
|
||||
include "mlir/IR/OpAsmInterface.td"
|
||||
|
||||
class SimOp<string mnemonic, list<Trait> traits = []> :
|
||||
Op<SimDialect, mnemonic, traits>;
|
||||
|
|
Loading…
Reference in New Issue