You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: codegen/cpp/fletchgen/README.md
+50
Original file line number
Diff line number
Diff line change
@@ -94,6 +94,56 @@ your kernel implementation.
94
94
| fletcher_profile | true / false | false | If set to true, mark this field for profiling. The hardware streams resulting from this field will have a profiler attached to them. |
95
95
| fletcher_tag_width | 1 / 2 / 3 / ... | 1 | Width of the `tag` field of commands and unlock streams of RecordBatchReaders/Writers. Can be used to identify commands. |
96
96
97
+
# Custom MMIO registers
98
+
You can add custom MMIO registers to your kernel using `--reg`.
99
+
More information [can be found here](../../../docs/mmio.md).
100
+
101
+
# Custom external I/O
102
+
103
+
Sometimes, your kernel requires other I/O signals than just Arrow data streams
104
+
in and out, and MMIO registers. There may be some other type of data source or
105
+
sink in your design, there may be some platform-specific things you want to use,
106
+
or etcetera.
107
+
108
+
You can supply Fletchgen with a YAML file describing what signals you want to
109
+
draw between the kernel and the top-level. An example is shown below, where we
110
+
want to handshake completion from the platform top-level with a `req` and `ack`
111
+
bit.
112
+
113
+
```yaml
114
+
- record:
115
+
name: platform
116
+
fields:
117
+
- record:
118
+
name: complete
119
+
fields:
120
+
- field:
121
+
name: req
122
+
width: 1
123
+
- field:
124
+
name: ack
125
+
width: 1
126
+
reverse: true
127
+
```
128
+
129
+
This will result in the following signals appearing at the top-level:
130
+
```vhdl
131
+
ext_platform_complete_req : out std_logic;
132
+
ext_platform_complete_ack : in std_logic
133
+
```
134
+
135
+
* The signals are assumed to be driven by the kernel. To drive them from the top
136
+
level, use:
137
+
```yaml
138
+
reverse: true
139
+
```
140
+
141
+
* Fields with a width of 1 can be forced to be `std_logic_vector` instead of
142
+
`std_logic` by using:
143
+
```yaml
144
+
vector: true
145
+
```
146
+
97
147
# Further reading
98
148
99
149
You can generate a simulation top level and provide a Flatbuffer file with a
0 commit comments