15
15
#ifndef XLS_CODEGEN_CODEGEN_OPTIONS_H_
16
16
#define XLS_CODEGEN_CODEGEN_OPTIONS_H_
17
17
18
+ #include < cstdint>
18
19
#include < memory>
19
20
#include < optional>
20
21
#include < string>
21
22
#include < string_view>
22
23
#include < vector>
23
24
24
25
#include " absl/container/flat_hash_map.h"
26
+ #include " absl/types/span.h"
25
27
#include " xls/codegen/module_signature.pb.h"
26
28
#include " xls/codegen/op_override.h"
27
29
#include " xls/codegen/ram_configuration.h"
@@ -42,7 +44,7 @@ class CodegenOptions {
42
44
~CodegenOptions () = default ;
43
45
44
46
// Enum to describe how IO should be registered.
45
- enum class IOKind { kFlop = 0 , kSkidBuffer , kZeroLatencyBuffer };
47
+ enum class IOKind : uint8_t { kFlop = 0 , kSkidBuffer , kZeroLatencyBuffer };
46
48
47
49
// Convert IOKind enum to a string.
48
50
static std::string_view IOKindToString (IOKind kind);
@@ -71,7 +73,7 @@ class CodegenOptions {
71
73
// Name to use for the generated module. If not given, the name of the XLS
72
74
// function/proc is used.
73
75
CodegenOptions& module_name (std::string_view name);
74
- const std::optional<std::string_view> module_name () const {
76
+ std::optional<std::string_view> module_name () const {
75
77
return module_name_;
76
78
}
77
79
@@ -113,12 +115,12 @@ class CodegenOptions {
113
115
bool separate_lines () const { return separate_lines_; }
114
116
115
117
// Whether to flop inputs into a register at the beginning of the pipeline. If
116
- // true, adds a single cycle to the latency of the pipline .
118
+ // true, adds a single cycle to the latency of the pipeline .
117
119
CodegenOptions& flop_inputs (bool value);
118
120
bool flop_inputs () const { return flop_inputs_; }
119
121
120
122
// Whether to flop outputs into a register at the end of the pipeline. If
121
- // true, adds a single cycle to the latency of the pipline .
123
+ // true, adds a single cycle to the latency of the pipeline .
122
124
CodegenOptions& flop_outputs (bool value);
123
125
bool flop_outputs () const { return flop_outputs_; }
124
126
0 commit comments