15 #include "cerata/vhdl/vhdl_types.h"
20 #include "cerata/vhdl/vhdl.h"
21 #include "cerata/type.h"
26 static std::shared_ptr<Type> result = std::make_shared<Bit>(
"valid");
27 result->meta[meta::EXPAND_TYPE] =
"valid";
32 static std::shared_ptr<Type> result = std::make_shared<Bit>(
"ready");
33 result->meta[meta::EXPAND_TYPE] =
"ready";
38 if (dir == Port::Dir::IN) {
46 if (dir == Port::Dir::IN) {
47 return Port::Dir::OUT;
53 std::vector<FlatType>
FilterForVHDL(
const std::vector<FlatType> &list) {
54 std::vector<FlatType> result;
55 for (
const auto &ft : list) {
58 if (!ft.type_->Is(Type::ID::RECORD)) {
70 return "(" +
top +
" downto " +
bottom +
")";