CIRCT  19.0.0git
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
circt::moore::RealType Class Reference

A real type. More...

#include <MooreTypes.h>

Inheritance diagram for circt::moore::RealType:
Inheritance graph
[legend]
Collaboration diagram for circt::moore::RealType:
Collaboration graph
[legend]

Public Types

enum  Kind { ShortReal , Real , RealTime }
 

Public Member Functions

Kind getKind () const
 Get the concrete integer vector or atom type. More...
 
StringRef getKeyword () const
 Get the keyword (like bit) for this type. More...
 
unsigned getBitSize () const
 Get the size of this type. More...
 

Static Public Member Functions

static std::optional< KindgetKindFromKeyword (StringRef keyword)
 Get the integer type that corresponds to a keyword (like bit). More...
 
static StringRef getKeyword (Kind kind)
 Get the keyword (like bit) for one of the integer types. More...
 
static unsigned getBitSize (Kind kind)
 Get the size of one of the integer types. More...
 
static RealType get (MLIRContext *context, Kind kind)
 

Static Public Attributes

static constexpr StringLiteral name = "moore.real"
 

Detailed Description

A real type.

Definition at line 607 of file MooreTypes.h.

Member Enumeration Documentation

◆ Kind

Enumerator
ShortReal 

A shortreal.

Real 

A real.

RealTime 

A realtime.

Definition at line 610 of file MooreTypes.h.

Member Function Documentation

◆ get()

RealType RealType::get ( MLIRContext *  context,
Kind  kind 
)
static

Definition at line 566 of file MooreTypes.cpp.

References circt::calyx::direction::get().

Referenced by customTypeParser(), and mooreRealTypeGet().

◆ getBitSize() [1/2]

unsigned circt::moore::RealType::getBitSize ( ) const
inline

Get the size of this type.

Definition at line 634 of file MooreTypes.h.

References getBitSize(), and getKind().

Referenced by getBitSize().

◆ getBitSize() [2/2]

unsigned RealType::getBitSize ( Kind  kind)
static

Get the size of one of the integer types.

Definition at line 554 of file MooreTypes.cpp.

References Real, RealTime, and ShortReal.

◆ getKeyword() [1/2]

StringRef circt::moore::RealType::getKeyword ( ) const
inline

Get the keyword (like bit) for this type.

Definition at line 632 of file MooreTypes.h.

References getKeyword(), and getKind().

Referenced by getKeyword().

◆ getKeyword() [2/2]

StringRef RealType::getKeyword ( Kind  kind)
static

Get the keyword (like bit) for one of the integer types.

Definition at line 542 of file MooreTypes.cpp.

References Real, RealTime, and ShortReal.

◆ getKind()

RealType::Kind RealType::getKind ( ) const

Get the concrete integer vector or atom type.

Definition at line 570 of file MooreTypes.cpp.

Referenced by getBitSize(), and getKeyword().

◆ getKindFromKeyword()

std::optional< RealType::Kind > RealType::getKindFromKeyword ( StringRef  keyword)
static

Get the integer type that corresponds to a keyword (like bit).

Definition at line 534 of file MooreTypes.cpp.

References Real, RealTime, and ShortReal.

Referenced by customTypeParser().

Member Data Documentation

◆ name

constexpr StringLiteral circt::moore::RealType::name = "moore.real"
staticconstexpr

Definition at line 636 of file MooreTypes.h.


The documentation for this class was generated from the following files: