Fletchgen
The Fletcher Design Generator
kernel.h
1 // Copyright 2018-2019 Delft University of Technology
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #pragma once
16 
17 #include <cerata/api.h>
18 #include <fletcher/common.h>
19 
20 #include <vector>
21 #include <string>
22 #include <memory>
23 
24 #include "fletchgen/schema.h"
25 #include "fletchgen/recordbatch.h"
26 
27 namespace fletchgen {
28 
29 using cerata::Port;
30 using cerata::Component;
31 
35 struct Kernel : Component {
37  explicit Kernel(std::string name,
38  const std::vector<std::shared_ptr<RecordBatch>> &recordbatches,
39  const std::shared_ptr<Component> &mmio);
40 };
41 
49 std::shared_ptr<Kernel> kernel(const std::string& name,
50  const std::vector<std::shared_ptr<RecordBatch>> &recordbatches,
51  const std::shared_ptr<Component> &mmio);
52 
53 } // namespace fletchgen
Contains all classes and functions related to Fletchgen.
Definition: array.cc:29
std::shared_ptr< Kernel > kernel(const std::string &name, const std::vector< std::shared_ptr< RecordBatch >> &recordbatches, const std::shared_ptr< Component > &mmio)
Make a kernel component based on RecordBatch and MMIO components.
Definition: kernel.cc:93
std::shared_ptr< Component > mmio(const std::vector< fletcher::RecordBatchDescription > &batches, const std::vector< MmioReg > &regs, Axi4LiteSpec axi_spec)
Generate the MMIO component for the nucleus.
Definition: mmio.cc:62
The Kernel component to be implemented by the user.
Definition: kernel.h:35
Kernel(std::string name, const std::vector< std::shared_ptr< RecordBatch >> &recordbatches, const std::shared_ptr< Component > &mmio)
Construct a new kernel.
Definition: kernel.cc:40